I have a video packaged in a *.mkv container. I used ffmpeg to re-package it into an *.avi container with the following command:
ffmpeg -i mymovie.mkv -acodec copy -vcodec copy mymovie.avi
The conversion works in the sense that ffmpeg accepts and processes the command.
However when I want to play the resulting movie in one of the famous video players like
VLC 2.1 or Potplayer
then only audio can be heard. No video output can be seen.
MediaInfo tool shows the following codecs in the *.mkv video (see bottom of this post).
Why can ffmpeg not produce correct and playable *.avi videos?
Yes, I know MKV is the better format but I want to have AVI for this case.
FFmpeg claims to be able to do this job.
Whats wrong?
Thank you
MediaInfo output (for input video):
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 29mn
Bit rate : 776 Kbps
Width : 720 pixels
Height : 298 pixels
Display aspect ratio : 2.40:1
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.145
Stream size : 497 MiB (66%)
Writing library : x264 core 138 r2358 9e941d1
Encoding settings : cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Default : Yes
Forced : No
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 : 1h 29mn
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 : 246 MiB (32%)
Language : German
Default : Yes
Forced : N
MediaInfo output (for resulting video in *.avi):
Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : H264
Duration : 1h 29mn
Bit rate : 798 Kbps
Width : 720 pixels
Height : 298 pixels
Display aspect ratio : 2.40:1
Frame rate : 50.000 fps
Original frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.074
Stream size : 511 MiB (67%)
Writing library : x264 core 138 r2358 9e941d1
Encoding settings : cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=19.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Audio
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : 00001000-0000-0020-8000-00AA00389B71
Duration : 1h 29mn
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 : 246 MiB (32%)
Interleave, duration : 32 ms (1.60 video frames)
+ Reply to Thread
Results 1 to 8 of 8
-
-
Probably has to do with something specific to your files , since it works here on many players
Might be the dimensions (mod2) - height is 298 causing problems with the AVI splitter / decoding pathway -
Nope, I can't reproduce your issue even with those dimensions. Must be something specific either to your files or versions of players (VLC runs independent of system installed codecs/splitters - so you might try another version)
298.mkv is the source test file
298_copy.avi is the copied version into AVI container using ffmpeg
I didn't use the same encoding settings or audio configuration, but that shouldn't affect it -
Why can ffmpeg not produce correct and playable *.avi videos?
For example, sometimes you DON'T need to specify the correct framerate for the output, but this time you should have specified it:
Code:Frame rate : 50.000 fps Original frame rate : 25.000 fps
Which OTOH, may mean nothing to programs like VLC
-
Is there really no automatic simple way?
Code:Frame rate : 50.000 fps Original frame rate : 25.000 fps
So instead of blindly using one and risking that the user does not get what he/she wants, it complains.
-> tools with 'advanced' options need 'advanced' users
Similar Threads
-
MKV guide, Play MKV, MKV to AVI, MKV to DVD, MKV to MP4, MKV to Blu-ray
By Baldrick in forum Newbie / General discussionsReplies: 55Last Post: 29th Jun 2012, 11:19 -
MKV Audio + AVI Video to avi using ffmpeg?
By kwanbis in forum Video ConversionReplies: 9Last Post: 15th Apr 2012, 20:45 -
How to play MKV, MKV to AVI, MKV to DVD, MKV to Xbox 360 or Playstation 3
By Baldrick in forum Video ConversionReplies: 2Last Post: 8th Mar 2012, 02:45 -
Cant get ffmpeg X to work
By mac1234 in forum ffmpegX general discussionReplies: 1Last Post: 16th Sep 2010, 22:47 -
convert avi to dvd with ffmpeg doesn't work-why?
By lilly333 in forum ffmpegX general discussionReplies: 21Last Post: 18th Mar 2009, 16:00