0

"Music Box Russia" channel over satellite transmits in HEVC 1920x1080 25fps interlaced - and after recording VLC recognizes file as 50 fps, and resolution 1920x540 - half a height. But on satellite tuner the player works fine - it plays a file as 1920x1080 25fps... When we can expect support for HEVC/H.265 interlaced? Here is recorded file (Garry Grey & Eva Miller - wtf). Also - a lot of lost frames in VLC player statistics..

EDIT:

I found some interesting info how in HEVC the interlace video content can be indicated here:

Unlike to H.264/AVC, interlace-dedicated coding in HEVC is not exist:

  • No mixed frame-field interaction (like PAFF in H.264/AVC)
  • No interlace scanning of transform coefficients
  • No correction MVX[1] (or y-component of MV) if current and reference pictures are in different polarity (top-bottom or bottom-top).

However, in HEVC the interlace video content can be indicated (signaled in VPS/SPS and pic_timing SEI messages the latter are transmitted for every picture in the sequence). Interlace-related setting:

  • in VPS/SPS set general_interlaced_source_flag=1 and general_progressive_source_flag=0. Indeed, the HEVC standard says:

    if general_progressive_source_flag is equal to 0 and general_interlaced_source_flag is equal to 1, the source scan type of the pictures in the CVS should be interpreted as interlaced only.

  • in VPS/SPS set general_frame_only_constraint_flag=0

  • in SPS VUI set field_seq_flag=1 and frame_field_info_present_flag=1. Notice that if these flags are ON then picture timing SEIs shall be present for each picture.

  • transmission of Picture Timing SEI per picture with the following parameters:

    source_scan_type = 0 to indicate interlace mode for top field picture signal pict_struct=1 and for bottom field picture pict_struct=2

Perhaps it is possible to pass these parameters to ffmpeg/vlc before playing a file?

5
  • How are you recording it?
    – llogan
    Commented Nov 28, 2020 at 18:10
  • By using satellite tuner - PVR. Tuner with hard disk, Linux (Enigma + OpenPLi). Commented Nov 28, 2020 at 18:23
  • This is an authoring problem and not related to VLC. QuickTime and mpv are also recognizing the sample file you posted as 1920x540 and play the video as distorted as expected. Even mediainfo agrees to the analysis of the three players I tried, so it appears to be correct (and all 4 parsers also assume 50 fps).
    – feepk
    Commented Dec 15, 2020 at 20:01
  • I found some interesting info how in HEVC the interlace video content can be indicated here. Commented Dec 15, 2020 at 22:08
  • From what I see (visually) is that there is no problem here after all. Just override the aspect ratio to 16:9. I do not see the typical interlaced tearing on the recorded file. The fact that you are seeing frame drops is probably due to the used hardware. Older PC's do not have native H265 decoding capabilities. Commented Dec 21, 2020 at 19:31

2 Answers 2

1

(Adding as an answer as I can't comment yet.) "This is an authoring problem and not related to VLC. " There may also be an authoring problem but the problem is related to VLC, more specifically to FFMpeg's lack of understanding of interlaced HEVC which affects the multitudes of applications that rely on it. Most programs have not been written for support which is starting to be a noted problem due to ATSC 3.0 broadcasts in the US starting and some are doing so in 1080i HEVC. A station can get around it by 'forcing' the aspect ratio which makes the software incorrectly report it as 1080p by software like Mediainfo and VLC but at least it displays with the correct aspect ratio. https://trac.ffmpeg.org/ticket/5514 https://trac.ffmpeg.org/ticket/4141

1
  • Oh, I see some progress here, but things going very slow - problem (bug) reported 5 years ago.. Interesting that satellite tuner hardware recognize HEVC interlaced and displays picture perfectly.. Commented Dec 30, 2020 at 20:47
0

Encoding: If you have an interlaced source file, you have to deinterleave the stream into separate fields with half the video height and twice the frame rate, and mark the stream as being HEVC interlaced:

ffmpeg -i test.ts -vf separatefields -c:v libx265 -x265-params interlace=tff -c:a copy test.mkv

If the source is progressive the above line will transform 25p to 50i, or 50p to 100i.

Decoding: If your source file is HEVC interlaced, the decoder has to interleave the fields first and then deinterlace the stream. In addition, the aspect ratio becomes distorted due to the weave filter, so if the video DAR is 16/9 (or 4/3 etc.), you have to explicitly state it. (Presumably, something similar is done by video hardware decoders, at least if they are programmed to recognize HEVC interlaced streams):

 ffplay -i test.mkv -vf weave,bwdif,setdar=16/9
1
  • This takes my Sony DVCam x480 and makes it x240. :( I'll try adding scaling back to 480, but so far this step removes some interlace artifacts (but not all) from the output into 265. Commented Mar 21 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.