Log in

View Full Version : Solution for MPEG-1 encoding and TMPG blank screen


lordkinbote
5th August 2003, 14:33
Although, this has been discussed somewhat, there were a few people who asked about this that were never answered. Here's what I figured that worked for me. As people have stated before, the key is to put the command ConvertToRGB24() either in the ini file or the avs file. I'm a lazy bastard so I prefer to do it in the ini file so I don't have to wait for the edit screen to pop up after DVD2AVI finishes.:D So, I will give you a copy of my VCD Settings.ini (actually, I named it NewVCD Settings.ini because I didn't want to screw with the original). The extra stuff at the bottom has to do with the SemiAutoCropResize filter I use (great filter to minimize TV overscan). Where I put the ConvertToRGB24 commands will be highlighted in red. Someone suggested putting this in the DVD2SVCD.ini but someone else came up with a good point about not wanting it to be in there when encoding SVCDs or using CCE, so that's why I decided to put it in the VCD Settings.ini since it will only then be used with TMPG.
--------------------------------------------

[Executables]
PVA Executable=
vStrip Executable=D:\Program Files\DVD2SVCD\vStrip\vStrip.exe
DVD2AVI Executable=D:\Program Files\DVD2SVCD\DVD2AVI\DVD2AVI.exe
BeSweet Executable=D:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe
MadPlay Executable=D:\Program Files\DVD2SVCD\MADPlay\madplay.exe
MPEG51 Executable=D:\Program Files\DVD2SVCD\MPEG5.1\pub_enc.exe
CCE Executable=D:\PROGRA~1\CUSTOM~1\CINEMA~1\cctsp.exe
VFAPI Executable=D:\Program Files\DVD2SVCD\VFAPI\Reader\VFAPIConv-EN.exe
TMPGEnc Executable=D:\Program Files\Pegasys Inc\TMPGEnc Plus 2.5\TMPGEnc.exe
ProCoder Executable=
ProCoder Frameserver Executable=D:\Program Files\DVD2SVCD\VFAPI\Reader\VFAPIConv-EN.exe
Pulldown Executable=D:\Program Files\DVD2SVCD\pulldown\pulldown.exe
SubMux Executable=D:\Program Files\DVD2SVCD\WinSubMux\WinSubMux.exe
bbMPEG Executable=D:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe
I-Author Executable=
VCDImager Executable=D:\Program Files\DVD2SVCD\VCDImager\VCDImager.exe
VCDXBuild Executable=D:\Program Files\DVD2SVCD\VCDImager\VCDXBuild.exe
CDMage Executable=
RunPerCDImage Executable=
RunFinal Executable=
AVS2.5 MPG2Dec DLL=D:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\Mpeg2dec\mpeg2dec3.dll
AVS2.5 InverseTelecine DLL=D:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\InverseTelecine\decomb.dll
AVS2.5 Subtitle DLL=D:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\Avisynth Subtitler.dll
AVS2.5 BMP Loader DLL=D:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\Avisynth BMP Loader.dll
Title Picture=D:\Program Files\DVD2SVCD\DefaultTitlepicture.bmp
Change CD Picture=D:\Program Files\DVD2SVCD\DefaultChangeCD.bmp
Last CD Picture=D:\Program Files\DVD2SVCD\DefaultLastCD.bmp

[Folders]
PVA Folder=D:\DVD Rip\
DVD2AVI Folder=D:\DVD Rip\video
vStrip Folder=D:\DVD Rip\source
Audio Folder=D:\DVD Rip\audio
CCE Folder=D:\DVD Rip\
TMPGEnc Folder=D:\DVD Rip\video
ProCoder Folder=D:\DVD Rip\
Pulldown Folder=D:\DVD Rip\
bbMPEG Folder=D:\DVD Rip\muxed
I-Author Folder=D:\DVD Rip\
Subpictures Folder=D:\DVD Rip\Subs

