Re: Convert Videos to 60fps in just a few clicks

Hello guys, I am a newbie with this so bear with me. So I want to convert a mkv file to 60fps using yin media encoder but I get an error (On the command line it vanishes so fast and I can't see it) when I hit preview changes or play in MPC-HC, the error states something related to ConvertToShader. Can anyone help?

Re: Convert Videos to 60fps in just a few clicks

Tkompuras wrote:

Hello guys, I am a newbie with this so bear with me. So I want to convert a mkv file to 60fps using yin media encoder but I get an error (On the command line it vanishes so fast and I can't see it) when I hit preview changes or play in MPC-HC, the error states something related to ConvertToShader. Can anyone help?

try staxrip. its f amazing
http://www.svp-team.com/forum/viewtopic … 44&p=2

178 (edited by Nintendo Maniac 64 22-04-2017 06:12:10)

Re: Convert Videos to 60fps in just a few clicks

Hey, so I just discovered a couple weeks ago that my first gen Intel Atom netbook actually has an IPS screen that looks way better than the TN screen on my AMD E-350 "not"book.  So for hour+ long videos, I've been using the netbook instead.



Problem is, the first gen Intel Atom is too slow to decode h.264 in software at the display's native resolution (1024x600) and the graphics is old enough (Intel 945GMA) that it lacks hardware h.264 decoding.

So I've found out that xvid actually works great on my netbook at 60fps with a resolution of 1024x600, so I already re-encode certain videos.

However, I noticed that NGP doesn't have a GUI option for xvid (though ffmpeg supports it), so because I don't know how to use ffmpeg commands, I have to re-encode the video a second time in xvid after NGP's own video encode.

It's worth noting that VP8 should also be decently lower in CPU utilization than h.264, but the program I use for encoding (Avidemux) doesn't include encoding support for it, so I've never tried a native 60fps 1024x600 video in VP8.  VP8 in particular would be useful for creating webms, though xvid would be useful simply for its fast encoding (relative to x264).



Another thing I discovered is that my netbook actually supports a refresh rate of 65Hz maximum with the stock EDID (I also did a bunch of tests and yes, it is not dropping or repeating any frames at 65Hz); this is important because custom resolutions are impossible in Windows with the Intel 945GMA, and its video playback performance in Linux is dreadful.

Doing some math, with "Uniform" interpolation, I discovered that 50fps videos slightly slowed down to 48.75fps would only need to display 3 interpolated frames for every source frame to hit 65fps - that would have considerably less artifacting than interpolating 50fps to 60fps (which requires 5 interpolated frames for every source frame).

...but NGP doesn't support custom frame rates, so I have to instead tell it to slow down the video by 90% to 45fps and then interpolate to 60fps, and then afterwards manually speed up the video playback speed to 65fps.



Another thing NGP doesn't seem to be able to do is slow down or speed up the audio like one could do in, say, Audacity by using the lossless "Set rate" function to a lower sampling rate (for 50fps with 48000Hz audio played back at 48.75Hz, you'd need the audio at exactly 46800Hz).  However, the audio part is very easy for me so it's not that big of a deal that it's missing.



So ideally, I would love you forever if NGP had GUI options for:

- xvid and/or vp8
- interpolating to a custom frame rate
- slowing down and/or speeding up the audio (with or without optional pitch correction)


Oh, and NGP's background colors don't work well with Windows' high-contrast themes that use white text.


Tkompuras wrote:

Hello guys, I am a newbie with this so bear with me. So I want to convert a mkv file to 60fps using yin media encoder but I get an error (On the command line it vanishes so fast and I can't see it) when I hit preview changes or play in MPC-HC, the error states something related to ConvertToShader. Can anyone help?

I had this problem myself with v1.4, but trying v1.32 instead worked perfectly fine, so try that (the media encoder is very similar between the two).

Interestingly enough however, when I reinstalled and tried v1.4 again just today, it worked just fine...I wonder if v1.32 installs something that v1.4 needs?

179 (edited by Mystery 22-04-2017 15:01:51)

Re: Convert Videos to 60fps in just a few clicks

Tkompuras wrote:

Hello guys, I am a newbie with this so bear with me. So I want to convert a mkv file to 60fps using yin media encoder but I get an error (On the command line it vanishes so fast and I can't see it) when I hit preview changes or play in MPC-HC, the error states something related to ConvertToShader. Can anyone help?

Click "Preview in MPC-HC" and you'll see the error message in the player. It generates "NaturalGrounding\Temp\Preview.avs". Something else you can try is run AVSMeter.exe utility on that script file. it will check if there are dependencies missing.

avsmeter.exe preview.avs
Nintendo Maniac 64 wrote:

However, I noticed that NGP doesn't have a GUI option for xvid (though ffmpeg supports it), so because I don't know how to use ffmpeg commands, I have to re-encode the video a second time in xvid after NGP's own video encode.

This should be easy enough to add; I just don't want to make the UI more complex. If ffmpeg supports xvid and vp8, then why not.

Nintendo Maniac 64 wrote:

...but NGP doesn't support custom frame rates, so I have to instead tell it to slow down the video by 90% to 45fps and then interpolate to 60fps, and then afterwards manually speed up the video playback speed to 65fps.

Wrong. You can change it yourself. Click on the Script tab and edit the Interframe parameter to the desired values. The UI does the best in the most simple way, and then you can customize the script for anything the UI doesn't do automatically.

ffmpeg parameters are different though; that's fully managed by the code so it has to expose the options. But then if I allow XVid and VP8, I need to allow additional container formats, so it adds to the complexity or I need to redesign the whole section. Then there are lots of other encoding options I'm not exposing -- so I have to decide what level of complexity I want to expose to the user.

Nintendo Maniac 64 wrote:

Another thing NGP doesn't seem to be able to do is slow down or speed up the audio like one could do in, say, Audacity by using the lossless "Set rate" function to a lower sampling rate (for 50fps with 48000Hz audio played back at 48.75Hz, you'd need the audio at exactly 46800Hz).  However, the audio part is very easy for me so it's not that big of a deal that it's missing.

Same as above.


Nintendo Maniac 64 wrote:

So ideally, I would love you forever

Thanks

Nintendo Maniac 64 wrote:

Oh, and NGP's background colors don't work well with Windows' high-contrast themes that use white text.

hum...

Nintendo Maniac 64 wrote:

I had this problem myself with v1.4, but trying v1.32 instead worked perfectly fine, so try that (the media encoder is very similar between the two).

If you look at the script difference between the two, there are huge differences between both versions that impact the quality. The next version will have further changes that will considerably improve frame interpolation results.

180 (edited by Nintendo Maniac 64 22-04-2017 22:37:57)

Re: Convert Videos to 60fps in just a few clicks

Mystery wrote:

Wrong. You can change it yourself. Click on the Script tab and edit the Interframe parameter to the desired values.

Didn't realize that you can actually change the stuff there; I thought it was for copying and debugging and stuff.


Mystery wrote:

But then if I allow XVid and VP8, I need to allow additional container formats

Not true - Xvid in particular is supported in MP4.

VP8, yeah, but WebM is just a subset of MKV.  Also MKV works for Xvid too.


Mystery wrote:
Nintendo Maniac 64 wrote:

Another thing NGP doesn't seem to be able to do is slow down or speed up the audio

Same as above.

I've no idea how to do this via scripting...


Mystery wrote:
Nintendo Maniac 64 wrote:

Oh, and NGP's background colors don't work well with Windows' high-contrast themes that use white text.

hum...

Yeah, it's really quite hard to see the script text with the background image (see attached screenshot).


Mystery wrote:

The next version will have further changes that will considerably improve frame interpolation results.

Will it makes encoding slower?  Even with the fastest settings, I'm only seeing like 0.3x realtime encoding speed on a 1024x600 48.75fps video with 1.333x interpolation on my 4.6GHz Pentium G3258 (though presumably encoding to Xvid would make things faster).

Post's attachments

screenshot.png, 30.6 kb, 530 x 568
screenshot.png 30.6 kb, 612 downloads since 2017-04-22 

Re: Convert Videos to 60fps in just a few clicks

Nintendo Maniac 64 wrote:

I've no idea how to do this via scripting...

That's a custom need. Ask on the Avisynth Usage forum.

Nintendo Maniac 64 wrote:

Yeah, it's really quite hard to see the script text with the background image (see attached screenshot).

Wow, have to agree. The issue is that parts of the layout is speficied by my application and part by the OS. Best option might be to override everything.

Nintendo Maniac 64 wrote:

Will it makes encoding slower?  Even with the fastest settings, I'm only seeing like 0.3x realtime encoding speed on a 1024x600 48.75fps video with 1.333x interpolation on my 4.6GHz Pentium G3258 (though presumably encoding to Xvid would make things faster).

Wow, *that* slow!? Were you using GPU acceleration? By default, it used GPU-acceleration if madVR was enabled in setting (I know, not a very obvious setting!) The new algorithm will unfortunately have no GPU acceleration, and it will be slower. I don't know yet to what extent. If you weren't using GPU acceleration already, then it won't make much difference.

Intel Pentium G3258 3.2GHz has a CPU benchmark of 3928. Mine (from 4 years ago) is about 7600 -- about 2x faster.

182 (edited by Nintendo Maniac 64 23-04-2017 00:42:24)

Re: Convert Videos to 60fps in just a few clicks

Mystery wrote:

Were you using GPU acceleration? By default, it used GPU-acceleration if madVR was enabled in setting (I know, not a very obvious setting!) The new algorithm will unfortunately have no GPU acceleration, and it will be slower. I don't know yet to what extent. If you weren't using GPU acceleration already, then it won't make much difference.

Oh, yeah, GPU acceleration was not being used because for some reason it's actually slightly slower with it enabled.


Mystery wrote:

Intel Pentium G3258 3.2GHz has a CPU benchmark of 3928. Mine (from 4 years ago) is about 7600 -- about 2x faster.

1. I was running overclocked at 4.6GHz, which is 43.75% faster than stock clocks.

2. My CPU is only a 2core/2thread CPU, and this sort of task loves multiple threads (Ryzen would be a beast!).

3. Haswell, the architecture used in the Pentium G3258, launched 4 years ago.  If your CPU is also 4 years old and you're getting around 2x faster performance vs my stock clocks, then I'm going to guess you're using a Haswell quad core like the i5-4670.

183 (edited by Mystery 24-04-2017 17:56:13)

Re: Convert Videos to 60fps in just a few clicks

I have a i7 quad-core in my laptop. It does the job fine.

184 (edited by Nintendo Maniac 64 02-05-2017 03:23:58)

Re: Convert Videos to 60fps in just a few clicks

So I was doing a bunch of tests via Avidemux between the Xvid Mpeg4p2 encoder and the ff Mpeg4p2 encoder.

Not counting the likes of single and double-pass encoding, it seems like the settings that encode the quickest also perform the worst when playing back the video and vice-versa.


Basically, if you want the fastest encode, use the ff encoder with thread count set to "auto" (since it defaults to two) and quantization set to "mpeg".

Conversely, if you want the fastest decode, use the xvid encoder with quantization set to "h.263".



EDIT: Oh, and for whatever reason using an MP4 container results in slightly better decoding performance than an MKV container without compression.

Re: Convert Videos to 60fps in just a few clicks

Decoding performance generally isn't an issue on computers, but MKV does have several drawbacks. It often will not play correctly on some devices. My Kindle Fire plays MKV files but it stutters every few seconds.

Re: Convert Videos to 60fps in just a few clicks

Mystery wrote:

Decoding performance generally isn't an issue on computers

It's important in the case of Xvid/Mpeg4p2/Mpeg4ASP (and/or VP8 if the decode performance is similar) since the only semi-modern reason a person would use that is if they didn't have hardware decoding for h.264.


H.264 hardware decoding was only present on discrete GPUs starting around 2007 while Intel's iGPUs didn't include it until around 2008 - this means that many Core 2 Duo laptops are completely missing h.264 hardware decoding, but because the chipset supports AHCI they can still properly support SSDs and therefore long out-live their expected life.

Remember, the much newer low-power AMD Jaguar/Puma and Intel Silvermont architectures are still slower per GHz than a Core 2 Duo.