[BUG] AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: [BUG] AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) (/thread-1866.html) |
AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - The_Tinkerer - 27.05.2021 Using Hybrid Dev 2021.04.15.1 Using AviSynth 32 bit and .mpg file. Mpg file is muxed DVD VOB's with just video (no re-encoding). General When loading .mpg file into Hybrid, it shows correct frame count of 185,897. But even if just passing the video straight through to only re-encode as .mp4, the job ends too soon, only processing 21,333 frames. It doesn't error... it shows job finished successfully... but it's only 21,333 instead of 185,897 frames. This is replicated in the previewer. Also, when viewing in the previewer, the aspect ratio is off. The source .mpg is 720x576 PAL. (Flagged interlaced but actually progressive). The correct stretched aspect ratio should be 1024x576. But Hybrid stretches it on output or the previewer to 1366x576. I PM'd you a Google Drive link to the .mpg file in case it will help. Script: ClearAutoloadDirs() Log file: [attachment=1415] I tried re-muxing the DVD .VOB files to a single .VOB file without re-encoding: 1) The aspect ratio is still wrong at 1366x576 2) The frame count is still way too low, but it changed to 34,489 frames (missing 81.45% of the frames). Debug: [attachment=1417] RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - Selur - 27.05.2021 As a side note: looking at the MediaInfo data the delay_original (= delay in the video stream itself) seems to be wrong. Quote:Also, when viewing in the previewer, the aspect ratio is off.No clue what that is, but usually wrong aspect ratio happens if the input isn't properly flagged. According to the flags in the mpg file 'Pixel aspect ratio : 1.896' is used. With this PAR 720x576 will be (720*1.896 ~ 1365 ~1366)x576 -> not Hybrids fault that your source if buggy. => Whatever you used (no clue why you did it) to create a mpg file out of multiple vob files didn't make a good job. Quote: the job ends too soon, only processing 21,333 frames.My guess is that the frame that were encoded are just the frames of the first .vob. MPEG2Source probably used the time codes inside the mpg file which probably start with each added vob new,... -> I'll download the file and have a short look at it, your best option is probably to remux to .mkv using mkvtoolnix, which has quite a bit of code to deal with buggy input. Hybrid is not designed for broken input. Cu Selur RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - The_Tinkerer - 27.05.2021 Frame count is handled correctly by Hybrid version 2020.11.25.1. First VOB file on DVD (VTS_01_1.VOB) has 34,093 frames. Doing a VOB mux is closer to this but not exact (34,489 frames)... MPG mux is way off. Aspect ratio is still wrong in Hybrid 2020.11.25.1, probably because of incorrect aspect ratio in source, like you said. VOB files loaded into MKVToolNix show correct pixels in GUI of 1024x576, again, probably due to MKVToolNix handling bad sources well. Is muxing DVD VOB's to MKV the preferred way to handle DVD? For video only, I always used ffmpeg to mux to mpg, since mpg is the format DVD uses. RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - Selur - 27.05.2021 Can't reproduce the issue here with your source: using Vapoursynth:
-> only decoder that's wrong here is LWLibavVideoSource which usually isn't used for decoding. Quote:, I always used ffmpeg to mux to mpg, since mpg is the format DVD uses.a. ffmpeg isn't really meant to handle dvd input b. if really want to use ffmpeg to concatenate vob files you need to tell ffmpeg to recalculate the time codes otherwise the output will be 'broken' better use: - mencoder to remux to mpg since it can handle DVD input - mkvtoolnix or MakeMKV if you want to remux .vob files to mkv - PGCDemux to demux to raw streams, this is probably the 'best' way since it is the best in handling pgcs. Quote:Frame count is handled correctly by Hybrid version 2020.11.25.1.like I wrote before, works fine here,... (since MPEG2Source hasn't be updated for ages and works fine here: no clue whats happening on your end) Quote:Is muxing DVD VOB's to MKV the preferred way to handle DVD?Depends on what you want to do. The best way is probably using PGCDemux if your source has multiple pcs, otherwise mkvtoolnix or MakeMKV are probably the best way. Cu Selur RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - The_Tinkerer - 27.05.2021 The latest Hybrid version I have is 2021.04.15.1. Is that what you used? I'm pretty sure I didn't see LWLibavVideoSource getting used. If not, maybe I should try the latest dev version? RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - Selur - 27.05.2021 Libav only get's used if a few options are combined. Will send you a link to the current dev version,... RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - The_Tinkerer - 27.05.2021 Thanks. I tried muxing the VOB's into a MKV using MKVToolNix and that works fine in Hybrid 2020.04.15.1. Will check MPG in latest dev version. But it looks like MKV is the way to go. Thanks again for the fast reply and spending time on this. RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - The_Tinkerer - 28.05.2021 I tried loading the mpg in the 2021.05.25.1 dev version, and the AviSynth previewer still has the problem... it ends at 21,332 frames. (I removed the C:\Users\Administrator\AppData\Roaming\hybrid folder before running.) Hybrid will show the correct frames when the source file loads. But it will end at 21,332 frames in the AviSynth previewer, or on a job process. (Did you click the AviSynth previewer button and click "end" to go to the end frame in the previewer?) As I mentioned, with all the exact same settings, the mpg will load and go to the correct end frame (185,895) in the AviSynth previewer in Hybrid version 2020.11.25.1. Not sure if you want to spend time on this or not, but anyways, here are logs: Hybrid 2021.05.25.1 (ends at incorrect frame 21,332 in AviSynth previewer): [attachment=1419] Hybrid 2020.11.25.1 (ends at correct frame 185,895 in AviSYnth previewer): [attachment=1420] Looks like the problem is not a Hybrid problem, but a problem with the new 2.0.0.2 version of DGIndex.exe that is now included with Hybrid. If I replace it with the older 1.5.8 version that Hybrid 2020.11.25.1 uses, then the problem goes away. (Full 185,896 frames load into AviSynth previewer or output.) I can confirm this if I run each DGIndex.exe directly and load the mpg file. Looks like this problem was solved in DGMPGDec Version 2.0.0.5. It appears DGIndex.exe and DGDecode.dll from dgmpgdec2005.zip works with Hybrid and solves the mpg issues above. RE: AviSynth x86 + MPG = wrong aspect ratio and frame count (missing 88%) - Selur - 28.05.2021 Good to know I'll update the DGindex&DGDecode version. Cu Selur |