VideoHelp Forum




+ Reply to Thread
Results 1 to 18 of 18
  1. I have an interlaced MP4 file but the scan type of the video is "Progressive" according to the MediaInfo.

    Is it possible to change the scan type on the file header with hex editor?
    If it is, could you show me which position of the Scan Type byte?
    Last edited by ohboy888; 7th Apr 2016 at 04:04.
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    No. Field order is embedded deep in the data stream. How do you know your file is interlaced?
    Quote Quote  
  3. How do you know your file is interlaced?
    It's very clear from the video playback.


    So the only solution is to re-encode the mp4?
    Is there a way I can fix this issue without losing the video's quality?
    Quote Quote  
  4. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    If you're seeing combing, it could be that your video was deinterlaced with a simple weave. You can check in VirtualDub with the "unfold fields side by side" filter.
    Quote Quote  
  5. Right, and if you still see interlacing in the fields then your video was resized incorrectly and even if you could change the scan type (or even reencode it), you wouldn't be able to fix it.
    Quote Quote  
  6. Hi all,

    I just opened the video with virtualdub (with FFInputDriver so I can open mp4) and played it, surprisingly there is no combing effect. So what does this mean?

    About "unfold fields side by side" filter, is that from "deinterlace" filter? I added the filter, no combing on the input pane when played.
    Quote Quote  
  7. Can you upload a short 10-second sample, one with steady movement? You can cut out a piece using MP4Box and its GUI.
    Quote Quote  
  8. Hi, sample file in attachment.
    Image Attached Files
    Quote Quote  
  9. Thanks. It's definitely interlaced.

    I know nothing about changing the scan type, but JVRaines has already stated it's not possible.
    Quote Quote  
  10. Is it still possible to fix it by re-encoding ? What is the best tool for this task? Is Handbrake good?

    Currently, to play the video I uses MPC with madVR directshow (default setting) and the LAV video filter's Hardware Decoder setting is set to "DXVA2 (native)". Only with this setting that give best result playback in MPC. But I worry by using this specific setting, it will disturb other normal video's playback quality (haven't seen one yet though). So I'm thinking to just re-encode it albeit with quality loss.
    Quote Quote  
  11. Many players will let you force deinterlacing even though the video is encoded progressive. VLC can do it but it gets the field order backward.

    The progressive encoding has blended the two chroma channels together -- that's not fixable in any case.

    You can reencode interlaced or deinterlace the video with many editors. You just have to convince the editor the video is interlaced and set the field order to top field first. But to fix the damage done by the progressive encoding will require advanced filtering to look half way decent. AviSynth is the best tool for filtering but it will take you a long time to learn it.

    A quick re-encoded interlaced (no other filtering) video attached (no audio).
    Image Attached Files
    Quote Quote  
  12. Yeah I aware many players have force deinterlace option but I prefer to leave the setting to auto mode.


    What tool did you use to encode the video as interlaced? The result looks smoother than with handbrake I tried (using high profile preset). Handbrake doesn't have interlace encoding filter, I only see deinterlace or decomb filter.
    Quote Quote  
  13. I used an AviSynth script to open the video and encoded with the x264 command line encoder.

    Script:
    Code:
    LSmashVideoSource("out.mp4") 
    AssumeTFF()
    AssumeFPS(25)
    Drag and drop onto a batch file with:
    Code:
    x264.exe --preset=medium --crf=18 --sar=1:1 --tff --output %1.mkv %1
    --tff means encode interlaced, top field first.
    Quote Quote  
  14. Cleaned up a bit and downscaled to 720p50 (since some devices can't handle 1080p50).

    script:
    Code:
    LSmashVideoSource("D:\Downloads\out.mp4") 
    AssumeTFF()
    AssumeFPS(25)
    QTGMC(preset="slower", EZDenoise=2.0)
    Spline36Resize(width/2, height/2)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
    aWarpSharp(depth=5)
    Sharpen(0.2)
    encoding:
    Code:
    x264.exe --preset=medium --crf=18 --sar=1:1 --output %1.mkv %1
    Image Attached Files
    Quote Quote  
  15. Nice, thanks.

    Is there a way to re-encode the video with original audio (direct copy) too?
    Quote Quote  
  16. Originally Posted by ohboy888 View Post
    Is there a way to re-encode the video with original audio (direct copy) too?
    Just use a muxer to add the audio from the original video file. In Mkvtoolnix you add the new video file, add the original video file, disable the original video track, then mux. You can use similar tools like Mp4Muxer get MP4 files instead, if you want.
    Quote Quote  
  17. Originally Posted by jagabo View Post
    Cleaned up a bit and downscaled to 720p50 (since some devices can't handle 1080p50).

    script:
    Code:
    LSmashVideoSource("D:\Downloads\out.mp4") 
    AssumeTFF()
    AssumeFPS(25)
    QTGMC(preset="slower", EZDenoise=2.0)
    Spline36Resize(width/2, height/2)
    nnedi3_rpow2(2, cshift="Spline36Resize", fwidth=1280, fheight=720)
    aWarpSharp(depth=5)
    Sharpen(0.2)
    encoding:
    Code:
    x264.exe --preset=medium --crf=18 --sar=1:1 --output %1.mkv %1
    Hi, I have tried the 1st method you gave on the full video file, but there are still combing artifacts on some parts of the result video. The second method above gave better result, but I want keep the 1080p resolution, so which part in avisynth command above that I have to remove?

    Also, which is better between mp4 or mkv?
    Last edited by ohboy888; 22nd Apr 2016 at 07:07.
    Quote Quote  
  18. Remove the Spline36Resize() and nnedi3_rpow2() lines. Or change the nnedi3 fwidth and fheight values to 1920 and 1080. You'll probably want to remove the aWarpSharp() and Sharpen() too -- they will accentuate the blockiness of the video. But the video is in such poor condition it's going to look worse, not better.
    Last edited by jagabo; 22nd Apr 2016 at 07:49.
    Quote Quote  



Similar Threads

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