Quantcast Avisynth: Frame Rate Problems with WMV - digitalFAQ.com Forums [Archives]
  #1  
01-05-2007, 01:53 PM
rab rab is offline
Free Member
 
Join Date: Nov 2004
Location: Hampshire, UK
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
I'm trying to make a DVD from WMV's through Avisynth but the resulting MPEG2's are weird. The video seems to finish before the audio and then the video keeps looping certain segments while the audio stays constant. The video ends up flashing grey and black until it's just constant grey until it finishs.
I have tried changing the frame rate in the script and playing it through WMP Classic where the video appears to be in sync but upon advancing to a further section of the video, it is completely out. Then a later section can be in sync again.
I played one of the WMV's in WMP 11 and checked the statistics and it said :
Frame Rate - 23
Actual Rate - Constantly changing but stayed around 23
So i set the frame rate in the script to 23 and viewed it with WMPC but it still had random sync problems. At one point i actually saw the video skip a few frames and continue normally leaving the audio out of sync. So i went back and checked that bit again. Sure enough, it did it again at exactly the same point in the video.

There is always a grey picture at the end of the videos when viewing a script in WMPC , VirtualDubMod or watching the encoded video. It can be flashing or constant for several seconds. It's as if it's trying to fill the gap left by the sync problem until the audio finishs

I think, maybe, i'm dealing with WMV's with variable frame rate. I dunno. Is there a script to convert it to a constant 29.97?

I hope someone knows what is going on cause it beats me.

Thanks

Avisynth V.2.56
Script i'm using -
Code:
directshowsource("File.wmv",fps=(whatever i try or whatever WMP 11 says it is))
TMPGEnc V2.521.58.169
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-05-2007, 04:52 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rab
I think, maybe, i'm dealing with WMV's with variable frame rate. I dunno. Is there a script to convert it to a constant 29.97?
I think you do too, and lucky you, there is a way since 2.56 :
See avisynth manual, at directshowsource :
Code:
convertfps = false (in v2.56): It turns variable framerate video (vfr) into constant framerate video (cfr) by duplicating or skipping frames. This is useful when you want to open vfr video (for example mkv, rmvb, mp4, asf or wmv with hybrid video) in AviSynth. It is most useful when the fps parameter is set to the least common multiple of the component vfr rates, e.g. 120 or 119.880.
Reply With Quote
  #3  
01-06-2007, 01:22 PM
rab rab is offline
Free Member
 
Join Date: Nov 2004
Location: Hampshire, UK
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Ah, excellent. That seems to have sorted out the frame rate sync problem. However the grey screen problem still remains.

Out of the videos i have tested, most of them only have a grey picture in the last few frames of the video but in others, the grey screen can be present for a number of seconds at the end of the video.
In one particular video, the picture fades to black while the audio continues for seven seconds.
After the frame convert there is the fade out, two seconds of black and then the screen goes grey and stays that way until the end of the video.

Unrelated to the grey problem......
At the end of another video there is text which scrolls to the center of the screen from the left and exits to the right. This happens a number of times.
After the frame convert the scrolling text seems to get stuck for about a second on the left edge of the screen and then scrolls in as normal. Each bit of text also does this, with the last bit stuttering once before resting at the center. The video finishs with a few grey frames.

Quote:
It is most useful when the fps parameter is set to the least common multiple of the component vfr rates, e.g. 120 or 119.880.
Does this mean that i have to set the fps to either of these before the convert? I have just put in fps=119.880. It seems to work. Not really sure what value to put in here.

Thanks again.
Reply With Quote
  #4  
01-06-2007, 04:43 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rab
After the frame convert the scrolling text seems to get stuck for about a second on the left edge of the screen and then scrolls in as normal. Each bit of text also does this, with the last bit stuttering once before resting at the center. The video finishs with a few grey frames.
Unfortunally all this is due to the same issue. Avisynth tries to match audio and video but :
1/ this is done by duplicating frames. so the shuttering
2/ due to math rounds, probably it doesn't manage to match perfectly audio and video, so the gray frames in the end


Quote:
Does this mean that i have to set the fps to either of these before the convert? I have just put in fps=119.880. It seems to work. Not really sure what value to put in here.
Not really possible to find the value. What they want to say is that the vfr change in the video from 24 to 26 fps, then you have to put the less common multiple between 24 and 26, that is 2x12x13.
But it's hard to tell what are the min anx max value of the framerate for your video.



Thanks again.[/quote]
Reply With Quote
  #5  
01-07-2007, 01:48 PM
rab rab is offline
Free Member
 
Join Date: Nov 2004
Location: Hampshire, UK
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
then you have to put the less common multiple between 24 and 26, that is 2x12x13.
i'm not very good with maths so i'm not really sure what this means. Sorry.

I'll just have to experiment with different values until the grey frames are minimal or hopefully non existent.

Thanks for the help.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
VIRTUALDUB FRAME RATE JAIME Conversão e Codificação de Vídeo (Português) 0 08-17-2004 01:23 PM
Frame rate ¡¡extra rao!!!!! generador Convertir y Codificar Video (Español) 4 07-11-2004 12:47 PM
FRAME RATE DUVIDA JACK WADE Conversão e Codificação de Vídeo (Português) 2 05-08-2004 11:59 PM
Can't recognise frame rate? Stevis2002 Video Encoding and Conversion 14 01-22-2004 03:19 AM
Avisynth 2.52 frame size problems cruz Avisynth Scripting 6 11-11-2003 12:01 PM

Thread Tools



 
All times are GMT -5. The time now is 01:59 PM  —  vBulletin © Jelsoft Enterprises Ltd