Dear all,
I even don't know how to call this distorsion. It looks like the image on a horizontal out of sync TV-set.
Is there any Avisynth or VDub filter to fix it? Or is any other way?
The clip is recorded from screen. I guess it's caused by wrong (codec-unfriendly) image size.
Some GSpot info:
- Encoding: MPG4 (MS MPEG-4 v1)
- image size: 379 x 268 px
- SAR: 1.414 (~17:12)
- PAR: 1.000 (1:1)
- DAR: 1.414 (~17:12)
Any help is much apprecciated.
thanks in advance
![]()
+ Reply to Thread
Results 1 to 11 of 11
-
-
It looks like a codec error. Do you have a codec pack on your computer? That could be the problem.
Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
The problem is the image width -- 379 pixels. Many storage formats require even values. Redo you capture (or encoding?) at 378 or 380 pixels and it should work fine.
-
True. I missed that. 379 is a likely cause. That would cause the pixel shifting, line by line.
Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
A possible solution is to try several MPG4 or MP41 decoders. You may find one that handles the odd width properly.
-
Thank you for your answers and suggestion. The problem is I cannot redo the capture. Unfortunattely I didn't knew at that time the consequences, but just discovered it months later...
Think the idea to try with different decoders is good one. But how to do it practically?
How to switch the codecs (or direct show filrers) reliably without uninstalling them?
I tried VCSwap, RadLight Filter Manager and also installed ffdshow just to do this easier... I disabled in MP-Classic the internal decoders without obvious results. The filter-display in MP-Classic does not change at all - which in my opinion means that the same decoder is used. My system is WinXP SP1.
I have the Microsoft, DivX, Xvid, ffdshow codecs installed. Can you please suggest any additional MPEG4 / MP4 decoder?
Is there some way to "hack" the video-file in order to cheat the decoder?
Is there any filter for VDub or avisynth to reverse this pixel-shift?
For your information: I'm not a professional, but also not a beginner...
Thanks -
You might try patching the AVI header with a different width, 378 or 380 instead of 379. I recommend doing this with a copy of your AVI file in case you screw it up. I have used this technique to fix images and video with the same problem.
VirtualDub has a built in hex editor you can use to do this (Tool -> Hex Editor):
The four bytes starting on the line labeled "40" (hilited in green) are the frame width. In this example the width is 640 (80 02 00 00). You should see 7B 01 00 00 with your video. Try changing the 7B to 7A (378) or 7C (380).
If you go with the smaller width you may also need to change the frame height to a larger value to prevent a buffer overflow. The four bytes following the frame width are the frame height. In the above image they are E0 01 00 00 (480). In your video they should be 0C 01 00 00 (268). Try changing the 0C to 0E (270).
If this works you may end up with garbage at the edges of the frame. This can easily be cleaned up with VirtualDub. -
Dear Midzuki, thanks for the suggestion... but it didn't work.
Goo side is that it gave me an idea
Why not using the cropp and stack horizontal and vertical functions in avisynth.
First cropp left-side of a single line, then right-side of the line then stack them together horizontaly in reversed order (eventually add on each line some black pixel to correct the odd frame width)
Next line same but with one pixel shifted to left... then stack the lines vertically.
.... and so forth for each frame from top to down.
I consider the shift is 1 px per line coz the line is exactly at 45 degr. to right.
on first line: left crop-width = X, right crop-length = W-X
on second line: where on next line X = X-1
....
at last line: X=0
Can anyone of the Avisynth gurus from this forum tell me if the avisynth scripting supports such variable and help me writing such script?
Other option is to write a "hard-coded" script for this particular case with exact numbers instead of variables... -
Dear jagabo, thank you for the information regarding the AVI-header hack... I tried it, but it didn't worked. Anyhow, I found your suggestion so interesting, that I downloaded the page and saved it to disk.
I couldn't use VirtualDub coz it crashed when loading the footage (see below) so i used some HexEditor instead.
An out-of-bounds memory access (access violation) occurred in module 'MPG4c32'...
...writing address 00ECFCDF...
...while decompressing video frame 0 (VideoSource.cpp:1778)...
...while using input buffer at 00b87008-00b8a5a7 (VideoSource.cpp:1777)...
...while using output buffer at 00ed0000-00f33313 (VideoSource.cpp:1776).
In meantime I solved the problem by using the crop(), StackHorizontal() and StackVertical() functions in avisynth. Atached the screenshot of the fixed video clip. The script I'll post a bit later coz i need to comment it first.
Similar Threads
-
Subs don't show properly I don't know what to do
By atai in forum SubtitleReplies: 1Last Post: 8th Oct 2009, 07:44 -
A Holiday Call for Help!
By hexfield in forum DVD & Blu-ray RecordersReplies: 16Last Post: 18th Dec 2007, 20:28 -
A general problem, I don't know what to call it.
By jonniemn in forum Newbie / General discussionsReplies: 2Last Post: 13th Jul 2007, 14:54 -
Remake casting call
By Marco33 in forum Off topicReplies: 6Last Post: 5th Jun 2007, 01:18