Is it possible to do IVTC on video from the HD-PVR?
Detecting telecine'd content # of telecine'd frames detected in a ~1 second sample of video at various offsets: # 0 x -62348618 = 0: 0 # 1 x -62348618 = -62348618: 0 # 2 x -62348618 = -124697236: 0 # 3 x -62348618 = -187045854: 0 # 4 x -62348618 = -249394472: 0 # 5 x -62348618 = -311743090: 0 # 6 x -62348618 = -374091708: 0 # 7 x -62348618 = -436440326: 0 # 8 x -62348618 = -498788944: 0 # 9 x -62348618 = -561137562: 0 # 10 x -62348618 = -623486180: 0 # 11 x -62348618 = -685834798: 0 # 12 x -62348618 = -748183416: 0 # 13 x -62348618 = -810532034: 0 # 14 x -62348618 = -872880652: 0 # 15 x -62348618 = -935229270: 0 # 16 x -62348618 = -997577888: 0 # 17 x -62348618 = -1059926506: 0 # 18 x -62348618 = -1122275124: 0 # 19 x -62348618 = -1184623742: 0 TOTAL=0 TARGET=290 TELECINE=false Perhaps the script doesn't detect telecine and normal IVTC is impossible with these videos because the capture is analog-to-digital, but it can't hurt to see if someone knows a way. Looking around on Google, someone suggested using Avisynth's TDecimate(), but I need to do these
I recorded a show with the HD-PVR that I know was recorded at 24p and telecined to 30i for broadcast. I have a working command line for shows for deinterlacing 30i content (most of what I record is originally recorded at 30i): mencoder in.ts -demuxer lavf -fps 60000/1001 -ofps 30000/1001 -of avi -oac copy -ovc x264 -x264encopts [x264 options] -vf yadif=1,framestep=2,harddup -o out.avi I've tried various combinations of -fps/-ofps values and filmdint=io= values with no luck. Someone on this list provided a script to determine if a video is telecined, and according to it, these videos are not telecined: transcodes on a Linux box, so Avisynth isn't an option. decimate or detc may be useful, but I don't know how I would configure them to fit this situation.
On 5/29/10 3:53 PM, "Andrew Berg" <bahamutzero8825@gmail.com> wrote:
I recorded a show with the HD-PVR that I know was recorded at 24p and telecined to 30i for broadcast. I have a working command line for shows for deinterlacing 30i content (most of what I record is originally recorded at 30i):
mencoder in.ts -demuxer lavf -fps 60000/1001 -ofps 30000/1001 -of avi -oac copy -ovc x264 -x264encopts [x264 options] -vf yadif=1,framestep=2,harddup -o out.avi
Detecting telecine'd content # of telecine'd frames detected in a ~1 second sample of video at various offsets: # 0 x -62348618 = 0: 0 # 1 x -62348618 = -62348618: 0 # 2 x -62348618 = -124697236: 0 # 3 x -62348618 = -187045854: 0 # 4 x -62348618 = -249394472: 0 # 5 x -62348618 = -311743090: 0 # 6 x -62348618 = -374091708: 0 # 7 x -62348618 = -436440326: 0 # 8 x -62348618 = -498788944: 0 # 9 x -62348618 = -561137562: 0 # 10 x -62348618 = -623486180: 0 # 11 x -62348618 = -685834798: 0 # 12 x -62348618 = -748183416: 0 # 13 x -62348618 = -810532034: 0 # 14 x -62348618 = -872880652: 0 # 15 x -62348618 = -935229270: 0 # 16 x -62348618 = -997577888: 0 # 17 x -62348618 = -1059926506: 0 # 18 x -62348618 = -1122275124: 0 # 19 x -62348618 = -1184623742: 0 TOTAL=0 TARGET=290 TELECINE=false Perhaps the script doesn't detect telecine and normal IVTC is impossible with these videos because the capture is analog-to-digital, but it can't hurt to see if someone knows a way. Looking around on Google, someone suggested using Avisynth's TDecimate(), but I need to do these
I've tried various combinations of -fps/-ofps values and filmdint=io= values with no luck. Someone on this list provided a script to determine if a video is telecined, and according to it, these videos are not telecined: transcodes on a Linux box, so Avisynth isn't an option. decimate or detc may be useful, but I don't know how I would configure them to fit this situation.
You should be able to play the output of the HD-PVR in recent versions of MPlayer. You can see telecining yourself by viewing frame by frame with the "." key. I have to use "-demuxer lavf" and give playback just a moment to stabilize before pausing and advancing a frame at a time with ".". If in roughly every 12 frames you see 6 pairs of duplicates, 2 consecutive pairs of which look like a double-exposed photo with combing, you've got a 60 fps telecined, interlaced source. That's all that the HD-PVR knows how to output to my system, but my system is not what typical MEncoder and MPlayer users have. Can you make a clip available? Laine Lee
On 6/1/2010 11:41 PM, Laine Lee wrote:
You should be able to play the output of the HD-PVR in recent versions of MPlayer. You can see telecining yourself by viewing frame by frame with the "." key. I have to use "-demuxer lavf" and give playback just a moment to stabilize before pausing and advancing a frame at a time with ".". If in roughly every 12 frames you see 6 pairs of duplicates, 2 consecutive pairs of which look like a double-exposed photo with combing, you've got a 60 fps telecined, interlaced source. That seems to be exactly what I have. Can you make a clip available? http://www.digital-signal.net/bahamut/temp/bms.s01e01.sample.ts (31 sec, 53.91MB)
On 6/2/10 11:18 AM, "Andrew Berg" <bahamutzero8825@gmail.com> wrote:
http://www.digital-signal.net/bahamut/temp/bms.s01e01.sample.ts (31 sec, 53.91MB)
I doubt that all these steps were necessary, but I took your clip and used tsMuxer to demux to a .264 and a .ac3 file. Then I used some stuff I learned from Henk in the following two commands to convert to a DVD-sized mpeg-2. The video capture seems pretty clean, and I think that's what makes the conversion successful. 1. MP4Box -tmp tempdirectory -add /path/to/yourfile.264 -fps 59.94 cleaned.mp4 2. mencoder cleaned.mp4 -oac copy -audiofile /path/to/yourfile.ac3 -ovc lavc -lavcopts vqscale=2:mbd=0:vcodec=mpeg2video:aspect=16/9:vrc_buf_size=1835:vrc_maxrate= 9800:vbitrate=5800:keyint=15 -vf filmdint=io=30:24/fast=0/sad_thres=2048,softskip,gradfun,fspp,scale=720:-10, harddup -noskip -mc 0 -noskip -of mpeg -mpegopts format=dvd:tsaf:muxrate=40000 -fps 60000/1001 -ofps 24000/1001 -o /path/to/yourfile.mpg Laine Lee
On 6/2/2010 11:27 PM, Laine Lee wrote:
-vf filmdint=io=30:24/fast=0/sad_thres=2048,softskip...harddup -fps 60000/1001 -ofps 24000/1001 It seems to work quite nicely: mencoder BMS.S01E02.ts -msglevel all=0:statusline=5 -demuxer lavf -aid 1 -vc ffh264 -fps 60000/1001 -ofps 24000/1001 -of avi -oac copy -ovc x264 -x264encopts crf=21:force_cfr:keyint=240:keyint_min=24:frameref=4:mixed_refs:weightp=2:b_pyramid=normal:weight_b:bframes=4:b_adapt=2:me_range=24:direct_pred=auto:cabac:8x8dct:me=umh:trellis=1:subq=7:threads=auto:nointerlaced:nopsnr:nossim:deblock=-1,-1 -vf filmdint=io=30:24/fast=0/sad_thres=2048,softskip,hqdn3d=0:0:4:4,harddup -o S01E02.avi
I didn't need to run the original AVC stream through ffmpeg or use -mc 0 or -noskip. No more duplicate frames or interlacing and it's the original 24000/1001fps it should be. Maybe I'm just so used to working with pro wrestling which requires an insane number of bits, especially at 1920x1080, but 5387kbps (the average bitrate I got for episode 1) seems low to me. In any case, I can't notice any artifacting that wasn't present in the original and it looks pretty good for HDTV.
You should be able to play the output of the HD-PVR in recent versions of MPlayer. You can see telecining yourself by viewing frame by frame with the "." key. I have to use "-demuxer lavf" and give playback just a moment to stabilize before pausing and advancing a frame at a time with ".". If in roughly every 12 frames you see 6 pairs of duplicates, 2 consecutive pairs of which look like a double-exposed photo with combing, you've got a 60 fps telecined, interlaced source. It turns out some portions of the video (entire segments between ad breaks) have a different pattern, resulting in jitters during that part of the encoded video (the original capture does not appear different in
On 6/1/2010 11:41 PM, Laine Lee wrote: these segments during normal playback). This pattern is five pairs of duplicate frames with 3 progressive and 2 interlaced rather than 6 pairs with 4 progressive and 2 interlaced. I don't think there's anything I can do about it, but do you have any idea why the pattern would be different in different parts of the same broadcast?
On 6/7/10 10:51 AM, "Andrew Berg" <bahamutzero8825@gmail.com> wrote:
It turns out some portions of the video (entire segments between ad breaks) have a different pattern, resulting in jitters during that part of the encoded video (the original capture does not appear different in these segments during normal playback). This pattern is five pairs of duplicate frames with 3 progressive and 2 interlaced rather than 6 pairs with 4 progressive and 2 interlaced. I don't think there's anything I can do about it, but do you have any idea why the pattern would be different in different parts of the same broadcast?
Sorry, I don't know, although by instinct I would associate multiples of 25 with PAL. Does -mc 0.1 do anything good for those sections? Laine Lee
participants (2)
-
Andrew Berg -
Laine Lee