gpt4 book ai didi

ffmpeg - ffprobe 使用小写或大写的格式标签

转载 作者:行者123 更新时间:2023-12-04 08:38:30 25 4
gpt4 key购买 nike

我试图了解 ffprobe 的行为关于对格式标签使用大写或小写约定。
以下是重现的步骤。从现有 MP4 电影创建 MP4、AVI 和 MKV 容器:

$ ffmpeg -y -i input.mp4 -c:a copy -c:v copy -metadata title="This is my title" -metadata date="1234" -metadata genre="erneg" output.mp4
$ ffmpeg -y -i input.mp4 -c:a copy -c:v copy -metadata title="This is my title" -metadata date="1234" -metadata genre="erneg" output.avi
$ ffmpeg -y -i input.mp4 -c:a copy -c:v copy -metadata title="This is my title" -metadata date="1234" -metadata genre="erneg" output.mkv
现在使用,要么
% ffprobe -v error -hide_banner -show_format -print_format json -i output.mp4
或者:
% ffprobe -v error -hide_banner -show_format -print_format json -i output.avi
我分别得到:
    "tags": {
"major_brand": "isom",
"minor_version": "512",
"compatible_brands": "isomiso2mp41",
"title": "This is my title",
"date": "1234",
"encoder": "Lavf58.20.100",
"genre": "erneg"
}
    "tags": {
"date": "1234",
"genre": "erneg",
"title": "This is my title",
"encoder": "Lavf58.20.100"
}
但是对于 MKV 容器,我得到了大写约定(' title '除外):
    "tags": {
"title": "This is my title",
"DATE": "1234",
"MAJOR_BRAND": "isom",
"MINOR_VERSION": "512",
"COMPATIBLE_BRANDS": "isomiso2mp41",
"GENRE": "erneg",
"ENCODER": "Lavf58.20.100"
}
ffprobe 中格式标签的小写和大写约定有什么区别? ?

作为引用,系统是 Debian/buster。
% ffmpeg -version 
ffmpeg version 4.1.6-1~deb10u1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100

最佳答案

ffprobe 中没有格式标签的约定.区别来自混合器:

The TagName SHOULD always be written in all capital letters and contain no space.


资料来源:Matroska Tagging
因此,简单标签将在生成的 mkv 中以大写形式写入。文件。 title在复用器中以不同方式处理并转换为 Title 元素。由于它没有保存为常规标签,它将显示为小写。
例如 mkvinfo揭示:
% mkvinfo /tmp/output.mkv
[...]
|+ Segment information
| + Timestamp scale: 1000000
| + Title: This is my title
[...]
|+ Tags
| + Tag
| + Targets
| + Simple
| + Name: MAJOR_BRAND
| + String: isom
| + Simple
| + Name: MINOR_VERSION
| + String: 512
| + Simple
| + Name: COMPATIBLE_BRANDS
| + String: isomiso2mp41
| + Simple
| + Name: GENRE
| + String: erneg
| + Simple
| + Name: DATE
| + String: 1234
| + Simple
| + Name: ENCODER
| + String: Lavf58.20.100
[...]

关于ffmpeg - ffprobe 使用小写或大写的格式标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64680677/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com