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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th June 2018, 04:11   #1  |  Link
Master Tape
Registered User
 
Join Date: May 2018
Posts: 7
Using AvsPmod to deinterlace HD video (Newbie)

I want to be able to deinterlace MP4 files using QTGMC in AvsPmod, but can't seem to be able to play the preview window to see the difference.. The source is PAL 1080i 50fps (the field rate) I'd like to keep it to 50 frames though to maintain the smooth playback.

How do i export the video to create a deinterlaced MP4 file?

Here's the script i got so far..

Quote:
SetMTMode(5, 4)
LoadPlugin("C:\Users\Desktop\Plugins\LSMASHSource.dll")
LSMASHVideoSource("C:\Users\Desktop\Video Files\BBC One.mp4")
AssumeFPS(25)
Audio=true
ConvertToYV12()
SetMTMode(2)
AssumeTFF()
QTGMC( Preset="Slower", SourceMatch=3, Lossless=2, EdiThreads=1 )
Master Tape is offline   Reply With Quote
Old 16th June 2018, 13:38   #2  |  Link
Shirtfull
Registered User
 
Join Date: May 2007
Posts: 54
Avisynth and plugins installed?
Shirtfull is offline   Reply With Quote
Old 19th June 2018, 02:32   #3  |  Link
Master Tape
Registered User
 
Join Date: May 2018
Posts: 7
Yes everything i need is all installed.
Master Tape is offline   Reply With Quote
Old 19th June 2018, 03:11   #4  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,071
What is the error message?
lansing is offline   Reply With Quote
Old 21st June 2018, 01:05   #5  |  Link
Master Tape
Registered User
 
Join Date: May 2018
Posts: 7
The issue is, when i double click on the batch file, the black command screen pops up with all the running text, but it stops and doesn't encode the video.

I've used these settings in the batch file specifically for Youtube.

ffmpeg -i "Tutorial.avs" -c:v libx264 -preset slow -crf 17 -c:a copy -pix_fmt yuv420p output.mkv "C:\Users\Desktop\Tutorial\BBC1.mp4"

Don't know i'm missing something, or one of the settings is wrong? Again like i said, i'm all new to this.
Master Tape is offline   Reply With Quote
Old 21st June 2018, 01:21   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,384
Quote:
but can't seem to be able to play the preview window
So have you solved your initial/(subject of thread) problem, otherwise, what has ffmpeg got to do with it ?

Quote:
What is the error message?
Yeh, you are gonna have to be a little less obfuscated [bit more clear] if you want some kind of assistance from the guys.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 21st June 2018, 09:48   #7  |  Link
patul
Registered User
 
Join Date: Sep 2005
Posts: 67
Quote:
Originally Posted by Master Tape View Post
The issue is, when i double click on the batch file, the black command screen pops up with all the running text, but it stops and doesn't encode the video.
I dont know anything about it, but if it is really a batch script (.bat), you can open Command Prompt and run the batch file from there instead of double click it. You'll be able to read the error message, then post it here so somebody can help.
patul is offline   Reply With Quote
Old 23rd June 2018, 20:58   #8  |  Link
Master Tape
Registered User
 
Join Date: May 2018
Posts: 7
Quote:
Originally Posted by StainlessS View Post
So have you solved your initial/(subject of thread) problem, otherwise, what has ffmpeg got to do with it ?
No i'm still stuck on how to export/render the video so it's then deinterlaced for online distribution. I've saved the script, and have created a .bat file.

FFmpeg is the encoder i'm using to output the final video. I'm just having issues and don't know if i'm doing it right.. I double click the .bat file to start encoding but it just grinds to a halt, and goes 1fps.... 2fps...3fps... and so on but seems to take forever, and isnt even rendering the video correctly. After leaving it for 16 hours, the 20 second clip came out funny, kept duplicating the same few frame every 2 seconds or so and has no sound.

Quote:
Originally Posted by StainlessS View Post
Yeh, you are gonna have to be a little less obfuscated [bit more clear] if you want some kind of assistance from the guys.
Yeah sorry, it's just this whole process is a little more complicated than i feared lol.

Quote:
Originally Posted by patul View Post
I dont know anything about it, but if it is really a batch script (.bat), you can open Command Prompt and run the batch file from there instead of double click it. You'll be able to read the error message, then post it here so somebody can help.
Yeah it's a (.bat) file. Can't see any error message but here is a screenshot of what is says whilst trying to encode.

Master Tape is offline   Reply With Quote
Old 24th June 2018, 09:51   #9  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,384
I'm still not sure that anybody knows what the actual problem is.

Firstly, Avisynth should produce a simulated *.AVI file, any avi player should be able to play the result, eg your Media Player of choice,
right click YourFile.avs, select 'Open With'. Or to view save as real avi then eg 'Open With' VirtualDub2. Select Save As in VirtualDub2 and save it.
[After selecting Video/FastRecompress and Video/Compression (perhaps use Ut_Video codec)]

If saved, then the file will be a real avi, and if you later need it in avs form again then could use something like this

Code:
Return AviSource("myNewAviFile.avi")
Use that as input to your ffmpeg thing, already deinterlaced etc.

I dont use AvsPMod and dont recall much about it, but either a media player or Vdub2 should display any error message that you may be getting.
(If you can clear error, then should be able to feed fixed original script directly into ffmpeg).

EDIT
Code:
SetMTMode(5, 4)
LoadPlugin("C:\Users\Desktop\Plugins\LSMASHSource.dll")
LSMASHVideoSource("C:\Users\Desktop\Video Files\BBC One.mp4")
AssumeFPS(25)
Audio=true          # this does nothing, and you do not have any audio
ConvertToYV12()
SetMTMode(2)
AssumeTFF()
QTGMC( Preset="Slower", SourceMatch=3, Lossless=2, EdiThreads=1 )
Maybe something more like this, untested
Code:
# SetMTMode(5, 4)   # Walk before you can run (I dont use MT stuff and have no idea what this line does)
LoadPlugin("C:\Users\Desktop\Plugins\LSMASHSource.dll")
FN="C:\Users\Desktop\Video Files\BBC One.mp4"
LSMASHVideoSource(FN)
Audio=LSMASHAudioSource(FN)
AudioDub(Audio)
#Return Info()         # UnComment to show/return info without deinterlace
AssumeFPS(25)       # I presume that it is already 25.0 FPS so probably NOT needed
ConvertToYV12()     # I presume that it is already YV12, so probabvly not needed
#SetMTMode(2)       # Lets learn to walk first
AssumeTFF()
QTGMC( Preset="Slower", SourceMatch=3, Lossless=2, EdiThreads=1 )
#QTGMC( Preset="Slower") # No idea what above does, I would just use simpler stuff, out would be 50.0 FPS
#QTGMC( Preset="Slower").SelectEven # 25.0 FPS
EDIT: VDub2 recommended for testing.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th June 2018 at 05:19.
StainlessS is offline   Reply With Quote
Old 25th June 2018, 19:19   #10  |  Link
Master Tape
Registered User
 
Join Date: May 2018
Posts: 7
Good call on not using the MT stuff, everything seems to be running alot smoother, it's actually rendering in FFmpeg now! Probably was putting too much pressure on my CPU and throttling it.

The issue i have now is that the rendered video keeps jumping back a few frames/stuttering every second or so, but the audio is still playing at normal speed. The original video is flagged up as 50fps (probably because it's an interlaced video which has 50 fields per second but it's declaring it as the frame rate) After removing Assume25fps the video runs too fast, on top of the other problem.

Also have the same issue when i save as AVi file in VirtualDub2 so must be a problem somewhere in the script.

Here's the sample video to show what i mean.

Quote:
QTGMC( Preset="Slower", SourceMatch=3, Lossless=2, EdiThreads=1 )
#QTGMC( Preset="Slower") # No idea what above does, I would just use simpler stuff, out would be 50.0 FPS
SourceMatch and Loseless are used for 'exacting detail'

From QTGMC wiki:
Source-match creates higher fidelity output with extra processing. Enable with SourceMatch = 1,2 or 3. Higher values are slower and more accurate. Can combine with Lossless setting (especially Lossless=2) for more detail again.

Though in using them i run into render freezes again. Don't understand it though as i have an i7-6700K and 16GB RAM, so not like i'm lacking the memory to run it faster through multi-threading.

Last edited by Master Tape; 26th June 2018 at 00:44.
Master Tape is offline   Reply With Quote
Old 26th June 2018, 04:14   #11  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,071
What happen when you preview the script in avspmod? Does the looping problem exist there?
lansing is offline   Reply With Quote
Old 26th June 2018, 20:29   #12  |  Link
Master Tape
Registered User
 
Join Date: May 2018
Posts: 7
Quote:
Originally Posted by lansing View Post
What happen when you preview the script in avspmod? Does the looping problem exist there?
Hard to tell as it struggles to play the video, like it's too much pressure on the processor. Playing the preview is not really displaying it in motion, more like a series of still pictures.
Master Tape is offline   Reply With Quote
Old 26th June 2018, 22:49   #13  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,071
Quote:
Originally Posted by Master Tape View Post
Hard to tell as it struggles to play the video, like it's too much pressure on the processor. Playing the preview is not really displaying it in motion, more like a series of still pictures.
By preview I mean loading the script into avspmod, click on the preview button on the bottom, and tapping the left/right arrow key. Did you see the looping problem there?
lansing is offline   Reply With Quote
Old 27th June 2018, 01:27   #14  |  Link
Master Tape
Registered User
 
Join Date: May 2018
Posts: 7
Quote:
Originally Posted by lansing View Post
By preview I mean loading the script into avspmod, click on the preview button on the bottom, and tapping the left/right arrow key. Did you see the looping problem there?
Oh i see. After going through it frame by frame in avspmod, the looping problem is still present.
Master Tape is offline   Reply With Quote
Old 28th June 2018, 04:51   #15  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 414
Take out QTGMC and replace with bob(). If it still does it your source is borked, switching between top and bottom fields first. You can try demuxing it or muxing it to mkv and using LWLibavVideoSource or FFMS2 and see if either do better.

With QTGMC you really want to add setmemorymax(1000) somewhere, and sourcematch and lossless do really badly on HD material for me.
kuchikirukia is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.