Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
17th July 2019, 09:14 | #1 | Link |
Registered User
Join Date: Feb 2009
Location: USA
Posts: 676
|
SVT-VP9 Framerate??
I've been playing with some compiled binaries my friend managed to find for me. But I'm having trouble with setting the proper FPS.
if I specify -fps-num 24000 -fps-denom 1001 it will output a file with 23.98 fps which ffmpeg does not like. If I just tell it 24, ffmpeg will take it, but then the audio from the original source will be off by 1 second (source clip is 10 minutes, video file comes out to 9m59s) Is it just not supported at this point, or is this some bug I have to wait for them to fix... Can I rescale the "FPS/duration" of the audio in ffmpeg as a compromise? What is the proper way to go about doing that? edit: Maybe a misunderstanding on my part. When I dump the input mkv file to YUV with ffmpeg it seems to want to assign it the 23.98 fps at that point. I can't seem to get it to play nice in that regard Last edited by osgZach; 18th July 2019 at 00:37. |
22nd July 2019, 23:01 | #2 | Link | |||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
Quote:
Quote:
|
|||
24th July 2019, 18:31 | #3 | Link |
Registered User
Join Date: Feb 2009
Location: USA
Posts: 676
|
Yes, I always specified the FPS when importing the YUV. I was unaware it would take Y4M, so I may try going that route.
I think at some point I even tried throwing a framerate declaration on the YUV file during creation as well. basically if I create a YUV file it'll come out as 23.98 fps. SVT will encode it as 23.98fps if I specify framerate as 24000/1001 IIRC At that point I cannot get the IVF file muxed into a webm because ffmpeg would throw an error IIRC about invalid framerate. I tried using mkvtoolnix (through the provided GUI) and it would always error out as well but not really give info on why it failed. I have only been able to successfully mux a file encoded by SVT when the framerate was a solid 23 or 24 fps. ----- it's my day off, so I will prepare and do some more tests and post my workflow here so i can provide a better and more accurate picture. |
24th July 2019, 19:37 | #4 | Link |
Registered User
Join Date: Feb 2009
Location: USA
Posts: 676
|
I produced a Y4M with ffmpeg 4.1.3
The original source file chain was an MKV dump of one of my Lord of The Rings discs, which I cut into a 10 minute chunk of video (-ss -to )for testing purposes with various encoding schemes. I further cut that chunk into a 1 minute chunk (-to) when I realized how huge a 10 minute YUV file was going to be. Code:
ffmpeg -i LOTR-Test.mkv -an -to 00:01:00 "D:\SVT-VP9\LOTR-Test.y4m ---- Input #0, yuv4mpegpipe, from 'LOTR-Test.y4m': Duration: 00:01:00.02, start: 0.000000, bitrate: 596601 kb/s Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc Code:
PS D:\SVT-VP9> ./SvtVp9EncApp.exe -i LOTR-Test.y4m -w 1920 -h 1080 -fps-num 24000 -fps-denom 1001 -b LOTR-Test.ivf ------------------------------------- SVT-VP9 Encoder v0.1.0 SVT [version] : SVT-VP9 Encoder Lib v0.1.0 SVT [build] : Visual Studio 2017 64 bit LIB Build date: May 24 2019 06:41:37 ------------------------------------------- Number of logical cores available: 12 Number of PPCS 30 ------------------------------------------- SVT [config]: Profile [0] Level (auto) SVT [config]: EncoderMode / Tune : 9 / 1 SVT [config]: EncoderBitDepth : 8 SVT [config]: SourceWidth / SourceHeight : 1920 / 1080 SVT [config]: Fps_Numerator / Fps_Denominator / Gop Size / IntraRefreshType : 24000 / 1001 / 16 / 1 SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure : 4 / 0 / 2 SVT [config]: BRC Mode / QP : CQP / 45 ------------------------------------------- Encoding 1439 SUMMARY --------------------------------- Channel 1 -------------------------------- Total Frames Frame Rate Byte Count Bitrate 1439 23.98 fps 8787768 1171.35 kbps Channel 1 Average Speed: 32.44 fps Total Encoding Time: 44359 ms Total Execution Time: 44561 ms Average Latency: 2138 ms Max Latency: 3220 ms Encoder finished Then I tried a straight mux Code:
PS D:\SVT-VP9> ffmpeg -i LOTR-Test.ivf -codec copy LOTR-Test.webm ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.3.1 (GCC) 20190414 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --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-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 [ivf @ 00000232b0628a00] Invalid frame rate LOTR-Test.ivf: Invalid data found when processing input PS D:\SVT-VP9> If I make changes to specify the framerate as either a straight 23 or 24 (i.e if I try -fps 23.98 SVT will round it down to 23fps) SVT will encode it and the file will mux fine into a webm. Also of interesting note, on the 24000/1001 attempt if I try to open that file with mediainfo, it complaints about a floating point error. The Y4M opens fine, and a 23 or 24 fps IVF file will open fine. just for kicks If I feed the encoder the y4m and only declare the width and height, it will encode it as 60fps but reports invalid framerate. when trying to open with ffmpeg - mediainfo will at least open it but reports an fps of 0. So again, refering my very first attempt cited above, I just don't know what I'm doing wrong. Maybe I'm "special". I know the SVT build is somewhat old but I'm not aware of any major fixes that would account for something like this? Last edited by osgZach; 24th July 2019 at 19:41. Reason: fixed formating |
2nd August 2019, 00:29 | #5 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
|
|
3rd August 2019, 19:17 | #7 | Link |
Registered User
Join Date: Jun 2013
Posts: 95
|
Can't reproduce with latest svt-av1 (master branch).
Note that the error comes from FFmpeg's ivf demuxer. You should be getting the same error if you just try to demux and decode the file: Code:
ffmpeg -i LOTR-Test.ivf -c rawvideo -f null - https://github.com/FFmpeg/FFmpeg/blo...fdec.c#L54-L63 So, either your file has an invalid ivf header, or the time_base info in the header is invalid. My guess is your very old encoder binary (version 0.1) has an ivf mux bug that was fixed later.
__________________
https://github.com/MoSal |
3rd August 2019, 22:19 | #8 | Link |
Registered User
Join Date: Feb 2009
Location: USA
Posts: 676
|
Interesting. I'll endeavor to try and find a more recent version (compiling stuff for Windows isn't really my area, nor is installing a bunch of tools to do it).
I'll have to go back and look at my linux VM as well, that's an environment I could try and mess around with compiling stuff on I suppose. Will report back here with my findings eventually. |
6th August 2019, 18:44 | #9 | Link | |
Registered User
Join Date: Jun 2013
Posts: 95
|
Quote:
I just tested the VP9 one (master branch). The issue you describe exists for me when no -fps-num/-fps-denom are passed. And checking with a hex editor confirms that the file header is invalid (0000 0000 03e8 0000 which corresponds to 0/1000 instead of 60000/1000). The floating point errors you are seeing are caused by division by zero. However, when passing -fps-num 24000 -fps-denom 1001, I do get valid files. The header is valid (5dc0 0000 03e9 0000 which corresponds to 24000/1001), and the files are playable/mux-able. It's worth mentioning that I tried many encoding settings, and I'm getting ghosts everywhere every time. So, you're not missing much. And I don't think anyone should bother with this encoder.
__________________
https://github.com/MoSal |
|
6th August 2019, 19:17 | #10 | Link |
Registered User
Join Date: Feb 2009
Location: USA
Posts: 676
|
Hi, yeah I noticed the 60fps thing as well. I did acquire a more recent compile from a friend and got it up and running on Ubuntu vis WSL. It did seem to fix the issue with 24fps files, although mediainfo being the quirk it is, still tells me its a solid 24 and not film 24 lol.. Audio and Video streams are in sync though.
I haven't looked too much into the quality of the encoder yet, but it certainly has limited uses for now... Definitely needs a 2 pass mode and when using CQ mode it doesn't seem to respect min-qp / max-qp flags. |
25th October 2019, 08:15 | #11 | Link |
Registered User
Join Date: Feb 2009
Location: USA
Posts: 676
|
I recently got myself a Ryzen 7 3700x this past week (my impulse got the better of me, I was trying to save for a R9 3900 or 3950), so I decided to give SVT-VP9 another spin. Was happy to hear about the new AVX2 codepath as well.
I got pretty acceptable qualiy which, off the cuff, I would equate to mid 2000's cableTV in terms of you can see some macroblocking in dark scenes, but anything else you'd probably have to be specifically looking for. This is all subjective of course, I don't claim to have the best eyes, and I have little practice in spotting encoding errors and other artifacts. The target was 720p with a quality/density (enc-mode) metric of 5... I really wish I could find some in depth comparisons of enc-mode settings to help pick a good middleground between performance and image quality... Anyway these were the settings I used, encoded with the binaries available from the Pre-Release folder on SVT-VP9's git repo. Granted this produces a file with some seek-lag because of missing options, I am loathe to post images as they aren't all that useful when judging video overall. Code:
.\SvtVp9EncApp -i LOTR-Test.yuv -w 1280 -h 720 -fps-num 24000 -fps-denom 1001 -rc 1 -tbr 1800000 -min-qp 20 -max-qp 25 -enc-mode 5 -b Test.ivf in both cases it's using maybe 65 - 70% of total CPU power, so you could potentially run two encodings at once for a slightly lower per file FPS, but higher FPS overall. Splitting videos into 2 parts and encoding at once could potentially be a lot faster. edit: confirmed I can encode two files at once at near the same speed. Pretty nice to be honest. Although if one file were to finish before the other, it does not seem to yield back the CPU resources so the speed on the second file never increases. Last edited by osgZach; 26th October 2019 at 00:39. Reason: info |
2nd January 2022, 10:33 | #13 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
The ffmpeg builds (build with mbas) shipping with Hybrid include these encoders:
Code:
Encoders: V..... = Video A..... = Audio S..... = Subtitle .F.... = Frame-level multithreading ..S... = Slice-level multithreading ...X.. = Codec is experimental ....B. = Supports draw_horiz_band .....D = Supports direct rendering method 1 ------ V....D a64multi Multicolor charset for Commodore 64 (codec a64_multi) V....D a64multi5 Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5) V..... alias_pix Alias/Wavefront PIX image V..... amv AMV Video V....D apng APNG (Animated Portable Network Graphics) image V..... asv1 ASUS V1 V..... asv2 ASUS V2 V....D libaom-av1 libaom AV1 (codec av1) V....D librav1e librav1e AV1 (codec av1) V..... libsvtav1 SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1) V....D avrp Avid 1:1 10-bit RGB Packer V....D libxavs2 libxavs2 AVS2-P2/IEEE1857.4 (codec avs2) V..X.D avui Avid Meridien Uncompressed V....D ayuv Uncompressed packed MS 4:4:4:4 V....D bitpacked Bitpacked V....D bmp BMP (Windows and OS/2 bitmap) V....D libxavs libxavs Chinese AVS (Audio Video Standard) (codec cavs) VF.... cfhd GoPro CineForm HD V..... cinepak Cinepak V....D cljr Cirrus Logic AccuPak V.S..D vc2 SMPTE VC-2 (codec dirac) VFS..D dnxhd VC3/DNxHD V....D dpx DPX (Digital Picture Exchange) image VFS..D dvvideo DV (Digital Video) VF...D exr OpenEXR image V.S... ffv1 FFmpeg video codec #1 VF.... ffvhuff Huffyuv FFmpeg variant V....D fits Flexible Image Transport System V..... flashsv Flash Screen Video V..... flashsv2 Flash Screen Video Version 2 V..... flv FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1) V..... gif GIF (Graphics Interchange Format) V..... h261 H.261 V..... h263 H.263 / H.263-1996 V.S... h263p H.263+ / H.263-1998 / H.263 version 2 V....D libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264) V....D libx264rgb libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264) V....D h264_amf AMD AMF H.264 Encoder (codec h264) V....D h264_nvenc NVIDIA NVENC H.264 encoder (codec h264) V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264) V..... hap Vidvox Hap V....D libx265 libx265 H.265 / HEVC (codec hevc) V..... libsvt_hevc SVT-HEVC(Scalable Video Technology for HEVC) encoder (codec hevc) V....D hevc_amf AMD AMF HEVC encoder (codec hevc) V....D hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc) V..... hevc_qsv HEVC (Intel Quick Sync Video acceleration) (codec hevc) V....D libkvazaar libkvazaar H.265 / HEVC (codec hevc) VF.... huffyuv Huffyuv / HuffYUV V..... jpeg2000 JPEG 2000 VF.... libopenjpeg OpenJPEG JPEG 2000 (codec jpeg2000) VF...D jpegls JPEG-LS VF.... ljpeg Lossless JPEG VF.... magicyuv MagicYUV video VFS... mjpeg MJPEG (Motion JPEG) V..... mjpeg_qsv MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg) V.S... mpeg1video MPEG-1 video V.S... mpeg2video MPEG-2 video V..... mpeg2_qsv MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video) V.S... mpeg4 MPEG-4 part 2 V..... libxvid libxvidcore MPEG-4 part 2 (codec mpeg4) V..... msmpeg4v2 MPEG-4 part 2 Microsoft variant version 2 V..... msmpeg4 MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3) V..... msvideo1 Microsoft Video-1 V....D pam PAM (Portable AnyMap) image V....D pbm PBM (Portable BitMap) image V..... pcx PC Paintbrush PCX image V....D pfm PFM (Portable FloatMap) image V....D pgm PGM (Portable GrayMap) image V....D pgmyuv PGMYUV (Portable GrayMap YUV) image VF.... png PNG (Portable Network Graphics) image V....D ppm PPM (Portable PixelMap) image VF.... prores Apple ProRes VF.... prores_aw Apple ProRes (codec prores) VFS... prores_ks Apple ProRes (iCodec Pro) (codec prores) V..... qtrle QuickTime Animation (RLE) video V....D r10k AJA Kona 10-bit RGB Codec V....D r210 Uncompressed RGB 10-bit V....D rawvideo raw video V..... roqvideo id RoQ video (codec roq) V..... rpza QuickTime video (RPZA) V..... rv10 RealVideo 1.0 V..... rv20 RealVideo 2.0 V..... sgi SGI image V..... smc QuickTime Graphics (SMC) V..... snow Snow V..... speedhq NewTek SpeedHQ V..... sunrast Sun Rasterfile image V..... svq1 Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1 V..... targa Truevision Targa image V....D libtheora libtheora Theora (codec theora) VF.... tiff TIFF image VF.... utvideo Ut Video V....D v210 Uncompressed 4:2:2 10-bit V....D v308 Uncompressed packed 4:4:4 V....D v408 Uncompressed packed QT 4:4:4:4 V....D v410 Uncompressed 4:4:4 10-bit V....D libvpx libvpx VP8 (codec vp8) V....D libvpx-vp9 libvpx VP9 (codec vp9) V..... libsvt_vp9 SVT-VP9(Scalable Video Technology for VP9) encoder (codec vp9) V..... vp9_qsv VP9 video (Intel Quick Sync Video acceleration) (codec vp9) V....D libwebp_anim libwebp WebP image (codec webp) V....D libwebp libwebp WebP image (codec webp) V..... wmv1 Windows Media Video 7 V..... wmv2 Windows Media Video 8 V..... wrapped_avframe AVFrame to AVPacket passthrough V..... xbm XBM (X BitMap) image V....D xface X-face image V....D xwd XWD (X Window Dump) image V....D y41p Uncompressed YUV 4:1:1 12-bit V....D yuv4 Uncompressed packed 4:2:0 VF.... zlib LCL (LossLess Codec Library) ZLIB V....D zmbv Zip Motion Blocks Video A..... aac AAC (Advanced Audio Coding) A....D ac3 ATSC A/52A (AC-3) A....D ac3_fixed ATSC A/52A (AC-3) (codec ac3) A....D adpcm_adx SEGA CRI ADX ADPCM A....D adpcm_argo ADPCM Argonaut Games A....D g722 G.722 ADPCM (codec adpcm_g722) A....D g726 G.726 ADPCM (codec adpcm_g726) A....D g726le G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le) A....D adpcm_ima_alp ADPCM IMA High Voltage Software ALP A....D adpcm_ima_amv ADPCM IMA AMV A....D adpcm_ima_apm ADPCM IMA Ubisoft APM A....D adpcm_ima_qt ADPCM IMA QuickTime A....D adpcm_ima_ssi ADPCM IMA Simon & Schuster Interactive A....D adpcm_ima_wav ADPCM IMA WAV A....D adpcm_ima_ws ADPCM IMA Westwood A....D adpcm_ms ADPCM Microsoft A....D adpcm_swf ADPCM Shockwave Flash A....D adpcm_yamaha ADPCM Yamaha A..... alac ALAC (Apple Lossless Audio Codec) A..... libopencore_amrnb OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band) (codec amr_nb) A..... libvo_amrwbenc Android VisualOn AMR-WB (Adaptive Multi-Rate Wide-Band) (codec amr_wb) A....D aptx aptX (Audio Processing Technology for Bluetooth) A....D aptx_hd aptX HD (Audio Processing Technology for Bluetooth) A....D libcodec2 codec2 encoder using libcodec2 (codec codec2) A....D comfortnoise RFC 3389 comfort noise generator A..X.D dca DCA (DTS Coherent Acoustics) (codec dts) A....D eac3 ATSC A/52 E-AC-3 A....D flac FLAC (Free Lossless Audio Codec) A....D g723_1 G.723.1 A....D libgsm libgsm GSM (codec gsm) A....D libgsm_ms libgsm GSM Microsoft variant (codec gsm_ms) A..... libilbc iLBC (Internet Low Bitrate Codec) (codec ilbc) A..X.. mlp MLP (Meridian Lossless Packing) A..... mp2 MP2 (MPEG audio layer 2) A..... mp2fixed MP2 fixed point (MPEG audio layer 2) (codec mp2) A..... libtwolame libtwolame MP2 (MPEG audio layer 2) (codec mp2) A....D libmp3lame libmp3lame MP3 (MPEG audio layer 3) (codec mp3) A....D libshine libshine MP3 (MPEG audio layer 3) (codec mp3) A....D nellymoser Nellymoser Asao A..X.. opus Opus A..... libopus libopus Opus (codec opus) A....D pcm_alaw PCM A-law / G.711 A-law A....D pcm_dvd PCM signed 16|20|24-bit big-endian for DVD media A....D pcm_f32be PCM 32-bit floating point big-endian A....D pcm_f32le PCM 32-bit floating point little-endian A....D pcm_f64be PCM 64-bit floating point big-endian A....D pcm_f64le PCM 64-bit floating point little-endian A....D pcm_mulaw PCM mu-law / G.711 mu-law A....D pcm_s16be PCM signed 16-bit big-endian A....D pcm_s16be_planar PCM signed 16-bit big-endian planar A....D pcm_s16le PCM signed 16-bit little-endian A....D pcm_s16le_planar PCM signed 16-bit little-endian planar A....D pcm_s24be PCM signed 24-bit big-endian A....D pcm_s24daud PCM D-Cinema audio signed 24-bit A....D pcm_s24le PCM signed 24-bit little-endian A....D pcm_s24le_planar PCM signed 24-bit little-endian planar A....D pcm_s32be PCM signed 32-bit big-endian A....D pcm_s32le PCM signed 32-bit little-endian A....D pcm_s32le_planar PCM signed 32-bit little-endian planar A....D pcm_s64be PCM signed 64-bit big-endian A....D pcm_s64le PCM signed 64-bit little-endian A....D pcm_s8 PCM signed 8-bit A....D pcm_s8_planar PCM signed 8-bit planar A....D pcm_u16be PCM unsigned 16-bit big-endian A....D pcm_u16le PCM unsigned 16-bit little-endian A....D pcm_u24be PCM unsigned 24-bit big-endian A....D pcm_u24le PCM unsigned 24-bit little-endian A....D pcm_u32be PCM unsigned 32-bit big-endian A....D pcm_u32le PCM unsigned 32-bit little-endian A....D pcm_u8 PCM unsigned 8-bit A....D pcm_vidc PCM Archimedes VIDC A....D real_144 RealAudio 1.0 (14.4K) (codec ra_144) A....D roq_dpcm id RoQ DPCM A..X.D s302m SMPTE 302M A....D sbc SBC (low-complexity subband codec) A..X.. sonic Sonic A..X.. sonicls Sonic lossless A..... libspeex libspeex Speex (codec speex) A..X.. truehd TrueHD A..... tta TTA (True Audio) A..X.. vorbis Vorbis A....D libvorbis libvorbis (codec vorbis) A..... wavpack WavPack A..... wmav1 Windows Media Audio 1 A..... wmav2 Windows Media Audio 2 S..... ssa ASS (Advanced SubStation Alpha) subtitle (codec ass) S..... ass ASS (Advanced SubStation Alpha) subtitle S..... dvbsub DVB subtitles (codec dvb_subtitle) S..... dvdsub DVD subtitles (codec dvd_subtitle) S..... mov_text 3GPP Timed Text subtitle S..... srt SubRip subtitle (codec subrip) S..... subrip SubRip subtitle S..... text Raw text subtitle S..... ttml TTML subtitle S..... webvtt WebVTT subtitle S..... xsub DivX subtitles (XSUB) |
Thread Tools | Search this Thread |
Display Modes | |
|
|