pyrisurfer
2nd July 2016, 14:08
I have got a few HDTV-recordings with 5.1 audio. With ffmpeg I am trying to copy the video stream to an mp4, while extracting the center channel of the ac3 and encoding that to aac and also mux it into the mp4.
Command line is the following:
ffmpeg -i "K:\Recording.ts" -vcodec copy -r 25 -ab 160k -filter_complex "channelmap=2:FC" -ac 1 "E:\Output.mp4"
However in some of the recordings, the 5.1 temorarily switches to 2.0 and then back to 5.1 or even has 2.0 audio for the first few seconds.
When trying to process such a file, I get the following error:
Input stream #0:3 frame changed from rate:48000 fmt:fltp ch:6 chl:5.1(side) to rate:48000 fmt:fltp ch:2 chl:stereo
[Parsed_channelmap_0 @ 0000000003ea0740] input channel #2 not available from input layout 'stereo'
[Parsed_channelmap_0 @ 0000000003ea0740] Failed to configure input pad on Parsed_channelmap_0
Error reinitializing filters!
[aac @ 00000000022d04a0] Qavg: 255.962
[aac @ 00000000022d04a0] 2 frames left in the queue on closing
Conversion failed!
Is there any way to force ffmpeg to ignore the errors and just fill the 2.0 segments with silence?
Command line is the following:
ffmpeg -i "K:\Recording.ts" -vcodec copy -r 25 -ab 160k -filter_complex "channelmap=2:FC" -ac 1 "E:\Output.mp4"
However in some of the recordings, the 5.1 temorarily switches to 2.0 and then back to 5.1 or even has 2.0 audio for the first few seconds.
When trying to process such a file, I get the following error:
Input stream #0:3 frame changed from rate:48000 fmt:fltp ch:6 chl:5.1(side) to rate:48000 fmt:fltp ch:2 chl:stereo
[Parsed_channelmap_0 @ 0000000003ea0740] input channel #2 not available from input layout 'stereo'
[Parsed_channelmap_0 @ 0000000003ea0740] Failed to configure input pad on Parsed_channelmap_0
Error reinitializing filters!
[aac @ 00000000022d04a0] Qavg: 255.962
[aac @ 00000000022d04a0] 2 frames left in the queue on closing
Conversion failed!
Is there any way to force ffmpeg to ignore the errors and just fill the 2.0 segments with silence?