PDA

View Full Version : VCD Creation on Linux



cwingert
11-27-2002, 11:33 AM
I am in the process of trying to create a VCD on Linux (I am starting small, but going to be making a DVD). Anyway this is the script I have come up with :

vsplit1k -m tivovideo.ty tivovideo.mpg tivovideo.m2a
vsplit1k tivovideo.ty /dev/null tivovideo.m2a
cat tivovideo.mpg | mpeg2dec -s -o YUVh | mpeg2enc -f 1 -o tivovideo.m1v
mpg123 -w temp32k.wav tivovideo.m2a
sox -r 44100 temp32k.wav temp44k.wav
rm temp32k.wav
toolame -p 2 -b 224 temp44k.wav vcd_stream.mp2
rm temp44k.wav
mplex -f 1 -O 234 vcd_stream.mp2 tivovideo.m1v -o vcd.mpg
vcdimager vcd.mpg
cdrdao write -n --driver generic-mmc --device 0,0,0 videocd.cue

Everything works fine. Except the output VCD has a narrow image on one of my DVD players and on another DVD player it shows the same image side-by-side. I noticed during the mplex process, I get

INFO: [mplex] VIDEO STREAM: e0
INFO: [mplex] Frame width : 176
INFO: [mplex] Frame height : 240
INFO: [mplex] Aspect ratio : 1:1.1250 (4:3 NTSC for 720x480/352x240 images
)
INFO: [mplex] Picture rate : 29.970 frames/sec
INFO: [mplex] Bit rate : 1152000 bits/sec
INFO: [mplex] Vbv buffer size : 40960 bytes
INFO: [mplex] CSPF : 1

My frame width appears to be half, the NTSC frame width. Is there something like DVD Patcher that I need to do?

Thanks

jeffcoat
12-05-2002, 12:31 PM
Originally posted by cwingert
I am in the process of trying to create a VCD on Linux


Me too. Except that I'm making SVCD's, and I've been doing it for a while. Comments below:



vsplit1k -m tivovideo.ty tivovideo.mpg tivovideo.m2a
vsplit1k tivovideo.ty /dev/null tivovideo.m2a
cat tivovideo.mpg | mpeg2dec -s -o YUVh | mpeg2enc -f 1 -o tivovideo.m1v


Have you tried using tivoweb to fiddle with the bitrates that recordings are originally made at? No re-encode step (for SVCDs), and the quality is great.



mpg123 -w temp32k.wav tivovideo.m2a
sox -r 44100 temp32k.wav temp44k.wav


It's this last line that made me reply, because it's definitely wrong. You've told sox that, header information notwithstanding, temp32k.wav has a 44.1 khz sample rate. What you really want is

sox temp32k.wav -r 44100 temp44k.wav




rm temp32k.wav
toolame -p 2 -b 224 temp44k.wav vcd_stream.mp2
rm temp44k.wav
mplex -f 1 -O 234 vcd_stream.mp2 tivovideo.m1v -o vcd.mpg
vcdimager vcd.mpg
cdrdao write -n --driver generic-mmc --device 0,0,0 videocd.cue

Everything works fine. Except the output VCD has a narrow image on one of my DVD players and on another DVD player it shows the same image side-by-side.


Weird. Can't help you there. Are you sure you don't want SVCDs? ;)

(Just in case it helps anyone, I'm attaching my script to turn tivo shows into SVCD-compliant MPEG2s. It probably won't work for anyone right out of the box, unless all the utilities you're using are exactly the same as mine, but it is well-tested and gets all the basics right. Well, mostly well-tested; I just added the 44.1khz recoding this morning, since my DVD player handles 32khz audio just fine...)

(Edit: Ooops. I should have checked the new version of tivo2mpeg a bit more carefully before uploading...)

cwingert
12-05-2002, 10:21 PM
Thanks for the info. I actually had figured out the problem I had with sox.

I have a stock TiVo that I would like to save some recordings from. Is there a way you know of, that I can transcode those m2v's from TiVo's bit rate to an SVCD bit rate?

Thanks

jeffcoat
12-05-2002, 11:18 PM
Originally posted by cwingert
Thanks for the info. I actually had figured out the problem I had with sox.

I have a stock TiVo that I would like to save some recordings from. Is there a way you know of, that I can transcode those m2v's from TiVo's bit rate to an SVCD bit rate?

Thanks

I've never really explored the transcoding option, but I'd be surprised if you couldn't do it with mpeg2enc, especially since you're already using it anyway.
Go visit http://www.chiappa.net/~chris/tivo_linux_extract.html

lmurray
12-06-2002, 05:47 PM
If you are using a SA tivo, you can change the bitrates on the tivo, so you don't have to transcode....

check out:

http://themurrays.homeip.net/downloads/tivo/tivo.html

-lloyd-




Originally posted by cwingert
Thanks for the info. I actually had figured out the problem I had with sox.

I have a stock TiVo that I would like to save some recordings from. Is there a way you know of, that I can transcode those m2v's from TiVo's bit rate to an SVCD bit rate?

Thanks