Quantcast QTGMC repeating frames on MP4 in Avisynth? - digitalFAQ Forum
  #1  
06-28-2018, 10:01 PM
Master Tape Master Tape is offline
Premium Member
 
Join Date: Jul 2016
Location: Scotland
Posts: 49
Thanked 0 Times in 0 Posts
I'm trying to deinterlace MP4 1080i HD video files, but when using QTGMC in AvsPmod it keeps repeating itself in a sort of looping back and forth motion, although the audio plays at normal speed. I'm also having the issue of the video playing too fast once it goes from 50i to 50p.

For clarity the .avs script:

Code:
LoadPlugin("C:\Users\Desktop\Plugins\LSMASHSource.dll")
FN="C:\Users\Desktop\Video Files\BBC One.mp4"
LSMASHVideoSource(FN)
Audio=LSMASHAudioSource(FN)
SetMemoryMax(1000)
#Return Info() 
AudioDub(Audio)
AssumeTFF()
SelectEven()
QTGMC( Preset="Slower") # 50i to 50p
And the Media Info of the source file:

Code:
General
Complete name                            : C:\Users\\Desktop\Video Files\BBC One.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 39.8 MiB
Duration                                 : 21 s 660 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 15.4 Mb/s
Description                              : AverMedia_er130_001.000.001
Encoded date                             : UTC 1970-01-01 00:00:00
Tagged date                              : UTC 1970-01-01 00:00:00
Writing application                      : Lavf53.3.0
Comment                                  : Quality_BEST

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 2 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 21 s 660 ms
Bit rate                                 : 15.3 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 50.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan type, store method                  : Separated fields
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 0.147
Stream size                              : 39.5 MiB (99%)
Encoded date                             : UTC 1970-01-01 00:00:00
Tagged date                              : UTC 1970-01-01 00:00:00
mdhd_Duration                            : 0

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 21 s 611 ms
Bit rate mode                            : Variable
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 338 KiB (1%)
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : UTC 1970-01-01 00:00:00
Tagged date                              : UTC 1970-01-01 00:00:00
mdhd_Duration                            : 0

I've attached a rendered file to show an example of the problem.


Attached Files
File Type: mp4 BBC One.mp4 (31.51 MB, 2 downloads)
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
06-28-2018, 10:11 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 8,488
Thanked 1,393 Times in 1,225 Posts
Avisynth really does not like non-AVI sources.
Convert the 1080p files to lossless Lagarith. Yes, the file will be ugly huge in size, but that's life in HD.

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
  #3  
06-29-2018, 03:04 AM
hodgey hodgey is offline
Free Member
 
Join Date: Dec 2017
Location: Norway
Posts: 468
Thanked 115 Times in 97 Posts
Alternatively, you could try to use FFmpegSource instead of lsmash to load the file. Though, be aware that ffmpegsource has to index the file, which can take a little while the first time it's loading the file.
Reply With Quote
  #4  
06-29-2018, 03:10 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,449
Thanked 1,076 Times in 895 Posts
[quote=Master Tape;54863]
Code:
LoadPlugin("C:\Users\Desktop\Plugins\LSMASHSource.dll")
FN="C:\Users\Desktop\Video Files\BBC One.mp4"
LSMASHVideoSource(FN)
Audio=LSMASHAudioSource(FN)
SetMemoryMax(1000)
#Return Info() 
AudioDub(Audio)
AssumeTFF()
SelectEven()
QTGMC( Preset="Slower") # 50i to 50p
Throwing away half of your video and then deinterlacing afterwards?
You're kidding, right?
Reply With Quote
  #5  
06-29-2018, 04:31 AM
Master Tape Master Tape is offline
Premium Member
 
Join Date: Jul 2016
Location: Scotland
Posts: 49
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by lordsmurf View Post
Avisynth really does not like non-AVI sources.
Convert the 1080p files to lossless Lagarith. Yes, the file will be ugly huge in size, but that's life in HD.
The strange thing is it runs fine when using other deinterlacers such as bob and Yadif, so must be a problem mainly with QTMGC

Ok i've converted it to an AVI using Lagarith, but now getting this error in AvsPmod..
Code:
AVISource: couldn't locate a decompressor for fourcc LAGS


Quote:
Originally Posted by sanlyn View Post
Throwing away half of your video and then deinterlacing afterwards?
You're kidding, right?
Oh didn't realise you had to have things in a certain order I'm still new to all this.. Was just trying out different settings to see if it would sort out the speeded up video problem

So if i was going from 50i to 25p i would still lose half the picture information?

Last edited by Master Tape; 06-29-2018 at 04:52 AM.
Reply With Quote
  #6  
