Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to convert a ogg video to mp4 or mkv, but different errors appear.

I have two streams (from the same source) that I captured. They are in an ogg container.

If I try to convert them to mkv with ffmpeg -i stream.ogg -c copy -map 0 stream.mkv, this error message appears:

ffmpeg version 0.10.7 Copyright (c) 2000-2013 the FFmpeg developers
  built on May 14 2013 21:35:02 with gcc 4.7.2 20120921 (Red Hat 4.7.2-2)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib --mandir=/usr/share/man --arch=i686 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --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/lib --cpu=i686 --enable-runtime-cpudetect
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
[ogg @ 0x8685b00] Estimating duration from bitrate, this may be inaccurate
Input #0, ogg, from 'stream.ogg':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: theora, yuv420p, 640x480 [SAR 1:1 DAR 4:3], 8 fps, 8 tbr, 8 tbn, 8 tbc
    Stream #0:1: Audio: flac, 48000 Hz, 1 channels, s16
    Metadata:
      ENCODER         : Lavf53.32.100
Output #0, matroska, to '/dev/shm/stream.mkv':
  Metadata:
    encoder         : Lavf53.32.100
    Stream #0:0: Video: theora (theo / 0x6F656874), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 8 fps, 1k tbn, 8 tbc
    Stream #0:1: Audio: flac ([172][241][0][0] / 0xF1AC), 48000 Hz, 1 channels
    Metadata:
      ENCODER         : Lavf53.32.100
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x8835880] Application provided invalid, non monotonically increasing dts to muxer in stream 1: 1440 >= 1440
av_interleaved_write_frame(): Invalid argument

And if I try to convert them to mp4 with ffmpeg -i stream.ogg -c copy -map 0 stream.mp4, this error message appears:

track 0: could not find tag, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?)

The files can be played with mplayer and ffplay. They contain one video and one audio stream:

$ ffmpeg -i stream.ogg
[ogg @ 0x85a9b00] Estimating duration from bitrate, this may be inaccurate
Input #0, ogg, from 'stream.ogg':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: theora, yuv420p, 640x480 [SAR 1:1 DAR 4:3], 8 fps, 8 tbr, 8 tbn, 8 tbc
    Stream #0:1: Audio: flac, 48000 Hz, 1 channels, s16
    Metadata:
      ENCODER         : Lavf53.32.100

When I play the files with VLC I get two warnings and two errors (in red), but the files play:

TagLib: Vorbis::File::read() - Could not find the Vorbis comment header.
TagLib: Vorbis::File::read() - Could not find the Vorbis comment header.
[0xb71029c0] ogg demux error: Got invalid packet, read 62187 of 63676: OggS
[0xb6d00618] main input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !

What is the problem with the files? Is there a way to convert the files, e.g. telling ffmpeg to ignore the errors? It would be no problem to skip the first or last seconds of the video if that would solve the problem.

share|improve this question
    
Please don't truncate the output. Post the full ffmpeg log of oyur first command. The second one doesn't work because MP4 containers do not support Theora video, and you're just copying the video bitstream when you use -c copy. –  slhck Mar 1 at 8:19
    
@slhck♦ Ok, I have now added the rest of the output. Does it help? –  erik Mar 1 at 9:21

1 Answer 1

And the answer is:

  • mp4 containers do not support theora video (thank you slhck)
  • with a recent nightly build it just works

For the future: Always try the nightly build, if it doesn’t work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.