If you can re-grab the file, just omit --format raw: dvgrab default format is DV AVI type 2, that's known by lav2yuv.bludger wrote: The file was grabbed with:
dvgrab -i --timestamp --format raw --size 0

This also works for 4:3 aspect NTSC dvds.geeojr wrote:I have confirmed it on two seperate DVD players here; but I would love to hear feedback from others.shiznix wrote:Can you (or anyone else) confirm for sure that this fixes the NTSC overscan problem ?geeojr wrote:Code: Select all
<video format="ntsc" aspect="16:9" widescreen="nopanscan" />
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<dvdauthor jumppad="1">
<vmgm>
<menus>
<pgc>
<post>jump titleset 1 menu;</post>
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<video format="ntsc" resolution="720x480" aspect="4:3" widescreen="nopanscan" />
<pgc> ...
Thanks for your help. I can't remember exactly why I ripped it to raw format, but I found that it was the only way to get it working at the time. Anyway, I found another solution using kino.mds32h wrote:If you can re-grab the file, just omit --format raw: dvgrab default format is DV AVI type 2, that's known by lav2yuv.bludger wrote: The file was grabbed with:
dvgrab -i --timestamp --format raw --size 0

Code: Select all
transcode -i zidane.avi -y ffmpeg --export_prof dvd-pal --export_asr 2 -o zidane -D0 -b224 -N 0x2000 -s2 -m zidane.ac3 -J modfps=clonetype=3 --export_fps 25Code: Select all
mplex -f 8 -o zidane_dvd.mpg zidane.m2v zidane.ac3Code: Select all
<dvdauthor dest="DVD">
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="zidane_dvd.mpg" chapters="0,5:30,10:00,15:30,20:30,35:00,40:30,45:00"/>
</pgc>
</titles>
</titleset>
</dvdauthor>Code: Select all
dvdauthor -x zidane.xmlCode: Select all
total 3.0G
-rwxr-xr-x 1 root root 6.0K 2005-11-17 16:13 video_ts.bup
-rwxr-xr-x 1 root root 6.0K 2005-11-17 16:13 video_ts.ifo
-rwxr-xr-x 1 root root 54K 2005-11-17 16:12 vts_01_0.bup
-rwxr-xr-x 1 root root 54K 2005-11-17 16:12 vts_01_0.ifo
-rwxr-xr-x 1 root root 1.0G 2005-11-17 16:12 vts_01_1.vob
-rwxr-xr-x 1 root root 1.0G 2005-11-17 16:12 vts_01_2.vob
-rwxr-xr-x 1 root root 967M 2005-11-17 16:13 vts_01_3.vobpyxel, it seems to be a problem of structure of the DVD Video. DVDs use an UDF structure: did you check the option 'Generate UDF structure' in k3b? You can find it in the 'Filesystem' tab of the window that opens when you click on 'Burn'. If you select it the DVD should work also on your home DVD player (at least I hope: I tried it some time ago).pyxel wrote:i can play it in xine, but i have not video, (i thinks that is because i havent codecs for this)...
i burn it with k3b, creane new dvd datab project i copy audio_ts and video_ts and burn it.
when finish i put it into my home dvd player and: DATA WRONG
i try to play in playstation2 but no succes.
please help me if you can![]()
Code: Select all
mkisofs -dvd-video -o dvd.iso dvd/Code: Select all
spumux -s0 subtitle.xml <test.mpg >test0.mpg
DVDAuthor::spumux, version 0.6.11.
Build options: gnugetopt iconv
Send bugs to <dvdauthor-users@lists.sourceforge.net>
INFO: Locale=zh_CN.UTF-8
INFO: Converting filenames to UTF-8
INFO: Detected subtitle file format: subviewer
INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*
INFO: Read 23 subtitles
INFO: Found EOF in .sub file.
WARN: Read 0, expected 4
INFO: 23 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18
Statistics:
- Processed 23 subtitles.
- The longest display line had -1 characters.
- The maximum number of displayed lines was 0.
- The normal display height of the font Vera.ttf was 0.
- The bottom display height of the font Vera.ttf was 0.
- The biggest subtitle box had 990 bytes.
Code: Select all
<subpictures >
<stream>
<textsub filename="test.srt" characterset="ISO8859-1"
fontsize="18.0" font="Vera.ttf" horizontal-alignment="left"
vertical-alignment="bottom" left-margin="60" right-margin="60"
top-margin="20" bottom-margin="30" subtitle-fps="23.976"
movie-fps="29.97" movie-width="720" movie-height="478"
/>
</stream>
</subpictures>
Code: Select all
#!/bin/bash
usage () {
echo " ";
echo " usage: $(basename $0) <avifile> ";
echo " ";
echo " ";
echo " ";
echo " Converts videos to mpeg2 ntsc format for DVDs.";
echo " with black borders";
echo " <video format = aspect=16:9 resolution=720x480>";
echo " <audio format = ac3>";
echo " ";
echo " ";
echo " ";
echo " This script was created by merging parts the following three different scripts together.";
echo " ";
echo " avi2Xvcd.sh from Andreas Wilm <wilm at biophys.uni-duesseldorf.de>";
echo " and";
echo " dvd-encode.sh from Scott Dylewski <scott at dylewski.com>";
echo " and";
echo " mpg2dvd.sh <author unknown>";
echo " ";
echo " adding my own changes from Spewdemon <spewdemon at gmail.com>";
echo " ";
echo " ";
}
if [ -z $1 ]
then
usage
exit
fi
olddir=$(pwd)
dir=$(dirname $1)
avitail=$(basename $1)
base=$(basename $1 .avi)
ROOT=`basename $1 .avi`
DVDXML=${ROOT}.xml
#un comment this one is for testing
#range="-c 2000-4800"
aut () {
echo "[avi2DVD] Doing 44Khz-48Khz translation...";
}
echo "base = $base"
cd $dir
echo "creating DVD from $avitail"
#get audio format
audiotype=`tcprobe -i "$avitail" | grep 'audio track: -a' | awk -F'-n ' '{print $2}' | awk '{print $1}'`
#these are here use with setting the black borders
# this will re-encode the video to 720 width and add top and bottom black borders.
#aspect ratios 4:3 = 1.33:1, 720:480 = 1.50:1, 16:9 = 1.85:1
vwidth=`tcprobe -i "$avitail" | grep 'width' | awk -F'width=' '{print $2}' | awk -F',' '{print $1}'`
vheight=`tcprobe -i "$avitail" | grep 'height' | awk -F'height=' '{print $2}' | awk -F',' '{print $1}'`
top=$(((480-$vheight)/2))
left=$(((720-$vwidth)/2))
bottom=$(((480-$vheight)/2))
right=$(((720-$vwidth)/2))
echo " "
echo " Orignal video format $vwidth x $vheight"
echo " Adding black borders top=$top left=$left bottom=$bottom right=$right"
echo " New video format with black borders $(($left+$right+$vwidth)) x $(($top+$bottom+$vheight)) "
aspect=$(echo "scale=10; $vwidth/$vheight" | bc)
echo $aspect
nheight=`bc << E4
(720 / $aspect)
E4
`
echo " $top"
echo $nheight
ntop=$(((480-$nheight)/2))
echo " $ntop"
echo " "
# extract audio:
echo '####### extracting audio:'
echo " "
echo "## Encoding audio to 48KHz stereo audio for dvd"
if [ "$audiotype" == '0x55' ] ; then
echo "[avi2DVD] Extracting mp3 audio"
nice transcode -i "$avitail" -m "${base}1.wav" -x null,mp3 -y null,wav $range
aut
sox "${base}1.wav" -c 2 -r 48000 ${base}.wav
elif [ "$audiotype" == '0x1' ] ; then
echo "[avi2DVD] Extracting PCM audio"
nice transcode -i "$avitail" -m "${base}1.wav" -x null,raw -y null,wav $range
aut
sox "${base}1.wav" -c 2 -r 48000 ${base}.wav
elif [ "$audiotype" == '0x50' ] ; then
echo "[avi2DVD] Extracting audio with mplayer"
nice transcode -i "$avitail" -m "${base}1.wav" -x null,mplayer -y null,wav $range
aut
sox "${base}1.wav" -c 2 -r 48000 ${base}.wav
else
echo "[avi2DVD] Extracting audio with mplayer"
nice transcode -i "$avitail" -m "${base}1.wav" -x null,mplayer -y null,wav $range
aut
sox "${base}1.wav" -c 2 -r 48000 ${base}.wav
fi
rm ${base}1.wav
# extract video:
echo "[avi2DVD] Extracting and converting video to DVD format with transcode"
nice transcode -i "$avitail" \
-x mplayer,null \
-w 8000 \
-J modfps \
-Z 720x480 \
--export_asr 3 \
--export_fps 29.97,4 \
-y mpeg2enc,null \
-F 8,"-f 8 -R 0 -n n -a 3 -q 6 -c -4 2 -2 1 -M 1 " \
-o ${base} \
$range
# Convert audio to ac3 format
ffmpeg -i "${base}.wav" -y -vn -ab 192 -acodec ac3 -ar 48000 -ac 6 ${base}.ac3
rm ${base}.wav
#create vob
nice mplex -V -M -f 8 ${base}.ac3 ${base}.m2v -o ${base}.vob
rm ${base}.ac3
rm ${base}.m2v
# creating xml file used with dvdauthor
cat > ${DVDXML} << EO
<dvdauthor dest="${ROOT}.dvd">
<vmgm />
<titleset>
<titles>
<video format="ntsc" aspect="16:9" resolution="720x480"/>
<audio format="ac3"/>
<pgc>
EO
echo " <vob file='${base}.vob' />" >> ${DVDXML}
cat >> ${DVDXML} << E1
</pgc>
</titles>
</titleset>
</dvdauthor>
E1
# end creating xml file used with dvdauthor
# Create DVD
if xmllint ${DVDXML} > /dev/null ; then
echo " the dvd creation has been disabled - please edit this script to renable"
#dvdauthor -x ${DVDXML}
#this one will create an iso
#mkisofs -dvd-video -o "${ROOT}.iso" ${ROOT}.dvd/
#This one writes the DVD so no need to create an iso
#growisofs -speed=1 -Z /dev/hdd -dvd-video ${ROOT}.dvd/
#delete dvd temp directory in one shot
#rm -r ${ROOT}.dvd
fi
cd $olddir
#move completed files out of processing directory
mv ${base}.vob vobs/
mv ${base}.xml vobs/
mv ${base}.avi avis/
# uncomment to shut down when done
echo $'\a'
#init 0
exit
Code: Select all
OUTPUT_AUDIO_RATE="48000" # currently hard-coded audio rate of 48KHz (NTSC dvd)
OUTPUT_AUDIO_BITRATE="224" # currently hard-coded audio bitrate of 224Kbits/sec (NTSC dvd)
TMP_AUDIO="temp_audio.ac3" # hard-coded name of temp file containing menu audio adjusted to ac3
...
BGDURATION="5" # input parm - number of seconds the menu lasts
...
# Use bc to calculate how many samples we want, which is the audio rate (samples/second) times the desired duration (seconds)
SAMPLES=$(echo "scale=0; $OUTPUT_AUDIO_RATE * $BGDURATION" | bc)
# Use sox to read /dev/zero and treat it as silent pcm and convert it to wav; use ffmpeg to convert that to our desired ac3 format.
sox -t raw -sw -c 2 -r $OUTPUT_AUDIO_RATE /dev/zero -t wav - trim 0 "${SAMPLES}s" | ffmpeg -i - -ab $OUTPUT_AUDIO_BITRATE -ar $OUTPUT_AUDIO_RATE -ac 2 "$TMP_AUDIO"Can you put this in the guide ? It could be usefull...gkmac wrote:Specify the -V parameter to growisofs followed by the desired name (which I think is limited to capital letters, numbers and underscores). So to burn a DVD with the label MY_MOVIE, do...Draeven wrote:When I put the DVD I created in my standalone DVD player or in my system, and mount it, the label for the disk is always CDROM. Is there a way to change it?Code: Select all
growisofs -Z /dev/dvd -dvd-video -V MY_MOVIE DVD/
Code: Select all
<subpictures>
<stream>
<spu start="00:00:00.0" end="00:00:00.0" highlight="menu2_highlight_bl.png" select="menu2_select_bl.png" autooutline="infer" force="yes" autoorder="rows"/>
</stream>
</subpictures>
Code: Select all
<dvdauthor dest="SKKS">
<vmgm>
<menus>
<pgc>
<post>jump titleset 1 menu;</post>
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<video format="pal" aspect="4:3" widescreen="nopanscan"/>
<pgc>
<button> jump title 1; </button>
<button> jump title 2; </button>
<vob file="menu_final.mpg"/>
<post> jump cell 1; </post>
</pgc>
</menus>
<titles>
<video format="pal" aspect="4:3" widescreen="nopanscan"/>
<pgc>
<vob file="/mnt/hd8/work2/video1.mpg" chapters="0:00,10:00,20:00,30:00,40:00,50:00,1:00:00"/>
<post>call menu;</post>
</pgc>
<pgc>
<vob file="/mnt/hd8/work2/video2.mpg" chapters="0:00,10:00,20:00,30:00,40:00,50:00,1:00:00"/>
<post>call menu;</post>
</pgc>
</titles>
</titleset>
</dvdauthor>

