[英]get specific metadata with ffprobe
I'm having a terrible time getting one single line of metadata from ffprobe.我很难从 ffprobe 获取一行元数据。
I'm running this command:我正在运行这个命令:
ffprobe -show_entries 'stream_tags: format_tags=com.apple.quicktime.creationdate' -loglevel error IMG_9931.MOV
ffprobe -show_entries 'stream_tags: format_tags=com.apple.quicktime.creationdate' -loglevel error IMG_9931.MOV
And I get this output我得到了这个 output
[STREAM]
[溪流]
TAG:creation_time=2022-05-14T20:24:55.000000Z
标签:creation_time=2022-05-14T20:24:55.000000Z
TAG:language=und
标签:语言=und
TAG:handler_name=Core Media Video
TAG:handler_name=核心媒体视频
TAG:encoder=H.264
标签:编码器=H.264
[/STREAM]
[/溪流]
[STREAM]
[溪流]
TAG:creation_time=2022-05-14T20:24:55.000000Z
标签:creation_time=2022-05-14T20:24:55.000000Z
TAG:language=und
标签:语言=und
TAG:handler_name=Core Media Audio
TAG:handler_name=核心媒体音频
[/STREAM]
[/溪流]
[STREAM]
[溪流]
TAG:creation_time=2022-05-14T20:24:55.000000Z
标签:creation_time=2022-05-14T20:24:55.000000Z
TAG:language=und
标签:语言=und
TAG:handler_name=Core Media Metadata
TAG:handler_name=核心媒体元数据
[/STREAM]
[/溪流]
[STREAM]
[溪流]
TAG:creation_time=2022-05-14T20:24:55.000000Z
标签:creation_time=2022-05-14T20:24:55.000000Z
TAG:language=und
标签:语言=und
TAG:handler_name=Core Media Metadata
TAG:handler_name=核心媒体元数据
[/STREAM]
[/溪流]
[STREAM]
[溪流]
TAG:creation_time=2022-05-14T20:24:55.000000Z
标签:creation_time=2022-05-14T20:24:55.000000Z
TAG:language=und
标签:语言=und
TAG:handler_name=Core Media Metadata
TAG:handler_name=核心媒体元数据
[/STREAM]
[/溪流]
[FORMAT]
[格式]
TAG:com.apple.quicktime.creationdate=2022-05-14T16:24:55-0400
标签:com.apple.quicktime.creationdate=2022-05-14T16:24:55-0400
[/FORMAT]
[/格式]
But the only thing I want returned is但我唯一想要退货的是
com.apple.quicktime.creationdate=2022-05-14T16:24:55-0400
com.apple.quicktime.creationdate=2022-05-14T16:24:55-0400
I've searched and searched but I can't find any examples of pulling a single specific value of metadata.我进行了搜索和搜索,但找不到任何提取单个特定元数据值的示例。
In actuality, I really just want the value of com.apple.quicktime.creationdate... ie "2022-05-14T16:24:55-0400"实际上,我真的只是想要 com.apple.quicktime.creationdate 的值...即“2022-05-14T16:24:55-0400”
I know I can grep and awk my way through it, but it seems like there should be a way to do it with ffprobe alone given all of the options it has.我知道我可以通过它 grep 和 awk ,但似乎应该有一种方法可以单独使用 ffprobe ,因为它具有所有选项。 I just can't figure out how.
我只是不知道怎么做。
How can I do this?我怎样才能做到这一点? Any help would be appreciated.
任何帮助,将不胜感激。
have you tried你有没有尝试过
ffprobe -show_entries format_tags=com.apple.quicktime.creationdate -i file.mov
@OP: no idea why the tags are still showing up for u @OP:不知道为什么标签仍然显示给你
ffprobe -v 0 -show_entries format -i'………/mnetMSTR_MV_00137_1.mp4' -of default
=nk=0:nw=0
ffprobe -v 0 -show_entries format -i'………/mnetMSTR_MV_00137_1.mp4' -of default
=nk=0:nw=0
[FORMAT]
filename=………/mnetMSTR_MV_00137_1.mp4
nb_streams=4
nb_programs=0
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV
start_time=0.000000
duration=241.984000
size=77126839
bit_rate=2549816
probe_score=100
TAG:major_brand=isom
TAG:minor_version=512
TAG:compatible_brands=isomiso2avc1mp41
TAG:title=Passion (mnet-137) 384p
TAG:artist=Koyote 코요태 KYT✜ 高耀太
TAG:album=2000 ▸ Passion
TAG:date=2000
TAG:encoder=Lavf58.45.100
TAG:comment=mnet MV ▸ 137 ▸ 4:02·b2906·g0102 ▸ master mp4
trk 2 : aac 384k, vol normalized :
loudnorm=-11:7:-2:-11.49:5.30:1.59:-21.74:0.71:true:true:summary
trk 4 : orig aac, preserved losslessly
TAG:genre=Kpop
TAG:lyrics=It's on and bump it
It's on and bump it
It's on and bump it
get ready to ride yeah!
It's on and bump it baby
come on and bump it baby
It's on and bump it baby
come on and bump it baby
people in the house lets go
아련히 기억에 멀어지던
너를 다시 볼수 있어 행복했었어
하지만 나 멀리서 너만을
하염없이 보고 말았지
once i flip those 2 to -of default=nk=1:nw=1
- everything gone except the raw values themselves一旦我将这 2 个翻转为
-of default=nk=1:nw=1
- 除了原始值本身之外,一切都消失了
(there's no way in heck I could manage 40,000 MVs and 9900 songs with proper metadata for all without awk
) (在没有
awk
的情况下,我不可能管理 40,000 首 MV 和 9900 首歌曲,并为所有人提供适当的元数据)
filename=………/mnetMSTR_MV_00137_1.mp4
4
0
mov,mp4,m4a,3gp,3g2,mj2
QuickTime / MOV
0.000000
241.984000
77126839
2549816
100
isom
512
isomiso2avc1mp41
Passion (mnet-137) 384p
Koyote 코요태 KYT✜ 高耀太
2000 ▸ Passion
2000
Lavf58.45.100
mnet MV ▸ 137 ▸ 4:02·b2906·g0102 ▸ master mp4
trk 2 : aac 384k, vol normalized :
loudnorm=-11:7:-2:-11.49:5.30:1.59:-21.74:0.71:true:true:summary
trk 4 : orig aac, preserved losslessly
Kpop
It's on and bump it
It's on and bump it
It's on and bump it
get ready to ride yeah!
It's on and bump it baby
come on and bump it baby
It's on and bump it baby
come on and bump it baby
people in the house lets go
아련히 기억에 멀어지던
너를 다시 볼수 있어 행복했었어
하지만 나 멀리서 너만을
하염없이 보고 말았지
========== ==========
ffprobe version 5.1 Copyright (c) 2007-2022 the FFmpeg developers
built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1-with-options_1 …..
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.