Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: avconv MKV->MP4 "pts < dts in stream 0" error

  1. #1
    Join Date
    Mar 2013
    Beans
    7

    avconv MKV->MP4 "pts < dts in stream 0" error

    Hello -

    I'm trying to remux an MKV file to MP4 using the following command:

    Code:
    avconv -i file.mkv -c:v copy -c:a copy file.mp4
    avconv fails with the following output:

    Code:
    [matroska,webm @ 0x133ef60] max_analyze_duration reached
    [matroska,webm @ 0x133ef60] Estimating duration from bitrate, this may be inaccurate
    Input #0, matroska,webm, from 'file.mkv':
      Duration: 00:42:33.66, start: 0.000000, bitrate: 384 kb/s
        Stream #0.0(eng): Video: h264 (High), yuv420p, 1280x718 [PAR 1:1 DAR 640:359], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
        Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s (default)
        Stream #0.2: Subtitle: [0][0][0][0] / 0x0000 (default)
    Output #0, mp4, to 'The Americans S01E07.mp4':
      Metadata:
        encoder         : Lavf53.21.1
        Stream #0.0(eng): Video: ![0][0][0] / 0x0021, yuv420p, 1280x718 [PAR 1:1 DAR 640:359], q=2-31, 1k tbn, 1k tbc (default)
        Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, 384 kb/s (default)
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (copy)
    Press ctrl-c to stop encoding
    [mp4 @ 0x1479120] pts < dts in stream 0
    av_interleaved_write_frame(): Invalid argument
    Any suggestions on how to fix this error?

    Thanks in advance for any help.


    mediainfo output is as follows:
    Code:
    GeneralUnique ID                                : 249517535331217033373395087239106118949 (0xBBB7544CA36DD4ADA32E867FF689C525)
    Complete name                            : file.mkv
    Format                                   : Matroska
    Format version                           : Version 4 / Version 2
    File size                                : 1.35 GiB
    Duration                                 : 42mn 33s
    Overall bit rate                         : 4 543 Kbps
    Encoded date                             : UTC 2013-03-15 04:07:30
    Writing application                      : mkvmerge v6.1.0 ('Old Devil') built on Mar  2 2013 14:32:37
    Writing library                          : libebml v1.3.0 + libmatroska v1.4.0
    
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3.1
    Format settings, CABAC                   : No
    Format settings, ReFrames                : 2 frames
    Codec ID                                 : V_MPEG4/ISO/AVC
    Duration                                 : 42mn 33s
    Bit rate                                 : 4 069 Kbps
    Width                                    : 1 280 pixels
    Height                                   : 718 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 23.976 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.185
    Stream size                              : 1.21 GiB (90%)
    Language                                 : English
    Default                                  : Yes
    Forced                                   : No
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    
    
    Audio
    ID                                       : 2
    Format                                   : AC-3
    Format/Info                              : Audio Coding 3
    Mode extension                           : CM (complete main)
    Format settings, Endianness              : Big
    Codec ID                                 : A_AC3
    Duration                                 : 42mn 33s
    Bit rate mode                            : Constant
    Bit rate                                 : 384 Kbps
    Channel(s)                               : 6 channels
    Channel positions                        : Front: L C R, Side: L R, LFE
    Sampling rate                            : 48.0 KHz
    Bit depth                                : 16 bits
    Compression mode                         : Lossy
    Stream size                              : 117 MiB (8%)
    Language                                 : English
    Default                                  : Yes
    Forced                                   : No
    
    
    Text
    ID                                       : 3
    Format                                   : UTF-8
    Codec ID                                 : S_TEXT/UTF8
    Codec ID/Info                            : UTF-8 Plain Text
    Default                                  : Yes
    Forced                                   : No
    Last edited by gravey; April 1st, 2013 at 11:52 PM.

  2. #2
    Join Date
    Mar 2013
    Beans
    7

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    Bump

  3. #3
    Join Date
    Mar 2013
    Beans
    7

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    .
    Last edited by gravey; April 1st, 2013 at 11:39 PM. Reason: post deleted

  4. #4
    Join Date
    Dec 2006
    Beans
    7,029

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    Have you updated your copy of avconv to the latest git?
    You think that's air you're breathing now?

  5. #5
    Join Date
    Mar 2013
    Beans
    7

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    Appears I'm up to date, as there are no upgrades available via apt.

    avconv -version gives me:
    Code:
    0.8.5-6:0.8.5-0ubuntu0.12.10.1
    I do see there's a version 9 available on git. What's the best way to go about upgrading since apt is showing that I'm up to date?

  6. #6
    Join Date
    Dec 2006
    Beans
    7,029

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    I have to admit that I don't follow avconv I use FFmpeg. This can be updated easily enough:

    https://ffmpeg.org/trac/ffmpeg/wiki/...mpilationGuide

    and this might be the best way to get a more recent copy that with any luck will not have the bug in your existing copy.
    You think that's air you're breathing now?

  7. #7
    Join Date
    Mar 2013
    Beans
    7

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    Thanks for the pointer. I went ahead and updated avconv to version 9.4, built from git.

    Using the same command and file as in my original post, I'm now getting a similar but slightly more descriptive error:
    Code:
    [mp4 @ 0x20b2020] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 83 >= 42
    av_interleaved_write_frame(): Invalid argument

  8. #8
    Join Date
    Dec 2006
    Beans
    7,029

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    Hmmm... this may be fixed in FFmpeg:

    http://ffmpeg.org/trac/ffmpeg/ticket/1154
    You think that's air you're breathing now?

  9. #9
    Join Date
    Mar 2013
    Beans
    7

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    Andrew - good call. I compiled FFmpeg from git with the instructions above, and the problem appears to be fixed. Guess I'll be sticking with FFmpeg over avconv.

    Appreciate the help!

  10. #10
    Join Date
    Dec 2006
    Beans
    7,029

    Re: avconv MKV->MP4 "pts < dts in stream 0" error

    Great news
    You think that's air you're breathing now?

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •