Oliver King
Oliver King

Reputation: 78

Can't save metadata when convert video files using python ffmpeg

I tried to us ffmpy library to convert .MOV files into .MP4. Converting works well, but I can't save metadata like title and artist.

ff = ffmpy.FFmpeg(
    inputs={'input.mov': None},
    outputs={'output.mp4': None},
    global_options=[
        '-metadata name=james',
        '-metadata artist=Beauty and Beast'
    ]
)

ff.run()

Upvotes: 4

Views: 500

Answers (1)

Oni
Oni

Reputation: 1153

You have to change output file options.

ff = ffmpy.FFmpeg(
    inputs={'input.mov': None},
    outputs={'output.mp4': [
        '-metadata', 'artist=james',
        '-metadata', 'title=Beauty and Beast'
    ]},
)

ff.run()

Upvotes: 2

Related Questions