View Full Version : Need help svcd to dvd
vifa
24th August 2005, 22:48
I am trying to convert from svcd (pal) to dvd (ntsc) and keep the proper aspect ratio without going through a thousand steps.
Here Is my example: I have a svcd pal which has 130 pixels of border on top and bottom. So I would subtract 576 - 260 = 316. Then I multiply 316 * .8334 to get ntsc which = 262 rounded. Then 640 / 262 = 2.44 ratio. Then 852 / 2.44 = 350 rounded. 480 - 350 = 130 so I would add 60 pixels of border on the top and bottom. So when lancos resize comes up I edit with:
resampleaudio(48000)
assumefps(23.976,true)
addborders(0,60,0,60)
It makes a video at 23.976 and it looks right but it needs pulldown, which I can do manually but is there an avs command that would force it to do a pulldown after encode? Also, after I do a manual pulldown, the audio is off a few seconds so is there a way to have the audio encoded to match the ntsc fps without having to do everything manually?
Nick
25th August 2005, 19:47
OK. First the maths - you've thrown me a bit with your number crunching. Especially since the avisynth script you posted contains no resize command!
I guess you're starting with 4:3 PAL and want to end up with 16:9 NTSC, right?
If so, the easiest way is to crop 72 pixels top and bottom from the source and resize to 720x480
ie
Crop(0,72,0,-72)
LanczosResize(720,480)
Scrub the add borders command.
If you look at the advanced usage of resizers at avisynth.org, you can cut that to one line and speed encoding up
LanczosResize(720,480,0,72,480,432)
sounds right but I haven't tested it.
Anyway, if the output from your maths looks right, all this is immaterial really.
So, now to the pulldown. Sadly there is no way I can see to call it from Avisynth. However, whilst it has to be done manually, you can use DGPulldown (http://neuron2.net/dgpulldown/dgpulldown.html) to fix the video.
You can flag straight from 25fps progressive to 29.97fps. Hence you can scrub the assumefps line from your script and scrub the need for slowing down the audio.
The easiest way to do things is this:
1) Launch DVD2SVCD. Do the above edits to the avisynth script and let the process complete in its entirity. Do not close DVD2SVCD when the process ends.
2) Delete the image file, authored DVD files and muxed file from the project folder.
3) Run DGPulldown on the Encoded_video_file_PAL.mpv file to flag from 25->29.97. Now carefully copy the filename of the ORIGINAL mpv file, then delete the original. Rename the Pulldown encoded file exactly as the original mpv file was - note the pulldowned file will have an m2v extension which you have to change back to mpv.
4) Edit the DVDAuthor.xml file in your project folder using Notepad. Change "PAL" for "NTSC" in this file. and resave.
5) Open Notepad again. From the "Log" tab of DVD2SVCD, copy and paste the commandlines for MPlex, DVDAuthor and MkIsoFS into the Notepad document, eg
"C:\Program Files\DVD2SVCD\DVDAuthor\mplex.exe" -f 8 -o "K:\Test\MPlex_Muxed_File00.mpg" "K:\Test\Pulldown_Encoded_Video_NTSC.mpv" "K:\Test\Encoded_audio_1.ac3"
"C:\Program Files\DVD2SVCD\DVDAuthor\dvdauthor.exe" -x "K:\Test\DVDAuthor.xml"
"C:\Program Files\DVD2SVCD\DVDAuthor\mkisofs.exe" -o "K:\Test\DVDImage.iso" -publisher "DVD2SVCD" -volid "" -dvd-video "K:\Test\DVD-Files"
Save this to your desktop as file.bat
Then double click it! When the process finishes again you should have an NTSC DVD.
Nick
25th August 2005, 19:48
Actually some feedback on this would be handy.
If it works OK for you I think I'll copy it into the FAQ.
vifa
26th August 2005, 02:16
[QUOTE=Nick]OK. First the maths - you've thrown me a bit with your number crunching. Especially since the avisynth script you posted contains no resize command!
Yes sorry, I left it out.
I guess you're starting with 4:3 PAL and want to end up with 16:9 NTSC, right?
Yes
If so, the easiest way is to crop 72 pixels top and bottom from the source and resize to 720x480
How did you come up with 72?
ie
Crop(0,72,0,-72)
LanczosResize(720,480)
Scrub the add borders command.
If you look at the advanced usage of resizers at avisynth.org, you can cut that to one line and speed encoding up
LanczosResize(720,480,0,72,480,432)
Yes I read this in a post but wasn't sure exactly what all of the numbers meant. I would assume the first two are the size you want to end up with, the second two are amount of border on the sides and top/bottom and the last two is the image size you want to process. ie if you want to just process the actual video and not include the borders, is that right? Also, how did you come up with 480x432?
sounds right but I haven't tested it.
Anyway, if the output from your maths looks right, all this is immaterial really.
This is what I did right or wrong.
I started out with an svcd pal video that was of course 480x576 and when i opened it up in virtualdub and selected null transform / cropping it took 130 in the y values to bring the borders on the top and the bottom to the actual video. So 130 on the bottom and 130 on the top = 260 total border. So wouldn't the actual video height be 576-260 = 316h. I read in a post that if your going to ntsc you need to multiply the height by .8334 which gives me 316*.8334 = 263 which I rounded to an even 262. Then since it's svcd which is 4:3 it's my understanding that it is 640 in width, so 640/262 = 2.44 video aspect. Then to resize to 16:9 dvd which is actually 852x480 1.78*480, so wouldn't I divide 852/2.44 which = 350 and wouldn't that make my target video 720x350 with 65 pixel border on the top and the bottom to fill in the remainder 130 pixels with border in a 16:9 NTSC dAR?
So would the command be
lancosresize(720,480,0,65,720,350) maybe I'm lost again.
I will try your method on pulldown and post my results.
Thanks for the help.
Nick
26th August 2005, 17:15
OK. The advanced usage of the resize command:
LanczosResize(Output width,Output height, source crop left,source crop top,source width,source height) <---note the last 4 variables refer to the SOURCE.
So, 720 x 480 output explains the first two - (720,480,...). But you don't want to resize the whole source image to 720 x 480 - only a 16:9 portion of it. If you take a 16:9 image and letterbox it to a 4:3 SVCD, you have to add borders of 72 pixels top and bottom, so by cropping this amount off, the remaining image should resize back to 16:9 perfectly.
So you need to crop 0 off the left and 72 off the top. Hence (720,480,0,72...
The final two numbers are source width and height. You want to use the full width of the source image but want to crop 72 pixels off the bottom. So for source width, you're using the full 480. You've already taken 72 off the top of your 576 so 504 pixels remain. you wish to discard the bottom 72 pixels and 504-72=432, so if you use 432 of the 504 remaining vertical pixels, you're in business.
Thus (720,480,0,72,480,432)
However, if you crop 72 pixels off top and bottom, leaving 432 pixels, you leave some (130-72=) 58 pixels of each border in place. When you resize these 432 to 480, that's an 11% increase. add 11% onto 58px and your maths is suddenly looking pretty accurate :) . Looks like different maths to get the same result!
Good luck with the pulldown bit!
vifa
27th August 2005, 03:50
Thus (720,480,0,72,480,432)
Ok, I tried the extended resize and I really like putting it all on one line, but one problem I'm having with your pulldown is, if I don't use the assumefps(23.976,true) command it doesn't resize to 720x480 the Encoded_video_CCE_PAL.mpv ends up as 720x576 even though I told it to size to 720x480. If I put assumefps in it sizes to the proper ntsc720x480 but of course then I have to slow down the audio. Your method would be great as I could encode at 25fps do a pulldown to 29.97 and load it into dvdauthor without having to time warp the audio. I wish there was a way to fool dvd2svcd into thinking the video is ntsc so it would set up the project files to do pulldown after the encoding.
Nick
27th August 2005, 18:08
if I don't use the assumefps(23.976,true) command it doesn't resize to 720x480 the Encoded_video_CCE_PAL.mpv ends up as 720x576 even though I told it to size to 720x480.
It didn't for me - I did a testrun with a PAL AVI to see if my pulldown proposal works and it worked perfectly.
At what point in proceedings are you editing the Avisynth script? I'm doing it as part of video encoding.
vifa
27th August 2005, 21:04
It didn't for me - I did a testrun with a PAL AVI to see if my pulldown proposal works and it worked perfectly.. I have the bat file setup and I think the pulldown part is going to work fine if I can just end up with 720x480 at 25fps from the encoding.
OK I tried it again and it still gives me 720x576. I used LanczosResize(720,480,0,72,480,432)
I'm not starting with an avi though, the file is an pal svcd mpg. I select dvd to dvd and select a dummy ifo and it then gives an error and ask you to browse to a file. I choose the svcd mpg and hit ok.
At what point in proceedings are you editing the Avisynth script? I'm doing it as part of video encoding .
The same
Nick
28th August 2005, 10:21
What video encoder are you using?
vifa
30th August 2005, 04:38
Cce 2.5
Nick
30th August 2005, 18:11
OK buddy. You'll have to post a full log on this.
I just ripped a 20 second sequence from a PAL SVCD and just converted it perfectly as per my post above, using CCE 2.5.
We're obviously doing something different, it's just figuring out what.
I've kept my log from my test run to compare.
vifa
31st August 2005, 01:40
I opened the encoded_video_pal_cce.mpv and it's 16:9 25fps 720x576
Ok, I here is the log of the small pal svcd file I used to test:
WNASPI32.DLL 4.6.0.1021
--------------------------------------------------------
- 8/30/2005 7:31:31 PM
- DVD to SVCD Conversion
- DVD2DVD ver. 1.2.2 build 3
--------------------------------------------------------
Initializing
- C:\Program Files\DVD2SVCD\VTS_01_0.IFO
- D:\Movies\Files\Test_pal_svcd.mpg
Initializing finished.
--------------------------------------------------------
- 8/30/2005 7:31:34 PM
- DVD2AVI
--------------------------------------------------------
Creating DVD2AVI INI file:
- C:\Program Files\DVD2SVCD\DVD2AVI\DVD2AVI.INI
Variable settings:
iDCT_Algorithm: 32-bit SSE MMX
Executing DVD2AVI.
Executing DVD2AVI. Commandline:
"C:\Program Files\DVD2SVCD\DVD2AVI\DVD2AVI.exe" -CS=2 -YR=1 -OM=0 -EXIT -OF=[C:\Program Files\DVD2SVCD\Movie\DVD2AVI_Project_file] -IF=[D:\Movies\Files\Test_pal_svcd.mpg]
Framerate: 25000
DVD2AVI processing done.
--------------------------------------------------------
- 8/30/2005 7:31:41 PM
- Free on drive C: 25658.86 mb
- AUDIO Extraction
--------------------------------------------------------
Found MPA stream id: 0xC0
Filename: C:\Program Files\DVD2SVCD\Movie\Extracted_audio_1.mpa
Audio1 delay: 0 ms
Audio extraction finished.
--------------------------------------------------------
- 8/30/2005 7:31:45 PM
- Free on drive C: 25657.88 mb
- AUDIO conversion
--------------------------------------------------------
Encoding Audio. Filename: C:\Program Files\DVD2SVCD\Movie\Extracted_audio_1.mpa
Executing BeSweet. Commandline:
"C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "C:\Program Files\DVD2SVCD\Movie\Extracted_audio_1.mpa" -output "C:\PROGRA~1\DVD2SVCD\Movie\Encoded_audio_1.mp2" -logfile "C:\PROGRA~1\DVD2SVCD\Movie\Encoded_audio_1.log" ) -ota( -g max ) -2lame( -e -b 192 -m s )
Audio conversion of C:\Program Files\DVD2SVCD\Movie\Extracted_audio_1.mpa finished.
Audio conversion finished.
--------------------------------------------------------
- 8/30/2005 7:31:54 PM
- Free on drive C: 25657.03 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------
- Editing AVS script file
Executing Cinema Craft Encoder.
StreamSectors: 4546875788
AudioSectors: 950516
VideoPAPO: 70418808
ScanOffsetBytes: 1388
SeqAligningBytes: 88183
DVDBytes: 0
VideoEndHeader: 4
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 0.00
PureMPEGStream: 4475416889.17
Seconds: 39.00
CalcMPEGStream: 4475416889.17
Frames: 925
CDSize: 4350.00
Number of CDs: 1
Cut point 4346.00
Variable Settings:
Frames: 925
Anti Noise Filter: Off
Passes: 3
Image Quality: 17
VAF file creation: On
Video Encoding Mode: One Pass VBR
Q. Factor: 1
Min. bitrate: 2000
Max. bitrate: 4000
Aspect Ratio: Anamorphic (no borders, encoded as 16:9)
---AVS Begin---
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
MPEG2Source("C:\PROGRA~1\DVD2SVCD\Movie\DVD2AV~1.D2V")
LanczosResize(720,480,0,72,480,432)
Import("C:\Program Files\DVD2SVCD\Tylo\RoBaConditional.avs")
Import("C:\Program Files\DVD2SVCD\Movie\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
----AVS End----
Closing program
CCE Max Speed: 2.070
Video Encoding finished.
--------------------------------------------------------
- 8/30/2005 7:34:05 PM
- Free on drive C: 25631.98 mb
- Multiplexing Audio and Video
--------------------------------------------------------
Executing MPlex. Commandline:
"C:\Program Files\DVD2SVCD\DVDAuthor\mplex.exe" -f 8 -o "C:\Program Files\DVD2SVCD\Movie\MPlex_Muxed_File00.mpg" "C:\Program Files\DVD2SVCD\Movie\Encoded_Video_CCE_PAL.mpv" "C:\Program Files\DVD2SVCD\Movie\Encoded_audio_1.mp2"
--------------------------------------------------------
- 8/30/2005 7:34:09 PM
- Free on drive C: 25605.84 mb
- Determining length of audio
--------------------------------------------------------
Analyzing: C:\Program Files\DVD2SVCD\Movie\MPlex_Muxed_File00.mpg
36.339 seconds C:\Program Files\DVD2SVCD\Movie\MPlex_Muxed_File00.mpg
Analyzing finished.
--------------------------------------------------------
- 8/30/2005 7:34:15 PM
- Free on drive C: 25605.84 mb
- Authoring DVD
--------------------------------------------------------
Executing DVDAuthor. Commandline:
"C:\Program Files\DVD2SVCD\DVDAuthor\dvdauthor.exe" -x "C:\Program Files\DVD2SVCD\Movie\DVDAuthor.xml"
--------------------------------------------------------
- 8/30/2005 7:34:33 PM
- Free on drive C: 25579.59 mb
- Creating DVD ISO Image
--------------------------------------------------------
Executing MkIsoFs. Commandline:
"C:\Program Files\DVD2SVCD\DVDAuthor\mkisofs.exe" -o "C:\Program Files\DVD2SVCD\Movie\DVDImage.iso" -publisher "DVD2SVCD" -volid "" -dvd-video "C:\Program Files\DVD2SVCD\Movie\DVD-Files"
Image creation finished.
--------------------------------------------------------
- 8/30/2005 7:34:38 PM
- Free on drive C: 25552.58 mb
- Conversion done!
--------------------------------------------------------
Nick
31st August 2005, 11:45
OK, the only thing we did differently is you used RoBa where as for test purposes I just used CBR.
I can see no way on earth that this could make the difference.
Other than rate control mode, the logs are identical.
What program are you using to get the resolution of the output file.
I used Media Player Classic and it reported correctly at 720x480. TMPGEnc DVD Author also reported the correct resolution.
However, Windows Media Player reports it wrongly ay 853x576 (?!) Could we rule out a reporting error in the software you're using to check the output file by trying it in something else?
vifa
1st September 2005, 02:49
Gspot 2.51 and Mainconcept 1.4.2 both list it as 720x576 25fps. Tmpegenc dvdauthor also reports 720x576. Not sure if it means anything, but I didn't open D2sRoba, I clicked on dvd2svcd. I don't know why it's calling roba.
Nick
1st September 2005, 21:01
OK.
I can see no reason on earth why, or even how this could be happening :confused:
Could you do a couple more things:
1. Play your Avisynth script file in MPC (or similar) and report the resolution if gives you.
2. Post your Avisynth_script_file.avs from your project folder
3. Post your CCE_Project_file.ecl (open it in Notepad then copy and paste - same for the avs file)
Thanks
Nick
Guest
1st September 2005, 21:44
I vaguely recall seeing something like this being seen and resolved in the DGPulldown thread.
vifa
2nd September 2005, 01:33
Ok, when I open the avs script in mainconcept it reports 720x480 and 25fps. Here is the script:
AviSynth_Script_file.avs
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
MPEG2Source("C:\PROGRA~1\DVD2SVCD\Movie\DVD2AV~1.D2V")
LanczosResize(720,480,0,72,480,432)
Import("C:\Program Files\DVD2SVCD\Tylo\RoBaConditional.avs")
Import("C:\Program Files\DVD2SVCD\Movie\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
Here is the CCE_Project_file.ecl:
; Cinema Craft Encoder SP -- Encoder Control List
[item]
title=AviSynth_Script_file.avs
vid_out=1
vaf_out=1
aud_out=0
vid_file0=C:\Program Files\DVD2SVCD\Movie\Encoded_Video_CCE_PAL.mpv
vid_file1=C:\Program Files\DVD2SVCD\Movie\Encoded_Video_CCE_PAL.mpv
vaf_file=C:\Program Files\DVD2SVCD\Movie\CCE_Video_Information_File.vaf
aud_file=C:\Program Files\DVD2SVCD\Movie\Encoded_Video_CCE_PAL.mpv.mp2
file_focused=0
encode_mode=0
packet_size=4096
timecode=0x00000000
width=720
height=480
vmode=0
frame_rate_idx=3
cbr_brate=6000
opv_q_factor=1
opv_brate_min=2000
opv_brate_max=6000
vbr_brate_avg=6000
vbr_brate_min=2000
vbr_brate_max=9000
vbr_bias=20
vbr_pass=3
quality_prec=17
use_filter=0
filter_val=2
seq_endcode=1
dvd=1
half_width=0
half_height=0
fast_mode=0
progressive=1
alternate_scan=0
non_linear=0
top_first=1
lum_level=1
intra_dc_prec=-1
aspect_ratio=3
gop_m=3
gop_nm=4
gop_hdr=12
seq_hdr=1
all_closed_gop=0
fix_gop_length=0
mpeg1=0
mpeg1_cps=1
samples_per_sec=44100
stereo=2
brate_idx=7
crc=1
[file]
name=C:\Program Files\DVD2SVCD\Movie\AviSynth_Script_file.avs
type=0
frame_first=0
frame_last=925
encode_first=0
encode_last=925
chapter=0:Chapter0
Guest
2nd September 2005, 01:56
OK, here's the scoop I found in the aforementioned thread:
You have to use CCE 2.66 and "disable the DVD compliant option in CCE or it will, er... force it to DVD specs (in your case padding to 576)."
It may be OK with 2.5, but 2.7 had problems. But you do have to disable the DVD compliant option in all cases.
Nick
2nd September 2005, 15:58
This could be a spectacularly good call from Neuron2!
Looking through my CCE Project file, apart from bitrate settings and mine being CBR rather than OPV, the only other difference is
dvd=1 in yours vs
dvd=0 in mine!
Try DVD2SVCD > Encoder tab > Advanced settings (bottom right)
If DVD Compliant is checked, uncheck it and try again from the top.
Good luck
Nick
vifa
3rd September 2005, 00:19
Great call indeed! Thanks Neuron2. I unchecked dvdcompliant and it now is 720x480 at 25fps. Ok thank god i'm past that. Now, if I run 2:3 pulldown it changes the length which then I have to change the audio time. Nick, if I understood you correctly I could perform a pulldown and not have to change the audio time?
Guest
3rd September 2005, 01:17
Great call indeed! Thanks Neuron2. I unchecked dvdcompliant and it now is 720x480 at 25fps. Ok thank god i'm past that. Now, if I run 2:3 pulldown it changes the length which then I have to change the audio time. Nick, if I understood you correctly I could perform a pulldown and not have to change the audio time? If you use DGPulldown on the elementary stream now and select the 25 --> 29.97 fps conversion, you will not have to touch the audio. That is the magic. Of course, your content must be progressive at this stage to apply any kind of pulldown. If your original content was interlaced, then you have to make it progressive before doing the MPEG2 encoding (apply field shift or deinterlacing as needed).
Nick
3rd September 2005, 10:58
Now we (we'll OK not so much "we" but Neuron2!) have fixed the framesize problem could you go back to my very first reply in this thread.
Follow it to the letter and let's see if it works for you. I've tested it and it seems to work on the PC but as I am in PAL territory I don't have NTSC standalone equipment.
However, as PAL2NTSC is a frequent topic here, I'd really like to update the FAQ in the light of Neuron2's excellent DGPulldown tool. So I'd be grateful try my draft guide once again and let me know anything you feel doesn't work or is perhaps poorly explained.
vifa
3rd September 2005, 17:34
Nick, you the man, thanks, I ran the batch file after the pulldown, the process ran and I checked the muxed file which was at the desired 720x480 29.97 fps with 48khz audio and it's in sync. I didn't think it would be because when I opened the pulldown video with virtualdub the time listed didn't match the audio, but I guess it just fools it with the timecodes and the length really hasn't changed.
Thanks to Nick and Neuron2!
Guest
3rd September 2005, 18:05
I didn't think it would be because when I opened the pulldown video with virtualdub the time listed didn't match the audio I assume you mean VirtualDubMod, because VirtualDub cannot open an MPEG2 file. I keep telling people that VirtualDubMod ignores pulldown flags, but it just doesn't sink in. :(
Nick
3rd September 2005, 19:23
@vifa
I ran the batch file after the pulldown
I take it you remembered to manually edit the DVDAuthor XML file in between to author an NTSC DVD. If not you might want to do that and run the batch file again.
@Neuron2
I keep telling people that VirtualDubMod ignores pulldown flags, but it just doesn't sink in.
Well last time I looked we'd just hit the 80000 mark for membership here. You can strike me and vifa off the list, so only 79998 left to educate! :D
Guest
3rd September 2005, 20:01
Well last time I looked we'd just hit the 80000 mark for membership here. You can strike me and vifa off the list, so only 79998 left to educate! :D I think manono, Cyberia, fccHandler, tritical and a few others know about it too. :)
vifa
4th September 2005, 02:51
I assume you mean VirtualDubMod, because VirtualDub cannot open an MPEG2 file. I keep telling people that VirtualDubMod ignores pulldown flags, but it just doesn't sink in. :(
Yes, I did mean virtualdubmod. Thanks for all the great info!
I take it you remembered to manually edit the DVDAuthor XML file in between to author an NTSC DVD.
No, I forgot thanks. I was just glad to get to that point going from pal to NTSC with the proper aspect. Well, I think I learned a good bit in this thread. The extended resize cammand, using pulldown to flag 25fps to ntsc allowing the use of the Encoded_audio1.mp2 file(saving time), setting up a batch file to complete the authoring process after pulldown, what checking dvd compliant in CCE means.
Again, thanks guys for all the great info!
vifa
Nick
4th September 2005, 10:55
Last bit - when you re-run the batchfile, remember to delete the DVD files from last time around beforehand, or it won't work properly.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.