Documentation teaches how to embed metadata using an FFMETADATA file as input. Its basically ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
On ffmpeg-python would be like this:
original = ffmpeg.input("file.mov")
metadata = ffmpeg.input("file.ffmetadata")
muxer=ffmpeg.output(
original,
metadata,
"output.mov",
acodec='copy',
vcodec='copy',
movflags='faststart+use_metadata_tags',
map_metadata=1,
**ffmpegFlags
)
But this will fail because ffmpeg-python will add a -map 1 parameter here for the ffmetadata input. FFmpeg will complain and fail because input #1 doesn't have streams.
To fix this, ffmpeg-python must not add a -map 1 parameter if input is an FFMETADATA text file. These files must have .ffmetadata extension in order to ffmpeg command to recognize their format, so ffmpeg-python should decide to not add -map 1 based on such file name.
Meanwhile I would appreciate some advice on how to overcome current limitation and use ffmetadata files somehow.
Thank you in advance.
Documentation teaches how to embed metadata using an FFMETADATA file as input. Its basically
ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUTOn ffmpeg-python would be like this:
But this will fail because ffmpeg-python will add a
-map 1parameter here for the ffmetadata input. FFmpeg will complain and fail because input #1 doesn't have streams.To fix this, ffmpeg-python must not add a
-map 1parameter if input is an FFMETADATA text file. These files must have.ffmetadataextension in order to ffmpeg command to recognize their format, so ffmpeg-python should decide to not add-map 1based on such file name.Meanwhile I would appreciate some advice on how to overcome current limitation and use ffmetadata files somehow.
Thank you in advance.