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 » Wed Aug 22, 2007 12:02 am

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 » Wed Aug 22, 2007 12:11 am

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 » Wed Aug 22, 2007 12:15 am

Thanks for the link.

hawkman
Veteran User
Posts: 609
Joined: Sat Feb 17, 2007 9:46 pm

Post by hawkman » Wed Aug 22, 2007 12:43 am

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 » Wed Aug 22, 2007 6:17 am

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 » Wed Aug 22, 2007 4:31 pm

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 » Wed Aug 22, 2007 4:43 pm

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 » Wed Aug 22, 2007 5:03 pm

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
Posts: 71
Joined: Fri Mar 16, 2007 11:11 pm

Post by Anamonde » Fri Aug 24, 2007 6:27 am

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 » Fri Aug 24, 2007 8:29 am

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 » Sat Aug 25, 2007 6:27 am

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 » Sat Aug 25, 2007 6:47 am

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 » Sat Aug 25, 2007 7:40 am

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 » Mon Sep 03, 2007 1:02 pm

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 » Mon Sep 03, 2007 3:10 pm

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 » Mon Sep 03, 2007 4:50 pm

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