You're so right :-) I am just concerned by the loss of quality (having to compress twice) and the time spending on this lol.
The developer of the tool gave me important advices and maybe he will make some adaptations to make the process more user friendly, we'll see

I managed to make it work but it is not a walkover
Basically : 3D blurays are not side by side or top/bottom streams but packed frames. The codec name is H264 MVC
This means that for each frame : the left picture is encoded in H264 format, whereas the right picture rebuilt from the left picture + the differential part stored apart in the same (packed) frame.
Unfortunately, ffmpeg (used by mpv, itself used by SVP transcoder) does not support H264 MVC, so the decoding process will give only 2D frames (and ignore the diff part).

To make it work, I used a tool named BD3D2MK3D : this tool is a wrapper of a set of tools (tsmuxer, mkvmerge, x264/x265 for encoding) and most of all the FRIMSource library that is able to decode H264 MVC properly.
- Decode the video and unmux it (I guess that the encoder needs to be fed then with 1 file per stream) : 1 file for video stream, 1 file per audio/subtitle streams
- The tool will generate an avisynth script file that will be used in the next step in the encoder command line : the script just grabs the left/right pictures given by the FRIMSource decoder and put them together (horizontally or vertically. I made sure to uncheck "half" because it will divide by 2 the resolutions. You will get a full HD x2 resolution stream, eg. 3840x1080

This procedure is not easy though because I had to manually modify the avisynth script to incorporate the call to SVP library: this script is located in the subfolder where all the unmuxed files are. Its name is __ENCODE_3D_MOVIE.avs
Add at script beginning (built from base.avs script in SVP4 programs folder + the generated script by SVP when using SVP transcoder) :

LoadPlugin("C:\Program Files (x86)\SVP 4\plugins64\svpflow2.dll")
stereo_type = 1
src_fps = 23.976
function interpolate(clip)
{
    input_um = clip #clip.resize.Point(format=vs.YUV420P8,dither_type="random")
    input_m = input_um
    input_m8 = input_m
    super_params     = "{scale:{up:0},gpu:1,rc:true}"
    analyse_params   = "{block:{w:8,overlap:0},main:{search:{coarse:{distance:-8,bad:{sad:2000},width:530},type:2}},refine:[{thsad:250}]}"
    smoothfps_params = "{gpuid:11,gpu_qn:1,rate:{num:11,den:5},algo:23,mask:{area:100,cover:80},scene:{mode:0}}"
    threads=3
    demo_mode=0
    nvof=1
    rife = 0
    nvof==1 ? eval("""
        smooth = SVSmoothFps_NVOF(input_m, smoothfps_params, vec_src=input_m8, mt=threads, src=input_um)
    """) : rife==1 ? eval("""
        input_rife = input_m.ConvertBits(32,fulls=false,fulld=true).ConvertToPlanarRGB(matrix="709")
        smooth = RIFE(input_rife,factor_num=rife_num,factor_den=rife_den,model_path=rife_mpath,gpu_id=rife_gpu,gpu_thread=rife_threads,sc=rife_sc,sc_threshold=rife_scth,yv12=input_m8)
        smooth = smooth.ConvertToYUV420(matrix="709").ConvertBits(input_um.BitsPerComponent)
        smooth = SVSmoothFps_RIFE(input_m, smoothfps_params, rife_out=smooth, vec_src=vec_src, src=input_um, mt=threads)
    """) : eval("""
        super = SVSuper(input_m8, super_params)
        vectors = SVAnalyse(super, analyse_params, src=input_m8)
        smooth = SVSmoothFps(input_m, super, vectors, smoothfps_params, mt=threads, src=input_um)
    """)

    return demo_mode==0 ? smooth : demo(input_m,smooth)
}

And at the end of the script : quote or delete this line"Return(last)#.Info()" and replace with :

input=last


    stereo_type==0 ? eval(""" interpolate(input)
""") :     stereo_type==1 ? eval("""
        lf = interpolate(input.crop(0,0,input.width/2,0))
        rf = interpolate(input.crop(input.width/2,0,0,0))
        StackHorizontal(lf, rf)
""") :     stereo_type==2 ? Eval("""
        lf = interpolate(input.crop(0,0,0,input.height/2))
        rf = interpolate(input.crop(0,input.height/2,0,0))
        StackVertical(lf, rf)""") : input

Return(input)

Now I have a MKV 3D at full resolution (2x FullHD) and smooth (60FPS in my case) that I can ready with my 3D projector (I used Zidoo device for playback)
No need to plug my PC anymore and configure MPC-BE for smooth 3D playback.

This procedure should be industrialized, I will see if I can put my hand on this tool and upgrade it with SVP options

Thank you @Chainik, now I just need to find out the right option to have both pictures side by side !

EDIT : it seems that ffmpeg used by mpv is not able to decode frame packed format from H264 MVC codec, it will only decode the main frame (left eye) but not the diff part giving the right eye.

Hi,

I would like to convert my Bluray 3D to video files with smooth 60FPS and preserving 3D format.
How is it possible ?

EDIT : I tried transcoding but it would convert 3D to 2D. I tried with an other conversion tool to convert H264 MVC to H264 SBS or TB in order to have 2D frames with left/right pictures on the same frame and then use SVP transcoding but it would require 2x conversions. I wonder how could it be achieved in one step

EDIT2 : as far as I understand, SVP uses MPV to convert videos with vapoursynth (to call SVP library). Can you share the command line to do it manually and convert a given video to smooth one ? I may add the missing filter to split the MVC video file to a side by side picture ?

Thank you

Otherwise use MPC video renderer instead of madvr.
I have a similar config and I had stutters sometimes with madvr (only with 4K videos). I know that tonemapping is better on madvr but this is okay for me for now

I don't use RIFE engine. I just selected in SVP options GPU acceleration on Nvidia + optical flow enabled instead of my integrated Intel GPU.
Also check that HDR is enabled in windows. I have Windows 11 and the native windows player render the video correctly
At least this one : http://media.developer.dolby.com/DolbyV … 00kbps.mp4
OK with MPV / native windows player (which relies on windows media foundation not directshow so not compatible with SVP)
Purplish with VLC, MPC-HC, MPC-BE

and wether I play it on a HDR screen (integrated laptop panel) or a dolby vision Oled TV

You can check the colorspace and output info by pressing "I" while playing the video from MPV
I can see that I have bt2020 output for instance

straumli wrote:

I have installed the Dolby Vision extensions but I still have the purple tint issue. Tried all players installed on a none-DoVi compatible monitor.

This problem is not related to the monitor : you didn't get the right version of MPV or didn't configure it correctly
On my side MPC-HC, MPC-BE and VLC render a purplish picture in dolby vision videos that don't have a HDR10/HLG fallback stream.
MPV works though, wether I use a dolby vision display or not (but HDR compatible in both cases).

1/ Create a %APPDATA%\mpv\mpv.conf file

# this is required for SVP to "catch" the mpv
input-ipc-server=mpvpipe
hwdec=nvdec-copy
#hwdec=auto-copy
hwdec-codecs=all
hr-seek-framedrop=no
vo=gpu-next
target-prim=bt.2020
target-trc=pq
gamma=5

2/ Enable HDR from windows 10/11 from windows settings System > Screen > HDR. Select the external screen (not the internal display) and enable HDR

3/ While having your external display plugged in : you have to set the graphic cards to output in 10 or 12 bits mode. See the capture below from nvidia control panel

4/ In SVP settings, set "Allow output in 10 bit color depth" set to always
https://www.svp-team.com/forum/misc.php?action=pun_attachment&item=5390&download=0

Hi, great news it works great with MPV
I have a couple of questions though :
1/ Is this real dolby vision decoding and converted on the fly to standard hdr with preserved dynamic metadata ? because the previous solution with madvr wasn't able to decode dolby vision, it was "just" an hdr optimization with frame by frame analysis and static hdr metadata. Also full dolby vision support requires an additional hevc decoder to decode the FEL layer (full enhancement layer) but very few movies carry it.
2/ Is MPC-HC compatible with this solution ? I have read that it requires to use the new libplacebo from ffmpeg

EDIT : I don't understand the use of it. From the reddit post "So the special DV/HDR10+ dynamic scene by scene metadata will get lost/ignored, but i'm not even sure those are used much outside of testfiles?". It is just a fallback solution to avoid purple colors with tone mapping on dolby vision video files that don't carry a HDR10 fallback stream, but the guy from the post may have misunderstood

Hi all,

just found out that with the latest version of MPC video renderer shipped with MPC-BE but you can also install separately and use with other players (ie MPC-HC) you can enable HDR
It eats less CPU than madVR with SVP and I find that the rendering looks quite the same with 4K HDR content.
It is easier to setup also and I had issues with madvr sometimes (which is not really maintained)
If you are using windows 11, set "Auto display HDR on/off" to "not used" : this setting is supposed to switch HDR on windows, but windows 11 does it automatically (as long as you enabled HDR in control panel), picture will be too dark otherwise

10

(10 replies, posted in Using SVP)

MAG79 wrote:

As said in user manual the hardware requirements for 4K:

Minimum CPU requirements: Intel Core i7 (4 cores)
Recommended CPU requirements: Intel Core i7 (6 cores), AMD Ryzen 7 (8 cores)

It is general advice. Of course the best solution is to check yourself your file with your hardware. If you have opportunity to get it home for test.
CPU load and GPU load must be below 90% while playback. Test duration 60 seconds minimum to detect is overheating and throttling are happen.

Hi,
thanks for these precisions however can you confirm that a dedicated GPU is necessary for 4K (not the iGPU) ?
My 4K videos stutter with my 10th Core i7 CPU and Intel UHD graphics but this may be due to my laptop architecture with the integrated panel. I'll make a test by plugging the laptop to the TV and forcing the intel GPU in the video decoder + in SVP

EDIT : I made the test => Core I7 10th gen CPU+iGPU is not enough for 4K 60FPS
So a dedicated GPU is necessary such as a RTX 2060 or maybe less

t.setsuna wrote:

I think it is because the laptop panel is connected directly to the integrated gpu, even though the Nvidia gpu is decoding it, the video still has to be sent back to the iGPU to display the video and most of the time iGPU is not strong enough to display it. If your laptop has a mux swith, you can disable optimus so the laptop will only use the dedicated gpu

Hi setsuna, thanks for the hint, I think this should be the cause. However even when I force the player to use the nvidia dGPU it does not change anything. I think it always get back to the intel GPU to display the frames

Hi Chainik, here are some logs, I don't know if this is enough/useful.
Thanks

Hi,

I have a weird behavior with SVP. I have a gigabyte laptop with integrated 4K OLED panel, 10th gen CPU and nvidia RTX 2070.

1/ When connecting though HDMI port the laptop to a 4K TV or projector : SVP works like a charm with any kind of videos. 4K HDR videos are fluid while playing them at 60FPS
2/ When using the integrated panel and the exact same configuration, videos are unwatchable : they look like slow motion and stutter heavily.

I thought that the nvidia GPU was not used but it is the case. Configured with MPC-BE with madvr and avisynth
I suspect the OLED panel to be the cause but I don't know why.
Here is a capture of madvr info on it. If you have any advise or clue thank you

13

(22 replies, posted in Using SVP)

Hi Chainik,

current shield tv pro (2019) with tegra soc won’t make it either ?
I would be interested to test it.
Last shield was released at the end of 2019 so one may expect a new one at the end of this year but I doubt it.

This is a very good news though as android devices especially those with android TV are much more comfortable to use than a pc !

Hi,
you don't have HDR display ? in that case madvr does a good job to convert HDR to SDR.
My settings with a gigabyte oled laptop with core I7 10875 + nvidia RTX 2070. I don't get more than 35% CPU and GPU usage with a 4K bluray rip with HDR output.

SVP settings
- GPU acceleration with Nvidia + Optical flow enabled
- Additional options : 10 bits output to "Always"
- Number of frames : I set to match to screen refresh rate (I have a projector running at 60Hz only)
- Disabled remove black borders

Player : MPC-BE is the best, better performance and quality than mpv/vlc and the most fluid for HD/4K and also 3D blurays. MPC-HC is okay too but discontinued
- Settings / video : madVR
- Settings / internal filters / Video decoder : you can use internal MPC decoder or add external filter. I used external LAV filters with D3D11 hardware decoder + Nvidia card selected (necessary to enable copy-back)
- Settings / external filters : LAV audio & video decoders added (optional)+ avisynth filter (mandatory to make SVP work, especially with HDR). Remove FFDShow if present

MadVR
- devices / <your monitor> : I ticked "passthrough HDR to display"
- scaling algorithms / chroma upscaling + image downscaling + image upscaling : Jinc seems to be the best compromise, or try NGU maybe

Notes :
- I noticed that SVP does not work correctly with my laptop monitor, it stutters a lot. Once I plug my OLED TV or projector it works like a charm.
- 4K blurays played from my optical player won't play flawlessly with SVP. I have to rip them first (no reencoding, just a copy as mkv)
- you can also set up kodi with an external player configured to MPC-BE, it works well with a bluetooth remote control

Chainik wrote:

> They seem to be almost there

yeah, "Opened 3 years ago"... just another 3 years and it'll work! big_smile

:-) I agree, except that this time this is just a matter of passthrough. They handle now the 10 bits pipeline correctly and one can submit HDR10 settings manually to the x265 encoder.

