[FFmpeg-user] Please can someone tell me why this ffmpeg command stopped working

Paul Gardiner lists at glidos.net
Sat Jan 28 18:11:40 CET 2012


On 28/01/2012 16:49, Reindl Harald wrote:
>
>
> Am 28.01.2012 17:33, schrieb Paul Gardiner:
>> On 28/01/2012 16:24, Paul Gardiner wrote:
>>> On 28/01/2012 16:10, Reindl Harald wrote:
>>>>
>>>>
>>>> Am 28.01.2012 16:53, schrieb Paul Gardiner:
>>>>> Can anybody see what is wrong with this:
>>>>>
>>>>> /usr/bin/ffmpeg -f ac3 -ar 48000 -i /tmp/mythar4336/audout -f
>>>>> rawvideo -top 1 -pix_fmt yuv420p -s 1440x1088 -r 25
>>>>> -i /tmp/mythar4336/vidout -threads 2 -vf
>>>>> crop=1440:1080:0:0,scale=1280:720 -vcodec libx264 -preset medium -crf
>>>>> 20.0
>>>>> -bufsize 25000k -maxrate 20000k -aspect 16:9 -acodec copy -f mp4
>>>>> /home/public/video/Archive/Horizon - Playing God.mp4
>>>>>
>>>>> Until a recent ffmpeg update, it used to do exactly what I wanted, but
>>>>> now it produces the error message: "Option sample_rate not found." I've
>>>>> googled and found various references to people having to make sure
>>>>> arguments are in the right order with later versions of ffmpeg, but
>>>>> my command seems to obey the rules, plus attempts I have made to reorder
>>>>> have not helped.
>>>>
>>>> "-f ac3 -ar 48000 -i"
>>>>
>>>> why is "-ar" BEFORE the input file?
>>>> in this case you set the parameter for the input instead the output
>>>
>>> My thinking was that the input was 48kHz and I needed to tell ffmpeg
>>> that information about the input. I guess that's showing my
>>> misunderstanding about how it works.
>
> i would say ffmpeg is knowing more about the input file as you and i will
> ever be able and there may be only very few cases where it needs help
>
> the output should specifuied so exactly as possible if you nedd videos
> palying in iPhone as example to make sure they are H264 BASELINE but
> not the input (use the ffmpeg output to see what is really is *gg*)
>
>>> Off to try the alteration now.
>>
>> Brilliant! It worked. I am again able to transcode my TV recordings.
>> I guess I should also move the "-r 25" from before the second input-file argument. Is that right?
>
> it is quite simple, all parameters before any file are taken as
> params for exactly this one

Yes that's completely plain from the documentation, but did you get
my point that I didn't know whether -ar 48000 should be used to
tell ffmpeg the sample rate of the input file I was supplying or
whether it should be used to tell ffmpeg the sample rate I wanted
in the output file. I know now of course with your help.

Cheers,
	Paul.


More information about the ffmpeg-user mailing list