View Full Version : old PAL interlaced videos to H264??
Blackout
13th May 2010, 15:03
hi all,
i hope some of the knowledgeable fine ppl here can answer this one, ive done a few searches and wasted a lot of time on this. i have some old interlaced PAL 25fps VHS video tapes. I want to convert them to h264, put them on my WD Live media player and throw out the video tapes forever.
I am yet to get a positive process to do the avi to h264 conversion. I would like to think i know a little bit about video. As the video is interlaced i want to keep the files interlaced to keep all the information (these files are going to be my "archive" files forever of my video tapes).
Ive tried several h264 conversion processes (Handbrake, Divx Converter Plus PRo etc) and every time, the h264 files are covered in messy/ugly interlacing artifacts. I was under the impression that the h264 codec could handle interlaced? is this not the case? is the only way to keep all the information from my video tapes to make mpg2 files? (i know the mpg2 codec supports interlaced). mpgs are way bigger for the seemingly same quality and that would mean many more hard drives (and cost).
is 25 fps interlaced the same as 50fps progressive? if i loaded the avi VHS interlaced files into Sony Vegas (25fps) and saved an avi that is 50fps prog would that keep all the information??
these questions keep me up at night staring at the roof in bed...thank you for your responses in advance,
Blackout
You seem to be missing a good GUI (You could use the command line but seeing as you are a noob then you prolly won't). Download MeGUI amd just check encode interlaced. Simple as that. You need to set the encoder to encode it interlaced otherwise it will weave the video.
Blackout
13th May 2010, 17:56
Thanks Gser. I just seem to loathe anything that requires AviSynth and messing around with scripts. I just tried MeGui and i generated the script for the file, i could see the video in the display window and scroll thru it, but as typical, when i try to load the avisynth file into MeGui i get the popup error box "AviSynth script error: AVISource: couldnt locate a decompressor for fourcc dvsd.....line 1"
these kind of problems are never ending with avisynth and scripts. I have tried to look on the net, is there a prog like Handbrake that has the "interlaced encoding" tickbox other than MeGui? surely this would be a really important setting, it always amazes me how its always buried under pages and tabs somewhere inconspicuous...
any help with a non-avisynth script encoder or a solution to the error i get would be appreciated.
poisondeathray
13th May 2010, 17:59
you need to install a dv vfw decoder , e.g. cedocida . ffdshow also has one you just have to enable it in the vfw configuration
Ive tried several h264 conversion processes (Handbrake, Divx Converter Plus PRo etc)
Well, HandBrake doesn't encode as interlaced unless you add :interlaced to the manual parameters string. As for DivX Converter, I don't know what it does, but I'd recommend using something x264-based instead for better quality, configurability and community support.
and every time, the h264 files are covered in messy/ugly interlacing artifacts.
Even if you make a proper interlaced encode, you will see weaving unless your player or decoder deinterlaces automatically. Most software players will not do that without some tinkering. Also, in case of x264, you should use a recent build that includes NAL-HRD so that field order signals get added to the stream.
is 25 fps interlaced the same as 50fps progressive?
Nope, but 50p can contain all the information from the 25i video if you bob it.
if i loaded the avi VHS interlaced files into Sony Vegas (25fps) and saved an avi that is 50fps prog would that keep all the information??
I wouldn't trust Vegas to do that well. It may do simple bobbing that does keep all the information, but it won't look particularly good when played back on a progressive display.
TempGaussMC beta2 (http://forum.doom9.org/showthread.php?p=1378526#post1378526) has a lossless(=3) mode that should be much better. You'll need to learn a bit about AviSynth usage though. It's not too hard and definitely worth it in the long run!
Blackout
14th May 2010, 10:25
hi nm,
sounds perfect. If all i have to do is insert :interlaced into the manual parameters string of Handbrake, then i will have the best of both worlds.
i assume it is the window under the "advanced" tab in Handbrake. so i simply added to the end of the string
:interlaced
and re-encoded. it does not seem to make a difference, Handbrake did not create an interlaced h264 video.
i also tried
:interlaced=1
no difference.
is this meant to be set differently?
do you mean the setting of
:bff
?
many thanks,
Blackout
ps thank you for the info on interlaced and 50fps. it is what i suspected ;)
hi nm,
sounds perfect. If all i have to do is insert :interlaced into the manual parameters string of Handbrake, then i will have the best of both worlds.
HandBrake 0.9.4 uses an old x264 without NAL-HRD support, so there's no field-order signaling. That doesn't matter if you only use it for archival purposes and decode the video with software decoders, but you won't get automatic deinterlacing.
I don't know if there's a recent snapshot of HandBrake for Windows built with newer libx264.
i assume it is the window under the "advanced" tab in Handbrake. so i simply added to the end of the string
:interlaced
and re-encoded. it does not seem to make a difference, Handbrake did not create an interlaced h264 video.
How did you determine that? It does work for me. If I check x264 parameters from the output (strings -50 output.mkv), there's mbaff=1.
do you mean the setting of
:bff
:bff and :tff will work on recent (lib)x264 versions that include NAL-HRD support.
Blackout
14th May 2010, 12:50
thanks again for your quick response nm. your experience is appreciated.
re:testing if its interlaced i have the text credits from an awards ceremony that i captured to AVI. its pretty easy to watch the scrolling text credits and see if they pan smoothly across the screen or "ticker" across , or blurr across with teeth....
i am using Handbrake 0.94 in Win7.
:interlaced
did not work.
:interlaced=1
did not work
:bff
did not work
:bff=1
did not work
:mbaff=1
did not work...
:mbaff
did not work...
re:testing if its interlaced i have the text credits from an awards ceremony that i captured to AVI. its pretty easy to watch the scrolling text credits and see if they pan smoothly across the screen or "ticker" across , or blurr across with teeth....
I can pretty much guarantee that you will see "teeth" even if interlaced encoding is enabled, because, as I already said:
Even if you make a proper interlaced encode, you will see weaving unless your player or decoder deinterlaces automatically. Most software players will not do that without some tinkering. Also, in case of x264, you should use a recent build that includes NAL-HRD so that field order signals get added to the stream.
and:
HandBrake 0.9.4 uses an old x264 without NAL-HRD support, so there's no field-order signaling. That doesn't matter if you only use it for archival purposes and decode the video with software decoders, but you won't get automatic deinterlacing.
You'll need signaling for decoders such as CoreAVC to deinterlace automatically. Some players (VLC, MPlayer, ...) will never deinterlace without user-specified filtering.
Blackout
14th May 2010, 13:03
Hi nm,
my WD Live TV media box handles interlaced video just fine. When i play a mpg2 (made from the same avi) the text scrolls ultra-smooth across my screen.
I have just tried Procoder 3. It has presets for H264. You can select if it processes interlaced. It made me a H.264 file that is interlaced! wow. it played perfectly smoothly on my WD Live TV also. unlike the files made from Handbrake. so i know this is possible and should work. but it just doesnt work with Handbrake.
The only problem, is that the Procoder 3 render of H264 is not particially a great encode. x264 would sure be a better quality encode so i would really like to continue pursuing this problem....
my WD Live TV media box handles interlaced video just fine. When i play a mpg2 (made from the same avi) the text scrolls ultra-smooth across my screen.
I have just tried Procoder 3. It has presets for H264. You can select if it processes interlaced. It made me a H.264 file that is interlaced! wow. it played perfectly smoothly on my WD Live TV also. unlike the files made from Handbrake. so i know this is possible and should work. but it just doesnt work with Handbrake.
As I have explained many times, this is due to signaling. The video is interlaced just fine when you add :interlaced to HandBrake's parameters, but decoders and players need signaling to deinterlace it automatically.
If you want automatic deinterlacing, use a recent x264 build directly on the command-line or wait until next HandBrake release.
Blackout
14th May 2010, 17:27
i get it nm. Thank you for your assistance in this. I await the next Handbrake release.
btw, i took my PAL interlaced 25fps video, imported it into Sony Vegas, changed the project properties to progressive and 50 fps. And saved a new avi to the Canopus dv avi codec at 50fps progressive.
It seems the 50fps avi does indeed contain all the information/frames of the 25fps interlaced! The credits scroll smoothly exactly like the interlaced 25fps video. And handbrake also processes the 50fps avi file into a h264 .mkv file! interesting....seems Vegas did handle the information well. surprising....
It seems the 50fps avi does indeed contain all the information/frames of the 25fps interlaced! The credits scroll smoothly exactly like the interlaced 25fps video. And handbrake also processes the 50fps avi file into a h264 .mkv file! interesting....seems Vegas did handle the information well. surprising....
Yes, even the simplest interpolating bobber will give smooth motion and all the information is there, but slowly moving and stationary parts of each frame will only have half of the vertical resolution because every other row is interpolated. This is clearly visible on playback when compared against more intelligent bobbers that use information from previous and following fields to construct the missing lines.
If you're about to take this route, I'd seriously suggest testing different methods first. TGMC (beta2, lossless) is a pretty nice filter for this purpose.
Blackout
31st May 2010, 18:04
thanks nm.
i have been doing some testing extensively on this. When ripping a dvd there is no doubt the advantage that H264 quality has over Divx.
But in my case i am starting to wonder if SD VHS interlaced video is better just being converted to mpg2 than h264. mpg2 format really is designed/made for the older technology of interlaced and standard def. h264 seems to be designed from the ground up for progressive , higher def stuff. When i convert my pal videos to h264 it certainly is keeping all the information when i keep it/convert to 50fps but in the end H264 seems to not handle the "grain" of poor video as well and becomes blokky, even with high bitrates...similar bitrates to mpg2 eg 8000. my guess is that part of the problem is what you are talking about nm with the vertical resolution problem but i wander if mpg2 (running at 8000 bitrate) is just a better archive storage format for VHS video converted straight across than h264, to keep the picture quality consistent, and interlaced as per the original. Of course i am trying to suggest a rule in a situation that is unique for every different piece of video depending on its original condition, but im trying to request an overall statement about your experience in general, overall what do you think...
Cheers,
Blackout
Guest
31st May 2010, 18:11
h264 seems to be designed from the ground up for progressive , higher def stuff. That's nonsense. If you use a poor AVC encoder (or choose bad settings), or your player cannot handle interlaced AVC streams properly, don't blame the AVC specification.
i have been doing some testing extensively on this. When ripping a dvd there is no doubt the advantage that H264 quality has over Divx.
But in my case i am starting to wonder if SD VHS interlaced video is better just being converted to mpg2 than h264. mpg2 format really is designed/made for the older technology of interlaced and standard def. h264 seems to be designed from the ground up for progressive , higher def stuff.
When using a decent encoder such as x264 or MainConcept, H.264 is significantly (about 50 %) more efficient than MPEG-2, even with interlaced SD VHS sources. H.264 actually has better tools for encoding interlaced video than MPEG-2 and good encoders keep grain and noise without blocking when the bitrate is high enough.
When i convert my pal videos to h264 it certainly is keeping all the information when i keep it/convert to 50fps but in the end H264 seems to not handle the "grain" of poor video as well and becomes blokky, even with high bitrates...similar bitrates to mpg2 eg 8000.
Sounds like a problem in encoding parameters. Which encoder are you using now and how is it set up?
Blackout
4th June 2010, 13:48
im going to try a few other encoders i think. ive been using Procoder 3. but Vegas of course has the mainconcept h264, i forgot that. Im so used to avi in, avi out for Vegas. Just annoys me how slow it is when doing mpgs and that my machine is useless until its done.
its interesting that i have a 720x576 16x9 avi file, and some h264 encoders turn that into a 1024x576 mp4 file to keep the aspect ratio, and some , like Procoder, manage to set a 16x9 "flag" in the mp4 to make it still 720x576 file, but with the 16x9 widescreen flag on. i wander if there is a difference to the encode quality and its effects on bitrate for the two different options. One would be working on more pixels for the same result i would have thought...
bunklung
1st January 2013, 13:48
Interlaced handbrake 0.9.8 support:
1) set to dvd preset
2) add :tff OR :bff in the advanced tab, put at end (append).
3) turn off all filters: set to off, set fps to same as source and constant.
Use mediainfo and set to sheet to find if tff or bff
4) feel free to set resolution, etc
http://www.antifart.com/2013/01/01/handbrake-retainkeep-interlaced-video-h-264x-264-for-encoding.html
Blue_MiSfit
1st January 2013, 22:55
Please try to avoid thread necromancy ;)
This thread hadn't been touched since 2010. If you'd like to discuss this or a similar topic, please open a new thread.
Thanks!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.