Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#10397 closed enhancement (fixed)

Feature Request: Support for decoding RTV1 codec

Reported by: geegee Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by geegee)

Dear FFmpeg Development Team,

I am writing to request the addition of support for decoding videos encoded with the RTV1 codec in FFmpeg. RTV1 seems to be a special codec developed by the guys behind the RivaTuner/Afterburner software for recording gaming sessions and/or the screen in general.

I believe that adding support for decoding the RTV1 codec in FFmpeg would be a valuable feature for users like myself who have videos encoded with this codec and would like to convert them to other formats using the vast flexibility of FFMPEG, or just play them back with FFPLAY.

The codec itself gets installed by MSI Afterburner software, and it is placed in

"%ProgramFiles(x86)%\RivaTuner Statistics Server\Codec"

The filenames are:

rtvcvfw32.dll
rtvcvfw64.dll

Codec Description from MSI tooltip:

RTV1 compression - the video is being encoded in RivaTuner Video format
V1. RivaTuner Video Codec installation is required to play video encoded in
this format. RivaTuner Video format V1 is lossy compression format based
on hybrid of DXT1 and RLE compression algorithms with 6x or higher
compression ratio. RTV1 encoder is able to encode high resolution video at
high framerate without consuming too much CPU time, so this format is
recommended for the systems with single core or slow dual core CPUs.

Sample output analysis of a dummy RTV1 encoded file using FFPROBE:

>ffprobe -analyzeduration 100M -probesize 100M Quake_x64_steam_2023_06_03_01_59_35_084.mkv
ffprobe version 2023-05-04-git-4006c71d19-full_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58.  6.100 / 58.  6.100
  libavcodec     60. 10.100 / 60. 10.100
  libavformat    60.  5.100 / 60.  5.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  7.100 /  9.  7.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[matroska,webm @ 000001f6db173680] Unknown/unsupported AVCodecID V_MS/VFW/FOURCC.
[matroska,webm @ 000001f6db173680] Could not find codec parameters for stream 0 (Video: none (RTV1 / 0x31565452), none, 1920x1080): unknown codec
Consider increasing the value for the 'analyzeduration' (100000000) and 'probesize' (100000000) options
Input #0, matroska,webm, from 'Quake_x64_steam_2023_06_03_01_59_35_084.mkv':
  Metadata:
    title           : Quake_x64_steam_2023_06_03_01_59_35_084.mkv
    encoder         : RivaTuner media encoding library v1.39.0.0
    creation_time   : 2023-06-03T01:59:35.153000Z
  Duration: 00:00:15.03, start: 0.000000, bitrate: 391626 kb/s
  Stream #0:0(eng): Video: none (RTV1 / 0x31565452), none, 1920x1080, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 1k tbn (default)
  Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Unsupported codec with id 0 for input stream 0

Link to download the sample video and the codec DLLs:

https://mega.nz/folder/j9UklByL#UGECRD-W1P3gqv2na_GAmA

Thank you for considering my request.

Change History (9)

comment:1 by geegee, 11 months ago

Description: modified (diff)

comment:2 by geegee, 11 months ago

Description: modified (diff)

comment:3 by Elon Musk, 11 months ago

To make this a valid ticket provide at least one input video file with dlls of codec.

comment:4 by geegee, 11 months ago

Description: modified (diff)

in reply to:  3 comment:5 by geegee, 11 months ago

Replying to Elon Musk:

To make this a valid ticket provide at least one input video file with dlls of codec.

Thank you for the feedback. I've added a download link pointing to the DLL codec files and a sample video MKV using the RTV1 codec.

comment:6 by Elon Musk, 11 months ago

Do you have by any chance some video with big part of flat colors, best with fully black/single color?

in reply to:  6 comment:7 by geegee, 11 months ago

Replying to Elon Musk:

Do you have by any chance some video with big part of flat colors, best with fully black/single color?

Sure thing! I just added to the download folder a 2.91 seconds RTV1 video showing a fully black screen (recorded from ffplay displaying a black picture in fullscreen mode for the entirety of the video).

filename: ffplay_2023_06_03_16_59_27_797.mkv
download link: https://mega.nz/file/Wt0F1bpR#WlCGMYlOS_K23Q4wH5isOK7Oin6qsa2uyEAG3C5G3ro

>ffprobe -hide_banner ffplay_2023_06_03_16_59_27_797.mkv
[matroska,webm @ 000001bd298b76c0] Unknown/unsupported AVCodecID V_MS/VFW/FOURCC.
[matroska,webm @ 000001bd298b76c0] Could not find codec parameters for stream 0 (Video: none (RTV1 / 0x31565452), none, 1920x1080): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, matroska,webm, from 'ffplay_2023_06_03_16_59_27_797.mkv':
  Metadata:
    title           : ffplay_2023_06_03_16_59_27_797.mkv
    encoder         : RivaTuner media encoding library v1.39.0.0
    creation_time   : 2023-06-03T16:59:27.842000Z
  Duration: 00:00:02.91, start: 0.000000, bitrate: 1085 kb/s
  Stream #0:0(eng): Video: none (RTV1 / 0x31565452), none, 1920x1080, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 1k tbn (default)
  Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Unsupported codec with id 0 for input stream 0

comment:8 by Elon Musk, 11 months ago

Component: undeterminedavcodec
Resolution: fixed
Status: newclosed

in reply to:  8 comment:9 by geegee, 11 months ago

Replying to Elon Musk:

Added in f11515c77f0a2915b831d91f061fb11c4359601f

Absolutely amazing! Thank you so much!

Note: See TracTickets for help on using tickets.