Code: Select all
transcode -i file1.avi -y ffmpeg -b 160 --export_prof dvd-pal --export_asr 2 -o filenumber1 -D0 -N 0x2000 -s2 -m file1.ac3 -J modfps=clonetype=3 --export_fps 25
Yeah, me too.viperlin wrote:i agree, AMAZING guide and welcome to the gentoo forumsBonezTheGoon wrote:That has got to be the very best first post I have ever seen on these forums!!!! I love it! I was just about to embark on the journey of trying to learn all this, I cannot thank you enough for gathering it all into one place and documenting it so well!
Great guide!!!!!
Regards,
BonezTheGoon

Code: Select all
Creating subtitle track TheTrack.srt
Running: spumux -s0 tmp_any2vob/subtitle.xml < tmp_any2vob/TheTrack.VOB > tmp_any2vob/TheTrack_final.VOB
DVDAuthor::spumux, version 0.6.11.
Build options: gnugetopt magick iconv freetype fribidi
Send bugs to <dvdauthor-users@lists.sourceforge.net>
INFO: Locale=C
INFO: Converting filenames to ANSI_X3.4-1968
INFO: Detected subtitle file format: subviewer
INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*
INFO: Read 669 subtitles
INFO: Unicode font: 255 glyphs.
INFO: Found EOF in .sub file.
WARN: Read 0, expected 4
INFO: 669 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18
Statistics:
- Processed 669 subtitles.
- The longest display line had 21 characters.
- The maximum number of displayed lines was 6.
- The normal display height of the font Vera.ttf was 28.
- The bottom display height of the font Vera.ttf was 35.
- The biggest subtitle box had 3194 bytes.
Creating subtitle track TheTrack.srt
Running: spumux -s1 tmp_any2vob/subtitle.xml < tmp_any2vob/TheTrack.VOB > tmp_any2vob/TheTrack_final.VOB
DVDAuthor::spumux, version 0.6.11.
Build options: gnugetopt magick iconv freetype fribidi
Send bugs to <dvdauthor-users@lists.sourceforge.net>
INFO: Locale=C
INFO: Converting filenames to ANSI_X3.4-1968
INFO: Unicode font: 255 glyphs.
ERR: Couldn't load file TheTrack.srt .