06-29-2018, 07:02 AM
sanlyn sanlyn is offline
Premium Member
 
Join Date: Aug 2009
Location: N. Carolina and NY, USA
Posts: 3,449
Thanked 1,076 Times in 895 Posts
Statements are executed in the order in which they appear.

Discarding alternate frames destroys 50% of your temporal resolution. Is that what you want? Why discard even-numbered frames, why note discard odd-numbered frames instead with SelectOdd()? Maybe the even numbered frames look cleaner than the odd frames (that's often the case with many sources, depending on how the mp4 was made). Why are you using QTGMC with the "slower" preset? Do you know what "slower" does? Are you sure you want that much processing on a lossy original? Why are you deinterlacing in the first place?
Reply With Quote
  #7  
06-29-2018, 01:08 PM
Master Tape Master Tape is offline
Premium Member
 
Join Date: Jul 2016
Location: Scotland
Posts: 49
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by sanlyn View Post
Statements are executed in the order in which they appear.

Discarding alternate frames destroys 50% of your temporal resolution. Is that what you want? Why discard even-numbered frames, why note discard odd-numbered frames instead with SelectOdd()? Maybe the even numbered frames look cleaner than the odd frames (that's often the case with many sources, depending on how the mp4 was made). Why are you using QTGMC with the "slower" preset? Do you know what "slower" does? Are you sure you want that much processing on a lossy original? Why are you deinterlacing in the first place?
I don't even know why i put SelectEven() in there, i wasn't entirely sure what it did, i was switching between that and AssumeFPS(25) but now i wont use it after learning it throws half the image away!

I guess 'Slower' is a little overkill but i just want to maintain as much quality as possible.

I want to deinterlace so i can upload clips to my Youtube.
Reply With Quote
  #8  
06-29-2018, 01:27 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 8,488
Thanked 1,393 Times in 1,225 Posts
Select Odd/Even doesn't "throw away" data as much as restore the original framerate. If the intended new format can use 50/59.94fps, then great, go for it. But if not, you must decimate it back to the original 25/29.97, no choice in the matter. While it is true that interlace fields are each a discrete moment in time, it's also at 50% size. The deinterlace process creates full-sized frames via interpolation of data. In effect, you have 50/60 new frames that previously did not exist. And sometimes even the field data is interpolated, not untouched, so not always 50/60 discrete moments after all.

Another offset of double frames = 200% file size (lossless), at least 125% compressed formats.

Youtube can handle 50/59.95fps. So just do that.

I've found myself using "faster" quite a bit this year, as quality between slow and fast/faster is sometimes negligible.

- Did my advice help you? Then become a Premium Member and support this site.
- Find television shows, cartoons, DVDs and Blu-ray releases at the TVPast forums.
Reply With Quote
  #9  
06-30-2018, 02:40 AM
Master Tape Master Tape is offline
Premium Member
 
Join Date: Jul 2016
Location: Scotland
Posts: 49
Thanked 0 Times in 0 Posts
Eureka! We're finally getting somewhere now. Installed the Lagarith codec and the avi is opening up fine. After rendering the file there's still a little problem.. Whilst everything all plays fine, the file is flagging up as 42 seconds when it should only be 21 seconds. Not sure what's happened there, but at the end of the 21 seconds when the video should end, it then kind of loops the last 2 frames simultaneously for another 21 seconds. I mean i can always trim it out, but would rather the problem not be there as it doubles my rendering time.

Also there's some horrid pixelation going onscreen in my test video during the ident, though it's present in the original source (probably because there's too much going onscreen at once, all the falling petals, ect) Is there a good script to reduce the appearance of this?


Attached Images
File Type: png Pixelation.png (961.8 KB, 5 downloads)
Attached Files
File Type: mp4 BBC One.mp4 (31.10 MB, 5 downloads)

Last edited by Master Tape; 06-30-2018 at 02:50 AM.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Skipping and Repeating Frames koberulz Capture, Record, Transfer 4 03-21-2018 12:04 PM
Broken index with VirtualDub when capturing Avisynth (QTGMC) Kugelfang Restore, Filter, Improve Quality 13 12-06-2015 10:56 AM
Avisynth script for QTGMC, encode x264 - no video after deinterlace? mo418 Capture, Record, Transfer 18 09-16-2015 01:06 PM
Random rainbow frames during deinterlacing with QTGMC? Kugelfang Restore, Filter, Improve Quality 6 06-02-2015 09:48 AM
QTGMC How-to: Help deinterlacing with Avisynth Joekster Restore, Filter, Improve Quality 1 12-22-2011 04:27 PM

Thread Tools



 
All times are GMT -5. The time now is 03:55 AM