I just tested Fastflix with x265 and NvencC : HDR10 metada is preserved in the final video file. So the proof of concept is there.
HDR10+ too but not tested. Dolby vision I'm not sure

Hi again,

I took a look on MPV & ffmpeg code : so actually (these are my assertions, I may be wrong)
1/ ffmpeg team is working on passing through HDR metadata (static & dynamic HDR10+/DV) to the encoder (h264/hevc) : https://trac.ffmpeg.org/ticket/7037
As long as this won't be achieved, it won't be possible to transcode with SVP while keeping HDR data (although 10 bits colors encoding is working). They seem to be almost there
2/ Adapt MPV code in the command line arguments to input the right parameters to ffmpeg : this is the easy part once ffmpeg will have done the job

Another approach is to extract and then reinject HDR data in the final file as NVEnC does (open source nvidia encoder) or else ffmpeg + Fastflix tool to reinject https://github.com/cdgriffith/FastFlix/ … /tag/3.4.0

Thanks Chainik but I hesitate between those 2 scenarios :
1/ Keep on pluggin in my PC with external UHD player
2/ converting my UHD discs to SVP+MKV vidéos to avoid plugging in the player and having a ready to play library
I will loose HDR in scenario 2 so I'll stick to scenario 1 for now.
If I understand correctly, MPV should "only" have to passthrough HDR metadata besides the 10 bits colors matrix to the vapoursynth plugin and then to the encoder ?
In the past I played around with mplayer code, it is not too complicated I think as this is a mapping between mplayer arguments with ffmpeg primitives and options...

