Project

General

Profile

Unable to postprocessing recorded mkvs (HD)

Added by B. J. over 10 years ago

Hi all,

I'ts unable to postprocessing every recorded mkv-file (e.g demux/remux etc). All tools for demuxing mkv fails (Windows and Linux too). Here's what i get if i try a remux using ffmpeg (Linux):

Aufnahmen$ ffmpeg -i Survival\ of\ the\ Dead.mkv -vcodec copy -acodec copy videoaudio.ts
FFmpeg version git-N-29155-g14360e0, Copyright (c) 2000-2011 the FFmpeg developers
  built on Apr 17 2011 12:23:32 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
  libavutil    50. 40. 1 / 50. 40. 1
  libavcodec   52.119. 1 / 52.119. 1
  libavformat  52.108. 0 / 52.108. 0
  libavdevice  52.  4. 0 / 52.  4. 0
  libavfilter   1. 79. 0 /  1. 79. 0
  libswscale    0. 13. 0 /  0. 13. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[h264 @ 0x9a30da0] mmco: unref short failure
    Last message repeated 1 times
[matroska,webm @ 0x9a06600] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) -> 50.00 (50/1)
Input #0, matroska,webm, from 'Survival of the Dead.mkv':
  Metadata:
    title           : Survival of the Dead
    DATE_BROADCASTED: 2011-04-15 20:15:00
    ORIGINAL_MEDIA_TYPE: TV
    CONTENT_TYPE    : Movie / Drama
    TVCHANNEL       : Sky Cinema HD
    SUMMARY         : Horrorfilm
  Duration: 01:40:26.80, start: 0.000000, bitrate: 768 kb/s
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 fps, 50 tbr, 1k tbn, 50 tbc (default)
    Stream #0.1(deu): Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s (default)
    Stream #0.2(eng): Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s (default)
File 'videoaudio.ts' already exists. Overwrite ? [y/N] y
[mpegts @ 0x9a2f6c0] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'videoaudio.ts':
  Metadata:
    title           : Survival of the Dead
    DATE_BROADCASTED: 2011-04-15 20:15:00
    ORIGINAL_MEDIA_TYPE: TV
    CONTENT_TYPE    : Movie / Drama
    TVCHANNEL       : Sky Cinema HD
    SUMMARY         : Horrorfilm
    encoder         : Lavf52.108.0
    Stream #0.0(eng): Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=2-31, 90k tbn, 25 tbc (default)
    Stream #0.1(deu): Audio: ac3, 48000 Hz, stereo, 384 kb/s (default)
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpegts @ 0x9a2f6c0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 2538000 >= 2530800
av_interleaved_write_frame(): Invalid data found when processing input

XBMC can play this files couriously. After a few seconds of garbage (artifacts, blocks) at the start these files are handled correct by XBMC. If I try to extract the videopart only (ffmpeg) i get this message for all (!) frames untill to the end:

Command is: ffmpeg -i myRecordedStream.mkv -vcodec copy -f h264 -an output.h264

[h264 @ 0x93b5270] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 7621200 >= 7619400

Replies (2)

RE: Unable to postprocessing recorded mkvs (HD) - Added by B. J. over 10 years ago

I've found out, that the process of re-/demuxing SD-recordings from tvheadend are working fine without problems. So this must be an issue with HD-recordings and/or h264. Anywhere else?

RE: Unable to postprocessing recorded mkvs (HD) - Added by Andreas Smas over 10 years ago

Birger Jesch wrote:

I've found out, that the process of re-/demuxing SD-recordings from tvheadend are working fine without problems. So this must be an issue with HD-recordings and/or h264. Anywhere else?

The problem is this

  • Matroska does not include a DTS (Decoding Time Stamp) for each frame (or packet)
  • ffmpeg needs a DTS when it remultiplexes a file (for some reason), thus it just makes something up and this does not work for h264 content.
    (1-2/2)