PDA

View Full Version : Distorted Picture @ AVI2SVCD with XVID source (in preview as in final result)


Venom_IL
27th March 2004, 14:32
Since the problem manifests even in the preview window, is independent of the encoder (tried TMPG [in which i can see the distorted picture throughout the encoding] and CCE) and occurs in the mpv file as well as in the final BIN/CUE I assume a log won't be of much help, but who knows

this is what i mean by distorted

http://members.lycos.co.uk/tvcaptures/tjdis.jpg
(ignore "tvcaptures", it is a dvdrip)

this is how it looks in the end result as well. as you can see, the colors are messed up and the picture is sort of tilted and cut and then continued in the other side.. or something like that

since the problem appears so early as to be in the preview i thought it might be the resizer but all 5 resizers (3 standard, FACAR, autofitcd) gave the same results

I tried switching the filter processing XVID files between XVID, ffdshow and DIVX to no avail. one thing to note is that MPC and WMP both crash when i try to open the file if the filter isn't DIVX, and if it is, the movie works great. VDMOD also runs the video fine (as does VLC, with it's own filters), and if i frameserve through it to TMPG I can encode it well, but i like D2Sroba somewhat [A LOT] better

Ive also tried the "save as direct stream copy" trick (including conversion to PCM audio and once without audio at all) in VDMOD, again, no cigar

relevant information:

http://members.lycos.co.uk/tvcaptures/tjgspot.JPG

http://members.lycos.co.uk/tvcaptures/tjvdmod.JPG

WNASPI32.DLL 4.71.2.0
--------------------------------------------------------
- 27/03/2004 02:03:37
- AVI to SVCD Conversion
- AVI2SVCD ver. 1.2.1 build 3
--------------------------------------------------------
Initializing
WARNING! You seem to be using "Norton Unerase Protection" and
you want to delete the temporary files created by dvd2svcd.
This can cause DVD2SVCD problems. Even though DVD2SVCD deletes
the temporary files, Norton doesn't, therefore DVD2SVCD
might run into diskspace problems. I suggest that you stop the
"Norton Unerase Protection" Service.
- G:\Downloads\tom_and_jerry.avi
Initializing finished.

--------------------------------------------------------
- 27/03/2004 02:03:40
- Free on drive F: 37779.06 mb
- AUDIO Extraction
--------------------------------------------------------
Audio extraction finished.

--------------------------------------------------------
- 27/03/2004 02:04:25
- Free on drive F: 37761.66 mb
- AUDIO conversion
--------------------------------------------------------
--------------------------------------------------------
- 27/03/2004 02:04:27
- Free on drive F: 37761.66 mb
- AUDIO conversion
--------------------------------------------------------

Converting MP2 to WAV. Filename: F:\DVD2SVCD\temp\Extracted_audio_1.mpa
Executing MADPlay (mp2 to wav). Commandline:
"C:\Programs\DVD2SVCD\MADPlay\madplay.exe" --quiet --output=wave:"F:\DVD2SVCD\temp\Encoded_audio_1.mp2.wav" "F:\DVD2SVCD\temp\Extracted_audio_1.mpa"
Conversion (mp2 to wav) of F:\DVD2SVCD\temp\Extracted_audio_1.mpa finished.


Encoding Audio. Filename: F:\DVD2SVCD\temp\Extracted_audio_1.mpa
Executing BeSweet. Commandline:
"C:\programs\DVD2SVCD\Tylo\BeSweetLater.bat" -core( -input "F:\DVD2SVCD\temp\Encoded_audio_1.mp2.wav" -output "F:\DVD2SVCD\temp\Encoded_audio_1.mp2" -logfile "F:\DVD2SVCD\temp\Encoded_audio_1.log" ) -ota( -g max ) -shibatch( --rate 48000 ) -2lame( -e -b 128 -m j )
Audio conversion of F:\DVD2SVCD\temp\Extracted_audio_1.mpa finished.

Audio conversion finished.

--------------------------------------------------------
- 27/03/2004 02:08:49
- Free on drive F: 37139.47 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------

Executing Cinema Craft Encoder.
StreamSectors: 833934864
AudioSectors: 58269652
VideoPAPO: 12015468
ScanOffsetBytes: 134558
SeqAligningBytes: 8551877
DVDBytes: 0
VideoEndHeader: 4
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 1.00
PureMPEGStream: 754963305.83
Seconds: 3593.20
CalcMPEGStream: 754963305.83
Frames: 89705
CDSize: 800.00
Number of CDs: 1
Cut point 795.00
Variable Settings:
Frames: 89705
Anti Noise Filter: Off
Passes: 3
Image Quality: 17
VAF file creation: On
Video Encoding Mode: One Pass VBR
Q. Factor: 30
Min. bitrate: 300
Max. bitrate: 1680
Aspect Ratio: 4:3 (No borders, encoded as 4:3)

