Quantcast Avisynth Problem Converting 29.970 AVI? - digitalFAQ.com Forums [Archives]
  #1  
09-22-2004, 10:20 AM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
I have a question about an avisynth script, I have it converting a 29.970 ntsc avi to a Pal one. It does the audio and video in perfect synch for a while but then they always get worse and worse out of synch til they end up about three seconds apart no matter what 29.970 fps avi I encode.

The script reads:

LoadPlugin("C:\AVI\plugins\decomb510.dll")
AviFileSource("C:\AVI\video_data\video.avi", true)
TimeStretch(tempo=(100.0*25.0)/29.970)
ConvertToYV12()
Telecide(order=1)
Decimate(cycle=5)
LanczosResize(352, 288,0.0,0.6)
AssumeFPS(25.000, true)


I tried adding

TimeStretch(tempo=(100.0*25.0)/29.970)

but this ended up making the actors sound like smurfs

As far as I can see it should be working fine, am I missing something obvious? I have tried ripping the audio direct via besweet and changing the rate to 25, etcetera, as my DVD player plays NTSC and NTSC Film DVD discs with stuttering motion.

Hope someone can help
__________________
Dave
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  
09-22-2004, 10:52 AM
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 Mental
Telecide(order=1)
Decimate(cycle=5)
By doing this, the fps of your movie is not anymore 29.970, but 23.976.
You should try to use a line like "TimeStretch(tempo =(100.0*25.0)/23.976)"
Reply With Quote
  #3  
09-22-2004, 11:49 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Code:
LoadPlugin("C:\AVI\plugins\decomb510.dll") 
AviFileSource("C:\AVI\video_data\video.avi", true) 
# ConvertToYV12() ### Isn't your avi already YV12??? A Divx or Xvid?
Telecide(order=1) 
Decimate(cycle=5) 
#
#### Video now gots 23.976 ######
#
LanczosResize(352, 288,0.0,0.6) 
#
# We do now ONLY pitch up the video
#
AssumeFPS(25.000, false) 
#
# Finally we do synchronise the audio by keeping the tone
#
TimeStretch(tempo=(100.0*25.0)/23.976)
Use always (AFAIK) ... assumefps(....,false) when using timestretch as the audio "should" COMPLETELY be kept in sync by timestrech - thats its purpose.

If still the audio gots out of sync than thats cause of Timestretch leck of precision. In that case delete the timestretch line and use instead:

AssumeFPS(25.000, true) .SSRC(44100)
Thats the conventional way but ends up in a slight upper tone of the audio (which doesnt hurt as its also often used by the dvd industry)
In case of DVD target use SSRC(48000)!

----- another point:

LanczosResize(352, 288,0.0,0.6)

You'd better use

