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?
+ Reply to Thread
Results 1 to 18 of 18
-
Last edited by ohboy888; 7th Apr 2016 at 04:04.
-
No. Field order is embedded deep in the data stream. How do you know your file is interlaced?
-
How do you know your file is interlaced?
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? -
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.
-
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.
-
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. -
Thanks. It's definitely interlaced.
I know nothing about changing the scan type, but JVRaines has already stated it's not possible. -
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. -
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). -
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. -
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)
Code:x264.exe --preset=medium --crf=18 --sar=1:1 --tff --output %1.mkv %1
-
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)
Code:x264.exe --preset=medium --crf=18 --sar=1:1 --output %1.mkv %1
-
Nice, thanks.
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.
-
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.
-
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.
Similar Threads
-
[SOLVED] "--ipratio" "--pbratio"+"--scenecut" "--minkeyint" / "--keyint
By Kdmeizk in forum Video ConversionReplies: 14Last Post: 21st Jun 2015, 07:21 -
avi file "hiccups" then goes pixalated. Tried DivFix++ Didn't change. Help?
By nobodyhome in forum RestorationReplies: 2Last Post: 9th Jun 2013, 10:50 -
ffmpegX splitting h264 into "title.ff.video.mp4" and "title.ff.audio.mp4"
By raleway in forum ffmpegX general discussionReplies: 1Last Post: 7th Aug 2012, 15:59 -
convert "file type:file" to mp4
By ghola in forum Video ConversionReplies: 5Last Post: 3rd Mar 2012, 09:43 -
Need to supply "File Type" and "Mime Type" info for MKV file
By oneking in forum Newbie / General discussionsReplies: 9Last Post: 9th Feb 2012, 03:31