Code: Select all
# mplex -f 8 -o test.mpeg test.m2v lily_final.ac3Code: Select all
INFO: [mplex] Frame width : 720
INFO: [mplex] Frame height : 576
INFO: [mplex] Aspect ratio : 4:3 display
INFO: [mplex] Picture rate : 25.000 frames/sec
INFO: [mplex] Bit rate : 9800000 bits/sec
INFO: [mplex] Vbv buffer size : 229376 bytes
INFO: [mplex] CSPF : 0
INFO: [mplex] Scanning for header info: AC3 Audio stream 00 (lily_final.ac3)
INFO: [mplex] AC3 frame size = 1536
INFO: [mplex] AC3 AUDIO STREAM:
INFO: [mplex] Bit rate : 49152 bytes/sec (384 kbit/sec)
INFO: [mplex] Frequency : 48000 Hz
INFO: [mplex] SYSTEMS/PROGRAM stream:
INFO: [mplex] rough-guess multiplexed stream data rate : 10403400
INFO: [mplex] target data-rate specified : 10080000
++ WARN: [mplex] Target data rate lower than computed requirement!
++ WARN: [mplex] N.b. a 20% or so discrepancy in variable bit-rate
++ WARN: [mplex] streams is common and harmless provided no time-outs will occur
INFO: [mplex] Run-in Sectors = 89 Video delay = 13019 Audio delay = 16619
INFO: [mplex] New sequence commences...
INFO: [mplex] Video e0: buf= 237568 frame=000000 sector=00000000
INFO: [mplex] Audio bd: buf= 16384 frame=000000 sector=00000000
++ WARN: [mplex] Stream bd: data will arrive too late sent(SCR)=736694 required(DTS)=736619
++ WARN: [mplex] Video e0: buf= 188218 frame=000202 sector=00001900
++ WARN: [mplex] Audio bd: buf= 13315 frame=000251 sector=00000192
**ERROR: [mplex] Too many frame drops -exiting