18

(10 replies, posted in Using SVP)

Hi,

I am looking after a cheap config to make SVP work with 4K HDR around 60FPS
Can someone advise me some minimal config to make it work flawlessly ?
It works like a charm with my laptop with RTX 2070, but could it be the same with a recent Intel NUC for instance ?
The FAQ seems outdated and does not precise which setup per usage

Thank you for your feedback

Ok thank you Chainik.
The recent progress made using avisynth let us play HDR videos through directshow players, any chance that it may be adapted to the chain MPV/vapoursynth ?

FYI I was one of the ffdshow developers, I tried recently to get it back to the code in order to adapt colorspace conversion to 10bits but there is too much old code to adapt, especially the mmx intrinsics on which rely the colorespace converters (to be upgraded to SSE2 intrinsics) and also to make it compatible to visual studio 2019.... So I gave up for now

Hi there,

as far as I understand it is now possible to encode HDR videos. However the HDR metadata isn't getting through while using nvidia HEVC encoding.
Would it be possible to update SVP transcoder to get to use NVEncC instead instead of ffmpeg, as NVEncC handles passthrough of HDR10 metadata
Software encoding takes ages, so I really would like to make it work through nvidia hw encoding

Otherwise this is a great piece of software : 4K HDR plays OK now with most players (mpv/vlc and directshow players), please keep doing a great job!

Regards,
Damien