ffmpeg-python
ffmpeg-python copied to clipboard
Can't set multiple metadata values
I believe I found an issue where the metadata key doesn't allow multiple values. You can find the supported metadata keys for movs HERE
This code works to store a single value of any of the linked metadata keys.
stream = ffmpeg.input(in_file)
stream = ffmpeg.output(
stream,
out_file,
vcodec="h264",
f="mov",
pix_fmt="yuv420p",
metadata="author=Nightingale"
)
stream = ffmpeg.overwrite_output(stream)
ffmpeg.run(stream)
But adding more than one metadata value doesn't work. In fact, the entire string is added as a single metadata value.
stream = ffmpeg.input(in_file)
stream = ffmpeg.output(
stream,
out_file,
vcodec="h264",
f="mov",
pix_fmt="yuv420p",
metadata="author=Nightingale show=MyShow"
)
stream = ffmpeg.overwrite_output(stream)
ffmpeg.run(stream)
Any ideas?

Hi! I couldn't even add one metadata let alone multiple. This should definitely be a feature.
Here is the code that I tried.
process = (
ffmpeg
.input('pipe:', format='rawvideo', s='{}x{}'.format(width, height))
.output("test_out.mkv", r='30/1', metadata='author=Nightingale')
.overwrite_output()
.run_async(pipe_stdin=True)
)
process.communicate(input=video_buffer)
I'd be glad if you had any suggestions.
I'm having the same issue. I tried the solution described in this issue; however only the first metadata argument actually works.
For example, when I run this line:
ffmpeg.output(aud, vid, output_title, **{'metadata:g:0':'title=mytitle', 'metadata:g:1':'subtitle=mysubtitle'})
The first piece of metadata (title) is set, but the second (subtitle) is ignored completely. I've tried this with different types of metadata, and the result is the same: only the first one works.
I'm having the same issue
same issue
Looks like #112 might be the solution.