Adding metadata
Author: AzazelHDCreated May 24, 2022Updated Sep 2, 2025
Hi guys. Just a little question. I know u can pass **metadata_dict as argument to set multiple metadata as u stated before, but why the keyword metadata isnt needed?
def test(src, dst, **kwargs):
(
ffmpeg
.input(src).audio
.output(f'{dst}.mp3', **kwargs)
.overwrite_output()
.run()
)With this small function, im trying to call it like this:
test("song.mp3", "Test1", map_metadata=-1, metadata={'metadata:g:0': f'title=hello', 'metadata:g:1': f'date=2000'})
But it is not working. However, if i remove the metadata keyword and i call it like:
test("song.mp3", "Test1", map_metadata=-1, **{'metadata:g:0': f'title=hello', 'metadata:g:1': f'date=2000'})
It works.
Can someone explain me please?
Source: kkroening/ffmpeg-python