[FFmpeg-user] Changing MKV files to MP4 files

Mike Brown brown at mrvideo.vidiot.com
Tue May 7 11:22:53 CEST 2013


I'm trying to rewrap MKV H.264 files, with AC3 or AAC audio, to MP4 files.

Here is what I did, and the result:

##########
BRN <13> ffmpeg -i videofile.mkv -vcodec copy -acodec copy videofile.mp4
FFmpeg version 0.6.2-rpmfusion, Copyright (c) 2000-2010 the FFmpeg developers
  built on Apr 12 2011 16:45:34 with gcc 4.5.1 20100924 (Red Hat 4.5.1-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --extra-version=rpmfusion --enable-bzlib --enable-libdc1394 --enable-libdirac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[matroska @ 0x10dc670]Unknown entry 0xF0
    Last message repeated 1062 times
[matroska @ 0x10dc670]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5994/125) -> 23.98 (24000/1001)
Input #0, matroska, from 'videofile.mkv':
  Metadata:
    doctype         : matroska
  Duration: 00:43:11.20, start: 0.000000, bitrate: 384 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Output #0, mp4, to 'videofile.mp4':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0(eng): Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 1k tbn, 1k tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, 384 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[mp4 @ 0x116a520]st:0 error, non monotone timestamps 83 >= 42
av_interleaved_write_frame(): Operation not permitted
##########

I have no clue as to why that didn't work.  If I remove the -vcodec, then
the job will progress, but the video is recoded, which I do not want.

Pointers are appreciated.

Thanks.

MNB
-- 
e-mail: vidiot at vidiot.com | vidiot at vidiot.net            /~\ The ASCII
        6082066843 at email.uscc.net (140 char limit)       \ / Ribbon Campaign
Visit - URL: http://vidiot.com/                           X  Against
             http://vidiot.net/                          / \ HTML Email
"Take your hand off your tool, Marco!" - Det. Beckett - Castle - 10/08/12


More information about the ffmpeg-user mailing list