[FFmpeg-user] Using -filter_complex instead of lavfi with amerge hangs.

Tim Nicholson nichot20 at yahoo.com
Tue Jun 26 13:59:53 CEST 2012


On 26/06/12 12:42, Tim Nicholson wrote:
> On 26/06/12 11:54, Nicolas George wrote:
>> Le nonidi 9 messidor, an CCXX, Tim Nicholson a écrit :
>>> Trying to update some scripts to use the new filter_complex syntax, but
>>> am finding it hangs the process....
>>>
>>> Original version to extract first 2 audio streams from a 4 stream file
>>> and convert to a single stereo stream:-
>>>
>>> ffmpeg -i LTA01631701.mxf -f lavfi -i "
>>> amovie=LTA01631701.mxf:si=1 , aconvert=s16:mono:planar [a1];
>>> amovie=LTA01631701.mxf:si=2 , aconvert=s16:mono:planar [a2];
>>> [a1][a2] amerge" -map 0:0 -map 1:0 \
>>> -c:v dvvideo -pix_fmt yuv420p \
>>> -c:a pcm_s16le -ar 48k -ac 2 \
>>> -t 10 -y ./LTA01631701-V1.mov
>>>
>>>
>>> This works fine however:-
>>>
>>> ffmpeg -i LTA01631701.mxf -map 0:0 -filter_complex "
>>> amovie=LTA01631701.mxf:si=1, aconvert=s16:mono:planar [a1];
>>> amovie=LTA01631701.mxf:si=2, aconvert=s16:mono:planar [a2];
>>> [a1] [a2] amerge" \
>>> -c:v dvvideo -pix_fmt yuv420p \
>>> -c:a pcm_s16le -ar 48k -ac 2 -t 10 -y ./LTA01631701-4-1.mov
>>>
>>> Hangs after producing the followng console output and has to be killed
>>> pressing q or <CTL> q or anything less than SIGKILL is ignored.
>>
>> -filter_complex is not just an alias for -f lavfi. It has inputs and
> 
> I understand that.
> 
>> outputs. Yours has no inputs. Since ffmpeg's streams are currently
> 
> I do not understand that, as I thought that
> 
> "amovie=LTA01631701.mxf:si=1, aconvert=s16:mono:planar [a1]"
> 
> defined an input and assigned it to pad a1. Having extra sources in a
> filtergraph is not uncommon, take the overlay filter for example, so
> expecting the use of amovie to define a source is not unreasonable in
> this circumstance, although possibly not the best way to do it.

And incidentally worked perfectly on another test file I was using....


-- 
Tim




More information about the ffmpeg-user mailing list