Log in

View Full Version : How to set audio track title in mp4 with ffmpeg


cool_snoopy
16th March 2015, 14:36
I used the following command
ffmpeg -i INPUT -c copy -metadata:s:a:0 title="name" OUTPUT.mp4
It didn't work
And I tried another command
ffmpeg -i VIDEO -i AUDIO -c:v copy -c:a copy -metadata:s:a:0 title="name" OUTPUT.mp4
It didn't workd either
But I tried to set audio track language
ffmpeg -i INPUT -c copy -metadata:s:a:0 language=jpn OUTPUT.mp4
It worked.
And if I used megui to mux and set audio track title, it worked
Is it possible to set audio track title in mp4 with ffmpeg?

Reino
22nd March 2015, 12:30
I may be wrong, but I've got a hunch the MP4-container doesn't support stream titles.
ffmpeg.exe -i in.mkv -c copy out.mp4...copies file-title and language-tag, but NOT stream-title (although ffmpeg tells you otherwise). MediaInfo and MPC-HC(LAV) don't show you any stream-titles. Not even when specifying manually:
ffmpeg.exe -i in.mkv -c copy -metadata:s:0 title="video stream" -metadata:s:1 title="audio stream" out.mp4A quote from 17 months ago, but if you've tested it with a recent ffmpeg version, I guess this still doesn't work.

Kurtnoise
23rd March 2015, 17:00
Try this...

ffmpeg -i input -c copy -metadata:s:a handler="Name of my Stream" output.mp4

Reino
23rd March 2015, 18:55
Undocumentend commands... great! Thanks though, Kurtnoise. It works.

nevcairiel
23rd March 2015, 19:11
Its not exactly undocumented, the problem is that mp4 doesn't have a "title" metadata .. so people abuse "handler" for that (both players and encoders equally, mine included)
Its more of a missing feature in mp4 than an undocumented feature of ffmpeg.