Log in

View Full Version : Converting 20fps wav to 25fps


speedripper
29th March 2002, 17:20
I have some smr movies which I would like to convert to SVCD.
They are all 20fps, so I have created a video only avi and a coresponding wav file with vdub.
The avi's frame rate can be converted using avifrate.
BeSweet GUI can't do the audio conversion.
How else can this be achevied?

Thanks in advance.

speedripper
30th March 2002, 09:35
Does anyone know where I can get download a freeware tool that will stretch and alter the pitch of the wav so sync is not lost?

Swede
30th March 2002, 10:26
I'm not quite sure that I understand the problem... If you save the wav you've got the sound.. A wav-file don't have any framerate. Just use the same file with your fps-converted video-only.

speedripper
30th March 2002, 11:19
You are quite correct the wav does not have a frame rate.
It does however have a length.
The original avi has a frame rate of 20fps with audio in perfect sync.
I wish to produce a smooth PAL S(VCD) with TMPGEnc or DVD2SVCD.
To do this the frame rate must altered to 25fps before encoding (TMPGEnc will attemp this by adding or removing frames which results in unsmooth motion) . By doing this the length of the film will be altered (every second there will be 5 more frames :( )
When the avi and wav are used to encode an mpg1 or mpeg2 the audio will be out of sync.
It will become 5 frames more out of sync every second. After an hour the audio will be about 10mins out of sync.
:eek:
So I need to alter the length of the audio in such a way that the pitch remains the same.

Apfelstruhdl
30th March 2002, 11:43
i think you can stick to your wav as the video will have 5 more frames per sec but playback will be 25fps so one sec of video is still one sec of video as there are more frames played but faster.

speedripper
30th March 2002, 11:58
I'm not an expert on this i'm afraid.
But I have tried it and on a 54min avi the audio lags approx 10mins after the video (using TMPGEnc 2.5 with standard Pal SVCD and also Pal VCD, works great for 25fps avi :( )
Help :confused:

Apfelstruhdl
30th March 2002, 12:01
so are there really frames insterted or is the movie just faster?

speedripper
30th March 2002, 12:18
More Info
I have tried.

1) TMPGEnc 2.5 with no prior conversion just a pal template.-Result audio\video in perfect sync but with frames added\removed resulting in less than perfect smothness. (Same result with NTSC template)

Or creating wav and avi with no audio with vdub.

2)changing avi to 25fps with vdub

3)changing avi to 25fps with avi[fr]changer

encoding changed avi and wav with TMPGEnc-result terrible out of sync sound which becomes progressively worse.

I tried BeSeet GUI to change the wav to match the altered 25fps avi.
This is the normal way for altering pal/NTSC and NTSC/pal. However 20fps to 25fps is not supported.
Does anyone know how I can acheve this?

ppera2
30th March 2002, 16:32
See NTSC-PAL conversion in Guides (SVCD section).
There is a way with Beesweet to make it. You need to change some values according to 20 fps...

However, I think that all this is no good idea. 25% faster sound will be terrible. I think that it's better to have nonsmooth video.

Apfelstruhdl
30th March 2002, 18:13
ok got your prob.
the method with vdub plays your video faster and it should be shorter (in time not frames) then before. so you really need to find a prog that transfers your wave so it plays also faster.
i know that besweet can transfer ntsc to pal, what is useless for you. but there should be a proggie that can do that...:D

TPN
31st March 2002, 01:14
Perhaps you could telecine the video (20/25 = 24/30).

grug2k
31st March 2002, 01:56
There are two ways to speed up the sound so it matches the video. The first is to just speed it up, the second is to use time compression. (expansion, really.)

As a simple 23.976 fps--> 25fps pitch conversion makes an audible difference to me (about a semitone raise in pitch), I'm sure 20fps-->25 would sound awful.

You could try getting the final size for your converted movie, and then using a wave editor with a time compression. I haven't tried it myself but I think Nero's Wave Editor has a time compression feature.

But the quality'll probably suck. I think you're gonna have to deal with jitter. What about an NTSC disc? Would 20/30 be more tolerable?

movmasty
31st March 2002, 09:36
>25% faster sound will be terrible. I think that it's better to have nonsmooth video.
-yes, really terrible....but better to have original pitch and smooth video.
Guys! you are spinning around like crazy ducks!
TPN even suggested to telecine the video!

if you need another fps for your movie,the way to go is inserting or deleting frames and keep the duration.
this isnt so easy as seems,also big editors have problems to do,

