VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. 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)
    Quote Quote  
  2. 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
    Quote Quote  
  3. 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
    Image Attached Files
    Quote Quote  
  4. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Why can ffmpeg not produce correct and playable *.avi videos?
    Because sometimes it does the job well, and sometimes it doesn't

    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
    If possible, I recommend you remux your MKVs to AVIs via VirtualDub's "Direct Stream Copy" (requires the Matroska input plugin). In this way, you can be sure the resulting AVIs will be 100-per-cent *compliant with the specs* Which OTOH, may mean nothing to programs like VLC
    Quote Quote  
  5. Ok, thank you.

    How do I manually specify the framerate at the cmdline?
    Quote Quote  
  6. Originally Posted by pxstein View Post

    How do I manually specify the framerate at the cmdline?
    -r

    (29.97, 25, 50, etc.)
    Quote Quote  
  7. Ok, thank you. But want to come back to my initial question:

    Why can't such an advanced tool as ffmpeg not simply re-package a *.mkv to *.avi WITHOUT modifying the parameters?

    Is there really no automatic simple way?
    Quote Quote  
  8. Is there really no automatic simple way?
    The problem is that:
    Code:
    Frame rate                               : 50.000 fps
    Original frame rate                      : 25.000 fps
    means that the video stream frame rate of the raw stream is 25fps and the video stream rate of the container is 50fps, without any help ffmpeg is not sure is it should use the video frame rate of the video stream itself or the frame rate of the container.
    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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!