How to play RAW video recorded using Afterburner?

Discussion in 'MSI AfterBurner Application Development Forum' started by BGR, Jan 17, 2021.

  1. BGR

    BGR New Member

    Messages:
    6
    Likes Received:
    0
    GPU:
    RX 580 4GB
    I recorded my gameplay using RAW setting in MSI Afterburner. The file extension is .mkv. But neither do MPC, nor VLC player can open it. VLC informs me that the codec is BGR. I have googled it, but virtually no information is available. I tried importing video into Premiere Pro, but it was not recognized. Any ideas?
     
  2. KissSh0t

    KissSh0t Ancient Guru

    Messages:
    8,622
    Likes Received:
    2,607
    GPU:
    ASUS RX 470 Strix
    Would Shark Codec Pack work? I've used Shark since Windows XP days.

    https://shark007.net/index.html

    Do the advanced one, then at the bottom "Get the latest release here", not the portable one above it, the installer.
     
  3. BGR

    BGR New Member

    Messages:
    6
    Likes Received:
    0
    GPU:
    RX 580 4GB
    I installed your suggested codec. But still no luck opening video file. I analyzed the video file though via integrated tool and the output has the following:
    Format : RGB
    Codec ID : V_UNCOMPRESSED
    Codec ID/Info : Raw uncompressed video frames
     
  4. Astyanax

    Astyanax Ancient Guru

    Messages:
    9,531
    Likes Received:
    3,328
    GPU:
    GTX 1080ti
    change container to avi
     

  5. BGR

    BGR New Member

    Messages:
    6
    Likes Received:
    0
    GPU:
    RX 580 4GB
    I used Movavi converter to convert to AVI. The converted video now can be played, but it's both flipped and mirrored. I think I should try another converter. Does anyone have any recommendation?
     
    Last edited: Jan 18, 2021
  6. boogieman

    boogieman Ancient Guru

    Messages:
    1,955
    Likes Received:
    23
    GPU:
    MSI GTX 1080X
    My VLC player can play mkv. Search for the plugin to VLC that makes it work.
     
  7. BGR

    BGR New Member

    Messages:
    6
    Likes Received:
    0
    GPU:
    RX 580 4GB
    My VLC player can play all MKV files except this Raw video.
     
  8. Andy_K

    Andy_K Master Guru

    Messages:
    580
    Likes Received:
    98
    GPU:
    MSI GTX 960 OC
    ffmpeg -i "recorded.avi" -vf "hflip, vflip" -c:v rawvideo -c:a copy "flipped.avi"

    don't know why you selected raw (uncompressed) as MSI AB but if it is for not loss of detail, there are lossless vfw codecs (Lagarith, HuffYUV, YUVsoft, zoe-lossless-codec, etc.) which serve you way better than uncompressed/raw files. Download and install them, in MSI AB select VFW compression, then click on the button on the right with the three dots to select the installed codec.
    Most of these codecs come as 32bit not as 64bit version, therefor in RTSS you need to make sure to select "Enable dedicated encoder service: 32-bit" or disable the option at all. Do not select 64bit encoder server!
    But do enable "64bit applications support"
     
    Last edited: Jan 18, 2021
  9. BGR

    BGR New Member

    Messages:
    6
    Likes Received:
    0
    GPU:
    RX 580 4GB
    I tried converting my MKV file using ffmpeg and the final output contains the following message:
    [matroska @ 0000026938745bc0] Raw RGB is not supported Natively in Matroska, you can use AVI or NUT or
    If you would like to store it anyway using VFW mode, enable allow_raw_vfw (-allow_raw_vfw 1)
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Error initializing output stream 0:0 --
    Conversion failed!​
    The problem is that Movavi does not convert MKV to AVI without conversion of the video stream to AVC. I downloaded Free MKV to AVI converter 1.9 and selected in Output file format/Video Settings "Copy original video stream." But that failed too.
     
  10. Astyanax

    Astyanax Ancient Guru

    Messages:
    9,531
    Likes Received:
    3,328
    GPU:
    GTX 1080ti
    Use mkvtoolnix to extract the video and sound and another software to recombine them in an avi container.

    @Unwinder it seems like a problematic idea to allow the combination of uncompressed and mkv, i don't believe ffmpeg or lav actually support it outside of vfw.
     

  11. Andy_K

    Andy_K Master Guru

    Messages:
    580
    Likes Received:
    98
    GPU:
    MSI GTX 960 OC

    hmmm this reads like you wanted to write a mkv file as output and not an avi file. Be sure to end the filename with .avi and if you have spaces in the filename include it in quotes "converted output file.avi"

    I just recorded uncompressed video in mkv container.
    Then opened a command prompt (in windows terminal, but that's irrelevant) and here is the command I used with all the generated output:
    Code:
    C:\Users\andyk\Videos\Bigdata\Captures>ffmpeg -i rawvideo.mkv -vf "hflip, vflip" -c:v rawvideo -c:a copy "flipped.avi"
    ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
      built with gcc 10.2.1 (GCC) 20200805
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
      libavutil      56. 58.100 / 56. 58.100
      libavcodec     58.101.101 / 58.101.101
      libavformat    58. 51.101 / 58. 51.101
      libavdevice    58. 11.101 / 58. 11.101
      libavfilter     7. 87.100 /  7. 87.100
      libswscale      5.  8.100 /  5.  8.100
      libswresample   3.  8.100 /  3.  8.100
      libpostproc    55.  8.100 / 55.  8.100
    Input #0, matroska,webm, from 'rawvideo.mkv':
      Metadata:
        title           : Desktop_2021_01_19_14_52_13_250.mkv
        encoder         : RivaTuner media encoding library v1.38.0.0
        creation_time   : 2021-01-19T14:52:13.326000Z
      Duration: 00:00:05.09, start: 0.000000, bitrate: 373998 kb/s
        Stream #0:0(eng): Video: rawvideo (BGR[24] / 0x18524742), bgr24, 960x540, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
    Press [q] to stop, [?] for help
    Output #0, avi, to 'flipped.avi':
      Metadata:
        INAM            : Desktop_2021_01_19_14_52_13_250.mkv
        ISFT            : Lavf58.51.101
        Stream #0:0(eng): Video: rawvideo, bgr24, 960x540 [SAR 1:1 DAR 16:9], q=2-31, 373248 kb/s, 30 fps, 30 tbn, 30 tbc (default)
        Metadata:
          encoder         : Lavc58.101.101 rawvideo
    frame=  153 fps= 51 q=-0.0 Lsize=  232401kB time=00:00:05.13 bitrate=370875.7kbits/s speed= 1.7x
    video:232369kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.013851%
    
    C:\Users\andyk\Videos\Bigdata\Captures>
    The output video is flipped horizontal and vertical (or to say rotated by 180°) and perfectly playable (VLC and MPC-HC).

    PS:
    There is also a way to store h.264 lossless.
    I tested this with a ~9s video 1080p@60fps captured in the racing sim Assetto Corsa Competizione, which is uncompressed about 1.58GB on disk.
    converted it with ffmpeg:
    Code:
    ffmpeg -i rawvideo2.mkv -vf "hflip, vflip" -c:v libx264 -crf 0 -c:a copy "flipped2.avi"
    the option "-crf 0" denotes lossless compression and still does a great job of writing a file with 244MB only.
    I converted it with a normal "good" quality at "-crf 22" and it outputs a video file with 21.5MB

    So even using x264 with crf 0 gives you a huge advantage for the video file. The file size is way less, the footage is still lossless and it plays in every media player and video editor I know.

    PPS: My raw video files are not flipped, only the converted ones are, because I used the options to flip them. I don't know why this is the case for you.
     
    Last edited: Jan 19, 2021
  12. BGR

    BGR New Member

    Messages:
    6
    Likes Received:
    0
    GPU:
    RX 580 4GB
    Before I saw your post, I had found Free MKV to AVI Converter 1.9. I selected H.264 video codec, entered 40000 kbit/s bitrate for Blu-Ray like quality and had to flip only vertically.

    Thank you for your post. But I had to flip only vertically when I converted just to AVI using ffmpeg. When I converted to lossless H.64, I had to flip video only horizontally.
     

Share This Page