[FFmpeg-devel] [PATCH] Add -fpre option.

Ramiro Polla ramiro.polla
Mon Nov 2 15:00:56 CET 2009


On Mon, Nov 2, 2009 at 9:39 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Nov 02, 2009 at 12:30:53PM +0100, Michael Niedermayer wrote:
>> On Sun, Nov 01, 2009 at 10:53:37PM -0200, Ramiro Polla wrote:
>> > msg7668 in issue659 spots another case where the preset files won't
>> > open a valid path. Also "../" doesn't work for example. Attached patch
>> > makes it the user's job to pass -fpre to open a preset file and FFmpeg
>> > will just pass it on to open().
>>
>> your hack makes it impossible to specify different preset files
>> for audio and video, that worked before ...
>> also it complicates the interface

'a', 'v', 's' are only used to write the codec name to the filename,
and when specifying 'f' that seemed unnecessary.

>> is there a reason why open() is not always tried if all else fails?

patch attached opt_preset_1.diff

Although I prefer the other way around (try open() and if that fails
snprintf() the filename)

> or alternatively check for some prefix char and strip that from the
> name to detect filenames or -fpre / fapre (audio) / fvpre (video) ...

patch attached opt_preset_2.diff but that makes no difference at the
moment from my first patch. This way I can do:
ffmpeg -i input -vcodec libx264 -fapre some_libx264_preset.ffpreset output

Is there any reason we separate [avs]pre besides to get the codec name
to snprintf() into the filename? opt_preset() also allows specifying
[avs]codec so a preset file could really change any codec and
parameter...

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt_preset_1.diff
Type: application/octet-stream
Size: 424 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091102/318ae2ba/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt_preset_2.diff
Type: application/octet-stream
Size: 1778 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091102/318ae2ba/attachment-0001.obj>



More information about the ffmpeg-devel mailing list