[FFmpeg-user] Problems at converting and splitting a MPEG file
Francesco Turco
fturco at fastmail.fm
Sun Aug 26 20:18:55 CEST 2012
Hello.
I'm trying to convert an MPEG file to the WebM format. Besides changing
format, I'm also applying the Yadif deinterlacer and copying the right
audio channel to the left, but this message is for a problem at
splitting the original MPEG file into two consecutive WebM files.
This is what my script contains:
ffmpeg -i '48.mpeg' -pass 1 -f webm -deadline good -cpu-used 0 -b:v
1500k -vf yadif=0:0:0 -t 00:08:16.960 -an -y '/dev/null'
ffmpeg -i '48.mpeg' -pass 2 -f webm -deadline good -cpu-used 0 -b:v
1500k -vf yadif=0:0:0 -t 00:08:16.960 -b:a 128k -ac 2 -map_channel 0.1.1
-map_channel 0.1.1 '48-a.webm'
rm -f ffmpeg2pass*
ffmpeg -i '48.mpeg' -pass 1 -f webm -deadline good -cpu-used 0 -b:v
1500k -vf yadif=0:0:0 -ss 00:08:17.800 -an -y '/dev/null'
ffmpeg -i '48.mpeg' -pass 2 -f webm -deadline good -cpu-used 0 -b:v
1500k -vf yadif=0:0:0 -ss 00:08:17.800 -b:a 128k -ac 2 -map_channel
0.1.1 -map_channel 0.1.1 '48-b.webm'
rm -f ffmpeg2pass*
I took the timecodes by opening the MPEG file with Avidemux, since I
don't know a better way to do that.
The first output file (48-a.webm) seems to be OK, but the second output
file (48-b.webm) starts too early, perhaps by a couple of frames, and so
it has unwanted content in it.
In Avidemux, the 00:08:17.800 position is not a keyframe, but it is a
B-frame. I don't know if this is a problem.
I also don't know if the following (red) warning message I get at the
beginning of the process is the reason of my problem:
[mpeg2video @ 0x101d560] warning: first frame is no keyframe
The original MPEG file (48.mpeg) was produced by using Avidemux, and I'm
sure to have cut at key frames.
Thank you.
More information about the ffmpeg-user
mailing list