Lanczos4Resize(352, 28


According to NTSC Playback:
Most PAL DVD Players have to be setup to play NTSC properly. Try entering your Players OSD Settings as youl find options like PAL60 etc. which "could" solve the stuttering NTSC Playback.
Reply With Quote
  #4  
09-23-2004, 03:00 PM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Brilliant ideas, I`ll try to answer both replies

I understand that the framerate is adjusted to 23.976 by the frame reduction but I think going by both replies that I may have inadvertently been converting the audio twice by frame reduction and then timestretching.

I added a Time Stretch but it still goes out of sync on longer samples such as a 90 minute avi, I shall try the AssumeFPS suggestion on a longer avi to see if this solves the problem.

Finally, a quick reply to the script line "Isn't your avi already YV12??? ".

Its for part of a program I`ve written to make my conversions automatic, because of this it may be that some files aren`t YV12 so I always add this because when I used QuEnc it always wanted it added. I use FreeEnc now but leave it in just in case.

The 29.970 fps avi`s have been the only annoyance for me, I have an auto convert button in my prog which figures out the input avi details such as audio type and framerate and then converts to PAL or NTSC FILM as needed but these one framerate avi`s have bugged me

But, I`m pretty sure that these suggestions will work

Off topic, one quick question for Incredible - if I get the 29.970 conversions working using your script do you mind me using that in the program as others use it too and I was hoping (when I have added the features I`m working on) to put it on my website for download?

It`s just a simple freeware program to convert avi files between standards and at selectable quality levels with a couple of button clicks, it produces a smooth motion mpeg2 file with Dolby Digital sound ready for use with a DVD creator such as DVDlab and has batch processing capability too.

Its a free prog of course as it uses only free command line tools but I`d like to check you don`t mind me using your solution in it?

Thanks
__________________
Dave
Reply With Quote
  #5  
09-23-2004, 03:08 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Mental
...
Its a free prog of course as it uses only free command line tools but I`d like to check you don`t mind me using your solution in it?

Thanks
What is the encoder engine?
Reply With Quote
  #6  
09-23-2004, 04:00 PM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Apologies if this is off topic, it`s a reply about the encoder.

I am using FreeEnc at the moment, as I said in the post earlier, I prefer it to QuEnc and it is much faster but also, as I understand itis , like QuEnc, free to use.

I have a help file with it I am writing which does make it clear that I did not write the encoder, etcetera, just the program which co-ordinates them to do what the user wants and the program which makes the batch processing file.

Currently it uses, apart from what I have written in FBSL, FreeEnc, Avs2wav, BeSweet, AviSynth, HeadAC3he, Avi2wav, bbmpeg, YAAI and TellMeAboutDivX but before I would put it on a website I would double check the licences.

I was a bit worried then when you said about the encoder incase I had the wrong idea and it isn`t allowed to be used in such a way, if that was the case I would use QuEnc of course.

Apologies for rambling on, it`s my pet project at the moment (lots of late nights and early mornings)
__________________
Dave
Reply With Quote
  #7  
09-23-2004, 04:46 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Mental
... when you said about the encoder incase I had the wrong idea and it isn`t allowed to be used in such a way, if that was the case I would use QuEnc of course.
Don't worry, it was only curiosity.
Reply With Quote
  #8  
09-23-2004, 05:08 PM
Mental Mental is offline
Free Member
 
Join Date: Sep 2004
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
I thought I might have done something wrong without knowing for a moment

About the script suggestion made by incredible, it works perfectly - using the AssumeFPS as suggested solved the problem. I love AviSynth, the more I find out the more it amazes me what you can do with it.

I`d like an opinion on a related avisynth point if that`s okay?

I`ve been experimenting with the examples of Donald Grafts helpfile for his Decomb plugin and tried the idea for hybrid clips. This seems to work with all example 29.970 fps files I have tried, producing no noticeable problems but there must be some drwabacks to applying this method to any avi or everyone would use it.

The example that has worked for me is

Telecide(order=1,guide=1)
Decimate(mode=3,threshold=2.0)

Because I want to automate the conversion process, what would be the drawbacks of applying this method to all ntsc files?

Thanks
__________________
Dave
Reply With Quote
  #9  
09-24-2004, 03:18 AM
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 Mental
Because I want to automate the conversion process, what would be the drawbacks of applying this method to all ntsc files?
I guess you read the manual(s) delivered with Decomb package. And you probably saw that there is not ONE kind of interlaced NTSC material, and there is not ONE method of deinterlacing them.

The drawback ? If one of your source is hybrid (for instance), the result will be very bad on this particular job.
Reply With Quote
  #10  
09-24-2004, 04:02 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
It would be nice to get sometime a Hybrid NTSC source for testing.

As its possible to configure telecide/decomb that way that a threshold is used for detecting real interlaced contend beside the telecined one.

So a telecide/decomb settet to a setting where ral interlaced scenes will be NOT deinterlaced, that could be processed afterwards in a conditionalfilter() by using comb=true where than a perfect deinterlacing function could be called.

hmmmm ..... the only problem is that I would need a long hybrid contend where real interlaced and telecine is included.
Reply With Quote
  #11  
09-24-2004, 06:15 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Maybe you can build it:

1 - Take a telecined source and split it with DIKUmsicer in several parts.
2 - Take a interlaced source and split it with DIKUmsicer in several parts.
3 - Load one type and another in avs script with directshowsource or do a d2v project for each one.
4 - Use ++ instuction.


Also you could do it without split files with trim and ++ functions.

All these stuff is only theoretical. I don't do it never.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Audio while converting AVI to KSVCD ? back2grave Video Encoding and Conversion 7 09-11-2004 03:47 AM
Problem converting two or More AVIs to 1 KVCD p2phunter Video Encoding and Conversion 2 03-18-2004 01:01 PM
Avisynth: Problem converting 29.97fps Interlaced to 23.976 Paul0889 Avisynth Scripting 0 01-25-2004 01:15 PM
DVD2SVCD: Problem converting to PAL-KVCD TheDJ Video Encoding and Conversion 6 10-07-2003 05:08 AM
Avisynth: Converting from old svcds? amir454 Avisynth Scripting 1 04-06-2003 09:32 AM

Thread Tools



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