[MEncoder-users] How concatenate several MPEG2 clips

Gennady Ovcharov henadzi.aucharou at vpi-minsk.com
Wed Nov 29 09:33:47 CET 2006


Hi Ladies and Gentlemen!

I want concatenate several MPEG2 clips in one MPEG2 file
mencoder version: MEncoder 1.0rc1-3.3.3

I prepared 10 clips as:
mencoder [1..10].avi -o [1..10].mpg \
    -vf softskip,scale=352:576,harddup,smartblur=0.3:1:0 \
    -of mpeg -mpegopts format=dvd -srate 48000 -af lavcresample=48000 
-ofps 25 \
    -ovc lavc -oac lavc \
    -lavcopts 
vcodec=mpeg2video:aspect=4/3:vrc_buf_size=1835:vrc_maxrate=9800:\
        
vbitrate=2000:keyint=15:acodec=ac3:abitrate=192:trell:mbd=2:dc=10:cbp:mv0:vstrict=1

... and make:
cat *.mpg | mencoder -of mpeg -ovc copy -oac copy -o ../big.mpg -

O-o-p-s :(

on stdout i see:
...
Pos:  14.7s    360f ( 0%)  0.00fps Trem:   0min   0mb  A-V:-0.069 [1108:192]
BUFFER UNDEFLOW at stream 0, raising muxrate to 1980 kb/s, delta_scr: 223418
BUFFER UNDEFLOW at stream 0, raising muxrate to 2178 kb/s, delta_scr: 203107
BUFFER UNDEFLOW at stream 1, raising muxrate to 2395 kb/s, delta_scr: 184643
Pos:  15.3s    375f ( 0%)  0.00fps Trem:   0min   0mb  A-V:-0.069 [1180:192]
ERROR: scr 15.069, dts 0.000, pts 14.960
ERROR: scr 15.172, dts 0.000, pts 15.024
ERROR: scr 15.260, dts 0.000, pts 15.120
BUFFER UNDEFLOW at stream 1, raising muxrate to 2635 kb/s, delta_scr: 167857
ERROR: scr 15.361, dts 0.000, pts 15.216
ERROR: scr 15.410, dts 15.240, pts 15.280
ERROR: scr 15.454, dts 0.000, pts 15.280
ERROR: scr 15.528, dts 0.000, pts 15.376
BUFFER UNDEFLOW at stream 1, raising muxrate to 2898 kb/s, delta_scr: 152597
ERROR: scr 15.597, dts 0.000, pts 15.472
ERROR: scr 15.636, dts 15.480, pts 15.520
Pos:  15.9s    390f ( 0%)  0.00fps Trem:   0min   0mb  A-V:-0.063 [1249:192]
...

In result I have big.mpg. On border between clips - boxing artifacts and 
disalignment A/V :(

I attempt
    cat *.mpg | mencoder -of mpeg -mpegopts -format=dvd -ovc copy -oac 
copy -o ../big.mpg -
and
    cat *.mpg | mencoder -of mpeg -ovc copy -oac copy -forceidx -o 
../big.mpg -

Wherein I not right?

Regards,

Gennady Ovcharov





More information about the MEncoder-users mailing list