VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Jun 2020
    Location
    Houston, TX
    Search PM
    What causes this? I am now very confused as I have viewed most of my TV recorded in an editor and advanced frame by frame to come to the conclusion that it is 2:3 pulldown but now I am thinking I may be wrong on some shows. This series comes out 47.952 when I use IVTC and 29.976 when I use YADIF. But I have others series that come out 23.976 when I use IVTC and 59.940 when I use YADIF. So I now get 4 different frame rates on similar content that all originated as 29.970....23.976, 29.970, 47.952, of 59.940. So now I am really confused as to what I am doing and stuck with a HUGE amount of TS files I need to encode but am unsure what to do now.

    All the content plays but I noticed that some of the files I used IVTC on were choppy when panning.....so I re-encoded it using simple de-interlacing and that took care of the choppiness but I am not sure what I am doing at this point as I went back and looked at this file in Avidemux and frame by frame I cannot identify any combed frames in the scenes where the choppiness occurs so I don't now what to do at this point.

    Should I identify the king of interlacing in each series and find the appropriate filter to de-interlace? Also when I cannot find any combed frames I don't know how to identify it as MediaInfo reports the file as interlaced top field first....but it does this on stuff that I can VERIFY is 2:3 pulldown.

    Any help understanding all these different frame rates and how to determine what kind of interlacing I have would be appreciated as it appears all my content is not exactly the same.

    Thanks
    Quote Quote  
  2. What software are you using? Upload a sample of your source. Don't re-encode, use AviDemux in copy mode -- mark a small section of movement (a medium speed panning shot is good). Save in copy mode, upload it here.

    Here's the basics:

    Film is shot at 24 frames per second. NTSC video is broadcast at 59.94 fields per second. So the film frames (slowed from 24 fps to 23.976 fps) have to be duplicated to 59.94 fields per second -- using "3:2 pulldown". That video is usually stored digitally as 29.97 frames per second (2 fields per frame). The inverse telecine process usually starts with 29.97 fps digital frames, performs field matching so that there are no longer any interalced frames, then smartly decimated from 29.97 fps to 23.976 fps (1 of every 5 frames, a duplicate, is discarded).

    If you are getting ~48 frames per second you are doing the IVTC incorrectly. You may be running Yadif (creating 59.94 fps) instead of a field matcher (29.907 fps) before decimating. Discarding 1 of every 5 frames of a 59.94 fps video will give you about 48 fps.
    Quote Quote  
  3. Seems you are mixing up telecined and interlaced stuff, and/or IVTC it incorrectly when you end up with 47.952fps. You should step through the fields to draw the final conclusions, or upload samples of few seconds duration of your unprocessed sources, with scenes with motions or camera panning.
    Hard telecined stuff will be reported as interlaced TFF by MediaInfo, soft telecined as progressive.
    Quote Quote  
  4. Member
    Join Date
    Jun 2020
    Location
    Houston, TX
    Search PM
    OK...the TS files that resulted in the 47.952 frames started out at 59.940 while all the others I have checked for the TV shows I have waiting encoding are 29.970. Is that significant?

    I am using FFmpeg Batch AV Converter (which I loved and the developer has added features I personally requested to make even more awesome) with the following settings:

    -map 0 -c:v hevc_nvenc -vf "fieldmatch,bwdif=mode=0:deint=1,decimate" -c:a copy -c copy

    For most TV shows but I sometimes use the setting I use for movies which are as follows:

    -map 0 -c:v hevc_nvenc -vf "fieldmatch,bwdif=mode=0:deint=1,decimate,format=y uv420p10le" -c:a copy -c copy -preset p7 -rc constqp -rc-lookahead 60 -spatial_aq 1 -temporal_aq 1 -nonref_p 1 -cq 26
    Quote Quote  
  5. Member
    Join Date
    Jun 2020
    Location
    Houston, TX
    Search PM
    Below is a short section of a TS file that I really noticed the problem of choppy playback after IVTC but not with simple de-interlacing. I usually quick preview my movies by starting and immediately skipping the the last chapter to check that the file encoded properly and the audio and video are still in sync and that is how I noticed this issue. Luckily I don't delete my TS files until they are all previewed and this was a directory of over 100 TV episodes that were manually edited...so lots of time invested.


    Image
    [Attachment 68965 - Click to enlarge]
    Image Attached Files
    Quote Quote  
  6. The example.ts is progressive video @29.97fps. There is nothing to IVTC or to deinterlace. It's just flagged as interlaced for standards (NTSC TV broadcast) compliance. The fields are from the same instant in time.
    Last edited by Sharc; 30th Jan 2023 at 17:20.
    Quote Quote  
  7. To clarify, the TS file is encoded interlaced at 29.97 fps. But the frames that were given to the encoder were progressive. So you can treat the video as progressive. But you should check other parts of the video -- they may be truly interlaced or telecined.
    Quote Quote  
  8. Member
    Join Date
    Jun 2020
    Location
    Houston, TX
    Search PM
    In that case if there is nothing to deinterlace can I just deinterlace it by default and on progressive TV shows it just doesn't do anything but I don't have to separate and encode differently? Or does that cause issues too? When I re-encoded that whole episode I did so with simple deinterlacing and it plays fine with no choppiness.

    I just checked some other TV shows and they have combing but it appears to be random, sometimes I see 3 combed then nothing for a few frames, sometimes 4 combed then nothing and then sometimes 8 frames in a row that are combed.....is this just normal interlacing?

    The show that was producing ~48 fps when IVTCed is 59.940 fps as a TS file but I cannot find any combing in multiple episodes so is that progressive too?
    Last edited by Ronstang; 30th Jan 2023 at 19:10.
    Quote Quote  
  9. Originally Posted by Ronstang View Post
    In that case if there is nothing to deinterlace can I just deinterlace it by default and on progressive TV shows it just doesn't do anything but I don't have to separate and encode differently? Or does that cause issues too? When I re-encoded that whole episode I did so with simple deinterlacing and it plays fine with no choppiness.
    When you bob-deinterlaced the 29.97fps progressive source and encode it accordingly as 59.94 fps the TV/player will just show every frame of the original 29.97fps video twice. It does no harm, it's just a bit inefficient.
    You could also encode it as 29.97fps progressive and add --fake-interlaced to the x264 commandline to fool picky players which may accept HD 29.97fps as "interlaced" only (29.97i), or refuse to play HD at 59.94fps progressive (level 4.2).

    I just checked some other TV shows and they have combing but it appears to be random, sometimes I see 3 combed then nothing for a few frames, sometimes 4 combed then nothing and then sometimes 8 frames in a row that are combed.....is this just normal interlacing?
    This sounds to me like normal interlaced video. You may see combed frames in panning and motion scenes, but (almost) no combing in static scenes.
    2:3 telecined would show up as a repetitive pattern of 3 clean (progressive) and 2 combed frames in motion/panning scenes.

    Your source could however also be a mix of formats (interlaced, telecined), or just a mess. An unprocessed sample would probably tell.

    The show that was producing ~48 fps when IVTCed is 59.940 fps as a TS file but I cannot find any combing in multiple episodes so is that progressive too?
    I would assume so, yes. The ~48fps are produced by the IVTC's 4/5 decimation of the progressive 59.94 fps video frames.
    Last edited by Sharc; 31st Jan 2023 at 03:26. Reason: typos
    Quote Quote  
  10. Originally Posted by Ronstang View Post
    OK...the TS files that resulted in the 47.952 frames started out at 59.940 while all the others I have checked for the TV shows I have waiting encoding are 29.970. Is that significant?

    I am using FFmpeg Batch AV Converter (which I loved and the developer has added features I personally requested to make even more awesome) with the following settings:

    -map 0 -c:v hevc_nvenc -vf "fieldmatch,bwdif=mode=0:deint=1,decimate" -c:a copy -c copy

    For most TV shows but I sometimes use the setting I use for movies which are as follows:

    -map 0 -c:v hevc_nvenc -vf "fieldmatch,bwdif=mode=0:deint=1,decimate,format=y uv420p10le" -c:a copy -c copy -preset p7 -rc constqp -rc-lookahead 60 -spatial_aq 1 -temporal_aq 1 -nonref_p 1 -cq 26
    There's nothing I can see in the command lines you posted that should output anything other than 23.976fps unless the source was 59.94fps to begin with, rather than 29.97fps. Decimating 1 frames in 5 from 59.94fps gives you 47.952fps.

    It doesn't appear the decimate filter can do anything other than 1 in 5 decimation, but for a 29.97fps source you could try mixed=true.
    https://ffmpeg.org/ffmpeg-all.html#decimate-1
    According to the docs that'll output a variable frame rate so the film sections should play at 23.976fps and the video sections at 29.97fps.

    For the sources that are 59.94fps I'd guess they're likely to be 29.97fps with every frame repeated.
    If that's the case, then you could apply the fps filter to reduce the frame rate to 29.97fps, which should drop every second frame, and from there you could run your usual filter chain, only using mixed mode for decimate.
    https://ffmpeg.org/ffmpeg-all.html#fps-1
    Of course without seeing a 59.94fps source I'm just guessing.

    The sample you uploaded is definitely 29.97fps progressive. You can probably get away with running your de-interlacing filters on it but applying 1 in 5 decimation is what's making it choppy.

    I downsized the video to keep the file size small, but here's your progressive sample encoded as 29.97fps vs applying decimation.
    Image Attached Files
    Last edited by hello_hello; 2nd Feb 2023 at 19:15.
    Quote Quote  
  11. Member
    Join Date
    Jun 2020
    Location
    Houston, TX
    Search PM
    Almost a year later and this still has me boggled. The video is not consistent. The clip I provided may be progressive but every video from that series is transcoded to deinterlace by emby if I play it in the browser and it also reports the video as 1080i at 29.97fps....this is the raw edited but unencoded video in TS format.

    If emby is deinterlacing then it can't be truly progressive, correct?

    I'm also getting a headache trying to figure out which type of interlacing is being used. I just pulled up a video in Avidemux and at the beginning of during the intro it was definitely Telecined with the 2 interlaced then 3 progressive frames but if I went to a random place in the video there was no longer a pattern. So what do you do with a mess like this?

    I did some testing encoding using default HEVC settings using BWDIF and YADIFF and changing from auto to TTF to BFF and all played in emby without needing to be deinterlaced but no matter which version of the same file I played emby had to recover from a playback error. I don't know what that means but....

    If I just encode it with no deinterlacing the filesize is not really different but it plays with no playback error in emby although it needs to be deinterlaced....this is to be played in the browser.

    But, no matter which file I play, from the original uncompressed or the encoded using no deinterlacing or using deinterlacing, all direct play in emby to my TV. I assume this is because the TV handles the deinterlacing natively.

    I just played the encoded video that was not deinterlaced in emby on my phone and it did not transcode so obviously my phone can deinterlace. It is an Android, I wonder if an iPhone can deinterlace?

    Since the only reason I am even messing with this is to prevent transcoding why am I even messing with it at all? If I just encode all these many 100s of TV episodes with no deinterlacing they play perfectly fine with no need to deinterlace on all my TVs and my phone....which is the only way I use emby so I think I have been wasting my time even messing with trying to figure this out

    Based on my findings I assume doing no deinterlacing is the easiest, fastest, and guarantees the highest quality, am I correct?
    Quote Quote  
  12. Originally Posted by Ronstang View Post
    ... Based on my findings I assume doing no deinterlacing is the easiest, fastest, and guarantees the highest quality, am I correct?
    If you are not sure what your source format is and what exactly to do with your source then simply leave it as is. Your TV will do the deinterlacing as necessary. Same for mobile phones. Even if your mobile does not deinterlace the video will usually look ok on the small screen. Just my opinion.
    Quote Quote  
  13. Member
    Join Date
    Jun 2020
    Location
    Houston, TX
    Search PM
    Originally Posted by Sharc View Post
    Originally Posted by Ronstang View Post
    ... Based on my findings I assume doing no deinterlacing is the easiest, fastest, and guarantees the highest quality, am I correct?
    If you are not sure what your source format is and what exactly to do with your source then simply leave it as is. Your TV will do the deinterlacing as necessary. Same for mobile phones. Even if your mobile does not deinterlace the video will usually look ok on the small screen. Just my opinion.
    Those are the conclusions my testing lead me too. In the past I only tested encoding and then checked them in emby to see of they played properly. Today I checked for transcoding due to having to deinterlacing and its shows that that doing no deinterlacing results in similar file sizes with faster encode times with that all play back directly through emby on all my devices with no work or BS.

    I think my pursuit to deinterlace has proven to be nothing but a folly.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!