[Settings]
XPos=661
YPos=667
FirstRun=0
UsePVA2SVCD=0
UseDVD2SVCD=1
UseAVI2SVCD=0
UseMPEG1=1
UseMPEG2=0
Convert to Canopus codec=0
Convert to Divx4=0
Use Frameselection=0
New Default Folder=0
DVD2SVCD Level=1
UseDVDRip=1
UsevStrip=0
UseInternalRip=1
Eject DVD=0
iDCT=0
DVD2AVI Pause=0
Luminance Gain=5
Luminance Offset=0
Audio1Downsampling=0
Audio2Downsampling=1
Audio1BitRate=10
Audio2BitRate=7
tooLame Mode=0
Autodetect Azid Gain=1
Folder Structure Source=
Folder Structure Video=
Folder Structure Audio=
Folder Structure Muxed=
Folder Structure Subs=Subs
Intra=8,16,19,22,26,27,29,34,16,16,22,24,27,29,34,37,19,22,26,27,29,34,34,38,22,22,26,27,29,34,37,40,22,26,27,29,32,35,40,48,26,27,29,32,35,40,48,58,26,27,29,34,38,46,56,69,27,29,35,38,46,56,69,83
NonIntra=16,17,18,19,20,21,22,23,17,18,19,20,21,22,23,24,18,19,20,21,22,23,24,25,19,20,21,22,23,24,26,27,20,21,22,23,25,26,27,28,21,22,23,24,26,27,28,30,22,23,24,26,27,28,30,31,23,24,25,27,28,30,31,33
Matrice Preset=
Use deafult Matrice=1
LFEDownmixLR6Ch=-3
LFEDownmixLFE6Ch=0
CenterDownmix6Ch=0
SurroundDownmix6Ch=0
DynamicCompression6Ch=1
StereoDownmixType6Ch=0
RearChannelFiltering6Ch=0
DialogNorm6Ch=0
LFEDownmixLR2Ch=-3
LFEDownmixLFE2Ch=0
CenterDownmix2Ch=-1
SurroundDownmix2Ch=-1
DynamicCompression2Ch=1
StereoDownmixType2Ch=0
RearChannelFiltering2Ch=0
DialogNorm2Ch=0
No Audio Conversion=0
Flip Vertival=0
Add ResampleAudio=1
Resize To=2
Use CCE=0
Use TMPGEnc=1
Use ProCoder=0
ProCoder CBR VBR Type=2
ProCoder Quality=3
ProCoder Field Order=2
Procoder Close GOPs=0
ProCoder Frames In GOP=15
ProCoder Distance IP=0
Procoder Use Sequence Header=1
ProCoder Picture Structure=1
Procoder DC Precision=1
CCE Safe Mode=0
NoOfpasses=4
CCE Image Quality=17
CCE Anti noise value=2
CCE Anti noise=0
CCE Timecode=01:00:00:00
CBR=1
One Pass VBR=0
Multi Pass VBR=0
RoBa Multi Pass=0
RoBa Visibel=0
CCE Bias=20
CCE Field Order=2
Progressive=1
Auto Intra DC=0
DVD Compliant=0
Restrict auto I frame insertion=0
Close all GOPs=0
Intra DC=2
M GOP=3
MN GOP=5
SEQ Header=1
Constrained Parameter Set=1
TMPGEnc Rate Control Mode=0
TMPGEnc Motion search precision=4
TMPGEnc Field Order=2
TMPGEnc Num of passes=2
Prediction Size=0.999
OffsetFixed CQ Value=80
OffsetFixed CQ_VBR Value=25
Use fixed CQ Value=0
DC component precision=2
Output YUV data as Basic YCbCr not CCIR601=0
Use floating point DCT=1
No motion search for still picture part by half pixel=1
Soften block noise=0
Soften Intra=35
Soften NonIntra=35
TMPGEnc GOP I Pictures=1
TMPGEnc GOP P Pictures=5
TMPGEnc GOP B Pictures=2
TMPGEnc SEQ Headers=1
TMPGEnc Max frames in GOP=0
TMPGEnc Close GOPs=0
TMPGEnc Detect Scene Change=1
Enabled Padding=0
TMPGEnc VBVBuffer=40
Dont Delete Files=0
Create VAF=1
QFactor=5
Linear quantizer scale=1
Zigzag scanning order=1
Use2Streams=0
Pri1Audio1=28
Pri1Audio2=-1
Pri2Audio1=-1
Pri2Audio2=-1
Sub1=28
Sub2=-1
Sub3=-1
Sub4=-1
Sub5=-1
Sub6=-1
Sub7=-1
Sub8=-1
Azid Gain Offset=6
Use CCE Template=0
CCE Template=
SubOutputPalette0=clBlack
SubBlendPalette0=0
SubOutputPalette1=clWhite
SubBlendPalette1=15
SubOutputPalette2=$001E1E1E
SubBlendPalette2=15
SubOutputPalette3=clGray
SubBlendPalette3=15
Rip subtitles=0
Min. Delay. Between Subtitles=100
Resize Subtitles=100
SVCD subtitles=0
CVD subtitles=0
Permanent subtitles=1
PAL Y-Pos=-1
NTSC Y-Pos=-1
External PAL Y-Pos=480
External NTSC Y-Pos=400
SubStreamIDOffset=1
External Subtitle Font Name=Verdana
External Subtitle Font Size=18
External Subtitle Font Style=0
bbMPEG MPEG1=0
bbMPEG VCD=1
bbMPEG MPEG2=0
bbMPEG SVCD=0
bbMPEG DVD=0
bbMPEG VBR=0
bbMPEG Pad VCD=0
bbMPEG Write PEC=1
bbMPEG Add Scan Offsets=0
bbMPEG Align Sequence Headers=0
bbMPEG Use Private Stream 2=0
bbMPEG Computed Bitrate=1
bbMPEG TimeStamps=0
bbMPEG Pulldown=2
bbMPEG MuxRate=3528
bbMPEG Pack Size=2324
bbMPEG Packets Pack=1
bbMPEG Video Buffer=46
bbMPEG Audio 1 Buffer=4
bbMPEG Audio 2 Buffer=4
bbMPEG videoDelay Adjustment=344
bbMPEG audioDelay Adjustment=344
bbMPEG audio1Delay Adjustment=344
Use MPEGAV=0
MinsHigh1=50
MinsHigh2=76
MinsHigh3=100
MinsHigh4=125
MinsHigh5=163
NumCd1=1
NumCd2=1
NumCd3=2
NumCd4=2
NumCd5=3
NumCd6=3
CDSize 1=798
CDSize 2=798
CDSize 3=798
CDSize 4=798
CDSize 5=798
CDSize 6=798
MaxBitrate=1150
MinBitrate=1150
MaxAvg=1150
MinAvg=1150
Adjust Audio Bitrate=0
Use Min. Avg.=1
Force Film=0
Movie Offset=0
CDOverlap=2
UseCDOverlap=0
FixedChapters=0
DVDChapters=1
PBCType=0
Data Preparer=dvd2svcd
Use I-Author=0
Use VCDImager=0
No images=1
Use VCDXBuild=0
Length of Chapters=60
Use TitlePicture=0
Use ChangeCD Picture=0
Use LastCD Picture=0
Use EntrySVD=0
Save XML=1
Save Movie Info=1
ProcessPriority=0
SmartDeinterlace Mode=2
SmartDeinterlace Treshold=10
SmartDeinterlace Denoise=1
SmartDeinterlace Blend=0
SmartDeinterlace Fast=1
Edit Avisynth Script file=0
Use CDMage=0
RunPerCDImage=0
RunPerCDImage Params=
RunFinal=0
RunFinal Params=
Automatic Shutdown=0
Avisynth Setup=SemiAutoCropAndResize

