Opened 3 months ago

Last modified 3 months ago

#7460 new enhancement

ffmpeg output filename

Reported by: user243 Owned by:
Priority: wish Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Is there a way to append the metadata info from the input to the output filename?

Change History (7)

comment:1 Changed 3 months ago by llogan

  • Priority changed from normal to wish

This is too vague. Please give an example of what you would like to do.

comment:2 Changed 3 months ago by user243

For example, I have “service_provider=some provider” information in the metadata of input ts. I would like this information (service_provider) to be incorporated in the output file name.

It would be great if there is a functionality to incorporate any metadata info from the input ts file to the output filename.

comment:3 Changed 3 months ago by user243

Example - if the input file is "hello.ts" and the metadata "service_provider=some provider", then the output file name needs to be - "hello_some provider.ts"

comment:4 Changed 3 months ago by Gyan

Not implemented. Barring some muxers, like image2, or hls/segment..etc, ffmpeg does not preprcoess the output filename.

comment:5 Changed 3 months ago by llogan

You can already do this by using ffprobe and simple scripting to name the output file. ffprobe example to get service_provider:

ffprobe -loglevel error -show_entries program_tags=service_provider -of csv=p=0 file.ts

Given this simple alternative solution, and because I've never seen other users ask for this, I have my doubts that anyone will implement this feature request. However, feel free to submit a patch that implements this if you are technically inclined, or you can always post a bounty or sponsor the implementation.

comment:6 Changed 3 months ago by user243

@llogan - I already tried the ffprobe and scripting method using the below command but the issue I am having is that my input files is MPTS, and with the command I am still getting the service name of all the programs on output rather than the program number I select.

ffprobe -loglevel error -show_programs -select_streams p:1 -show_entries program_tags=service_provider input.ts
Last edited 3 months ago by user243 (previous) (diff)

comment:7 Changed 3 months ago by llogan

This is straying into a new feature request. I recommend you open a new ticket to address the lack of ability (AFAIK) of ffprobe to output info only for selected programs.

Note: See TracTickets for help on using tickets.