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 10th December 2007, 10:14   #1  |  Link
ernstblaauw
Registered User
 
Join Date: Nov 2003
Posts: 106
From DVD (PAL, interlaced) to Youtube

Hi all,

For some promotional stuff of my sports club, I want to upload some parts of home-made DVD's to Youtube. Those DVD's are encoded in PAL and are interlaced; Youtube advices to upload progressive 30fps.

Therefore, I want to convert my DVD's to 30 fps progressive. I think I first need to deinterlace and after that change the framerate to 30. Is this correct? Or do I first need to change the framerate, and after that deinterlace?

Until now, I used the following script:
Code:
LeakKernelDeint(1)
ChangeFPS(29.97)
This does not produce very satisfactory results: every 4th and 5th frame are the same. Is it possible to produce more fluent results? I would really love to know, but I didn't found any topics/websites about this one.
Thanks for all your help (or at least reading this )!
ernstblaauw is offline   Reply With Quote
Old 10th December 2007, 10:40   #2  |  Link
ajk
Registered User
 
Join Date: Jan 2006
Location: Finland
Posts: 132
I suggest not using 30fps, the bitrate YouTube allows is rather low. I have achieved good results by simply doing a SelectEvery(3,0) after a bob(), this leads to 16.7 frames per second and much clearer image quality. If you want to go a bit further, you can also encode the flash video yourself and achieve a higher bitrate in addition, see this thread here.

Here is something I uploaded earlier as a test, this is from a video game but it works rather well with any kind of material. Of course you don't have the motion as smooth as 30fps would allow, but personally for me the difference in image quality is worth it. One drawback is that the duration will be wrong, that clip is only about 4 minutes in length even though it says 11 on there.

Even if you do decide to keep the motion smoother, it's still probably worth doing the encoding yourself and sticking to 25 fps rather than trying to get exactly 30; I have never managed good results if you let YouTube encode the video, no matter what the uploaded source file is like.

Last edited by ajk; 10th December 2007 at 10:44.
ajk is offline   Reply With Quote
Old 10th December 2007, 12:24   #3  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: Yorkshire, UK
Posts: 1,673
You don't need to get up to 30fps for YouTube - that's just the limit. It'll happily keep 25fps at 25fps.

Code:
video=mpeg2source("whatever.d2v")
audio=mpaSource("whatever.mp2")

audiodub(video,audio)

crop(8,0,704,576)

converttorgb(interlaced=true)

separatefields()

selectevery(2,0)

bicubicresize(320,240)
That's it. The converttoRGB is kind of optional.


If there is a lot of movement or difficult-to-encode stuff in the video, ajk's 50/3 rather than 50/2 frame rate may help keep the artefacts down, at the expense or a more stuttery look.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 10th December 2007, 12:40   #4  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,044
Quote:
Originally Posted by ernstblaauw View Post
Hi all,
Until now, I used the following script:
Code:
LeakKernelDeint(1)
ChangeFPS(29.97)
to be onest 29.97 is not exactly NTSC frame rate - frame should be 30000/1001 ie 29,97002997002997002997002997003...
pandy is offline   Reply With Quote
Old 10th December 2007, 14:48   #5  |  Link
ernstblaauw
Registered User
 
Join Date: Nov 2003
Posts: 106
Quote:
Originally Posted by 2Bdecided View Post
You don't need to get up to 30fps for YouTube - that's just the limit. It'll happily keep 25fps at 25fps.

Cheers,
David.
Ok, I'll try that. I tought it 30 fps was the best setting after reading this page. I will not alter the framerate and see what happens.

Quote:
Originally Posted by ajk View Post
I suggest not using 30fps, the bitrate YouTube allows is rather low. I have achieved good results by simply doing a SelectEvery(3,0) after a bob(), this leads to 16.7 frames per second and much clearer image quality. If you want to go a bit further, you can also encode the flash video yourself and achieve a higher bitrate in addition, see this thread here.
I'm going to try this one. I wil use the ffdshow encoder for FLV1, and see what happens.