[AVISYNTH_BicubicResize]
0=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=ConvertToRGB24()
^b_value=0.0
^c_value=0.6

[AVISYNTH_BilinearResize]
0=BilinearResize(^TargetWidth,^TargetHeight)
1=AddBorders(0,^BorderTop,0,^BorderBottom)
2=ConvertToRGB24()

[AVISYNTH_SemiAutoCropAndResize]
0=DetectedTop=^DetectedTop
1=DetectedHeight=^DetectedHeight
2=BlocksToCropHorizontal=^BlocksToCropHorizontal
3=BlocksToCropVertical=^BlocksToCropVertical
4=BlockOptimization=^BlockOptimization
5=ResizeMethod=^ResizeMethod
6=Bicubic_b_Value=^b_value
7=Bicubic_c_Value=^c_value
8=GammaCorrection=^GammaCorrection
9=Hue=^Hue
10=Saturation=^Saturation
11=Brightness=^Brightness
12=Contrast=^Contrast
13=DebugMode=^DebugMode
14=DestinationWidth=^TargetWidth
15=DestinationHeight=^TargetHeight
16=LoadPlugin(!SimpleResize.dll)
17=Import(!SemiAutoCropAndResize.avs)
18=ConvertToRGB24()
^DetectedTop=0
^DetectedHeight=478
^BlocksToCropHorizontal=1
^BlocksToCropVertical=1
^BlockOptimization=8
^ResizeMethod=2
^b_value=0.0
^c_value=0.6
^GammaCorrection=1.0
^Hue=0
^Saturation=1.0
^Brightness=0
^Contrast=1.0
^DebugMode=0
!SimpleResize.dll=D:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\SimpleResize\SimpleResize.dll
!SemiAutoCropAndResize.avs=D:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\AutoCrop\SemiAutoCropAndResize.avs

DDogg
6th August 2003, 03:42
Nice work around, Or you can just do this registry change.
------------------------------------------

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32]
"VIDC.YUY2"="huffyuv.dll"

lordkinbote
6th August 2003, 06:00
Really? That works? What does that actually do?

DDogg
6th August 2003, 14:27
It sets up huffy (installed with DVD2SVCD) to act as the colorspace handler which gives TMPG what it needs to function. The MS handler causes problems.

This reg tweak should probably be considered mandatory on any encoding machine, but I don't think D2S felt comfortable changing somebody's registry for them.

