question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am trying to find a way to add metadata to the output. Using ffmpeg from the command line I would use something like -metadata title="Title" . I couldn’t find anything relating to this in the ffmpeg-python docs. I tried a few different methods, using global_args and output kwargs and I wasn’t able to get it to work, usually getting an error like the following.

Unrecognized option 'metadata title="test title"
Error splitting the argument list: Option not found

Here’s an example of a full command using ffmpeg.

ffmpeg -i 1-00.30.mp4 -vcodec copy -acodec copy -scodec copy -metadata title="Sample Title" 1-00.30_copy.mp4

Any help would be appreciated.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

6reactions
Matttmancommented, Aug 19, 2018

I Solved it by using the output kwargs and using metadata=‘title=Example Title’.

title =' Example Title'
out = (
    ffmpeg
    .input(infile)
    .output(outfile, metadata='title=' + title)
)
3reactions
ianhomercommented, Mar 17, 2019

A little cleaner, it seems I can do … { 'metadata:g:0':"title=My Title", 'metadata:g:1':"artist=Me", 'metadata:g:2':"album=X", 'metadata:g:3':"year=2019", } which hopefully means I can add as many metadata items as I need. The index - 0,1,2,3 - seems to be just ignored my ffmpeg as they are all global metadata items, but at least give us unique key values in the dictionary object that the ffmpeg wrapper uses for building up the ffmpeg arguments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Add Metadata to Your Image Files - Artwork Archive
Add metadata on your PC · Right-click on the image and select “Properties” · In the window that appears, you can change the...
Read more >
Adding Metadata to Files and Using Presets
Adding Metadata to Files and Using Presets · In Manage mode, select one or more files in the File List pane. · In...
Read more >
How to View, Edit, and Add Metadata to a Photo - MakeUseOf
Right-click the image and select Properties. Select the Details tab. Add metadata to Description, Origin, Author, and so on. Photo ...
Read more >
Metadata: Where to find it, how to add it - Adobe
You can add metadata to any document in Illustrator®,. Photoshop®, or InDesign by choosing File > File Info. Here, title, description, keywords, and...
Read more >
Adding Metadata – Boston University Data Services
Why add Metadata? Metadata are important because it explains a data set to others. Data sets exist within a certain context, and this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found