Thanks for your help!
ernstblaauw is offline   Reply With Quote
Old 10th December 2007, 17:22   #6  |  Link
ernstblaauw
Registered User
 
Join Date: Nov 2003
Posts: 106
I've uploaded a video to Youtube which I converted by hand to .flv. What do you think of it?
The movie can be found here.
ernstblaauw is offline   Reply With Quote
Old 10th December 2007, 18:00   #7  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: Yorkshire, UK
Posts: 1,673
I think the aspect ratio is wrong.
2Bdecided is offline   Reply With Quote
Old 11th December 2007, 00:09   #8  |  Link
ernstblaauw
Registered User
 
Join Date: Nov 2003
Posts: 106
Quote:
Originally Posted by 2Bdecided View Post
I think the aspect ratio is wrong.
That could be the case. My AviSynth script looks like:
Code:
Crop(24, 54, -24, -54)
lanczos4resize(320,240)
So, I'm first cropping to 4:3 and then resizing. Should I remove the 'Crop'? (Or at least do not change the width/height ratio?)
__________________
My website: www.ernstblaauw.nl
ernstblaauw is offline   Reply With Quote
Old 11th December 2007, 04:12   #9  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Quote:
Originally Posted by ernstblaauw View Post
That could be the case. My AviSynth script looks like:
Code:
Crop(24, 54, -24, -54)
lanczos4resize(320,240)
So, I'm first cropping to 4:3 and then resizing. Should I remove the 'Crop'? (Or at least do not change the width/height ratio?)
If it's PAL 16:9 I'd suggest you do a resize to 1024x576, crop it to proper 4:3 then downsize to 320x240. Otherwise, if it's 4:3 material resize to 768x576 first and do a straight drop down to 320x240 or crop as necessary.
Sagekilla is offline   Reply With Quote
Old 11th December 2007, 10:32   #10  |  Link
ernstblaauw
Registered User
 
Join Date: Nov 2003
Posts: 106
Quote:
Originally Posted by Sagekilla View Post
If it's PAL 16:9 I'd suggest you do a resize to 1024x576, crop it to proper 4:3 then downsize to 320x240. Otherwise, if it's 4:3 material resize to 768x576 first and do a straight drop down to 320x240 or crop as necessary.
The source is 720x576. However, I already cropped to 4:3 by this line:
Code:
Crop(24, 54, -24, -54)
By adding that line, the resulting size is 696x522, which is 4:3. After that, I crop. Therefore, I don't think that is the cause. Is it possible there is another reason?

After removing that Crop, it looks more natural. I think I'm going to reencode and leaving that one out!
__________________
My website: www.ernstblaauw.nl

Last edited by ernstblaauw; 11th December 2007 at 10:42.
ernstblaauw is offline   Reply With Quote
Old 11th December 2007, 12:15   #11  |  Link
ajk
Registered User
 
Join Date: Jan 2006
Location: Finland
Posts: 132
Sounds complicated. If the source is anamorphic 16:9, and you want to keep it wide screen, it should be fine by simply doing a resize(320,180) and addborders(0,30,0,30) to add the necessary letterboxing.

You should only need to crop it a little bit in this case if you want to get rid of some ugly borders in the image or something like that.

If you want to crop it to full screen (4:3) and avoid letterboxing, you need to take about 96 pixels off from both sides and then do the resize to 320x240. Just make sure you don't clip off the edges of text or other important stuff from the video however.
ajk is offline   Reply With Quote
Old 11th December 2007, 12:47   #12  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: Yorkshire, UK
Posts: 1,673
Quote:
Originally Posted by ernstblaauw View Post
By adding that line, the resulting size is 696x522, which is 4:3.
But SD video pixels aren't square - so by keeping a 4x3 ratio of pixels you're not keeping an actual 4x3 area.

If the source is 4x3, I already gave you the correct crop and resize in my code.

Cheers,
David.
2Bdecided 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 17:17.


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