The problem is we all did this so long ago we forgot about it and that's why we have not been much help with the newer folks having problems with tmpg. Also, some of the MS upgrades change this back and cause the problem to reappear out of nowhere which got everybody scratching their heads in frustration.

I think he is considering adding a converttorgb24() checkbox on the beta he is working on, but this reg tweak is the preferred method, IMO. Huffy is a fast handler.

lordkinbote
10th August 2003, 01:50
Thanks DDogg,

I'll try this out. I just copied that whole line (except for the Windows Registry version line) and pasted it in a blank text file and saved it as a .reg file. That didn't work 'cause it said that I can only import binary registry files. So, I'm going to try to add it manually although I'm not sure how exactly.

lordkinbote
10th August 2003, 01:55
Nevermind. I found it and edited it.

Thanks again.

lordkinbote
10th August 2003, 09:33
Okay, I tried it, DDogg and it didn't work. There was the same results as before with the ms handler. Are you quite certain it is vidc.yuy2 that should be changed or should all of the ones that have the msyuv.dll be changed to the huffyuv.dll? Well, I'm changing them all now and we'll see how that fairs.

lordkinbote
10th August 2003, 09:38
Changing them all didn't work either. Looks like I have to edit the avs.

Venom_IL
21st January 2004, 08:21
Hey guys, having this exact problem here..

Tried the regfix (rebooted after the fix), the avs converttorgb24 fix both through ini and manual insertion to resize script (btw Im confused - under advanced TMPG options it says color conversion: Convert to RGB24.. why add it to the AVS/INI then? ), tried the VDMOD trick as described in "my avi2vcd fails" thread, tried the readavs.dll thingie in the TMPG advanced options and probably some other stuff I forget :)

The avs script works perfectly through media player classic, that is i see the movie with the subtitles well

Here is a random log of one of the attempts, if you want me to post a few more logs of other attemps (just tell me what options to use), only say the word :cool:

disregard the strange audio conversions time, i cancel them to get to the video encoding quickly

the same thing happens every time - tmpg encodex a black screen. if I add subs, it encodes a black screen with subs on it

WNASPI32.DLL 4.71.2.0
--------------------------------------------------------
- 21/01/2004 09:14:45
- AVI to SVCD Conversion
- AVI2VCD 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.
- C:\downloads\To watch\a(1900).avi
Initializing finished.

--------------------------------------------------------
- 21/01/2004 09:14:48
- Free on drive G: 6027.72 mb
- AUDIO Extraction
--------------------------------------------------------
Audio extraction finished.

--------------------------------------------------------
- 21/01/2004 09:15:49
- Free on drive G: 6027.72 mb
- AUDIO conversion
--------------------------------------------------------
--------------------------------------------------------
- 21/01/2004 09:15:51
- Free on drive G: 6027.72 mb
- AUDIO conversion
--------------------------------------------------------

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


Encoding Audio. Filename: G:\Downloads\dvd2svcd\Extracted_audio_1.mpa
Executing BeSweet. Commandline:
"C:\programs\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "G:\Downloads\dvd2svcd\Encoded_audio_1.mp2.wav" -output "G:\DOWNLO~1\dvd2svcd\Encoded_audio_1.mp2" -logfile "G:\DOWNLO~1\dvd2svcd\Encoded_audio_1.log" ) -ota( -g max ) -shibatch( --rate 48000 ) -2lame( -e -b 224 -m s )
Audio conversion of G:\Downloads\dvd2svcd\Extracted_audio_1.mpa finished.

Audio conversion finished.

--------------------------------------------------------
- 21/01/2004 09:16:07
- Free on drive G: 6206.69 mb
- Video Encoding using TMPGEnc
--------------------------------------------------------
- Encoding G:\Downloads\dvd2svcd\AviSynth_Script_file.avs
StreamSectors: 1667869728
AudioSectors: 172847500
VideoPAPO: 23158692
ScanOffsetBytes: 0
SeqAligningBytes: 0
DVDBytes: 0
VideoEndHeader: 8
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 1.00
PureMPEGStream: 1471863528.00
Seconds: 6090.75
CalcMPEGStream: 1471863528.00
Frames: 145912
CDSize: 800.00
Number of CDs: 2
Cut point 795.00
Bitrate: 1150.00
Executing TMPGEnc. Commandline:
"C:\programs\TMPG\TMPGEnc.exe" "G:\Downloads\dvd2svcd\TMPGEnc_Project_file.tpr" /Encode /Close
Video Encoding finished.

I haven't edited the avisynth script or anything like that.. (for this attempt.. ive tried once to add the converttorgb24() line but to no avail)

Thanks a lot for any insight you might have :sly: