[libav-bugs] [Bug 516] New: "avconv -i f.mpg -codec copy f.mkv" fails, even with "-fflags genpts"

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Thu May 16 19:48:25 CEST 2013


https://bugzilla.libav.org/show_bug.cgi?id=516

           Summary: "avconv -i f.mpg -codec copy f.mkv" fails, even with
                    "-fflags genpts"
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: general
        AssignedTo: bugzilla at libav.org
        ReportedBy: nikoli at lavabit.com


Bug is not fixed in "avconv version v9-1280-g4dbceaa", ffmpeg works fine with
"-fflags genpts"

Dump some dvd with any mplayer:
$ mpv dvd:// -dvd-device /path/to/dvd/ --stream-dump /tmp/pp.mpg

Try remuxing mpg file to mkv:

$ time avconv -i /tmp/pp.mpg -codec copy /tmp/pp1.mkv
avconv version 9.5, Copyright (c) 2000-2013 the Libav developers
  built on Apr 23 2013 03:11:22 with gcc 4.6.3 (Gentoo Hardened 4.6.3 p1.11,
pie-0.5.2)
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mpeg, from '/tmp/pp.mpg':
  Duration: 00:22:53.43, start: 0.063322, bitrate: 8654 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 16:15
DAR 4:3], 7000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
Output #0, matroska, to '/tmp/pp1.mkv':
  Metadata:
    encoder         : Lavf54.20.3
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3],
q=2-31, 7000 kb/s, 1k tbn, 90k tbc
    Stream #0.1: Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press ctrl-c to stop encoding
[matroska @ 0x42b75a4d00] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument

real    0m0.038s
user    0m0.027s
sys     0m0.010s

$ time avconv -fflags genpts -i /tmp/pp.mpg -codec copy /tmp/pp1.mkv
avconv version 9.5, Copyright (c) 2000-2013 the Libav developers
  built on Apr 23 2013 03:11:22 with gcc 4.6.3 (Gentoo Hardened 4.6.3 p1.11,
pie-0.5.2)
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mpeg, from '/tmp/pp.mpg':
  Duration: 00:22:53.43, start: 0.063322, bitrate: 8654 kb/s
    Stream #0.0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [PAR 16:15
DAR 4:3], 7000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
Output #0, matroska, to '/tmp/pp1.mkv':
  Metadata:
    encoder         : Lavf54.20.3
    Stream #0.0: Video: mpeg2video, yuv420p, 720x576 [PAR 16:15 DAR 4:3],
q=2-31, 7000 kb/s, 1k tbn, 90k tbc
    Stream #0.1: Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press ctrl-c to stop encoding
Can't write packet with unknown timestamp1kB time=1220.70 bitrate=8543.4kbits/s
av_interleaved_write_frame(): Invalid argument

real    0m2.296s


$ time ffmpeg -i /tmp/pp.mpg -codec copy /tmp/pp2.mkv
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 11 2013 20:20:15 with gcc 4.6.3 (Gentoo Hardened 4.6.3 p1.11,
pie-0.5.2)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc
--cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar
--optflags='-march=corei7-avx -O2 -pipe' --extra-cflags='-march=corei7-avx -O2
-pipe' --extra-cxxflags='-march=corei7-avx -O2 -pipe' --disable-static
--enable-gpl --enable-postproc --enable-avfilter --enable-avresample
--disable-stripping --enable-version3 --enable-nonfree --disable-indev=oss
--disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib
--disable-runtime-cpudetect --disable-debug --disable-doc --enable-gnutls
--enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl
--enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libmp3lame
--disable-libfdk-aac --disable-libaacplus --enable-libfaac --enable-libtheora
--disable-libtwolame --enable-libx264 --enable-libxvid --enable-libcdio
--disable-libiec61883 --di  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mpeg, from '/tmp/pp.mpg':
  Duration: 00:22:53.43, start: 0.063322, bitrate: 8654 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 16:15
DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
Output #0, matroska, to '/tmp/pp2.mkv':
  Metadata:
    encoder         : Lavf54.63.104
    Stream #0:0: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 720x576 [SAR
16:15 DAR 4:3], q=2-31, 25 fps, 1k tbn, 90k tbc
    Stream #0:1: Audio: pcm_s16be ([255][255][255][255] / 0xFFFFFFFF), 48000
Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x72489f60c0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument

real    0m0.094s
user    0m0.072s
sys     0m0.021s

$ time ffmpeg -fflags genpts -i /tmp/pp.mpg -codec copy /tmp/pp2.mkv
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 11 2013 20:20:15 with gcc 4.6.3 (Gentoo Hardened 4.6.3 p1.11,
pie-0.5.2)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc
--cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar
--optflags='-march=corei7-avx -O2 -pipe' --extra-cflags='-march=corei7-avx -O2
-pipe' --extra-cxxflags='-march=corei7-avx -O2 -pipe' --disable-static
--enable-gpl --enable-postproc --enable-avfilter --enable-avresample
--disable-stripping --enable-version3 --enable-nonfree --disable-indev=oss
--disable-indev=jack --disable-outdev=oss --enable-version3 --enable-bzlib
--disable-runtime-cpudetect --disable-debug --disable-doc --enable-gnutls
--enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl
--enable-ffplay --disable-vaapi --disable-vdpau --enable-zlib
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libmp3lame
--disable-libfdk-aac --disable-libaacplus --enable-libfaac --enable-libtheora
--disable-libtwolame --enable-libx264 --enable-libxvid --enable-libcdio
--disable-libiec61883 --di  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mpeg, from '/tmp/pp.mpg':
  Duration: 00:22:53.43, start: 0.063322, bitrate: 8654 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 16:15
DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
File '/tmp/pp2.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to '/tmp/pp2.mkv':
  Metadata:
    encoder         : Lavf54.63.104
    Stream #0:0: Video: mpeg2video (mpg2 / 0x3267706D), yuv420p, 720x576 [SAR
16:15 DAR 4:3], q=2-31, 25 fps, 1k tbn, 90k tbc
    Stream #0:1: Audio: pcm_s16be ([255][255][255][255] / 0xFFFFFFFF), 48000
Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=34336 fps=13929 q=-1.0 Lsize= 1432370kB time=00:22:53.44
bitrate=8543.5kbits/s
video:1173586kB audio:257520kB subtitle:0 global headers:0kB muxing overhead
0.088321%

real    0m3.868s
user    0m1.761s
sys     0m0.745s

-- 
Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list