Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

*Found a way to get it running: If I run avconv -i input.mkv output.mp4 without -codec copy nor -c:v copy -c:a copy not even -vcodec copy -acodec copy it finally runs. BUT IT STILL LOST ITS FRAME ACCURACY. *

STILL HAVE NO IDEA ON HOW TO CHANGE ITS CONTAINER FROM MATROSKA TO MP4 WITHOUT LOSING FRAME ACCURACY

During the conversion with avconv, some reference frames were discarded.

[h264 @ 0x9e8ff60] number of reference frames (0+7) exceeds max (5; probably corrupt input), discarding one about twenty of this showed out in red text

Is this the cause of frame rate loss?


I have a few question to ask. I am trying to convert a .mkv to a .mp4 container. I tried avidemux with safe mode but it causes losing of frame accuracy.

After failing that attempt, I tried directly to the terminal with avconv -i input.mkv -codec copy output.mp4 (because ffmpeg is no longer maintained by Ubuntu) and got [mp4 @ 0x98db600] pts < dts in stream 0 av_interleaved_write_frame(): Invalid argument.

I got the same [mp4 @ 0x98db600] pts < dts in stream 0 av_interleaved_write_frame(): Invalid argument by running avconv -i input.mkv -c:v copy -c:a copy output.mp4 and also avconv -i input.mkv -vcodec copy -acodec copy output.mp4.

What does the error mean?

and

How can I successfully convert .mkv to .mp4 without losing frame accuracy?

mediainfo input.mkv
General
Unique ID                                : 229726914608851741830163651885517877558 (0xACD3CB5CFDD310DC95B47155A575B136)
Complete name                            : input.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 3.16 GiB
Duration                                 : 1h 35mn
Overall bit rate                         : 4 717 Kbps
Encoded date                             : UTC 2013-08-28 20:45:51
Writing application                      : mkvmerge v5.8.0 ('No Sleep / Pillow') built on Sep  2 2012 15:37:04
Writing library                          : libebml v1.2.3 + libmatroska v1.3.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1h 35mn
Width                                    : 1 916 pixels
Height                                   : 812 pixels
Display aspect ratio                     : 2.35:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : A_AAC
Duration                                 : 1h 35mn
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : 945ms
Language                                 : English
Default                                  : Yes
Forced                                   : No
share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.