ABOUT
FAMILY
LINUX
GO-LOTO
MUSIC
FILM
GUITARS
GYM
SLEEP
COMPLAINTS
LINKS
CONTACT
Valid HTML 4.01!


dvb to dvd

(I am using an AVerMedia 771 DVB capture card) Record to a file:
dvbstream -n 4000 -o -ps -qam 16 -cr 3_4 600 601 > /mnt/www3.mpg
Viewing with Xine:
dvbstream -n 4000 -o -ps -qam 16 -cr 3_4 600 601 | xine stdin:/
Viewing with Xine and recording:
dvbstream -n 4000 -o -ps -qam 16 -cr 3_4 600 601 | tee filename.mpg | xine stdin:/
Recording to DVD:
replex -k -i TS -t DVD -o out.mpg in.mpg
GOPchop out.mpg
replex -k -i TS -t DVD -o final.mpg gopchop.mpg
dvdstyler
growisofs -Z /dev/cdrom=dvd.iso

pal vhs to dvd

Using a scart to s-video adaptor, plug s-video the end into the capture card, and the audio end into the soundcard.
Capture the video, endcoding into mpeg format. These are what I have found to be the best settings so far.
The 'crop' command cuts out the annoying noise at the edges of the picture. The 'expand' command puts black borders in at the edges of the picture. When you then scale up to PAL size (720x576), you don't lose loads of picture around the sides.
'harddup' makes mencoder duplicate frames to keep the audio in sync.
What took me the longest time to work out was that 'ilme' and 'ildct' are absolutely essential to making the interlacing come out correctly when you play back on the DVD player / TV. Without them, the DVD will be unwatchable.
I was also having trouble with the contrast and brightness being too high, so turn them down a little with the mencoder command.
mencoder -mc 0 -endpos 04:00:00 -tv \
driver=v4l2:width=720:height=576:alsa:device=/dev/video0:contrast=-30:brightness=-10 \
tv:// -of mpeg -mpegopts format=dvd -srate 48000 -ovc lavc -oac lavc -lavcopts \
vcodec=mpeg2video:vrc_buf_size=1835:keyint=15:vrc_maxrate=9800:vbitrate=4000:\
acodec=mp2:abitrate=192:aspect=4/3:ilme:ildct \
-o out.mpeg -vf crop=704:560,expand=-80:-60:40:30,scale=presize=pal:interlaced=1,harddup
To fit more onto one disk, with some quality loss, you can adjust the vbitrate parameter downwards.

Chop the rubbish off the end, because I've probably been asleep or something whilst it's been recording:
gopdit out.mpeg
Replex the file:
replex -k -i PS -t DVD -o final.mpg gopditted.mpg
You can use mplayer to fast forward the mpg and make a note of the times at which you want the chapter points to be. The time in seconds appears on stdout. Design the DVD:
dvdstyler
You can edit the .xml file that dvdstyler produces by hand, because it is often quicker to fix things like the chapter points that way, rather than by ponderously clicking around the interface with the mouse. Burn the DVD:
growisofs -Z /dev/cdrom=dvd.iso

random movie file to dvd

Create separate video and audio files. '--export_asr 3' means an aspect of 16:9. Use '--export_asr 2' for 4:3. You can append -w(bitrate) to change the bitrate, for example: -w4000.
transcode -i movie.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 \
-o video -D0 -b224 -N 0x2000 -s2 -m audio.ac3 -J modfps=clonetype=3 \
--export_fps 25
Splice them together:
mplex -f 8 -o final.mpg video.m2v audio.ac3
Then design the DVD with dvdstyler, and burn it.

To rip subtitles, where -sid is subtitle stream id, gives subtitles.idx and subtitles.sub;
mencoder 1.vob -o /dev/null -nosound -ovc copy -vobsubout subtitles -vobsuboutindex 0 -sid 0
To play them back;
mplayer -vobsub subtitles 1.mpg