Detelecine?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
MuckSavage
Posts: 6
Joined: Sun Apr 15, 2007 6:11 pm

Detelecine?

Post by MuckSavage »

Did a google search, but still unsure of what this does? Anybody have any links or a quick explanation?
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

I have a suggestion: read the damned HandBrake Guide :) http://handbrake.m0k.org/trac/wiki/HandBrakeGuide

It's not an entirely straightforward concept to explain, so I'm not even going to attempt a summary.
MuckSavage
Posts: 6
Joined: Sun Apr 15, 2007 6:11 pm

Post by MuckSavage »

Thanks for the link.
hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman »

Wow, seeing my response there it sounds really harsh. It was only meant to be a gentle jibe!
MichaelLAX

Do we have to pay extra for "attitude"?

Post by MichaelLAX »

hawkman wrote:read the damned HandBrake Guide :)

Wow, seeing my response there it sounds really harsh. It was only meant to be a gentle jibe!
Can't wait to see your response when you're really angry!
egor
Posts: 1
Joined: Wed Aug 22, 2007 4:22 pm

Post by egor »

I've read a lot about this because over half the movies on my shelf have been telecined using 3:2 pulldown. I was thrilled when I saw the detelecine feature added to Handbrake, but I'm missing some key piece of info:

Specifically, when I run a telecined movie through the detelecine process, the interlacing disappears (as expected), but the movie remains at 29.97 fps (giving a duplicate frame every fifth frame). I would have expected the process to drop the duplicate frame and render a 24 fps movie.

Feel free to chastise me for "not reading the manual." I've read a zillion of 'em but, obviously, not the right one. :)
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Post by cvk_b »

egor wrote:
Specifically, when I run a telecined movie through the detelecine process, the interlacing disappears (as expected), but the movie remains at 29.97 fps (giving a duplicate frame every fifth frame). I would have expected the process to drop the duplicate frame and render a 24 fps movie.
You're right. It's not discarding doubled frames... yet.
huevos_rancheros
Posts: 12
Joined: Fri Jul 20, 2007 2:40 am

Post by huevos_rancheros »

cvk_b wrote:You're right. It's not discarding doubled frames... yet.
Exactly - the primary concern with discarding frames in the detelecine filter was keeping sync with the audio. By duplicating frames, the sync issue was sidestepped for the time being until a proper mechanism for dropping the frame rate from 30 fps to 24 fps while maintaining audio/video sync could be worked out. This is mentioned briefly in the HandBrake frame rate guide.

For material that is sanely telecined, I still find the current detelecine approach preferable to deinterlacing even with the new deinterlace options, since you don't get any deinterlacing artifacts (i.e. ghost images, broken or jagged lines in animation, etc.) in the resulting video.
Anamonde
Novice
Posts: 71
Joined: Fri Mar 16, 2007 11:11 pm

Post by Anamonde »

Why is audio sync even a problem? Surley you dont have to do anything to the Audio at all.

After all, a 2h12 movie at 29.97 is still a 2h12 movie even at 24fps. The audio can just stay the same.... unless each frame is linked a specific time in the audio track for some reason.

I am not sure how handbrake is built as I am not a programmer, but I do work in digital post-production and frame rates is something I have to work with every day... sorry I can't be more help.
PuzZLeR
Bright Spark User
Posts: 287
Joined: Tue Apr 24, 2007 4:01 am

Post by PuzZLeR »

Not sure what happens in the MP4 container, but if you interleave every frame with a segment of audio, then changing the framerate could mess with the sync. This could definitely happen in something like an AVI container, or even with MPEG-2. Time stamps, etc. could be thrown off. Being an old-school "DivX-er", this was a typical problem we had to deal with.

Nevertheless, I wouldn't worry about it. Here's your answer at any rate.

Many experienced encoders encode their video and audio separately and mux them together afterwards. Assuming both audio and video have the same lengths at the end of encoding, it should be no problem. The sync should be fine at any video framerate.
huevos_rancheros
Posts: 12
Joined: Fri Jul 20, 2007 2:40 am

Post by huevos_rancheros »

Hmm...now that I think about it, you are both correct that A/V sync shouldn't really be an issue. When I originally put the code in, I was dropping frames but that caused some difficulty with sync, so I just modified the ported mencoder pullup filter to duplicate older frames instead to maintain 30 fps.

However, jbrjake mentioned that we were previously not correctly receiving a particular piece of the puzzle (the PIC_FLAG_REPEAT_FIRST_FIELD frame flag from libmpeg2) and this has apparently been fixed and should be showing up now. I'll take another look at the code to see if the original method of dropping frames is functional now that we are receiving this information.
eddyg
Veteran User
Posts: 798
Joined: Mon Apr 23, 2007 3:34 am

Post by eddyg »

huevos_rancheros wrote:Hmm...now that I think about it, you are both correct that A/V sync shouldn't really be an issue. When I originally put the code in, I was dropping frames but that caused some difficulty with sync, so I just modified the ported mencoder pullup filter to duplicate older frames instead to maintain 30 fps.
Isn't sync before render? In which case you are dropping the frames after they have been synced. If it were before then there definitely wouldn't be an issue. Being afterwards there may be an issue, but I'd have to look at that more closely. They are still using the PTS timestamp so in theory it shouldn't be an issue. However we traditionally are interleaving audio and video out of the sync thread, which would result in issues.

Basically suck it and see for now.

Cheers, Ed.
huevos_rancheros
Posts: 12
Joined: Fri Jul 20, 2007 2:40 am

Post by huevos_rancheros »

eddyg wrote:Isn't sync before render? In which case you are dropping the frames after they have been synced. If it were before then there definitely wouldn't be an issue.. They are still using the PTS timestamp so in theory it shouldn't be an issue.
Good point and since sync itself could potentially be throwing away video frames, the best spot for detelecine to operate would actually be before the sync process since missing video frames would jack with the pullup sequence. Like you said though, the PTS should still match up even if the muxer is receiving fewer video frames. Worth a shot at any rate...
Conner
Posts: 38
Joined: Wed Jan 03, 2007 12:58 am

Post by Conner »

cvk_b wrote:
egor wrote:
Specifically, when I run a telecined movie through the detelecine process, the interlacing disappears (as expected), but the movie remains at 29.97 fps (giving a duplicate frame every fifth frame). I would have expected the process to drop the duplicate frame and render a 24 fps movie.
You're right. It's not discarding doubled frames... yet.
any idea when this might get fixed? not discarding the doubled frames makes the video playback choppy.
Deke
Posts: 8
Joined: Sun Sep 02, 2007 3:47 am

Post by Deke »

Do you have Cinema Tools? That might work to delete the duplicate frames.
Deke
Conner
Posts: 38
Joined: Wed Jan 03, 2007 12:58 am

Post by Conner »

Deke wrote:Do you have Cinema Tools? That might work to delete the duplicate frames.
Deke
so... after encoding with handbrake to mp4, I should run this file thru a $500 software package that might work to delete the duplicate frames?
Post Reply