[FFmpeg-devel] [PATCH] ffmpeg_opt: Allow program metadata other than title to be set.

Vittorio Gambaletta (VittGam) ffmpeg-dev at vittgam.net
Sun Jan 24 16:03:30 CET 2016


On 24/01/2016 12:33:51 CET, Michael Niedermayer wrote:
> On Sun, Jan 24, 2016 at 05:23:22AM +0100, Vittorio Gambaletta (VittGam) wrote:
>> This commit makes it possible to add optional metadata (such as "service_provider") to an mpegts output stream composed by multiple programs (mpts).
>> This is needed because the global metadata is not inherited by the single programs.
>> Signed-off-by: Vittorio Gambaletta <ffmpeg-dev at vittgam.net>
>> ---
>>  ffmpeg_opt.c |   10 +++-------
>>  1 file changed, 3 insertions(+), 7 deletions(-)
> with this change the whole namespace except "st"/"program_num" would
> be used for metadata. This might be a problem in the future if we
> want to add some non metadata key/value

What would you suggest then? I have two ideas:

1. Move the 'process manually set programs' block above 'process
    manually set metadata' and have it handle `-metadata:p:<program_id>`
2. Use a prefix: `-program st=0:st=1:metadata=service_provider=HelloWorld`
3. Change mpegtsenc to look for global metadata if program metadata
    is not present

The first is probably cleaner.


More information about the ffmpeg-devel mailing list