Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

Ability to reference input properties

Suggestions and feature requests, whislists, etc.

Ability to reference input properties

Postby mulvya » Thu Dec 10, 2015 3:44 pm

This is a feature request for ffmpeg to have the ability to reference input properties like codec, container, dimensions, duration..etc. Often the output properties bear some relation to input properties and adding the requested ability to ffmpeg will allow to bypass a ffprobe/grep multi-command-chain.

Here is a mock command example to illustrate their use.

Code: Select all
ffmpeg -i file.ext -i file2.ext2 -t len(0:a) -s trunc(dim(1:v:1)/2) -c:v codec(1:v:1) -other_filter_or_parameters -f type(0) output


Here -c:v codec(1:v:1) evaluates the codec of the 2nd video stream in the 2nd input and sets that as the output encoder.

-t len(0:a) encodes till the output reaches the duration of 0:a:0

-s trunc(dim(1:v:1)/2) sets the size to half of the 2nd video stream in the 2nd input

-f type(0) sets the f flag to the same format as the 1st input. Useful in cases like MXF where there are variants and extension isn't unique.
mulvya
 
Posts: 566
Joined: Mon Oct 26, 2015 6:58 am

Re: Ability to reference input properties

Postby llogan » Fri Dec 11, 2015 3:04 am

Feature requests should be directed to the FFmpeg Bug Tracker (but search first in-case there is already one), or submit a patch implementing this to the ffmpeg-devel mailing list.

The FFmpeg Development section of this forum should probably be removed.
Get an answer more quickly by providing your actual ffmpeg command and the complete console output. Use the code button to format your command and output or your question will be ignored.
llogan
 
Posts: 2339
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: Ability to reference input properties

Postby mulvya » Fri Dec 11, 2015 4:52 am

Done. Thanks.
mulvya
 
Posts: 566
Joined: Mon Oct 26, 2015 6:58 am


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests