View Full Version : DV to VCD
zulu
8th January 2005, 10:12
Hi,
i've got the following situation:
recently i bought a digi cam (canon ixus 40) that is also capable of recording video. video is saved to an avi file using mjpeg compression @ 320x240 / 30 fps / progressive.
Now, i thought it would be nice to have a vcd filled with clips shot with the cam.
To meet the VCD standard specs, i decided to use the following destination format i want to convert to:
352x240 (NTSC) / 29.97 fps / progressive.
To achieve this, i wrote the following avs script to feed TMPG with:
avisource("cam_video_320x240.avi")
crop(0,12,320,218)
LanczosResize(352,240)
AssumeFPS(29.97)
ConvertToYUY2() # tmpeg doesnt like yv12 input?
so far, so good (..i think. please correct me if something's wrong, im a bloody vcd n00b :D)
what i'm still unsure about is the audio part:
i demuxed an 8 bit 11khz mono wav from the source avi.
what should i do with it to stay vcd compilant?
does vcd allow mp2 audio at this resolution?
am i allowed to use a mono track?
and since i changed the framerate of the video, i assume this has to be taken into account for audio conversion, too.
i thought about doing something like this:
BeSweet -core( -input "demuxed_cam_audio.wav" -output "vcd_audio.mp2" -ota(-r 30000 29970) -2lame( -e -b 192 -m m )
any sugestions? do i need resampling to 16 bit as well?
Thanks for helping me out :)
regards,
zulu
The Geek
8th January 2005, 11:32
Well, I'm not really familiar with AviSynth, but I'd just load it into TMPGEnc and encode.
The 320x240 is 4:3, and the encoded VCD will also have an aspect ratio of 4:3, so there is no need to resize.
tmpeg doesnt like yv12 input?
TMPGEnc takes what you've got the codec for. If you don't have a YV12 codec installed, TMPGEnc will reject the file. Otherwise, it'd work fine.
The Geek
jsoto
10th January 2005, 00:44
To be VCD complaint you should use MPEG1-Layer2 CBR in audio coding, max 384 Kbit in stereo and 192 Kbit in mono. Yes, you are allowed to use mono.
AFAIK, BeSweet does not support 8 bit wave. You have to add extra zeroes to get a 16 bit wave. (You can try wav20.exe, see my sig)
And, is there any reason for the crop sentence in your script?. May be you have some invalid lines?
Croping in such way will not keep the DAR, originally 4:3...
Your avi is 4:3 (and squared pixels too), so, IMHO, your script should be:
avisource("cam_video_320x240.avi")
LanczosResize(352,240)
AssumeFPS(29.97)
ConvertToYUY2()
jsoto
zulu
10th January 2005, 08:50
TMPGEnc takes what you've got the codec for. If you don't have a YV12 codec installed, TMPGEnc will reject the file. Otherwise, it'd work fine.
YV12 is not a codec, its a colorspace. it appears to me as tmpg doesnt like it. all i get is a completely black video. (my input video is uncompressed btw, i decompressed it using vdub)
Croping in such way will not keep the DAR, originally 4:3...
it won't keep DAR? IMHO it will, actually thats my reason for cropping.
if i woudn't crop vertically, video would be resized horizontally only, cause vertically its already 240px and will remain unchanged. now that would mess up my DAR.
What i'm still wondering about is:
am i forced to use 16bit audio @ 44khz?
or is 8bit @ 11hz just fine?
@jsoto:
thanks for pointing me to wav20, i think i'll give it a try.
zulu
jsoto
10th January 2005, 12:26
if i woudn't crop vertically, video would be resized horizontally only, cause vertically its already 240px and will remain unchanged. now that would mess up my DAR.
Nope, your original video is a 1:1 AVI (and also 4:3), squared pixels, let's say, your pixels have the same height than width. But the VCD pixels are NOT square. Using 352x240 (NTSC) VCD gives you a 4:3 DAR, so to keep the DAR you need to resize in horizontal, but not in vertical.
am i forced to use 16bit audio @ 44khz?
or is 8bit @ 11hz just fineSorry, I forgot to mention VCD standard requires 44100 KHz, but probably 48 KHz will be supported by your player. The advantage of using 48KHz is to be able to author a DVD with the same streams (VCD resolution is supported in DVD). May be in a future you'll want to put all your clips together in a DVD, and if you have used 48 KHz it will be very easy (and lossless).
Your final audio must be mp2, and AFAIK, to use BeSweet you need to have a 16 bits wav.
jsoto
zulu
10th January 2005, 13:16
Nope, your original video is a 1:1 AVI (and also 4:3), squared pixels, let's say, your pixels have the same height than width. But the VCD pixels are NOT square. Using 352x240 (NTSC) VCD gives you a 4:3 DAR, so to keep the DAR you need to resize in horizontal, but not in vertical.
stupid me, you're of course right. :D
i was mistaken by gknots resize feature..
Sorry, I forgot to mention VCD standard requires 44100 KHz, but probably 48 KHz will be supported by your player. The advantage of using 48KHz is to be able to author a DVD with the same streams (VCD resolution is supported in DVD). May be in a future you'll want to put all your clips together in a DVD, and if you have used 48 KHz it will be very easy (and lossless).
Your final audio must be mp2, and AFAIK, to use BeSweet you need to have a 16 bits wav.
thanks for clearing that up :)
do you have an idea for the best conversion approach?
jsoto
10th January 2005, 14:12
do you have an idea for the best conversion approach?
Well, not an expert... but if I were you I'll try with BeSweet adding
"-shibatch( --rate 48000 )"
Be careful: I had in the past some issues using in the same command both options: resampling and rate conversion (-ota( -r..) )... May be you have to do the job in two steps.
Or you can try the new SoundTouch tempo adjust (without modifying the pitch).
jsoto
Trahald
11th January 2005, 05:25
Originally posted by zulu
YV12 is not a codec, its a colorspace. it appears to me as tmpg doesnt like it. all i get is a completely black video. (my input video is uncompressed btw, i decompressed it using vdub)
zulu
the geek said 'a yv12 code' and should have explained better. he didnt mean literally a yv12 codec.. but a codec capable of displaying it. like newer xvid codecs for example. usually having something like this installed will give windows an option to graph to that codecs colorspace decoder so that the application (tmpgenc hopefully in our case) will actually get the input it wants (rgb or yuy2). this does not involve 'truly' using xvid, just its colorspace converter.
dont quote me on xvid doing it since i have so much installed im not sure which codec is handling the task on my system.
but anyways... you are better off doing it in the script than letting the decoder do it imo.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.