change framerate (http://forum.doom9.org/showthread.php?s=&threadid=21892)

vdub does fine,but only for integer ratios /2,/3 ecc.
and as you said tmpg doesnt do good.

freeware videomach (http://www.gromada.com) does perfectly,
save at the fps you need checking "keep duration"
but you should use some uncompressed format,before the final encoding

in this way you wont have audio desync.

on the other side,when you need to change the frame speed,and thus the movie duration,
you have to change the duration of the audio too,
but WITHOUT ALTERING THE PITCH!
i use sound forge for this, time change option,
or you could use the new free Asia audio editor.

speedripper
31st March 2002, 10:46
Thanks for everyones help.
Videomatch seem to be just what I am after.
It looks like I'll need a bigger hard drive though if I want to save in an uncompressed format. Also I better change to an NTFS drive.

Can Vdub do the same thing (changing frame rate while maintaining duration)?

Is there any other software that can do the same without the large file sizes.

movmasty
31st March 2002, 11:06
doesnt depends from sw,but from video codec
you dont have to use the uncompressed RGB,but any codec with light compression,lossless or lossy

huffyuv
picvideo
indeo raw ecc.

and you can always do the vid in smaller parts, then join.

vdub can do that job only under strict circumstances.

avig70
31st March 2002, 11:30
you can just use sound forge 5.

It has a feature called "time streach" that you can use although I think it doesn't support VBR mp3 for saving the file so you will need to work on .WAV instead and then recompress it to mp3.

Also see:

http://forum.doom9.org/showthread.php?s=&threadid=21620

dakos

ppera2
31st March 2002, 14:56
Speedripper asked for freeware...
Speeding up 25 % will cause not only terrible sound, even if it is made with preserve pitch, but video will be also too fast...

speedripper
31st March 2002, 15:31
Maybe the way to go is videomach. I'm just a little unsure about adding another layer of compression. The original avi is already an smr compressed file (a divx variant with a stupid frame rate:mad: )
I'll trial it and report back.
Sound forge my be worth a go(is there a trial version?). How good is it. Will everyone sound like birds or is there a accurate way to componsate?:D
How accurate is the resultant lip sync.

movmasty
1st April 2002, 18:48
Sound forge is a professional editor.....
and you could give a chance to the free Asia too.

but remember that doing with videomach you wont need to modify the audio.

about the recompression, use a smooth filter to eliminate recompression artifacts,say the spatial soften of avisynth,
and some light sharpen if the movie will seem to you too soft.

avig70
2nd April 2002, 08:08
v

avig70
2nd April 2002, 08:10
Thats right its a proffesional sound editor but they have a trial version and that spacific feature is enabled without any limitations.

I guess I don't have to tell you about cracks....

dakos

ppera2
2nd April 2002, 14:31
@movmasty

Videomach is not freeware but shareware. I tried it, it's not bad, but I don't see that framechange is something special good.

I got same result with AVISynth ChangeFPS() command, and it's free and faster.

speedripper
4th April 2002, 10:48
Thanks ppera2,
Avisynth is a great tool. There is no need for more compression and large file sizes. Just write your script and load into TMPGE and go
:D

Do you know where i can download Avisynth 1.0beta7? I'd realy like to try the ConvertFPS filter.

The filter attempts to convert the frame rate of clip to new_rate without dropping or inserting frames, providing a smooth conversion with results similar to those of standalone converter boxes.

Sounds good:cool:

movmasty
4th April 2002, 13:28
videomach is a shareware free for personal use...
since avisynth didnt supported this ChangeFPS and big editors like premiere have some trouble changing fps,
it does a great job

>The filter attempts to convert the frame rate of clip to new_rate without dropping or inserting frames

if frames are not dropped or inserted,the duration change,
if the duration doesnt change frames are dropped or inserted

avisynth misterious version with convertFPS (http://forum.doom9.org/attachment.php?s=&postid=110586)

ppera2
4th April 2002, 15:07
@speedripper

See in Avisynth section of this forum for download.
I use Avisynth 1.05 . But I think that there is no any change in this FPS commands in last time.

ChangeFPS() changes framerate by dropping or duplicating frames.

AssumeFPS() changes it by changing speed, so duration will change too.

Btw. it looks that ChangeFPS has some bug, and reports incorrect number of frames. Must check it...

speedripper
4th April 2002, 20:17
Convert fps is mentioned in the doc section of this page
http://www.videotools.net

"The output will have (almost) the same duration as clip, but the number of frames will change proportional to the ratio of target and source frame rates. "

I have now tried avisynth. ChangeFPS() performs no better than TMPGE so videomach is still the only viable method for me.

I'm new to this so I may not be doing this correctly.
Here is my script.

function change(clip) {
ChangeFPS(clip,25)
}
AVIFileSource("d:\divx\(smr)intheshadows-scr-(1of2).avi").change()


Is there any way this can be improved?
I used this avisynth.avs file as video input to TMPGE

speedripper
4th April 2002, 20:19
More info.

The audio input to TMPGE is a wav file saved from vdub.
Is all this ok, because the outputed mpg is not smooth.

movmasty
5th April 2002, 08:52
avisynt got also the SelectEvery command,es:
SelectEvery(6)will keep 1 frame every 6
SelectEvery(6,1,2,3,4,5)will keep 1 frame every 6, but doing 5 times,
so you will keep 5 frames every 6,
that is to pass from 30 to 25
this command always gives smooth output

i dunno how to pass from 25 to 30 duplicating 5 frames

Trahald
5th April 2002, 17:03
do not do any funny telecining type deals

if you have an smr movie AND the origional movie you'll see theirs is longer (by time). they change fps to 20 (virtual dub doesnt take away frames.. it just has them playback slower) and use the vdub feature to slow the audio to match the video. using the assumefps is the CORRECT thing to do
you have to shorten the audio to match the video (cooledit does it perfect... )

ive done 10 movies and they came out perfect

Trahald
5th April 2002, 17:06
oh.. and most of their non rips are PAL.. so you are shooting for 25 fps

(the frame size is 352x288) on some they squish it to 16:9... so harder to tell.. but most likely on non dvd rips 25 fps is the way to go

speedripper
5th April 2002, 20:42
I have tried using vdub (without avidynth) to alter the frame rate to 25fps. As you say the audio is then very much longer than the video (10 min approx for the film I tried).
I then used cool edit 2000 try out to compress the length of the audio -Transform-Time/Pitch-Stretch (125%)
The audio is now exactly the correct length.
The resultant mpg would mot play correctly (made with TMPGE).
What exactly do I need to do to make this work?

ppera2
5th April 2002, 22:36
Originally posted by speedripper
.....The resultant mpg would mot play correctly (made with TMPGE).
What exactly do I need to do to make this work?

More details, please...

Trahald
6th April 2002, 06:03
make sure if you go for 25fps you use 352x288 PAL video.. if you choose you can go for 23.976 ntsc (119.88% in cool edit) then video must be 352x240..

as ppera2 stated.. more details.. what do you mean by not play correctly?

speedripper
6th April 2002, 07:33
I encoded the compressed wav and 25fps avi with TMPGE SVCD PAL standard template and VCD PAL. I left TMPGE to resize as as it does a good job for all other files input. In both instances the resultant mpg1/2 played fine for a short time (~2mins) then it froze. The mpg would not play at all beyond that point. The avi played fine to the end and so did the wav. The durations of both were a perfect match.
And another thing Cool Edit 2000 is soooooooooo sloooooow. It took several hours on my PIII 850 to compress the audio.

:mad:

avisynth would be so much neater.

speedripper
6th April 2002, 08:43
Avisynth 1.07a beta can be found at.

http://members.cox.net/hansenjo1/avisynth-1.0b7a.zip

This has the ConvertFPS filter.
However it currently requires YUY2 input, so my smr stuff will have to be re saved before conversion.
It looks interesting though.

Here is an explanation of the filter, in the avisynth doc section.

http://www.videotools.net/uk/index.php

ppera2
6th April 2002, 14:26
I never had problems with TMPGEnc. However, I read here that some versions make problems.
Try some other version if you can find it.

Wavelab makes timestretch very fast. I need about 4-5 min for 2 hour movie with medium quality setting (Athlon@1380).

Trahald
6th April 2002, 18:02
you just need to put
ConvertToYUY2()
in your script before the filter

hmm.. a new avisynth.. cool

ConvertFPS will leave the video longer and just interpolate new frames so it ends up 23.976 or 29.97 fps?

unfortunately adding frames means you have to stretch your bitrate further.. anyways.. whatever works for you..

actually tmpgenc will take the avi as is.. or you can run it through avisynth if you want to add filters.. but if tmpgenc is given a non vcd fps it does the converting on its own (by adding frames like convertFPS although its not as smooth) and leaving the lenght the same.. the audio doesnt have to be converted

i have to use avisynth because i encode with cce which has no built in frame rate conversion..

here is a sample script

LoadPlugin("C:\simpleresize.dll")
AviSource("C:\cheesy20fpsmovie.avi")
ConvertToYUY2()
SimpleResize(352,240) #ntsc
ChangeFPS(23.976)
ResampleAudio(44100) #athlon fix

even though the ORIGIONAL source was pal (usually) i convert the 20fps to ntsc just for compatability (although my player can do pal or ntsc) plus pal screen is larger so encode takes longer and bitrate is spread further