---AVS Begin---
LoadPlugin("C:\Programs\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("G:\DOWNLO~1\TOM_AN~1.AVI",False)
ConvertToYUY2()
BilinearResize(480,576)
----AVS End----

--------------------------------------------------------
- 27/03/2004 02:57:43
- AVI to SVCD Conversion
- AVI2SVCD ver. 1.2.1 build 3
--------------------------------------------------------
Initializing
WARNING! You seem to be using "Norton Unerase Protection" and
you want to delete the temporary files created by dvd2svcd.
This can cause DVD2SVCD problems. Even though DVD2SVCD deletes
the temporary files, Norton doesn't, therefore DVD2SVCD
might run into diskspace problems. I suggest that you stop the
"Norton Unerase Protection" Service.
-
Initializing finished.

--------------------------------------------------------
- 27/03/2004 02:57:43
- Free on drive F: 35921.66 mb
- Restarting from: Muxing and Cutting
--------------------------------------------------------
- 27/03/2004 02:57:45
- Free on drive F: 35921.59 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Programs\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 27/03/2004 02:57:48
- Free on drive F: 35921.59 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Programs\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 27/03/2004 02:57:51
- Free on drive F: 35921.59 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Programs\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 27/03/2004 02:57:54
- Free on drive F: 35921.59 mb
- Multiplexing and cutting
--------------------------------------------------------
Saving bbMPEG settings: C:\Programs\DVD2SVCD\bbMPEG\default.ini
Offset in Seconds: 2
Executing bbMPEG.
Variable Settings:
Movie offset: 2 seconds
Cut point: 605 mb

Executing RunbbMPEG. Commandline:
"C:\Programs\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "F:\DVD2SVCD\temp\bbMPEG_Muxed_File.mpg"
Multiplexing and cutting finished.

--------------------------------------------------------
- 27/03/2004 03:03:37
- Free on drive F: 34716.63 mb
- Determining length of audio
--------------------------------------------------------
Analyzing: F:\DVD2SVCD\temp\bbMPEG_Muxed_File00.mpg
1800.024 seconds F:\DVD2SVCD\temp\bbMPEG_Muxed_File00.mpg
Analyzing: F:\DVD2SVCD\temp\bbMPEG_Muxed_File01.mpg
1786.200 seconds F:\DVD2SVCD\temp\bbMPEG_Muxed_File01.mpg
Analyzing finished.

--------------------------------------------------------
- 27/03/2004 03:05:42
- Free on drive F: 34716.59 mb
- Creating CD-Images using VCDXBuild
--------------------------------------------------------
- No. of chapters to create: 30

CD image #1: CD_Image_File_CD1.bin

Executing VCDXBuild. Commandline:
"C:\Programs\DVD2SVCD\VCDImager\VCDXBuild.exe" --verbose --cue-file="F:\DVD2SVCD\temp\CD_Image_File_CD1.cue" --bin-file="F:\DVD2SVCD\temp\CD_Image_File_CD1.bin" "F:\DVD2SVCD\temp\VCDXBU~1.XML"
--------------------------------------------------------
- 27/03/2004 03:07:11
- Free on drive F: 34707.88 mb
- Creating CD-Images using VCDXBuild
--------------------------------------------------------
- No. of chapters to create: 29

CD image #2: CD_Image_File_CD2.bin

Executing VCDXBuild. Commandline:
"C:\Programs\DVD2SVCD\VCDImager\VCDXBuild.exe" --verbose --cue-file="F:\DVD2SVCD\temp\CD_Image_File_CD2.cue" --bin-file="F:\DVD2SVCD\temp\CD_Image_File_CD2.bin" "F:\DVD2SVCD\temp\VCDXBU~2.XML"
Image creation finished.

--------------------------------------------------------
- 27/03/2004 03:08:34
- Free on drive F: 34699.25 mb
- Conversion done!
--------------------------------------------------------

I think the problem is not specific to my computer since I encoded many movies (many of them were XVID+mp3 like this one)without encountering such a thing, and furthermore, i believe there is some problem with the movie itself seeing as it crashes when opened in MPC via ffdshow or XVID

Sorry for the long post and thanks in advance :cool:

manono
28th March 2004, 14:00
Hi-

I'm pretty sure that the problem lies with the original avi resolution of 410x288. 410 is only Mod 2. Some idiot didn't know what he was doing when he made that in the first place (hope it wasn't you-we don't teach those kinds of things here at Doom9). And since the AR is 1.42:1, then there's a good chance that it has bad AR as well. You'll have to crop some before resizing. Try this:

LoadPlugin("C:\Programs\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("G:\DOWNLO~1\TOM_AN~1.AVI",False)
ConvertToYUY2()
Crop(2,0,408,288)
BilinearResize(480,544)
AddBorders(0,16,0,16)

But that won't fix the (probably) bad AR. I'd have to see the original vob files for that. But if it was originally fullscreen 1.33:1, then leaving off the last AddBorders line will return it to 1.33:1, I think. If you want to try that, then the resize line becomes BilinearResize(480,576), with no AddBorders line after it.

i believe there is some problem with the movie itself seeing as it crashes when opened in MPC via ffdshow or XVID

No kidding. Stop downloading garbage from the Internet, and do them better yourself. Regarding downloaded files, please be sure to read this Announcement. (http://forum.doom9.org/announcement.php?s=&forumid=6) I'll give you a free ride this time, since you weren't real clear as to the source. Good thing. :)

Venom_IL
2nd April 2004, 13:59
"Some idiot" is an understatement. You should see other encodes made by the monkeys who did this ;)

If I were the encoder of this I'd deserve to be called an idiot (if only for posting HERE for help after clearly not reading the guides). But if I were to make XVID encodes (I only do SVCD's) I'd probably use AutoGK and thus wouldn't be able to produce such bad results even if i wanted to :D

in any case, I think it's originally 1.33 and i'll try your suggestion and report back.. just one question though - i usually don't mess with the AVS script so Im not really sure where I put the code you gave me .. reading around the forum i see multiple places where it could go and im just not really sure

Im guessing I should choose "edit when dvd2avi is done" and then some time after i start the process i'd get a window whose content i should erase and put the code you wrote there.. is that correct? is there a way to edit the script in advance, before starting the process ?

sorry for the newbie question..

Venom_IL
2nd April 2004, 14:07
I've done some more reading, will adding this to dvd2svcd.ini and choosing it in the frameserver tab do ?

[AVISYNTH_temp]
0=LoadPlugin("C:\Programs\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
1=Crop(2,0,408,288)
2=BilinearResize(480,576)

o_O

manono
2nd April 2004, 15:47
Hi-

Now it's my turn to betray my newbieness. I have no idea how to edit the .ini files, and although I guess that'll work, since it's for only one encode (?), I don't think it strictly necessary. But sorry, I can't help you there. Perhaps someone else can.

Yes, I would do it by editing the .avs (AviSynth script file) that DVD2SVCD creates. I would do it by ticking "Edit as part of video encoding", but I think that "Edit when DVD2AVI is done" will also work. In the case of "Edit as part of video encoding", just before the video encoding starts, DVD2SVCD pauses, and shows you the .avs. Then you have a chance to edit and save it before the encoding starts.

By the way, you can test these scripts in VDubMod before encoding to make sure they work. Open the first one in VDubMod and you should see that really nasty stuff from your picture. Open the second one with the added crop, and it should look more normal. They'll both have the characters look tall and skinny, because they haven't been resized by 4:3 as will be done when the SVCD is played, but the second one shouldn't be skewed diagonally.

Venom_IL
2nd April 2004, 16:57
Strange indeed

I have done as you suggested and previewd the AVS in VDMOD and behold - the distortion persists even when i use the cropping you suggested, with or without the resize(and/or addborders)

I even tried cropping to 400X288 (so that the first would also be a factor of 16) but the same thing occurs

maybe it's avisynth itself that has the problem with the bad resolution ? should i consider upgrading it? my current version is avisynth 2.53 build nov 11 2003

thank you for your continued help

manono
2nd April 2004, 20:54
Hi-

This took awhile, but I think I finally figured it out. I made myself a 410x288 .avi, and it played fine, and opened fine in VDubMod. Then I opened it in your CCE (I think) script, and got the diagonal stuff. Then I decided it must be a colorspace issue. The only way those guys could even have encoded it is if they had used Full Processing in VDubMod (more proof that they had no idea what they were doing). That would make it RGB. That also explains (I think) why it works in TMPGEnc. when frameserving through VLC, as TMPGEnc. uses RGB. And RGB and YUY2 can handle Mod 2 resolutions, whereas YV12 can't. When using AviSource, by default it opens it in YV12. For more information about this issue see here:

http://www.avisynth.org/index.php?page=AviSource

So you have to force a colorspace change. Try this:

LoadPlugin("C:\Programs\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("G:\DOWNLO~1\TOM_AN~1.AVI",False,"YUY2")
BilinearResize(480,576)
#SwapUV() #if needed to correct the colors (probably will be needed)

You'll still have to edit the .avs before the encoding (or do your .ini file trick). I think you can leave off the ConvertToYUY2() line, as it's now already in YUY2. But if it doesn't work without it, or CCE crashes, then put it back in, but after the resize line. I tested with a black and white video, and it looks OK in VDubMod, and opens in CCE, although I didn't actually do any CCE encoding. I don't know how your colors will look, but I suspect they'll still be off. If so, then add SwapUV() to the script before encoding. For more information on that one, please see this:

http://www.avisynth.org/index.php?page=Swap

And as always, be sure to test it out before doing all the encoding. If it works, then I apologize for taking so long to figure it out. If it doesn't work for some reason, then I wouldn't mind taking a look at a piece of the video. Good luck.

Venom_IL
3rd April 2004, 18:04
:thanks:



RE "If it works, then I apologize for taking so long to figure it out" -
Don't be ridiculous, it is I who should apologize for my lack of knowledge in video encoding..

hey, I just read the guides and FAQ's :D