Correct filter usage/order for deinterlace 1920x540@50 to 1920x1080@25

Started by IcePlanet, November 28, 2024, 06:02:06 PM

Previous topic - Next topic

IcePlanet

I have video with frame size 1920x540 in 50 fps. It is interlaced. My target is to create video 1920x1080 with 25 fps.

Have already done more than 100 experiments, but not happy with the result. The only good option is to use Merge Fields, but this is freezing avidemux for some videos (see my other topic). For this reason I'm searching for 'workaround'.

What is the best filter order when Merge fields is not possible to get 1920x1080@25fps?

My idea was to start with resize each frame to 1920x1080 (swsResize) and then change fps to 25 (ResampleFPS). The problem is that resulting video has visible interlacing artifacts.

Tried Yadif before/after ResampleFPS, tried  dgbob, Kernel deint, Libavdec... but can not find solution to produce picture of similar quality than original. Any ideas?

Attached is mediainfo or original file.

You cannot view this attachment.

eumagga0x2a

If the video is interlaced, the height of frames is bogus and the video is broken (some software has mistreated field-encoded video as progressive). The exactly right way to fix it is to apply Merge Fields, period.

What is generating such videos? It would be preferable by far to avoid them being created in the first place.

IcePlanet

These videos are received by satelite receiver. There is no encoding in receiver, this is what the satelite is sending. Satelite box does only decripting. It is VU+ UNO 4K SE (Enigma2 based linux machine).

I do not see any way how to make the recording better, because results of in-box transcoding are not very good... For this reason my approach is following:

1. VU+ makes recording (.ts file) The only action in box is decoding of protection, because only the box has corresponding card for decoding
2. Recording is downloaded to my PC
3. Re-encoded by VLC (to get sync of video and audio) (still .ts file)
4. File is loaded to Avidemux for ads removal, logo removal, crop, aspect ratio... and encoding (new file is .mkv)
5. Then is loaded to my NAS to be able to see the video any time I like

eumagga0x2a

#3
Please exclude Step 3, absolutely.

However, to understand the crash, it would be necessary to obtain a sample presumably mangled by VLC (smaller is better, but e. g. up to 2 GiB is supported by WeTransfer, no email address required, despite the website trying to suggest the opposite) able to trigger the assert failure. Other means to provide a sample include Mega, Dropbox and Google Drive.

(Sample provided in the other topic, will look at it shortly)

Geo_log

Quote from: IcePlanet on November 28, 2024, 06:02:06 PMI have video with frame size 1920x540 in 50 fps. It is interlaced.
Sample from the other topic is reported as progressive by ffprobe:
[hevc @ 0000015f059b9e00] Could not find ref with POC 17423
[hevc @ 0000015f059b9e00] Could not find ref with POC 17422
[mpegts @ 0000015f059aed40] PES packet size mismatch
[mpegts @ 0000015f059aed40] Packet corrupt (stream = 0, dts = 431705759).
Input #0, mpegts, from '20240915 1640 - Markiza Klasik HD - A-Tím II (21) reenc.ts':
  Duration: 01:19:56.45, start: 0.400000, bitrate: 1589 kb/s
  Program 1
    Metadata:
      service_name    :
      service_provider:
  Stream #0:0[0xc8](???): Audio: aac (HE-AAC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 63 kb/s
  Stream #0:1[0x64]: Video: hevc (Main) ([36][0][0][0] / 0x0024), yuv420p(tv, bt709, progressive), 1920x540 [SAR 1:1 DAR 32:9], 50 fps, 50 tbr, 90k tbn

alexstorm

Why does the ffprobe show progressive?  Does it look interlaced? PAL interlaced could be recorded at 50 fps.
 https://martin.hinner.info/vga/pal.html
QuotePAL details
1. CCIR/PAL standard video signal has 625 lines/frame and it repeats @ 25 frames/sec.

2. Each frame is split into 2 fields; - each consisting of 312.5 lines, called odd and even fields. Thus field rate is 50. i.e. CCIR /PAL std has 50 fields/sec rate .

3. 3. Interlacing: The lines of odd-even field lie alternately . This method of scanning is called interlacing. This interlaced scanning is used to reduce flicker while displaying the image on a monitor.

Interlaced scanning process is shown below.

Perhaps the original was interlaced and the copy stream is progressive.  I think that might make separating the interlaced difficult, if every frame has both odd and even scan lines.  Does a single frame show space between the video lines?

Since ffprobe shows hevc h.265 as progressive and if the original source was interlaced, I would guess that Sat playback, makes no changes and serves this directly to the TV, which might do a decent playback. 

Are there black bars top and bottom in the media stream? You could try filters: to crop black bars, if needed, and resize to the correct aspect ratio, probably 2.35, or 2.39 for these old movies.  Media resize to 960 x 408 for Aspect Ratio 2.35 or 960 x 400 for AR 2.39, might look good.  Add blur in the filter and change to 25 fps and keep audio in sync.  This should remove the interlace look.

Other than that, I think you need a better original from some other source.