简体   繁体   English

ffmpeg 元数据副本(全部)

[英]ffmpeg metadata copy (all)

Hope you are having a wonderful day,希望你有一个美好的一天,

I come with question related to FFMPEG and copying metadata.我提出了与 FFMPEG 和复制元数据相关的问题。

So my output file got just some of metadata, but not all of them, even if my.txt contains them.所以我的 output 文件只得到了一些元数据,但不是全部,即使 my.txt 包含它们。

currently using -map_metadata 0:g as i read somewhere here it is supposed to copy everything.当前使用 -map_metadata 0:g ,因为我在这里读到它应该复制所有内容。 I tried few others but none are working.我尝试了其他几个,但没有一个工作。

I make everything in bat file so this is part of "for" loop:我在 bat 文件中制作所有内容,所以这是“for”循环的一部分:

ffmpeg -i "%%A" -f ffmetadata metadata.txt -f rawvideo -y NUL

and then接着

ffmpeg -i "%%A" -f ffmetadata -i metadata.txt -c copy -map_metadata 0:g -movflags +faststart "%output%\%%~nAtag.mov"

Now, I get from metadata title, author, but I do not get field "description".现在,我从元数据标题、作者那里得到,但我没有得到“描述”字段。 So not ALL the data is copied.因此,并非所有数据都被复制。 Do you know how to basically copy these metadata from file to another (absolutely all of them?您是否知道如何将这些元数据从文件复制到另一个文件(绝对是所有这些元数据?

PS -metadata description="TESTESTTEST" seems to work only on mp4 files, not mov files PS -metadata description="TESTESTTEST"似乎仅适用于 mp4 文件,不适用于 mov 文件

For mov & mp4 containers, custom tags can be written if -movflags use_metadata_tags is added.对于 mov & mp4 容器,如果添加了-movflags use_metadata_tags ,则可以编写自定义标签。
See Gyan answer见吉安回答

For a non-ffmpeg solution, exiftool can be used to copy metadata in MP4/Mov files with this command对于非 ffmpeg 解决方案, exiftool可用于使用此命令复制 MP4/Mov 文件中的元数据
exiftool -TagsFromFile source.mp4 -All:All target.mp4

Batch processing can be done with this command, assuming the files are the same name假设文件同名,可以使用此命令进行批处理
exiftool -TagsFromFile /path/to/sources/%F -All:All /path/to/targets/

These commands creates backup files.这些命令创建备份文件。 Add-overwrite_original to suppress the creation of backup files.添加-overwrite_original以禁止创建备份文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM