# Howto author AVI->DVD with menus using Linux only !

## shiznix

This howto is written in the attempt to help those reading to: 

1) Accomplish transferring a video media file (.avi, .mpg, .wmv, .mov, etc.) to DVD media in a format that will allow it to be played on a standalone DVD player.

2) Create professional style menus with audio to allow selection of Titles, Chapters and other menus.

Tools needed:Mjpegtools 1.8.0

Latest ffmpeg 0.4.9_* (masked)**

Latest transcode 1.0.2

Latest dvd+rw-tools 7.0

Sox 12.17.9

Mencoder (comes with the mplayer package), 'USE="encode" emerge mplayer'

The GIMP Image Manipulation Program

Dvdauthor 0.6.11Note:

If upgrading you should also do:

```
emerge gentoolkit

revdep-rebuild -p
```

To check any library dependency issues that may need fixing afterwards.

** Some of the package versions listed above are labelled 'masked'.

This means they have not yet moved out of Gentoo's developer testing phase, and so must be specifically 'unmasked' by the user before the version can be installed.

All of the above masked packages are masked by KEYWORD ~arch (or soft masked).

Example to unmask a masked package that is masked by KEYWORD ~arch:

```
mkdir /etc/portage

echo "media-video/transcode ~x86" >> /etc/portage/package.keywords

emerge -av transcode
```

For further details, see 'man portage'.

Tools optional:

Xine - to test DVD menus before burning, 'emerge xine-ui'

Normalize - to normalise volume on audio .pcm/.wav files

To make things easier to read, I will be using some real filenames, always keeping them and any created files in the same directory.

For the purpose of the exercise I have chosen 2 video files I have downloaded for free from www.matrix-xp.com and renamed them to 'matrix.avi' and 'outtakes.avi'.

I will also be using the THX theme at the start of the DVD and have named this 'thx.mpg'

Note any copyright issues for your location if you intend to use these for anything other than private use.

Encoding the movies

Know or find out what TV format you will be using.

For most of Europe and Australia, use PAL.

For America, use NTSC.

Here is a full listing of TV formats used in different countries around the world -> http://mightylegends.zapto.org/dvd/tv_standards.html

*For those in a hurry to get on with it, the following package automates this entire page -> http://sourceforge.net/projects/any2dvd/

For PAL:

```
transcode -i matrix.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o matrix -D0 -b224 -N 0x2000 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 25

transcode -i outtakes.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o outtakes -D0 -b224 -N 0x2000 -m outtakes.ac3 -J modfps=clonetype=3 --export_fps 25

transcode -i thx.mpg -y ffmpeg --export_prof dvd-pal --export_asr 3 -o thx -D0 -b224 -N 0x2000 -m thx.ac3 -J modfps=clonetype=3 --export_fps 25
```

For NTSC:

```
transcode -i matrix.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o matrix -D0 -b224 -N 0x2000 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 29.97

transcode -i outtakes.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o outtakes -D0 -b224 -N 0x2000 -m outtakes.ac3 -J modfps=clonetype=3 --export_fps 29.97

transcode -i thx.mpg -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o thx -D0 -b224 -N 0x2000 -m thx.ac3 -J modfps=clonetype=3 --export_fps 29.97
```

The above will produce 6 files 'matrix.m2v/matrix.ac3', 'outtakes.m2v/outtakes.ac3' and thx.m2v/thx.ac3' which have been split from the original  into video and audio files. The video(.m2v) has now been re-encoded into a DVD compliant mpeg2 format and the audio(.ac3) has been encoded into an AC3 DVD audio stream.

Aspect Ratio

The above transcode lines will convert and encode to an aspect ratio of 16:9. If an aspect ratio of 4:3 is desired then replace '--export_asr 3' with '--export_asr 2' in your transcode line. Dvdauthor will only work correctly on files with aspect ratios of either 4:3 or 16:9.

Convert 2-channel stereo audio track to 5.1 surround sound (optional)

Using the above transcode lines will result in a 2-channel stereo audio track.

Depending on the brand of 5.1 surround sound entertainment system, this may result in the audio only being present on the centre and sub channels.

Find out if the original .avi/.mpg file already contains a 5.1 AC3 audio track:

```
mplayer -vo null -ao null -frames 1 -msglevel all=4:decaudio=6 original.avi 2> /dev/null | grep "5.1 ("
```

A positive output would look something like:

```
AC3: 5.1 (3f+2r+lfe) 48000 Hz 384.0 kbit/s
```

If it does, then extract it using 'tcextract' (part of the transcode package) and use it in your mplex line below instead. In this way, front to rear panning will not be lost on true 5.1 audio tracks, and no added conversion is necessary:

```
tcextract -d2 -i matrix.avi -a0 -x ac3 | tcextract -d2 -x ac3 -t raw > matrix.ac3
```

If it doesn't, then using the existing 2-channel audio track, it is possible to create a 5.1 surround sound track so that the audio will be present on all 6 channels (front to rear panning is lost).

See here -> http://mightylegends.zapto.org/dvd/dvdauthor_howto_surround.html

Combine the new audio and video files into one DVD mpg

```
mplex -f 8 -o matrix_dvd.mpg matrix.m2v matrix.ac3

mplex -f 8 -o outtakes_dvd.mpg outtakes.m2v outtakes.ac3

mplex -f 8 -o thx_dvd.mpg thx.m2v thx.ac3
```

Test the files in mplayer or xine. eg. 'mplayer -vo xv matrix_dvd.mpg'

Adding subtitles

Add subtitles using a subtitle file.

There are many different subtitle file formats (.sub, .srt, .ssa, .smi, .rt, .txt, .aqt, .jss, .js, .ass), for this exercise we'll be using the .srt format.

The .srt format has the following syntax:

```
1

00:00:04,700 --> 00:00:06,736

The weather is nice today

2

00:00:06,900 --> 00:00:09,494

Yes it is

but not as nice as yesterday
```

It represents a time span in 'hours:minutes:seconds,milliseconds' to show the subtitle text.

Here is one created for matrix.avi -> http://mightylegends.zapto.org/dvd/matrix.srt

Make a directory in your home directory called '.spumux/', then copy the Vera.ttf font from your xorg/xfree fontpath to ~/.spumux/

Font does not have to be Vera.ttf, can be any other TrueType Font (.ttf), if the font is changed then also edit the subtitle.xml file below.

Use spumux to merge the subtitle text into the DVD video.

Spumux is part of the dvdauthor package. It is configured via an .xml file. Here is the xml config file we will use, save it as 'subtitle.xml':

```
<subpictures>

  <stream>

    <textsub filename="matrix.srt" characterset="ISO8859-1"

         fontsize="18.0" font="Vera.ttf" horizontal-alignment="center"

         vertical-alignment="bottom" left-margin="60" right-margin="60"

         top-margin="20" bottom-margin="30" subtitle-fps="25"

         movie-fps="25" movie-width="720" movie-height="570"/>

  </stream>

</subpictures>
```

Specified 'subtitle-fps', 'movie-fps', 'movie-width' and 'movie-height' are important.

If you are using NTSC, then it will be 'subtitle-fps="29.97" movie-fps="29.97" movie-width="720" movie-height="472"'

Merge the subtitles into the DVD video:

```
spumux -s0 subtitle.xml < matrix_dvd.mpg > matrix_dvd.mpg.temp

mv matrix_dvd.mpg.temp matrix_dvd.mpg
```

If multiple subtitles are needed, then for each subtitle stream, increment spumux's '-s' value by 1

(eg. 'spumux -s3 subtitle.xml < matrix_dvd.mpg > matrix_dvd.mpg.temp' to add the 4th subtitle stream).

If different subtitle colours other than the default grey are desired, then it is necessary to patch the dvdauthor-0.6.11 source and re-compile.

Patch available here -> http://mightylegends.zapto.org/dvd/dvdauthor-0.6.11_subtitle_colours.diff

Apply the patch:

cd /path/to/dvdauthor-0.6.11 patch -p1 < /path/to/dvdauthor-0.6.11_subtitle_colours.diff

Then re-compile dvdauthor.

Create a colour palette file called palette.rgb, specifying the text outline and text colours in RGB hex:

```
000000

ffff00
```

The first hex code is the text outline colour (black), the second hex code is the text colour (yellow).

A full list of supported colours and their relevant RGB hex codes can be found in /usr/share/doc/ImageMagick-<version>/www/color.html

Adjust the dvdauthor.xml file mentioned below like so:

```
    <titles>

      <subpicture lang="en"/>

      <pgc palette="palette.rgb">

        <vob file="matrix_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00"/>
```

NotesThe 'movie-height=' value is slightly less than the full screen height (576 or 480) to bring the subtitles up off the bottom of the screen. The lower the number, the higher on the screen the subtitles will appear.

Do not use lower resolutions such as 352x288 and 352x240 for 'movie-width' and 'movie-height' if you intend on viewing the subtitles on a television. The only reason these low resolutions can be used in the video encoding is that DVD players will scale the video, but do not scale the seperate subtitle streams. So using low resolutions for 'movie-width' and 'movie-height' will result in the subtitles appearing somewhere in the middle of the screen when viewed on a television.

Using lower resolutions for video encoding also has another effect on the display of subtitles when subtitle 'movie-width="720" movie-height="(570 or 472)"'. The subtitles will not be visible at all when playing back on a software DVD player on a PC as they are overlayed outside the non-scaled field of 352x288/240.

So in summary, if you intend to use lower video encoding resolutions, use a subtitle config of 'movie-width="720" movie-height="(570 or 472)"' if you intend to playback the content on a television. Or use a subtitle config of 'movie-width="352" movie-height="(288 or 240)"' if you intend to playback the content on a software DVD player on a PC.

Or if you want the best of both worlds, be really tricky and create two subtitle streams, one for PC and one for television  :Wink: 

The subtitle formats listed above are of a text format only, another commonly used alternative is the graphical based Vobsub (.sub/.idx) format.

DVDAuthor supports both textual and graphical forms of subtitles, but if using a graphical format, the process becomes more involved. 

The user must first extract and prepare the subtitle images for each dialog using a tool such as 'vobsub2pgm' that is contained in the 'subtitleripper' suite of tools, located here -> http://subtitleripper.sf.net

Then create an spumux.xml file that looks something like this: 

 In this example, 'Matrix0001.png' is an image of the dialog "The weather is nice today", and 'Matrix0002.png' is an image of the dialog "Yes it is, but not as nice as yesterday", the xoffset/yoffset tags are used to position where the image will be placed on the 720x576/480 TV canvas. 

```
<subpicture> 

   <stream> 

     <spu image="Matrix0001.png" start="00:00:4.7" end="00:00:6.7" xoffset="178" yoffset="480" /> 

     <spu image="Matrix0002.png" start="00:00:6.9" end="00:00:9.5" xoffset="178" yoffset="480" /> 

   </stream> 

 </subpicture>
```

To make things easier, here is a script that automates the extraction of the subtitle images (using 'vobsub2pgm') and creates an spumux.xml file with the images, timestamps and offsets -> http://mightylegends.zapto.org/dvd/vobsub2spumux.sh

File types other than AVI or MPEG

For file types other than .avi/.mpeg, such as .wmv,.mov,.asf, .mkv, .ogm and .bin (S)VCD etc.  it's necessary to first encode the movie to .avi with mencoder, like this:

For PAL:

```
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 25 your_movie.mov
```

For NTSC:

```
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 29.97 your_movie.mov
```

Then proceed as normal with the above transcode line.

NotesIf transcode errors out and refuses to encode your file, use mplayer to feed the file to transcode like this:

```
transcode -i matrix.avi -x mplayer,mplayer -y ffmpeg --export_prof dvd-pal --export_asr 2 -o matrix -D0 -b224 -N 0x2000 -m matrix.ac3 -J modfps --export_fps 25
```

*If it still errors out or can't encode properly (eg. 'Unknown' video/audio formats), run the file through the mencoder line mentioned above first.

Remember that you can preview the .m2v file with mplayer or xine while it is still being encoded with transcode. No need to wait until encoding is completely finished before seeing the result, handy for very large movies.

Alternatively, transcode has a preview option available so that the movie can be watched (video only) as it's being encoded by adding 'pv=cache=30' to the -J option, like so (note that this will incur a slight performance hit and encoding will be slower as a result):

```
-J modfps,pv=cache=30 --export_fps 25
```

To preview whether AV sync is going to be correct, only encode a small amount of the movie by adding '-c 0-00:05:00' to the end of your transcode line. This will encode just the first 5 minutes of the movie, then you will need to merge(mux) the two AV streams as mentioned below using mplex

Tweakage (optional)Halve the encoding times by reducing the DVD resolution (720x576 for PAL, 720x480 for NTSC) down to a VCD resolution (352x288 for PAL, 352x240 for NTSC). See the 'Notes' under the 'Adding subtitles' section if you intend to do this and also add subtitles.

Halve the encoded file output size by reducing the video bitrate to 1800 kbits/s ('--export_prof dvd-*' defaults to 5000 kbits/s). On average, this means that instead of being able to fit only 1-2 full length 90min. movie(s) on one 4.7GB DVD, you can fit 3-4.The video quality does suffer, but not in a visually noticeable way. Quality will always be subjective, but for my eyes I can only really see a difference when viewing on a PC while TV playback quality is still superb (your mileage may vary, depends greatly on the quality of the original file).

As --export_prof is not used, some ffmpeg options need to be manually set, save the settings in a file called 'ffmpeg.cfg':

```
[mpeg2video] 

 vrc_minrate=0 

 vrc_maxrate = 7000 

 vrc_buf_size = 1792
```

The following transcode lines do both, reduce the resolution and video bitrate (by not using '--export_prof dvd-*', transcode's video bitrate defaults to 1800 kbits/s).

For PAL: 

```
transcode -i matrix.avi -y ffmpeg -F mpeg2 -Z 352x288 --export_asr 2 --encode_fields t -o matrix -D0 -E 48000,16,2 -b 224 -N 0x2000 -m matrix.ac3 -J modfps --export_fps 25
```

For NTSC:

```
transcode -i matrix.avi -y ffmpeg -F mpeg2 -Z 352x240 --export_asr 2 --encode_fields b -o matrix -D0 -E 48000,16,2 -b 224 -N 0x2000 -m matrix.ac3 -J modfps --export_fps 29.97
```

Set the video bitrate manually by using '-w', eg. add '-w3000' to your transcode line if a video bitrate of 3000 kbits/s is desired.

One major drawback of using this method is that transcode's '--export_prof' option cannot be used, so if an aspect ratio conversion is necessary, we lose the benefits of auto clip/zoom which '--export_prof' provides.

You will know an aspect ratio conversion is necessary if the encoded output file's video is squashed/stretched using the above transcode lines.

An easy way around this is to do a dummy run using '--export_prof' on the input file and let transcode do the calculations, like so:

```
transcode -i matrix.avi -y ffmpeg --export_prof dvd --export_asr 2 -c 0-00:00:00 2>&1 | grep "pre clip frame"
```

An example output would look something like:

```
[transcode] V: pre clip frame | 592x450 (-106,0,-104,0)
```

It is the '--pre_clip' values in brackets that we need. Using those we can now also do the aspect ratio conversion like this:

For PAL:

```
transcode -i matrix.avi -y ffmpeg -F mpeg2 -Z 352x288 --export_asr 2 --encode_fields t --pre_clip=-106,0,-104,0 -o matrix -D0 -E 48000,16,2 -b 224 -N 0x2000 -m matrix.ac3 -J modfps --export_fps 25
```

For NTSC:

```
transcode -i matrix.avi -y ffmpeg -F mpeg2 -Z 352x240 --export_asr 2 --encode_fields b --pre_clip=-106,0,-104,0 -o matrix -D0 -E 48000,16,2 -b 224 -N 0x2000 -m matrix.ac3 -J modfps --export_fps 29.97
```

Creating the menus

For PAL:

Open up The Gimp and make a new image of size 720x576, with a resolution of 75dpi in the x-axis and 80dpi in the y-axis.

For NTSC:

Make a new image of size 720x480, with a resolution of 81dpi in the x-axis and 72dpi in the  y-axis.

Open up the 'Layers, Channels and Paths' dialog box by selecting menu File -> Dialogs -> Layers. 

Create a layer called 'button_highlight' by right clicking on the background layer in the 'Layers ..' dialog box and selecting 'New Layer'. 

Add an alpha channel to the layer by selecting the 'Layer Fill Type' to be 'Transparency', or by right clicking on the layer in the 'Layers ..' dialog box and select 'Add Alpha Channel'. 

Create a layer called 'button_select' using the same steps used to create the 'button_highlight' layer. 

Select the background layer and draw the menu background. 

I chose to use the matrix 'green data dribble' as the background, which I downloaded from a free wallpaper website.

Scaled the image to the correct 720x576, right click image -> Image -> Scale Image and set. Then copy/pasted it into the background layer of my new image.

Here is the image -> http://mightylegends.zapto.org/dvd_images/matrix.jpg

I wanted to have selectable snapshots of each movie in the menu.

Snapshots were taken using xine, images were scaled using gimp, then pasted into the background layer.

Here is the image -> http://mightylegends.zapto.org/dvd_images/matrix_menu_background.jpg

Select the button_highlight layer and draw the button outlines. To see howto draw perfect rectangles, squares and circles in the gimp, see here -> 

http://mightylegends.zapto.org/dvd/gimp_circles-n-squares.html

Here is the image -> http://mightylegends.zapto.org/dvd_images/matrix_menu_highlight.png

Hide the button_highlight layer & save the background layer.

Do this by selecting the button_highlight layer and using the Opacity slider in the 'Layers, Channels & Paths' dialog box to make it disappear.

Click on the background layer, right click on the image, select File -> Save as

Save background layer as 'matrix_menu_background.jpg' (can be almost any image format).

Save the button_highlight layer in the same way. Use the opacity slider to bring the button_highlight layer back up, and hide the background layer.

Click on the button_highlight layer, right click on the image, select File -> Save as

Save button_highlight layer as 'matrix_menu_highlight.png'.

(NOTE - Button layer MUST be a .png)

Select the button_select layer and draw the button outlines exactly the same as button_highlight, but in a different colour. 

An easier way to do this is to open matrix_menu_highlight.png, right click image, select menu Colors -> Map -> Rotate Colors, set the colour to something different, but that will still be visible against the menu background colour. 

(Users of Gimp-1.x versions can find this by selecting menu Colors -> Color map rotation) 

Save new colour image as 'matrix_menu_select.png'. 

(NOTE - MUST also be a .png) 

Here is the image -> http://mightylegends.zapto.org/dvd_images/matrix_menu_select.png

Putting it all together

Convert the menu background into a DVD .mpg.

For PAL:

```
convert matrix_menu_background.jpg ppm:- | ppmtoy4m -n50 -F25:1 -A59:54 -I p -r -S 420mpeg2 | mpeg2enc -n p -f8 -b5000 -a3 -o matrix_menu_background.m2v
```

For NTSC:

```
convert matrix_menu_background.jpg ppm:- | ppmtoy4m -n50 -F30000:1001 -A10:11 -I p -r -S 420mpeg2 | mpeg2enc -n n -f8 -b5000 -a3 -o matrix_menu_background.m2v
```

The above lines will encode to an aspect ratio of 16:9. If an aspect ratio of 4:3 is desired then replace '-a3' with '-a2'.

For mjpegtools versions smaller than 1.8.0, use '-S 420_mpeg2' instead of '-S 420mpeg2' in your 'ppmtoy4m' line.

Create some background audio for the menu:

```
ffmpeg -i your_music_file.mp3 -f wav menu_audio.wav
```

Use 'normalize' to make audio softer/louder if necessary:

```
normalize -a -10dB menu_audio.wav
```

Convert to AC3 audio:

```
ffmpeg -i menu_audio.wav -ab 224 -ar 48000 menu_audio.ac3
```

If you do not want any audio present in your menu, it is still necessary to create a silent audio file for mplex so the DVD menus will work correctly. Like this:

```
dd if=/dev/zero bs=4 count=99999 | sox -t raw -wsr 48000 - -t wav -r 48000 - | ffmpeg -i - -ab 224 -ar 48000 -ac 2 menu_audio.ac3
```

NoteIn later versions of FFmpeg, the option to specify audio bitrate has changed. Depending on the version of FFmpeg installed you may need to specify '-ab 224k' instead of '-ab 224'.

Merge background menu video/audio:

```
 mplex -f 8 -o matrix_menu.mpg matrix_menu_background.m2v menu_audio.ac3
```

Use spumux to merge button_highlight & button_select images into the menu video.

Spumux is part of the dvdauthor package. It is configured via an .xml file. Here is the xml config file we will use, save it as 'spumux.xml':

```
<subpictures>

  <stream>

    <spu start="00:00:00.0" end="00:00:00.0"

         highlight="matrix_menu_highlight.png"

         select="matrix_menu_select.png"

         autooutline="infer"

         autoorder="rows"/>

  </stream>

</subpictures>
```

Create final menu .mpg:

```
spumux spumux.xml < matrix_menu.mpg > matrix_menu_final.mpg
```

A successful output should look something like this:

```
INFO: Picture had 2 colors

INFO: Converting filenames to ANSI_X3.4-1968

INFO: Picture had 2 colors INFO: Picture had 2 colors

INFO: Constructing blank img

INFO: Autodetect 0 = 0x0-720x576

INFO: Pickbuttongroups, success with 1 groups, useimg=1

INFO: Found EOF in .sub file.

INFO: Max_sub_size=4456 WARN: Read 0, expected 4

INFO: 1 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18
```

Authoring the DVD

Dvdauthor is configured via a .xml file. Here is the .xml config file we will use, save it as 'dvdauthor.xml':

```
<dvdauthor dest="DVD">

  <vmgm>

    <menus>

      <video widescreen="nopanscan" />

      <pgc>

        <vob file="thx_dvd.mpg"/>

          <post> jump titleset 1 menu; </post>

      </pgc>

    </menus>

  </vmgm>

  <titleset>

    <menus>

      <video widescreen="nopanscan" />

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 2; </button>

        <vob file="matrix_menu_final.mpg"/>

        <post> jump cell 1; </post>

      </pgc>

    </menus>

    <titles>

      <video widescreen="nopanscan" />

      <pgc>

        <vob file="matrix_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00"/>

          <post> call menu; </post>

      </pgc>

      <pgc>

        <vob file="outtakes_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00,4:30,5:00"/>

          <post> call menu; </post>

      </pgc>

    </titles>

  </titleset>

</dvdauthor>
```

NoteLater versions of dvdauthor will not accept the presence of <video widescreen="nopanscan" /> if the vob file in question has been encoded at a 4:3 aspect ratio, remove this line from the XML file if that is the case.

For an explanation on what 'panscan' is, see here -> http://en.wikipedia.org/wiki/Pan_&_scan

Authoring with no menus

To create a more simple DVD with no menus or THX intro, then use the dvdauthor.xml config below:

```
<dvdauthor dest="DVD">

  <vmgm /> 

   <titleset> 

     <titles>

       <video widescreen="nopanscan" />

       <pgc> 

         <vob file="matrix_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00"/> 

       </pgc> 

       <pgc> 

         <vob file="outtakes_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00,4:30,5:00"/> 

       </pgc> 

     </titles> 

   </titleset> 

 </dvdauthor>
```

Create a directory named 'DVD'.

Create the DVD file structure with:

```
dvdauthor -x dvdauthor.xml
```

Test the new menus in xine before burning:

```
xine dvd:/full/path/to/DVD/VIDEO_TS/
```

Xine should play from the folder as though it's playing from a DVD.

Understanding the hierarchical structure of a DVD

VMGM

VMGM (or Root Menu) is the highest level of structure within a video DVD.

TitleSet

Every DVD has at least 1 titleset. All the files associated with a given titleset start with VTS_nn where nn is the titleset number (starting from 1). 

Title

Each titleset contains 1 or more titles. Each title is effectively a standalone movie. If you start xine and just tell it to play a dvd, and that dvd doesn't have a top-level menu, then it will just play the first title of the first titleset and then stop.

Chapter

Titles are subdivided into chapters. Chapters provide entry points to the movie, but when the player reaches the end of a chapter it will continue to the next chapter.

Menus can be associated with either the whole disk (VMGM=Video Manager Menu) or with a titleset (VTSM=Video Titleset Menu), there can be more than one menu of either type.

VMGM menus are typically used when selection of more than one VTSM in a different Titleset is required, as one VTSM cannot jump to another VTSM in a different Titleset.

Limitations on the targets of navigation menus:

A VMGM menu can only jump to:Another VMGM menu.

The first VTSM of a titleset.

The start of a titleset.A VTSM menu can only jump to:Another VTSM in the same titleset.

A title or chapter within the titleset.

The first VMGM of the disk.Note:

My DVD player (and others?) defaults to the first VTSM when pressing the 'Disc' button on the remote. If this is the case, and you want to setup menu access to different VTSMs at the VMGM level, then you may need to setup the first VTSM like so:

```
  <titleset>

    <menus>

      <pgc>

        <post> jump vmgm menu; </post>

      </pgc>

    </menus>

    <titles>....
```

So that pressing 'Disc' will take you to the VMGM Menu.

Create the DVD image and burn it

Use growisofs, part of the dvd+rw-tools package.

```
growisofs -Z /dev/dvd -dvd-video DVD/
```

Jerky video and skipping audio

This shouldn't happen, but here are some possible causes:The standalone DVD player cannot handle high bitrates.

DVD video is of a variable bitrate, while the audio is fixed. The two combined must not exceed 10.08Mbit at any time, but for some DVD players that limit is sometimes a great deal lower.

If you notice the problem to be worse in high motion scenes (peak video bitrate), then this is maybe what is happening.

Solution: Encode the video using a lower bitrate and avoid encoding the audio at anything higher than 448kbits/sec

An example ffmpeg.cfg to encode video at a lower bitrate:

```
[mpeg2video] 

vrc_minrate=0 

vrc_maxrate = 7000

vrc_bufsize=1792
```

This will set an average video bitrate of 5000kbits/sec (using Transcode's default) but set a bitrate ceiling of 7000 kbits/sec (Transcode defaults to 9000kbits/sec).

Encoding up from a lower framerate (eg. 23.976 to 29.97 frames per second), modfps has cloned some frames to achieve the new framerate.

Solution: Experiment with different clonetypes, more details in /usr/share/doc/transcode/README.filter.modfps.

Some cheap DVD media incorrectly reports it's optimal write speed, which can result in data being written to the DVD too fast. 

Solution: Add '-speed=1' to the above growisofs command line.

The media is damaged or poor.

Solution: Burn to a new disc or change brands of disc.Final Notes

Hopefully the DVD worked  :Smile: 

Here is a flow-chart diagram to aid in getting an overall view of the processes -> http://mightylegends.zapto.org/dvd_images/dvdauthor_howto.png

More sophisticated menus can be generated by having menus within menus within menus - this is a kickstart guide only, using 2 titles with chapters every 30 seconds.

It may seem complex and time consuming first time through, but once it's been done a couple of times it becomes very quick and easy.

Some nice progress is also currently being made on a complete GUI based DVD authoring tool for Linux.

Some that stand out are:KDE DVDAuthor Wizard -> http://pingwing.xs4all.nl/view.php/page/DVDAuthor

DVDStyler -> http://dvdstyler.sourceforge.net

QDVDAuthor -> http://qdvdauthor.sourceforge.net/

KMediaFactory -> http://susku.pyhaselka.fi/damu/software/kmediafactory/Credits

Scott T. Smith - creator of dvdauthor

Thomas Oestrich and Tilmann Bitterberg - creators of transcode

The ffmpeg team

The mjpeg team

Wolfgang Wershofen - for precise and detailed help

Ian Pointer - for his article at linuxjournal.com, Issue# 116

James A. Pattie - for his 'DVDs under Linux' presentation

James Tappin - for his dvdauthor tutorial

Erik Slagter - for his dvdauthor colour palette patch

David A. Norris - for his flow-chart diagram of the whole process

Links

Wolfgang Wershofen has done some interesting work on different xml configs and a set of scripts to automate the whole menu making process. They can be found here -> 

http://www.wershofen.de/downloads/dvdauthor.xml

http://www.wershofen.de/downloads/dvdauthor_example.tar.gz

http://dvdwizard.sf.net

http://www.linuxjournal.com - An interesting article on DVD authoring under Linux

http://www.pcxperience.org/james/dvd/presentations/  - James Pattie's DVD presentations

http://www.tappin.me.uk/Linux/dvd.html - James Tappin's dvdauthor tutorial (recommended reading for those transferring DV to DVD)

Shiznix  :Very Happy: 

PS> Check out Anterion's post on Page 2 for howto create animated menus. Highly recommended reading.Last edited by shiznix on Thu Jun 14, 2007 2:18 am; edited 109 times in total

----------

## BonezTheGoon

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

----------

## viperlin

 *BonezTheGoon 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,
> ...

 

i agree, AMAZING guide and welcome to the gentoo forums   :Laughing: 

----------

## shiznix

Thanx for the positive feedback guys !

Gives me that warm fuzzy feeling knowing that it's helped someone.    :Smile: 

Shiznix

----------

## gleno

Again, to reiterate! Well done   :Cool: 

I've most definitely have avoided this because of the confusion, which you have removed.

----------

## viperlin

 *shiznix wrote:*   

> 
> 
> I will also be using the THX theme at the start of the DVD & have named this 'thx.mpg'
> 
> 

 

what is the THX theme? where's it got from

----------

## paulisdead

I've never worked with xml before, so I'm wondering, if I wanted to make this without the thx.mpg file, the xml file would look like this?

```
<dvdauthor dest="DVD">

   <titleset>

    <menus>

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 2; </button>

        <vob file="matrix_menu_final.mpg" pause="inf"/>

      </pgc>

    </menus>

    <titles>

      <pgc>

        <vob file="matrix_dvd.mpg"/>

          <post>

            call menu;

          </post>

      </pgc>

    </titles>

    <titles>

      <pgc>

        <vob file="outtakes_dvd.mpg" />

          <post>

            call menu;

          </post>

      </pgc>

    </titles>

  </titleset>

</dvdauthor>
```

----------

## shiznix

 *viperlin wrote:*   

>  *shiznix wrote:*   
> 
> I will also be using the THX theme at the start of the DVD & have named this 'thx.mpg'
> 
>  
> ...

 

The THX theme is the small 'The audience is listening' introduction they play at the start of some movies in  cinemas to test the speaker system.

I'm currently using a Simpsons parody of it, which I got off a p2p network. But it's freely available on the web. Just type 'THX' or 'THX.mpg' into google & see what pops up.

Using the above dvdauthor .xml file, the THX theme would play only once the disc is inserted into the DVD player. Then it would default to the titleset menu thereafter.

----------

## shiznix

 *paulisdead wrote:*   

> I've never worked with xml before, so I'm wondering, if I wanted to make this without the thx.mpg file, the xml file would look like this?
> 
> ```
> <dvdauthor dest="DVD">
> 
> ...

 

Almost, you still need to create the <vmgm> root menu tag. Just leave it blank, like this:

```
<dvdauthor dest="DVD">

<vmgm />

   <titleset>

    <menus>

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 2; </button>

        <vob file="matrix_menu_final.mpg" pause="inf"/>

      </pgc>

    </menus>

    <titles>

      <pgc>

        <vob file="matrix_dvd.mpg"/>

          <post>

            call menu;

          </post>

      </pgc>

    </titles>

    <titles>

      <pgc>

        <vob file="outtakes_dvd.mpg" />

          <post>

            call menu;

          </post>

      </pgc>

    </titles>

  </titleset>

</dvdauthor>
```

----------

## BonezTheGoon

UPDATE!!!

 *Quote:*   

> Latest dvdauthor 0.6.8 - Not yet in portage, though the ebuild is avaliable from here -> https://bugs.gentoo.org/show_bug.cgi?id=36103
> 
> set 'PORTDIR_OVERLAY=/usr/local/portage' & uncomment it in /etc/make.conf
> 
> Create a directory /usr/local/portage/media-video/dvdauthor/ & place the ebuild in it, then from that directory, run:
> ...

 

The ebuild is now available in portage -- you will still need to ACCEPT_KEYWORDS="~x86" given it is 'unstable' however there is no need to manually download it or do a portage_overlay.  You might want to update the how-to.

Thanks again for this thread!  I am emerging as we speak!

Regards,

BonezTheGoon

----------

## viperlin

drat i just used overlay too  :Smile: 

----------

## malloc

well i can only say thank you shiznix 'cause you just gave us one hell of a howto. props to you and a big thanks  :Smile: 

----------

## ajayrockrock

I just got my plextor dvd writer and was reading up on all this.  Thanks for writing out this step by step guide, it's really going to help me out!!!

later,

ajay

PS.  One very small suggestion, you may want to put 'normalize' in your list of tools.

----------

## paulisdead

Excellent, I've gotten it all to work on a set of mpegs.  I did run into a problem getting AVIs converted, though.

```
paulisdead@deepthought dvd $ mencoder -o video.avi -ovc lavc -oac lavc video.mpg

MEncoder 1.0pre3-3.3.2 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton 2450 MHz (Family: 6, Stepping: 0)

Detected cache-line size is 64 bytes

MMX supported but disabled

MMX2 supported but disabled

SSE supported but disabled

3DNow supported but disabled

3DNowExt supported but disabled

CPUflags: Type: 6 MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0

Compiled for x86 CPU with extensions:

Reading /home/paulisdead//.mplayer/codecs.conf: Can't open '/home/paulisdead//.mplayer/codecs.conf': No such file or directory

Reading /usr/share/mplayer/codecs.conf: 61 audio & 169 video codecs

File not found: 'frameno.avi'

Failed to open frameno.avi

Reading config file /home/paulisdead//.mplayer/mencoder: No such file or directory

font: can't open file: /home/paulisdead//.mplayer/font/font.desc

Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)

File not found: 'video.mpg'

Failed to open video.mpg

Cannot open file/device.

Exiting...
```

----------

## shiznix

 *BonezTheGoon wrote:*   

> UPDATE!!!
> 
> The ebuild is now available in portage -- you will still need to ACCEPT_KEYWORDS="~x86" given it is 'unstable' however there is no need to manually download it or do a portage_overlay.  You might want to update the how-to.
> 
> 

 

I can't see dvdauthor-0.6.8 in portage yet, even after syncing with a few US mirrors to be sure.

Bonez, can you 'emerge sync' & confirm that it resides in /usr/portage/media-video/dvdauthor/ and comment out PORTDIR_OVERLAY in /etc/make.conf & see if it still emerges 0.6.8 ?

I may be unluckily syncing with not yet up to date mirrors.

Thanx  :Smile: Last edited by shiznix on Wed Dec 24, 2003 11:56 pm; edited 1 time in total

----------

## shiznix

 *ajayrockrock wrote:*   

> 
> 
> PS.  One very small suggestion, you may want to put 'normalize' in your list of tools.

 

Done & thanx for the heads up !

----------

## shiznix

 *paulisdead wrote:*   

> Excellent, I've gotten it all to work on a set of mpegs.  I did run into a problem getting AVIs converted, though.
> 
> ```
> paulisdead@deepthought dvd $ mencoder -o video.avi -ovc lavc -oac lavc video.mpg
> 
> ...

 

Most excellent !

The mencoder line above should work, providing you have included the right directory path to video.mpg & video.mpg actually exists.

The errors on 'frameno.avi' can be ignored, they are normal & non-fatal.

Cheers  :Smile: 

----------

## viperlin

ok whats a rought guess at the amount of time to encode the simpsons THX mpg (3.7MB) with 

transcode -i thx.mpg -V -y mpeg -F d,1 -E 48000 -b 224 -o thx

2.084GHz CPU, 256MB RAM   :Confused: 

----------

## shiznix

Remote embeddable images have been disabled, the original post has been edited to reflect this.

Just click on the URL links for image examples, thanks   :Wink: 

----------

## shiznix

 *viperlin wrote:*   

> ok whats a rought guess at the amount of time to encode the simpsons THX mpg (3.7MB) with 
> 
> transcode -i thx.mpg -V -y mpeg -F d,1 -E 48000 -b 224 -o thx
> 
> 2.084GHz CPU, 256MB RAM  

 

From an XP 1800+, 512MB RAM - THX mpg (5.3MB)

```
time transcode -i thx.mpg -V -y mpeg -F d,1 -E 48000 -b 224 -o thx

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source thx.mpg (ok)

[transcode] V: import format    | MPEG    (V=mpeg2|A=mp3)

[transcode] V: AV demux/sync    | (0) sync AV at PTS start - demuxer disabled

[transcode] V: import frame     | 352x240  1.47:1  encoded @ 4:3

[transcode] V: bits/pixel       | 0.711

[transcode] V: decoding fps,frc | 29.970,4

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x50    MPEG layer-2 [44100,16,2]  224 kbps

[transcode] A: export format    | 0x50    MPEG layer-2 [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 5884 (5885.880000)

[transcode] A: adjustment       | 1880@1000

[transcode] V: IA32 accel mode  | 3dnow (3dnow mmxext mmx asm)

[transcode] V: video buffer     | 10 @ 352x240

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_mpeg2.so] v0.4.0 (2003-10-02) (video) MPEG2

[export_mpeg.so] v1.2.3 (2003-08-21) (video) MPEG 1/2 | (audio) MPEG 1 Layer II

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "thx.mpg" -x mp2 -d 0 | tcdecode -x mp2 -d 0 -z 0

[import_mpeg2.so] tcextract -x mpeg2 -i "thx.mpg" -d 0 | tcdecode -x mpeg2 -d 0 -y yv12

INFO: using reference profile (DVD)

INFO: profile type is (NTSC)

INFO: resize from w/h (352/240) to (w/h) (352/288)

encoding frames [000000-000933],  33.87 fps, EMT: 0:00:31, ( 0| 0| 9)

INFO:    Min bitrate of any one frame = 1293 bits

INFO:    Max bitrate of any one frame = 220558 bits

INFO:    Min bitrate over any one second = 77200 bps

INFO:    Avg bitrate over any one second = 1932774 bps

INFO:    Max bitrate over any one second = 3538088 bps

INFO:    Total time: 28 seconds (00:00:28), 33.32 frames/sec, 0.030 sec/frame.

clean up | frame threads | unload modules | cancel signal | internal threads | done

[transcode] encoded 934 frames (0 dropped, 0 cloned), clip length  31.16 s

real    0m28.097s

user    0m26.110s

sys     0m0.840s

```

Roughly, 30 seconds.

----------

## viperlin

hmm, by the way could you please help me get the official THX video as all the ones i get are the simpsons one (very lol!)

(it takes ages to do thx for me.)

```

transcode v0.6.10 (C) 2001-2003 Thomas Oestreich

tcprobe: error while loading shared libraries: libMagick-5.5.6-Q16.so.0: cannot open shared object file: No such file or directory

[transcode] auto-probing source thx.mpg (failed)

[transcode] V: import format    | unknown  (V=(null)|A=(null))

[transcode] warning : no option -x found, option -i ignored, reading from "/dev/zero"

[transcode] V: import frame     | 720x576  1.25:1  

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,0

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x2001  AC3/A52      [48000,16,2]

[transcode] A: export format    | 0x50    MPEG layer-2 [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] V: IA32 accel mode  | 3dnow (3dnow mmxext mmx asm)

[transcode] V: video buffer     | 10 @ 720x576

[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null

[export_mpeg.so] v1.2.3 (2003-08-21) (video) MPEG 1/2 | (audio) MPEG 1 Layer II

INFO: using reference profile (DVD)

INFO: profile type is (PAL)

INFO: resize from w/h (720/576) to (w/h) (352/288)

encoding frames [000000-006165],  53.14 fps, EMT: 0:04:06, ( 0| 0| 9)
```

----------

## shiznix

 *viperlin wrote:*   

> hmm, by the way could you please help me get the official THX video as all the ones i get are the simpsons one (very lol!)
> 
> (it takes ages to do thx for me.)
> 
> ```
> ...

 

I seem to have misplaced my original classic THX video in one of my great hard drive clean-out binges.  :Embarassed: 

However you should be able to find many different ones on any p2p network, including the original.

As far as slow encode times go, try upgrading transcode to 0.6.11.

You'll need to re-emerge transcode anyway, as the dvdauthor-0.6.8 ebuild upgrades ImageMagick & your transcode is now looking for the old ImageMagick libraries, which of course aren't there.

```
tcprobe: error while loading shared libraries: libMagick-5.5.6-Q16.so.0: cannot open shared object file: No such file or directory
```

Better yet, & an even more thorough option is to:

```

emerge gentoolkit

ACCEPT_KEYWORDS="~x86" revdep-rebuild
```

Original post edited to point this out.

----------

## viperlin

yeh kida figured that one out   :Embarassed:   i could have sworn i'd updated to loatest version :-\, musta forgot accept keywords or something...

----------

## Angrybob

Damn! with a tutorial that good it allmost makes me feel bad I dont have any dvds that need menus added  :Smile: 

----------

## Anterion

Hi folks...

I'm currently experimenting with transcode, gimp and imagemagick to see if I can get the DVD menus to have an animated background using the following idea...

Choose video to use as background

Use Transcode to convert it into a series of enumerated JPGs.

Use Gimp to create the menu with a transparent background and saving it as PNG with alpha channel.

Using Imagemagick to "merge" the JPGs and the PNG as a batch job.

Using transcode (or mjpegtools) to create the m2v for the menu.

That's basically my plan. Any comments on it? Once I've succeeded, I'll be doing a HOWTO on that as well.. (or at least I hope so   :Very Happy:  )

See ya,

Anterion

----------

## viperlin

sounds like a great idea

----------

## shiznix

 *Anterion wrote:*   

> Hi folks...
> 
> I'm currently experimenting with transcode, gimp and imagemagick to see if I can get the DVD menus to have an animated background using the following idea...
> 
> Choose video to use as background
> ...

 A grand plan. I can't see any reason why this shouldn't work  :Very Happy: 

One gotcha is that you may still have to use spumux to merge the transparent button mask images as subtitles to the main menu or at least define the button regions.

http://dvdauthor.sourceforge.net/doc/spumux.html

I for one would be most interested in seeing how you go.

Keep in touch.  :Smile: 

----------

## BonezTheGoon

 *shiznix wrote:*   

> I can't see dvdauthor-0.6.8 in portage yet, even after syncing with a few US mirrors to be sure.
> 
> Bonez, can you 'emerge sync' & confirm that it resides in /usr/portage/media-video/dvdauthor/ and comment out PORTDIR_OVERLAY in /etc/make.conf & see if it still emerges 0.6.8 ?
> 
> I may be unluckily syncing with not yet up to date mirrors.
> ...

 

DOH!!!!!!  I hadn't been careful enough to note that the version was NOT up to date.  It was my misunderstanding that dvdauthor was not available in portage as a package at all, so when I saw that it was available I failed to check the versions.  Many many many appologies to all, 0.6.8 is not yet available to my knowledge.  Again, sorry for the confusion.

Regards,

BonezTheVeryEmbarassedGoon

----------

## Anterion

It's done   :Very Happy:   :Very Happy: 

And works pretty well... here's how I did it (If anyone would like to see the XCF file I used, just send me an e-mail.)

The following tools are useful:

avidemux2

transcode

composite (from ImageMagick)

mpeg2enc (from mjpegtools)

sox

toolame

ffmpeg

First of all, I used avidemux2 to find the video that should be played in the background. For my menu, I chose the ending credits of an episode that I was to put on the DVD. This way I got background music right along with it. Avidemux2 shows the current frame position. Write down the start frame and end frame of the video part you want to use. Now we are going to extract that part as a series of jpg pictures using the great transcode tool. (I'll be using NTSC for this example. Switch to 720x576 and 25 fps for PAL )

```
 transcode -i <your video file> -V -J fps --export_fsr 29.970 --export_asr 2 --keep_asr -Z 720x480 -y jpg,wav -m music.wav -o pics/background -c <startframe>-<endframe> 
```

The generated jpegs will be written to the (hopefully existing  :Smile:  directory "pics" given the name "backgroundXXXXXX.jpg" (XXXXXX sequential numbers).  Additionally -Z 720x480 --export_asr 2 --keep_asr will scale the video to 4:3 full screen video (adding black borders on top an bottom if necessary). -m music.wav extracts the audio to an uncompressed PCM wave file.

Now that we have the background video split up in images, we can prepare the menu. Load one of the jpgs into the Gimp and keep it as background layer. Now draw your menu in a transparent layer on top of it. Once this is done, hide the background layer and export the picture (should have a transparent background now) as PNG file (e.g. menu.png).

The next step will overlay the images of the background video with the menu PNG using the "composite" tool from ImageMagick.

```

for i in pics/*.jpg; do composite menu.png $i $i.png; done

```

This little shell scripts will take the jpgs from the pics directory and overlay the menu.png over the background images and write them to new files called "backgroundXXXXXX.jpg.png" (PNG because I didn't want yet another lossy compression.) You can check the PNGs with you favorite image viewer if everything went well.

Next step is to create the m2v video for the menu using png2yuv and mjpegtools' mpeg2enc.

```

png2yuv -f 29.970 -j pics/background%06d.jpg.png -I p | mpeg2enc -f 8 -I 0 -4 1 -2 1 -H -o menu.m2v

```

Now we got the menu's video. Check with mplayer or xine if looks ok.

Next goes the audio. DVD menus require 48khz audio, so first we check the samplerate of the audio.

```

   file music.wav

```

If it's 48000 Hz, then everything's well otherwise we'll use sox to resample.

```

   sox -t wav music.wav -t wav -r 48000 music2.wav

```

Now we need to compress the audio. One word of advice, some players don't like it if the DVD has MP2 and AC3. So check what kind of compression the videos have you want to put on it. If it's MP2 then

```

   toolame -s 48 -b 192 music.wav music.mp2

```

For AC3

```

   ffmpeg -i music.wav -ar 48000 -ab 192 music.ac3

```

Mplexing...

```

   mplex -f 8 -V -o menu.mpg menu.m2v music.ac3

```

That's it for the animated menu. Everthing from here follows the tutorial from the beginning of this thread.

Any questions?Last edited by Anterion on Mon Dec 29, 2003 10:06 pm; edited 2 times in total

----------

## shiznix

!!! FANTASTIC !!!

This works like a charm.

Great work, you've really taken it to the next level  :Very Happy: 

A huge thank you for this post, it adds a whole new perspective on creating menus now.

3 cheers for Anterion  :Smile: 

----------

## BonezTheGoon

Anterion gets my vote for the very best second post to these forums ever!!!

Good work.

Regards,

BonezTheGoon

----------

## Anterion

*blushes* Thanks, thanks   :Very Happy:   Glad to finally be able to contribute to the board that has helped me so many times now. 

Next plan is to create animated thumbnails for chapters. Once I get to it, I'll make sure to post the HOWTO here.

See ya,

Anterion

----------

## viperlin

following this guide to use PAL it never works.

i tried on NTSC VOB's to convert to PAL, the sound was out of sync.

when trying DivX films the picture is diagonally red (hard to explain)

----------

## Anterion

 *viperlin wrote:*   

> following this guide to use PAL it never works.
> 
> i tried on NTSC VOB's to convert to PAL, the sound was out of sync.
> 
> when trying DivX films the picture is diagonally red (hard to explain)

 

Hmm... have you replaced 29.970 with 25 everywhere?

Can't imagine what you mean with "diagonally" red, sorry. Where does that happen? Are the jpgs that way already or is it only the m2v?

----------

## viperlin

 *Anterion wrote:*   

>  *viperlin wrote:*   following this guide to use PAL it never works.
> 
> i tried on NTSC VOB's to convert to PAL, the sound was out of sync.
> 
> when trying DivX films the picture is diagonally red (hard to explain) 
> ...

 

what jpegs? i'm on about transcode video conversion

----------

## Anterion

 *viperlin wrote:*   

> 
> 
> what jpegs? i'm on about transcode video conversion

 

Thought you were refering to the animated menu section. 

Can you give the transcode commandline you were using and what you are trying to do?

----------

## viperlin

i have an american import of Finding Nemo  :Smile:  NTSC

i used the VOB files inplace of Matrix.mpg using the exact PAL examples in the original post. when i played them back the sound was delayed by about 5 seconds :-\

i'm just about to go to sleep but i'll be playing with this again in the morning  :Smile: 

----------

## Anterion

Ah, I see now. Instead of this line:

```
transcode -i <your.vob> -V -y mpeg -F d,4 -E 48000 -b 224 -o matrix
```

Try this one:

```

transcode -i <your.vob> -V -E 48000 -b 224 -w 7500 -J fps --export_fps 25 -Z 720x576 -y mpeg2enc,mp2enc -F 8 -o <your.mpg>

```

You'll need mjpegtools installed for this.

See ya,

Anterion

----------

## ajayrockrock

I had that same problem with the colors.  I think the problem might be related to burning animation since I was trying to burn a dvd of South Park.  btw, all my stuff is NTSC so I cut 'n' pasted most of the command lines from this tutorial.  Also, after the transcode step the video was still okay.  It was jacked up after the mplex step where I merged in the separate audio and video files.  

I thought it was something to do with my setup, but when I tried it on a normal video file (an episode of Seinfeld) it worked fine.  So try a regular file and see if you still get the weird colors?

oh, for the rest of you, the weird colors is like streaks of red that cross the screen.  I'll try to get a screenshot or something and post a link.

later,

ajay

----------

## viperlin

mine was a DivX Film of Operation Takedown.  not anime

----------

## pzasso

I followed the steps in the beggining of this thread and everything ran clean until I got to the transcode step.  The revdep-rebuild worked fine and I ran it a second time to verify everything was clean.  It reported everthing ok on second run.

Here is what I am getting.  

nighthawk sdc # transcode -i matrix.mpg -V -y mpeg -F d,4 -E 48000 -b 224 -o matrix

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg

[transcode] (probe) suggested AV correction -D 872 (34880 ms) | AV 34906 ms | 26 ms

[transcode] auto-probing source matrix.mpg (ok)

[transcode] V: import format    | MPEG    (V=mpeg2|A=mp3)

[transcode] V: AV demux/sync    | (0) sync AV at PTS start - demuxer disabled

[transcode] V: import frame     | 352x288  1.22:1  encoded @ 16:9

[transcode] V: bits/pixel       | 0.710

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x50    MPEG layer-2 [48000,16,2]  192 kbps

[transcode] A: export format    | 0x50    MPEG layer-2 [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: AV shift         | 34906 ms [ 872 (A) | 26 ms ]

[transcode] V: IA32 accel mode  | 3dnow (3dnow mmxext mmx asm)

[transcode] V: video buffer     | 10 @ 352x288

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_mpeg2.so] v0.4.0 (2003-10-02) (video) MPEG2

[transcode] warning : /usr/lib/transcode/export_mpeg.so: undefined symbol: pred_comp_mmx

[transcode] warning : (dl_loader.c) loading "/usr/lib/transcode/export_mpeg.so" failed

[transcode] warning : (encoder.c) loading audio export module failed

[transcode] warning : failed to init export modules

[transcode] critical: plug-in initialization failed

Any ideas?

Thank You

----------

## ajayrockrock

 *pzasso wrote:*   

> ---snip---
> 
> [import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG
> 
> [import_mpeg2.so] v0.4.0 (2003-10-02) (video) MPEG2
> ...

 

What do your use flags look like when you're building transcode:

```
# emerge -pv transcode

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] media-video/transcode-0.6.11  +sdl +mmx +mpeg +sse +3dnow +encode +X +quicktime +avi -altivec 

```

Mine is pulling everything in 'cept for altivec.  What version of transcode are you using?  You might want to rebuild it and try again...  I'm shooting in the dark as I'm sorta new to all this as well.   

later,

ajay

----------

## shiznix

I've not seen the weird streaks of red both Viperlin & ajayrock speak of.

All my divx video files encode fine. This maybe luck, so:

If someone could provide a link to a small sample video that this occurs on (pre-transcoded), plus the transcode line used when it occurs, I'd be happy to test it out & bug-fix.

Viperlin, for audio sync problems, look near the top of your transcode output for a line like

```
[transcode] (probe) suggested AV correction -D 872 (34880 ms) | AV 34906 ms | 26 ms
```

And a little further down for something like this:

```
[transcode] A: AV shift         | 34906 ms [ 872 (A) | 26 ms ]
```

This means transcode has engaged it's AV Sync auto-correction & usually ends up with bad AV sync (in my experience).

Ideally what you should see is something like this:

```
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
```

The workaround is to enforce transcode to sync the video to the first audio frame with the '-D 0' option, like this:

```

transcode -i matrix.mpg -V -y mpeg -F d,1 -E 48000 -b 224 -D 0 -o matrix
```

This is mentioned in the 'Notes:' section in the original post, btw  :Smile: 

Pzasso, the above will apply to you also when transcode does finally work as you have an AV Sync auto-correction happening in your transcode output.

But for now, it seems transcode is having problems with MMX on your system.

```
[transcode] warning : /usr/lib/transcode/export_mpeg.so: undefined symbol: pred_comp_mmx
```

Try re-emerging transcode with mmx disabled:

```
USE="-mmx" emerge transcode
```

For a full list of USE flags do:

```
emerge -pv transcode
```

An incorrect CPU selection in your kernelconfig may also cause this, though you would more than likely see performance problems elsewhere too.

SSE, 3dnow & MMX are CPU instruction sets, do:

```
cat /proc/cpuinfo
```

to check if your CPU supports these. If it does & transcode is still spitting out errors like this, then it's my feeling that it's a bug within transcode & should be posted to the transcode authors -> http://zebra.fh-weingarten.de/~transcode/

Does it happen with .avi's too ?

----------

## pzasso

shiznix,

Thank you for your quick response.  I will try what you have suggested and let you know what happens.  I don't think the kernel/cpu config is the problem.  I am using an Athlon XP 2600 and the system has been rock solid thus far since I installed Gentoo about 4 months ago.

Talk to you soon.

----------

## pzasso

Ok, so I performed the following steps:

emerge unmerge transcode  (ok)

USE="-mmx" emerge transcode (ok)

I am getting the same error even now.  Just as a sanity check, I tried this on a Pentium 4 machine that I have.  It is running a 2.4.22 kernel while my AMD machine is running a 2.4.20 kernel.  I got the same error on that machine as well, even after performing the above steps.  The AMD machine has the kernel configured for Athlon XP+ gcc>31.  Below is the output from /proc/cpuinfo 

processor       : 0

vendor_id       : AuthenticAMD

cpu family      : 6

model           : 8

model name      : AMD Athlon(tm) XP 2600+

stepping        : 1

cpu MHz         : 2088.052

cache size      : 256 KB

fdiv_bug        : no

hlt_bug         : no

f00f_bug        : no

coma_bug        : no

fpu             : yes

fpu_exception   : yes

cpuid level     : 1

wp              : yes

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow

bogomips        : 4128.76

Thanks

----------

## viperlin

EDIT: oops, it was -I p

not -l p

----------

## viperlin

little question, i just bumped into a problem, the video is in a widescreen style format and converting it distorts it into streched upwards style video (like when people watch widescreen films in full TV view so they have tall heads.) guess i'd better start again on the video figuring this bit out  :Smile: 

----------

## shiznix

The mmx problem that pzasso is experiencing:

 *Quote:*   

> [transcode] warning : /usr/lib/transcode/export_mpeg.so: undefined symbol: pred_comp_mmx

 is definitely a bug with transcode.

See here -> http://zebra.fh-weingarten.de/~maxi/html/transcode-devel/2002-10/msg00005.html

Looks like it's reared it's ugly head again, 12 months later :/

Pzasso, for what it's worth I also use an AMD CPU, but don't receive the error (XP 1800+).

You should cut/paste your transcode output & submit it to transcode's mailing list.

This bug needs fixing.

Thanks,

Shiznix

----------

## shiznix

 *viperlin wrote:*   

> little question, i just bumped into a problem, the video is in a widescreen style format and converting it distorts it into streched upwards style video (like when people watch widescreen films in full TV view so they have tall heads.) guess i'd better start again on the video figuring this bit out 

 

Have you tried playing with enforcing the aspect ratios ?

4:3 would be a good start.  :Wink: 

----------

## pzasso

shiznix,

I sent the bug information to the Transcode developers and gave them a link to this thread as well.  

Thanks for your help.

--Paul  :Smile: 

----------

## pzasso

While I am waiting for Transcode to get fixed, I am experimenting with other ways of getting my home movies to DVD.  I have listed the steps below and am curious if my current end result will improve with the use of Transcode for encoding?  This is nothing more than a bunch steps that I have gathered from various sites.  I have no idea if this is a good way to get the job done or not.  Some processes talk about creating an iso file before burning it out to dvd.  I am unclear on why that might be needed?

1. I use Kino to pull in the video from my camcorder

2. I use avimerge to create one large avi file

3. lav2wav +p myfile.avi | mp2enc -V -o audio.mp2

4. lav2yuv +p myfile.avi | mpeg2enc -n n -f 8 -s -r 16 -o video.mlv

5. mplex -f 8 audio.mp2 video.mlv -o endresult.mpg

6. dvdauthor -o finalproduct endresult.mpg

7. dvdauthor -o finalproduct -T

8. Test it out with xine

9. growisofs to burn it to DVD.

My end result is a pretty clear DVD, but I think it could be better.  I have only attempted this using Linux and have no plans to go the Wiindows route, although I have seen some pretty good output from people who have used TMPGenc for their encoding.

All feedback is welcome.

Thank You

--Paul

----------

## viperlin

 *shiznix wrote:*   

>  *viperlin wrote:*   little question, i just bumped into a problem, the video is in a widescreen style format and converting it distorts it into streched upwards style video (like when people watch widescreen films in full TV view so they have tall heads.) guess i'd better start again on the video figuring this bit out  
> 
> Have you tried playing with enforcing the aspect ratios ?
> 
> 4:3 would be a good start. 

 

ok how the hell do you do that  :Smile: 

i've read the manpage and according to it using the normal size with -Z (the standard PAL size) and the --keep_asr option it will make the video have black bars top and bottom in order to keep aspect ratio. so i'm using this:

```

transcode -i Film\ -\ Ghost\ In\ The\ Shell.avi -V -Z 720x576 --keep_asr -y mpeg -F d,1 -E 48000 -b 224 -o gits

```

the way the manpage explains it working is like this:

```

 --keep_asr

           try to keep aspect ratio (only with -Z) [off]

           The --keep_asr options changes the meaning of -Z. It tries to fit the video into a framesize specified by -Z by

           keeping the original aspect ratio.

           /------------------------\                                             /---480-------\

           |                         |                                           | black         |

           |720x306 = 2.35:1| -> -Z 480x480 --keep_asr ->  |-----------------4

           |                         |                                           | 480x204    8

           \------------------------/                                            |-----------------0

                                                                                 | black         |

                                                                                 \-----------------/

           Consider --keep_asr a wrapper for calculating -Y options and -Z options

```

however it does not work, the video is streched still on normal playback instead of being a rectangular shape

also the in the notes i tried the enforcing 4:3 and still nothing changed

----------

## Anterion

 *Quote:*   

> 
> 
> however it does not work, the video is streched still on normal playback instead of being a rectangular shape 
> 
> also the in the notes i tried the enforcing 4:3 and still nothing changed
> ...

 

Try to give transcode the asr you want to get in the end. Usually it should autodetect and use the right ASR, but I've discovered that it doesn't work sometimes or that I misunderstand the concept.   :Very Happy: 

Add --import_asr X and --export_asr Y to the --keep_asr option. For example 16:9 to 4:3 (adding black borders at the top and bottom):

```

transcode -i Film\ -\ Ghost\ In\ The\ Shell.avi -V -Z 720x576 --keep_asr -y mpeg -F d,1 -E 48000 -b 224 -o gits --import_asr 3 --export_asr 2

```

Maybe this helps?

----------

## viperlin

 :Very Happy: 

thankyou

sorry for this but i struggle with video a bit, it's like my little weakness, and my dad being perfect at it on windows don't help (PVR/DVD Guru) but he's never used transcode  :Sad: 

----------

## desh

Having a spot of bother with some transcoding, I wonder if anyone knows what's up here...

I transcoded the Simpon's THX spoof without any problems, using shiznix's original command-line.  The mplex'd audio & video stream plays fine in mplayer and xine.

Now I'm trying to transcode a MPEG PES stream - recorded as an MPEG transport stream from a DVB card, and converted to program stream with the ts2ps utility (part of dvbtools).  Both the raw TS stream and the PS stream play fine in mplayer and xine.

However, when I transcode as follows:

```
transcode -i input.mpg -M 0 -y mpeg -F d,1 -E 48000 -b 224 -o test1

mplex -o test1.mpg test1.mpa test.m2v

```

The resulting movie is just a blank screen, in mplayer and xine.  The audio is fine, but no picture.  I don't get any errors during transcoding - at least, nothing that seems fatal to my untrained eye:

```
$ transcode -i input.mpg -M 0 -y mpeg -F d,1 -E 48000 -b 224 -o test1

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg

[transcode] (probe) suggested AV correction -D 10 (400 ms) | AV 420 ms | 20 ms

[transcode] auto-probing source input.mpg (ok)

[transcode] V: import format    | MPEG-2  (V=null|A=vob)

[transcode] V: AV demux/sync    | (0) sync AV at PTS start - demuxer disabled

[transcode] V: import frame     | disabled

[transcode] V: bits/pixel       | 0.000 (unknown)

[transcode] V: decoding fps,frc | 25.000,0

[transcode] A: import format    | 0x50    MPEG layer-2 [48000,16,2]  256 kbps

[transcode] A: export format    | 0x50    MPEG layer-2 [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] V: IA32 accel mode  | 3dnow (3dnow mmxext mmx asm)

[transcode] V: video buffer     | 10 @ 0x0

[import_vob.so] v0.6.0 (2003-10-02) (video) MPEG-2 | (audio) MPEG/AC3/PCM | (subtitle)

[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null

[export_mpeg.so] v1.2.3 (2003-08-21) (video) MPEG 1/2 | (audio) MPEG 1 Layer II

[import_vob.so] tccat -i "input.mpg" -t vob -d 0 -S 0 | tcdemux -a 0 -x mp3 -S 5 -M 0 -d 0 | tcextract -t vob -a 0 -x mp2 -d 0 | tcdecode -x mp2 -d 0

INFO: using reference profile (DVD)

INFO: profile type is (PAL)

INFO: resize from w/h (0/0) to (w/h) (352/288)

encoding frames [000000-000092],  69.30 fps, EMT: 0:00:03, ( 0| 0| 9)
```

Anyone know what's going on here?  Thanks!

Update: so the "import format MPEG-2 (V=null)" doesn't look good, nor does "import frame | disabled".  Looking on the transcode mailing lists, there was a similar question in 2002 about this, but no final answer.  I've retried with "-x mpeg2,mp3" option to transcode, but no luck - still a blank video.

I've also tried converting to AVI with mencoder (I noticed the "-oac lavc" option doesn't work, so I used "-oac copy").  mencoder segfaulted on this after creating a partial AVI - this AVI plays OK in mplayer too, but immediately crashes transcode.  Ho hum.

I'd be interested to know if anyone at all has had success in transcoding program streams...Last edited by desh on Sat Jan 03, 2004 11:42 am; edited 1 time in total

----------

## devsk

 *pzasso wrote:*   

>  I have only attempted this using Linux and have no plans to go the Wiindows route, although I have seen some pretty good output from people who have used TMPGenc for their encoding.
> 
> All feedback is welcome.
> 
> Thank You
> ...

 

don't you worry, wine people have done a good job. TMPGEnc works with wine out of box...I have encoded my DV footage with it.

----------

## Anterion

 *desh wrote:*   

> 
> 
> Anyone know what's going on here?  Thanks!
> 
> no final answer.  I've retried with "-x mpeg2,mp3" option to transcode, but no luck - still a blank video.
> ...

 

Just a blind shot on my side here... try to use "-x mpeg3" Transcode will try to use libmpeg3 (must be installed, it's not part of transcode) to decode the MPEG2 stream.

See ya,

Anterion

----------

## kabutor

Nice read!

A question, how can I add a sub or srt file as subtitles to the DVD?

 :Idea: 

----------

## shiznix

 *desh wrote:*   

> Now I'm trying to transcode a MPEG PES stream - recorded as an MPEG transport stream from a DVB card, and converted to program stream with the ts2ps utility (part of dvbtools).  Both the raw TS stream and the PS stream play fine in mplayer and xine.
> 
> The resulting movie is just a blank screen, in mplayer and xine.  The audio is fine, but no picture.  I don't get any errors during transcoding - at least, nothing that seems fatal to my untrained eye.

 

Hi desh,

James Tappin's Howto at -> http://www.tappin.me.uk/Linux/dvd.html

is based on encoding/burning DVB to DVD, though he uses a camcorder & not a capture card, both are DVB devices & so should still be relevant (uses Kino).

Note that I don't own any DVB devices to test this  :Neutral: 

----------

## shiznix

 *kabutor wrote:*   

> A question, how can I add a sub or srt file as subtitles to the DVD?

 

Interesting question, & one idea I've not had the chance to toy with yet.

However, here's a start -> http://zebra.fh-weingarten.de/~maxi/html/transcode-users/2003-11/msg00296.html

Let us know if it works out  :Smile: 

----------

## desh

Well, "-x mpeg3" doesn't help either - still just a blank video.  James Tappin's guide doesn't tell me much either, unfortunately - it doesn't seem very relevant to DVB.

I'll probably have a play with avidemux and/or kino next and see if I can export anything useful from there... thanks for the pointers though, guys.

-Des.

----------

## ajayrockrock

I finally got around to getting some screenshots of the funky colors (the red streaks through the picture):

http://www.odc.net/~ssharma/curb1.png

http://www.odc.net/~ssharma/curb2.png

I haven't tried burning a dvd yet but is that green bar at the bottom normal?  This is for an NTSC disc, by accident I encoded a PAL version and the green bar wasn't there...  

thanks,

ajay

PS.  oh and mplayer always crashes when I try to play the final mpg file (right before I use dvdauthor).  I can only preview the file with xine which is strange since mplayer *rarely* crashes.

----------

## kabutor

That strange colors happen to me, i have to adjust the video almost manually, I read somewhere (maybe this thread) that is a problem with the resizing .. but I'm a newbie so..

I did it this way :

```
transcode -i video.avi -V -y mpeg,mp2enc -F d,0 -E 48000 -b 224 -o video -m audio -Y -80,0 -Z 720 --export_asr 3
```

And it works.. just start transcoding and in another console watch the video output to see that is correct, if not play with the -Y and -Z values..

-----------

About the subtitles I don't see a fast solution, because the link provided up there is for subtitles in pgm format, the original dvd format, and not the SUBRIP format, and to convert it you have to:

1- Create a PNG image for each subtitle line

2- Create and XML file with the timing of that image.

Is needed someone with high scripting skill (not me)  :Very Happy: 

----------

## ChrisCol

 *pzasso wrote:*   

> While I am waiting for Transcode to get fixed...

 

I have had exactly the same problem as you.  Temporarily solved by downgrading to version 0.6.10.

```
emerge /usr/portage/media-video/transcode/transcode-0.6.10.ebuild
```

Hope that helps...

----------

## jay

VAMPS is a fast requantizer for ripping streams from a DVD and compressing them ready for further use with DVDauthor.

Get it here:

ftp://ftp.heise.de/pub/ct/listings/0401-094.tgz

Sample usage:

Rip the stream Track 1 Chap 1 angle 1:

#vamps-play_title /dev/dvd 1 1 1 > chapter01.mpg

Compressing the Stream using audio channels 1+2, subchannel 3  with factor 1.5

# vamps -E 1.5 -a 1,2 -s 3 < chapter01.mpg > c_chapter01.mpg

----------

## ChrisCol

Quick hint:

The LATEST transcode - v0.6.12 supports a simplified command ling for dvd mpeg encoding:

```
XXX@XXX$ transcode -i <I/P_F_NAME> -V --export_prof dvd-pal -o <O/P_F_NAME>

```

In the above command 'dvd-pal' can be replaced with any one of:

vcd, vcd-pal, vcd-ntsc, svcd, svcd-pal, svcd-ntsc, dvd, dvd-pal and dvd-ntsc

This sets all the required options and converts to the format you request.  I believe it also sorts out the aspect ratios for you...

See: http://zebra.fh-weingarten.de/~transcode/man1/transcode.1.html for more info.

Incase anyone is as new to this as me then to get this version I:

1)Copied the ebuild file:

'/usr/portage/media-video/transcode/transcode-0.6.11.ebuild' 

to 

'/usr/local/portage/media-video/transcode/transcode-0.6.12.ebuild'

then, making sure the PORTAGE_OVERLAY line is uncommented in /etc/make.conf, typed:

```
XXX@XXX $ ebuild /usr/local/portage/media-video/transcode/transcode-0.6.12.ebuild digest
```

Then:

```
XXX@XXX $ emerge transcode
```

This failed onece, with a message about mmx support patch not veing available.  To solve this I comment out the line that tries to patch the source tar.gz in the ebuild file.

```
#       epatch ${FILESDIR}/${P}-no-mmx.patch
```

This makes life easier for me so I guess it may for someone else.[/url]

----------

## jammib

Hi pzasso,

I too got the same problems that you experienced with transcode, I ran an emerge -vp transcode and noticed it wasn't using mmx or sse.  After adding mmx and sse to my use flags (I was sure I did this when I first configured my system?), transcode runs fine.

I hope this helps

Jammib

----------

## MetalSlug

Does anyone know why dvdauthor would not make a VIDEO_TS.IFO.  It finishes turning the mpgs into vobs (3 titles, one titleset) and makes the VTS_01_0.IFO and .BUP.  Then it says that is is making table of contents but gives an error message "No .IFO files to process" or something to that effect.  Does anyone have experience with this?  Thanks

----------

## revo

hey, cool to have found this thread, as i had no luck to install MyDVD with crossoveroffice/wine...

but i got problems generating the menus. when i follow the first post, ia always get a blank screen when i play the dvd, except the *highlighted* part, which is visible. i do hear my sound. in xine, i can click on any part of the screen and it will start the *first* movie. no chance to start the second. further investigation revealed, that spumux always recognized *one* subtitle, which in fact is the whole image. i tried to manually write the places of the buttons into spumux.xml, but i didn't get it, i always get errors, because i don't really understand the syntx. manpage doesn't help a lot. if anyone has a sample spumux.xml file with manually defined buttons or could point me into a direction why spumus recognizes the whole screen as a button, i'd be very happy.  :Smile: 

revo

----------

## MetalSlug

Well, my problem with the generation of VIDEO_TS.IFO was solved by the realization of a very annoying fact.  My DVD was being made on a FAT32 partition (only drive with the space left) and was mixing up the case sensitivity.  Dvdauthor was expecting VTS_01_0.IFO and was getting vts_01_0.ifo but FAT32 doesn't note any difference between the two.  It was solved by putting the .IFO file in a empty dvd structure on a more modern file system (reiserfs) and running dvdauthor -o directory_here -T , then transfering the resulting files back to the FAT32 partition.  This should not be a common problem but I thought that I would explain just in case.

----------

## shiznix

Came across a video last night that when encoded, had the same diagonal red streaks running through it that Viperlin & ajayrock mentioned.

The problem lies with transcode's internal mpeg encoder not encoding properly on some DivX.

The solution is to tell transcode to use the external mpeg2enc program to encode, like this:

```
transcode -V -i <input_file> -y mpeg2enc,mp2enc -F4,"-n p -f 8" -b 224 -E 48000 -o <output_name>
```

Howto updated to reflect this, see there for more detail.

Thanx  :Cool: 

----------

## shiznix

 *ChrisCol wrote:*   

> Quick hint:
> 
> The LATEST transcode - v0.6.12 supports a simplified command ling for dvd mpeg encoding:
> 
> ```
> ...

 

This command line is much nicer however, a couple of points:

The '-E 48000 -b 224' audio part is still necessary to get a DVD compliant audio stream.

The encoding is much slower. About 5 times slower than

```
transcode -i matrix.mpg -V -y mpeg -F d,1 -E 48000 -b 224 -o matrix
```

Although this sometimes produces strange colour streaks.

And about half as slow as

```
transcode -V -i matrix.mpg -y mpeg2enc,mp2enc --export_asr 2 -F4,"-n p -f 8" -b 224 -E 48000 -o matrix
```

Which usually always works.

Latest transcode 0.6.12 is in portage, there's also been an update to mjpegtools (1.6.1.92)

Cheers,

Shiznix

----------

## shiznix

 *revo wrote:*   

> hey, cool to have found this thread, as i had no luck to install MyDVD with crossoveroffice/wine...
> 
> but i got problems generating the menus. when i follow the first post, ia always get a blank screen when i play the dvd, except the *highlighted* part, which is visible. i do hear my sound. in xine, i can click on any part of the screen and it will start the *first* movie. no chance to start the second. further investigation revealed, that spumux always recognized *one* subtitle, which in fact is the whole image. i tried to manually write the places of the buttons into spumux.xml, but i didn't get it, i always get errors, because i don't really understand the syntx. manpage doesn't help a lot. if anyone has a sample spumux.xml file with manually defined buttons or could point me into a direction why spumus recognizes the whole screen as a button, i'd be very happy. 
> 
> 

 

I'm baffled as to what it could be. You might try the dvdauthor mailing list here -> http://lists.sourceforge.net/lists/listinfo/dvdauthor-users

Be sure to include the spumux.xml file you're using when/if you post there.

----------

## revo

Thanks for the response.   :Smile: 

But in the meantime i found out what i was doing wrong. I used your sample pictures and realized that i didn't choose "transpaency" for the menu_highlight and menu_select but used "background" when i created the new layers.

Now it works like a charm  :Smile: 

Thanks for your cool guide!

revo

----------

## viperlin

ok is there any special "speed up" option? i just ask because whenever i encode a video file (the same file actually) it goes at different speeds, same command. like at this very moment i was going to encode a film and watch it, but it's going at  17fps.

last time i did this it was going at 43fps

it just seems completely random to me. same things running and everything, same conditions.

----------

## shiznix

 *viperlin wrote:*   

> ok is there any special "speed up" option? i just ask because whenever i encode a video file (the same file actually) it goes at different speeds, same command. like at this very moment i was going to encode a film and watch it, but it's going at  17fps.
> 
> last time i did this it was going at 43fps
> 
> it just seems completely random to me. same things running and everything, same conditions.

 

You could try giving the transcode process a higher priority using the 'nice' command.

eg. nice -20 transcode -i ....etc.

This will give transcode the highest possible priority.

Another alternative if you have another networked PC, is to distribute the encoding to it using transcode's pvm module.

Check out /usr/share/doc/transcode/export_pvm.txt for more info.

I haven't played with this yet.

You'll need to emerge pvm & configure it on both boxes, then re-emerge transcode.

The re-compile should auto-detect pvm on your system & so compile in it's own pvm support.

Would be nice if the transcode ebuild included a +pvm USE flag, so that if it's chosen it auto-emerges pvm as a dependency to it.

----------

## matspi

Hi,

great HOWTO.

It is always good to add

```
-x mplayer,mplayer
```

to your transcode commandline. This will use mplayer to read the input file. So videos with errors can still be encoded.

Further the additional step with mencoder is no longer necessary.

You should be able to encode *.bin files etc. directly

matspi

----------

## shiznix

OK, the Howto has been significantly updated.

Specifically the transcode lines.

Scratch my previous post on using the external mpeg2enc,mp2enc to encode on getting rid of the coloured streaks that some are experiencing.

Encoding with mpeg2enc,mp2enc works but the resultant burnt DVD plays in black & white (on my DVD player anyway).

Seems the problem is in the resize option (d,1) for certain files, use -Z (zoom) instead to get the required resolution for PAL or NTSC & all should be well.

Kabutor mentioned using -Z as a workaround, but at the time I was wrongly convinced by others that it was one & the same thing.

Whew, I think this update should iron out a lot of problems that users have been experiencing (me included).

Thanx,

ShiznixLast edited by shiznix on Wed Jan 21, 2004 10:30 pm; edited 1 time in total

----------

## shiznix

 *matspi wrote:*   

> Hi,
> 
> great HOWTO.
> 
> It is always good to add
> ...

 

This is extremely handy, and something I've looked long & hard into.

I stuck with using mencoder in the end for non-standard formats as using '-x mplayer,mplayer' resulted in video that was completely foobarred (a mish mash of flashing colours).

It does work very well with .avi's/.mpg's (though slightly slower), but for some .wmv's & .mov's especially, it fails miserably.

As an aside, transcode has a '-x/-y mov', but uses libquicktime, so no Sorenson support.

I've tried very hard to be able to remove mencoder from the encoding process to keep things as simple as possible, but in some instances it's a necessity.

However, it's a good option for those files transcode flat out refuses to encode.

Noted & updated.

Thanks   :Smile: Last edited by shiznix on Thu Jan 22, 2004 1:43 am; edited 1 time in total

----------

## darksaidin

Great guide - thank you!

I had one little problem with emerging mjpegtools. The quicktime dependency gave me some strange "unresolved externals nv_ ..." errors. Switching to from nvidia-opengl to xfree, emerging the package and switching back did the trick. Just in case someone else comes across the same problem.

----------

## shiznix

 *kabutor wrote:*   

> Nice read!
> 
> A question, how can I add a sub or srt file as subtitles to the DVD?
> 
> 

 

Update !

Apparently spumux can do it.

I haven't tested this, but I'm assured it now supports this, even though it's not present in the man page for version 0.6.8 as it's still new (thanks Sjef).

--snip--

Spumux is also able to handle [>=0.6.8] text subtitles, which will be rendered to graphics by spumux. A lot of different text (must be non-graphic) formats are supported (.sub, .srt, .ssa, .smi, .rt , .txt, .aqt, .jss, .js, .ass).Spumux will try to determine the format automatically. If processing textbased subtitles no other streams can be defined, buttons or others need to be processed in another pass with spumux, using anotherxml file. Following .xml file shows the available tags and their default settings. Only the textsub tag is mandatory, defaults are used if the specific tagis not specified.

<subpictures>

   <stream>

      <textsub filename="demo1.srt" characterset="ISO8859-1"

		fontsize="28.0" font="arial.ttf" horizontal-alignment="left"

		vertical-alignment="bottom" left-margin="60" right-margin="60"

		top-margin="20" bottom-margin="30" subtitle-fps="25"

		movie-fps="25" movie-width="720" movie-height="574"      />

   </stream>

</subpictures>

The textsub tag defines the settings for the text to graphics rendering.

The filename attribute defines the path and name of the input text subtitlefile, this is the only attribute that is mandatory.

The horizontal-alignment attribute defines the horizontal alignment of thesubtitles. Options are: "left", "right", "center" and "default".The "default" value causes spumux to use the attribute that is in the textsubtitle file if the format supports such an attribute.

The vertical-alignment attribute defines the vertical alignment.Options are: "top", "center" and "bottom".

The margin attributes define the minimum blank pixel space between theborder of the image and the border of the subtitle lines.

Defining the subtitle-fps and movie-fps attributes make it possible forspumux to recalculate the subtitle timing if these are not the same.

The movie-width and movie-height attributes define the maximum size ofthe subtitle page, these shouldn't be larger than the fram-size of themovie frame, normally they are the same. Some DVD-players more likesubtitle frames that are 2 or 4 pixels smaller in height.

--snip--

Hope it helps

----------

## kabutor

no luck here  :Sad: 

 *Quote:*   

> 
> 
> DVDAuthor::spumux, version 0.6.8.  Build options: gnugetopt magick
> 
> Send bugs to <dvdauthor-users@lists.sourceforge.net>
> ...

 

I tried emerging corefonts, and freefonts, restarting X, reemerged imagemagicck, but nothing, (also tried adding /usr/share/fonts/corefonts/arial.ttf and nothing.)

----------

## shiznix

 *kabutor wrote:*   

> no luck here 
> 
>  *Quote:*   
> 
> DVDAuthor::spumux, version 0.6.8.  Build options: gnugetopt magick
> ...

 

Have you tried substituting the 'font="arial.ttf"' with some other truetype font located in /usr/X11R6/lib/X11/fonts/truetype/ ?

Or tried 'font="/full/directory/path/to/arial.ttf" ?

Is this what you meant by 'adding /usr/share/fonts/corefonts/arial.ttf and nothing'  ??

Just some thoughts.

Apart from this error, it looks like it's almost there.

----------

## kabutor

Yeah I tried that..

my subs.xml file:

 *Quote:*   

> <subpictures>
> 
> <stream>
> 
> <textsub filename="sttn601.srt" characterset="ISO8859-1"
> ...

 

 *Quote:*   

> 
> 
> # spumux subs.xml 
> 
> DVDAuthor::spumux, version 0.6.8.  Build options: gnugetopt magick
> ...

 

----------

## shiznix

 *kabutor wrote:*   

> <subpictures>
> 
> <stream>
> 
> <textsub filename="sttn601.srt" characterset="ISO8859-1"
> ...

 

Looking on the dvdauthor-users mailing list, it seems that spumux will only look for fonts in ~/.spumux/

You mighty try copying the relevant .ttf font file to there & change the font line in spumux.xml to read:

fontsize="28.0" font="verdana.ttf"

----------

## kabutor

Now it's working..  :Smile: 

Yes, copy the sub ttf file to .spumux does the trick.

But, just in case someone test it, in Xine I couldnt see the subtitles, but, in my DVD player it works.

Xine shows in the subtitle option two ?? and while playing it a normal DVD it shows the region code (es uk etc..)

So i suppose the solution is adding that ES or UK or something in the xml file somewhere.

Another thing would be how to add two subtitles.. maybe adding another stream tag in the xml? or making the same process for two subtitles?

----------

## pzasso

Hi pzasso,

I too got the same problems that you experienced with transcode, I ran an emerge -vp transcode and noticed it wasn't using mmx or sse. After adding mmx and sse to my use flags (I was sure I did this when I first configured my system?), transcode runs fine.

I hope this helps

Jammib

------------------------------------------------------------------------------------

Jammib,

I added mmx and sse to my USE flags as you mentioned above and recompiled transcode.  It appears to be working fine so far.

Thanks for your response.  

--pzasso

----------

## perbert

 *Anterion wrote:*   

> Next plan is to create animated thumbnails for chapters. Once I get to it, I'll make sure to post the HOWTO here.
> 
> 

 

has this been done yet?  if not, here's a hint (a script i wrote to do this for a DVD i made of ESB):

```
#!/bin/sh

# note: make menu1.ppm for background (720x480)

# mplayer -nosound -vo jpeg -jpeg outdir=./c1/ -frames 600 -ss 122 ../../../empire_strikes_back_p1a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c2/ -frames 600 -ss 1490 ../../../empire_strikes_back_p1a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c3/ -frames 600 -ss 2120 ../../../empire_strikes_back_p1a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c4/ -frames 600 -ss 8 ../../../empire_strikes_back_p2a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c5/ -frames 600 -ss 23:34 ../../../empire_strikes_back_p2a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c6/ -frames 600 -ss 34:24 ../../../empire_strikes_back_p2a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c7/ -frames 600 -ss 44:27 ../../../empire_strikes_back_p2a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c8/ -frames 600 -ss 58:12 ../../../empire_strikes_back_p2a.avi

# mplayer -nosound -vo jpeg -jpeg outdir=./c9/ -frames 600 -ss 73:19 ../../../empire_strikes_back_p2a.avi

# rm c?/0000001.jpg

# for i in `ls c1/000* | sed s/"c1\/"// | sed s/.jpg//`; do ./makemenu $i; done

# cat m00000???.ppm | ppmtoy4m -F 30000:1001 -n 299 |mpeg2enc -n n -f 8 -a 2 -q 2 -o menu1.m1v

# mplex, spumux and all that

# makemenu script:

for i in 1 2 3 4 5 6 7 8 9; do

jpegtopnm c$i/$1.jpg | pnmscale -width 120 > c$i/$1.ppm;

done

pnmcomp -align=left -valign=top -xoff=111 -yoff=24 \

               c1/$1.ppm menu1.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=255 -yoff=42 \

               c2/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=381 -yoff=30 \

               c3/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=534 -yoff=57 \

               c4/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=63 -yoff=141 \

               c5/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=315 -yoff=171 \

               c6/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=478 -yoff=168 \

               c7/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=300 -yoff=264 \

               c8/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

pnmcomp -align=left -valign=top -xoff=471 -yoff=267 \

               c9/$1.ppm m$1.ppm junk.ppm

mv junk.ppm m$1.ppm

rm -v c?/$1.ppm

#done

```

Basically, what i did was transform about 599 frames from the video into jpegs (the first one out of mencoder was always the very first frame of the video file and not related to the proximity of the other frames, so i threw it out) and then shrink them, convert to pnm, and overlay them onto a common background image (you have to select the X and Y coordinates of the buttons here).  the resulting images are then essentially a 'flip book' that you just have to feed into mpeg2enc via ppmtoy4m (note that i am using NTSC stuff, choose your own options to suit yourself best).  voila!  now you have a short movie (about 20 seconds worth in this case, given a frame rate of 29.97) that you can spumux some transparent PNGs onto and make into a nice menu with animated buttons (make sure to not throw out one of the frames that you created so that you can overlay the subtitles with gimp or whatever you are inclined to use).

I'm sure there's an easier way to script this, but i'm a scientist not a programmer...also, programs such as lavtoyuv and y4mtoppm from mjpegtools might make things a bit easier to convert into the initial images, as opposed to using mencoder.  anyways, this is mostly just a starting point and i'm sure that it can be easily improved upon...  :Very Happy: 

----------

## Banko

Is there a way to actually get better quality from transcode, so it is exactly say 4.3 gigs? Because when it's get's done my file is around 2 gigs, and the quality isn't that great compared to the original avi. You can see a lot of blockiness on the tv.

----------

## Negated Void

How large should the dvd menu background m2v file be? Mine's hit fifty megs now, and is taking it's time to encode.

--Murph

----------

## Pink

@ Negative Void

See this link:

clicky click

Upgrade the prog and it solves the problem. I was stuck on this for hours!

----------

## Negated Void

oh wow, fast responce.. you're a savior.. *removes now 200 meg file*

----------

## Negated Void

I'm a little confused, don't i have to tell dvdauthor where the buttons are, or anything? Like, within the menu, i could put them wherever i wanted, correct? How does it know which parts are buttons?

Edit, spoke too soon.

Looks like spumux can do that for me.

I've got four buttons, arranged into a square..

1 2

3 4

kinda thing. Will that work? Is that numbering in the right order?

-Murph

----------

## perbert

 *Negated Void wrote:*   

> I've got four buttons, arranged into a square..
> 
> 1 2
> 
> 3 4
> ...

 

that's the correct order if you specify the spumux XML file to count by rows.  you can also specify columns, which would make it:

1 3

2 4

-b

----------

## Negated Void

Solved, read end of post

Sorry to be a pain  :Wink: 

My newly created .mpg's are out-of-sync.

I just tried the -D 0 part, with no additional luck, any ideas?

transcode -i fma01.avi -V -y mpeg -F d,1 -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o fma01 -D 0 -x mplayer,mplayer

Thanks,

-Murph

Edit

The audio seems to be going somewhat darasticly slower than the video, or the video is decently sped up.

Edit2

Compared with the origional, the video is sped up, the audio is perfect timed.

Edit3

Ah-ha! --pulldown added to command, no problems now!

----------

## Negated Void

Woo-hoo, a dvd has been created.

I've got two problems with it though. The video quality is bad (cmon.. the iso is 1.6 gig, can't i crank up the transcode quality somehow?), and the subtitles (hardcoded) seem to flicker lighter/dimmer (not a feature of the source).

Soo... any clue how to a) get better quality video, and b) remove that flickering effect? (might be caused by my needed use of pulldown..)

Thanks!

-Murph

----------

## Anterion

 *Negated Void wrote:*   

> Woo-hoo, a dvd has been created.
> 
> I've got two problems with it though. The video quality is bad (cmon.. the iso is 1.6 gig, can't i crank up the transcode quality somehow?), and the subtitles (hardcoded) seem to flicker lighter/dimmer (not a feature of the source).
> 
> -Murph

 

What commandline for transcode did you use? One with -y mpeg or with -y mpeg2enc?

----------

## malloc

I know this brokes a little of the post spirit however i've found a program that can take care of the multiple subtitles files problem. 

It is for window$  :Sad:  however it works fine under wine. 

The program is this.

This is a little program that correctly merges several subs files into a single one wich can then be used according to the instructions here. 

I'm sorry this escapes the "linux only" idea of the thread but i thought it's a nice tool to surpass a little problem.

----------

## Negated Void

I was using:

sudo transcode -i fma01.avi -V -y mpeg -F d,1 -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o fma01 -x mplayer,mplayer  --pulldown

and now i just tried with -y mpeg2enc with no really visible difference, the subtitles still seem to flicker, and the quality isn't terribly great

-Murph

----------

## Anterion

 *Negated Void wrote:*   

> the -y mpeg one, should the mpeg2enc one provide better results?

 

Absolutely. If you don't mind to wait for a longer encoding time, I can recommend that you replace mpeg with mpeg2enc and use the following settings:

-w 9000 -F 8,"-4 1 -2 1  -r 24"

You'll need to have the mjpegtools installed for this. There are some more options to tweak quality but this should look ok.

And there's mp2enc for audio, btw (-y mpeg2enc,mp2enc )

See ya,

Anterion

----------

## Negated Void

alrighty, tried that, subtitles look much better, quality got bad though. The file size has reduced to a third of what it was before..?

Also, the audio has become skippy. I think i may be the most problematic transcoder ever!

latest command:

sudo transcode -i fma01.avi -V -y mpeg2enc,mp2enc -w 9000 -F 8,"-4 1 -2 1 -r 24" -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o fma01 -x mplayer,mplayer --pulldown

I dunno if it matters, but i get a:

++ WARN: [mpeg2enc] Frame height won't split into two equal field pictures...

++ WARN: [mpeg2enc] forcing encoding as progressive video

----------

## darksaidin

 *Negated Void wrote:*   

> I think i may be the most problematic transcoder ever!

 

Not quite. I've only been able to encode one single file sofar. All other files on my HDD are "rejected" by transcode - or rather it only creates a 38 byte m2v and a 0 byte mpa.

```

INFO: using reference profile (DVD)

INFO: profile type is (PAL)

INFO: 3:2 pulldown flags enabled

 

INFO:    Min bitrate of any one frame = 200000000 bits

INFO:    Max bitrate of any one frame = 0 bits

INFO:    Min bitrate over any one second = 200000000 bps

INFO:    Avg bitrate over any one second = inf bps

INFO:    Max bitrate over any one second = 0 bps

INFO:    Total time: 34 seconds (00:00:34), 0.00 frames/sec, inf sec/frame.

 

clean up | frame threads | unload modules | cancel signal | internal threads | done

[transcode] encoded 0 frames (0 dropped, 0 cloned), clip length   0.00 s

root@truesource encode #

```

----------

## Negated Void

oh, wow. What's the transcode command you're using? Have you got the -x mplayer,mplayer part?

Sooo... does anyone have any idea what's up with this? Using mpeg2enc, i get a filesize way small. If i put -q in the part passed to mpeg2enc, making it VBR, i can get larger files. Is VBR acceptible for dvd usage, or will it not work w/ dvd players and stuff?

I've also noticed that my video likes to go a little bit, then kinda pauses/jumps a little. The audio also seems to be somewhat skippy, and stops completly about 80% through the video (Even though it's completly in sync untill then)

my current, latest, attempted command is:

sudo transcode -i fma01.avi -V -y mpeg2enc,mp2enc -w 9000 -F 8,"-4 1 -2 1 -r 24 -p -q 3" -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o fma01  -x mplayer,mplayer 

Thanks again..

-Murph

----------

## darksaidin

 *Negated Void wrote:*   

> oh, wow. What's the transcode command you're using? Have you got the -x mplayer,mplayer part?

 

It doesn't seem to matter if I use mplayer or the default transcode. I've tried all those parameters suggested in this thread, but none seemed to work. Either all my files are somehow broken or I'm too stupid to use transcode.  :Wink:  btw, the one file that worked had it's sound out of sync after I remerged the streams  :Wink: 

----------

## revo

Ok, till now I've managed most of the hurdles. The last remaining one is this:

If I have films with different aspects, how do I author them the proper way?

In particular, I have this dvdauthor.xml:

```

<dvdauthor dest="DVD">

  <vmgm>

        <menus>

        <pgc>

          <vob file="/foo/bar/trailers/THX/THX_dvd.mpg"/>

         <post>

                jump titleset 1 menu;

         </post>

        </pgc>

        </menus>

  </vmgm>

  <titleset>

   

     <menus>

    <video aspect="4:3" />

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 2; </button>

        <vob file="menu_final.mpg" pause="inf"/>

      </pgc>

    </menus>

    <titles>

    <video aspect="4:3" />

      <pgc>

        <vob file="/foo/bar/fd1/fd1_dvd.mpg"/>

          <post>

            call menu;

          </post>

      </pgc>

    </titles>

    <titles>

    <video aspect="16:9" />

      <pgc>

        <vob file="/foo/bar/fd2/fd2_dvd.mpg" />

          <post>

            call menu;

          </post>

      </pgc>

    </titles>

  </titleset>

</dvdauthor>

```

I added the aspect-stuff, because: THX_dvd.mpg is 4:3, fd1_dvd.mpg 4:3 and fd2_dvd.mpg is 16:9.

Now, when I author without the aspect-stuff, I always get messages during authoring like "attempting to update from 4:3 to 16:9, skipping" or so.

The result is: THX and fd1 are shown OK, fd2 has "stretched heads".

Now, when I add the stuff forcing aspects, the warning-messages are gone, but the result is the same: THX, fd1 are OK, fd2 has "stretched heads". What am I doing wrong? Isn't it possible at all to put films with different aspects on a dvd? Do I need another menu-structure?

Thanks, revo

----------

## khazad-dum

INFO - Graphic User Interface

Hi all,

here a good GUI for editing and authoring, but the tips wrote by shiznix are always the best!!  :Wink: 

```

lve - (Video editing)

klvemkdvd - (DVD-Authoring)

```

http://lvempeg.sourceforge.net/

```

Menu DVD Author

```

http://qdvdauthor.sourceforge.net/

```

dvd authoring and recording

```

http://dvdstyler.sourceforge.net/

```

Video Editing

```

http://www.uchian.pwp.blueyonder.co.uk/kdenlive.html

Unfortunally there aren't .ebuild (or bug too).

Did you remember 

```

./configure & make & make install ?

```

 :Razz:   :Laughing:   :Razz: 

enjoy

----------

## steelrose

Hi

Can i compile many videos on a dvd and choose between them from a menu?

maybe that is a stupid question but i am new with this stuff

----------

## kram

Hi,

great guide   :Cool: 

I have a few things to add that helped me  :Smile: 

First, resizing videos without stretching heads, here's what I did:

You need to know the aspect of your output video. Mine was 720x576 = 1.25 (I'll call this p). And you need to know the dimensions of your input video, eg. 576x304 (I'll use axb).

So, here's the equation  :Smile: 

x = ((a / p) - b) / 2

For my example: x = ((576 / 1.25) - 304) / 2 = 78.4

Round this number to nearest even integer, so I would use 78.  The number has to be even or it'll muddle up the colours. Now I would use this on the command line options for transcode:

--pre_clip -78,0,-78,0 -Z 720x576

Those options will add the appropriate black bars at the top and bottom of the video and then zoom to the right size for my DVD  :Smile:   From what I can tell from the man page --keep_asr is supposed to do this, but it doesn't work for me.

A couple of other things...

When trying to change the frame rate with transcode I always lost A/V sync. So, I used mencoder:

mencoder -ofps 25.000 -ovc copy -oac copy -o output.avi input.avi

I found that the video needed to be re-encoded if doing this from an mpeg source:

mencoder -ofps 25.000 -ovc lavc -oac copy -o output.avi input.mpg

My DVD player didn't play mp2 audio correctly so I had to encode to ac3 using "-y mpeg2enc,ac3" with transcode

HTH  :Smile: 

----------

## khazad-dum

Another link for linux-dvdauthoring community:

```

KdvdStudio

```

http://kdvdstudio.burgbacher.net/

But:

 *Quote:*   

> 
> 
> The first alpha version of KDVDStudio is to be released in April..
> 
> 

 

I'm waiting !  :Smile: 

----------

## perbert

ok, so...following up on my previous post:  i wrote up a python script that makes it pretty straight forward to make animated buttons for a DVD menu.  the url is http://ewww.scarymonster.net/dvdanimenu/.   by animated buttons, i mean that you can take clips from several videos or pieces thereof and superimpose them on a preselected background image so that there are several distinct subpicture moves playing on the overall videoclip.  something like that, anyways...

basically, the script takes in an XML file and outputs an MPEG2-ES video stream that can be run through 'mplex' or the like to add background audio and then pop it through 'spumux' to add the buttons and all for menu-fulness.

i'm hoping to move this to a sourceforge page soon, so stay tuned.

oh.  caveat:  for now the input video files have to be 'lavtool' compatible.  that is, they have to be MJPEG files.  but that's easy to convert to with 'mencoder'/'transcode', etc.  i'll work on that...

caveat 2: really only have NTSC support now...

 :Very Happy: 

----------

## steelrose

 *Quote:*   

> 
> 
> Hi
> 
> Can i compile many videos on a dvd and choose between them from a menu?
> ...

 

Let me correct this. i just want to make a multi video dvd with a background picture and a menu .I want to make a button for each movie.I am not good at  graphics so i want to use ready staff.how can i do this?

I followed the quide and that went well but i couldn;t make the buttons and background so i tried to author the dvd with TMPEGenc DVD Author in winblows.when i load the .mpg file i get an error that the overall bitrate of the movie is higher than the standard dvd bitrate and i will create a non standard   dvd that will not be played on a standalone player. why is that?

Sorry my english are not very good.i hope you understand my problems and help me

----------

## DooBeDooBeDo

There's also avidemux for creating the mpegs - there's a version in portage, or a CVS ebuild is available here.

----------

## steelrose

 *Quote:*   

> Let me correct this. i just want to make a multi video dvd with a background picture and a menu .I want to make a button for each movie.I am not good at graphics so i want to use ready staff.how can i do this?
> 
> I followed the quide and that went well but i couldn;t make the buttons and background so i tried to author the dvd with TMPEGenc DVD Author in winblows.when i load the .mpg file i get an error that the overall bitrate of the movie is higher than the standard dvd bitrate and i will create a non standard dvd that will not be played on a standalone player. why is that?
> 
> Sorry my english are not very good.i hope you understand my problems and help me

 

please i need help with this.i dont want to use windowz for this task

Acomplete quide would be very useful

----------

## rubeken

how do i have to make the .xml file if i only have 1movie, no intro, no menus, not buttons, just the movie?

----------

## Roguelazer

Anybody happen to notice the Slashdot news article?  :Razz: 

----------

## perbert

 *Roguelazer wrote:*   

> Anybody happen to notice the Slashdot news article? 

 

that would be the one where someone asked about DVD authoring under linux and about 60% of the replies were "bok bok bok iMac this bok bok bok iMac that"?   :Rolling Eyes: 

http://ask.slashdot.org/article.pl?sid=04/03/12/0115229&mode=thread

----------

## RichardNeill

Thanks for a wonderful tutorial!  I found it really useful. Can I add a few comments:

1)You give this line:

```

transcode -i matrix.mpg -V -x mplayer,mplayer -y mpeg -F d -Z 352x288 --export_fps 25 --export_asr 2 -E 48000 -b 224 -o matrix

```

I think you want 

```
-Z 720x576
```

 for PAL. 

It's also really worth using  the option  

```
 -J smartdeinter
```

2)I haven't got toolame, only lame. Another way to generate 2 sec of silence is to use record.

3)A normal DVD is "4.7GB" in size. This is actually only 4.3GB of real files (2^30 vs 10^9). The largest file that can be fitted onto the dvd is 1.0GB, but that is handled by dvdauthor; the .mpg files can be upto 4.3 GB in size.

4)when using mplex, it will default to splitting files at 2GB. This can cause a glitch at the transition, and on reiserfs, it's not necessary.  So use: 

```

mplex -f 8 -S 0 -o outfile.mpg infile.m2v infile.mpa 
```

If you do want mplex to split the files, the output filename needs to contain %d  i.e. 

```

mplex -f 8  -o outfile%d.mpg infile.m2v infile.mpa 
```

This all works great in Mandrake 9.2, except that there is a slight bug in mplex (it ignores -S), so the latest mjpegtools needs to be compiled from source.

Richard

----------

## The Fallen Weeble

Alright, here's an issue I've been running into.  I'm using dvdauthor to create myself a demo reel dvd.  I have all of the components properly built and encoded.  I've spumuxed my menus and created my dvdauthor XML file and ran dvdauthor.

Now here's the issue.  I run xine to test dvdauthor's output and all seems gravy, but there seems to be a problem jumping to the next track, be it a menu or a title.  Basically it plays whatever the first thing is without issue, but can't ever seem to go to the next step.  I either get (when trying to go to a menu):

```

libdvdnav: *** pgci_ut handle is NULL ***

```

or (when trying to go to a title from the menu)

```

libdvdread: Invalid IFO for title 1 (VTS_01_0.IFO).

libdvdnav: ifoOpenVTSI failed - CRASHING!!!

xine: vm.c:204: ifoOpenNewVTSI: Assertion `0' failed.

```

I'm guessing that it could just as easily be a problem with xine as it could be with dvdauthor.  However, xine works with other dvds, so I suspect te issue is more likely to be a dvdauthor one.  This is the test xml file I'm using (and it yields the second error):

```

<dvdauthor dest="dvd">

  <vmgm>

    <menus>

      <pgc>

        <vob file="demo_montage.mpg" />

   <post> jump titleset 1 menu; </post>

      </pgc>

    </menus>

  </vmgm>

  <titleset>

    <menus>

      <pgc>

        <button name="play_demo"> jump title 1; </button>

        <button name="abridged"> jump title 1; </button>

        <button name="unabridged"> jump title 1; </button>

        <vob file="demo_menu.mpg" />

        <post> jump cell 1; </post>

      </pgc>

    </menus>

    <titles>

      <pgc>

        <vob file="demo_montage.mpg" />

        <post> call menu; </post>

      </pgc>

    </titles>

  </titleset>

</dvdauthor>

```

First person to help me figure out what I'm doing wrong gets a copy of the finished dvd.  Any takers?

----------

## The Fallen Weeble

Alright, I think I figured it out.  I never thought to clear out previous dvdauthor test writes before running dvdauthor again.  A quick "rm -rf" of the dest directory and a re-running of dvdauthor on my xml file and everything worked like a charm.

So... just in case anyone else runs into this problem, make sure you delete your last run prior to running dvdauthor with a changed xml file.

----------

## Compugup

@kabutor and @malloc

Sorry for the late response (just found this forum)!

Two subtitles with spumux:

spumux textsubtitles1.xml <input.vob >temp.vob

spumux -s 1 textsubtitles2.xml <temp.vob >output.vob

Now output.vob contains two subtitle streams!

Compugup

----------

## The Fallen Weeble

By the way, I don't know if anyone's already mentioned this, but here's a small tip if you ever decide to author your own dvds:

 make your menus loop longer than 4 seconds if you intend to be seen on regular DVD players.  A computer's DVD-ROM drive caches it and everything runs fine... but regular players don't cache as aggressively, causing the loop to be anything but seamless

----------

## t0nik

I decide to publish my own script for encoding video to mpeg2 for dvdauthor

```
#!/bin/bash

for v in ${*}

do

    ffmpeg -i ${v} -target dvd -mbd 2 -strict 1 -ildct -ilme -an -qmin 2 -pass 1 \

    -y /dev/null && \

    ffmpeg -i ${v} -target dvd -mbd 2 -strict 1  -ildct -ilme -an -qmin 2 -pass 2 \

    -y -map 0:0 ${v%.*}_nosound.vob -ab 224 -map 0:1 ${v%.*}.ac3 && \

    mplayer ${v%.*}_nosound.vob -nosound -dumpvideo -dumpfile ${v%.*}.m2v && \

    mplex -V -f 8 -o ${v%.*}_ffdvd_out.mpg  ${v%.*}.m2v ${v%.*}.ac3 && \

    rm -f ${v%.*}_nosound.vob ${v%.*}.m2v ${v%.*}.ac3 && \

    echo "-=: ${v} succesfully encoded in ${v%.*}_ffdvd_out.mpg :=-"

done

```

Note: i used interlaced material (-ildct -ilme) - my DV-stream, but without (-ildct -ilme) may be encode noninterlaced video.

After scrirt & sorting mpeg's for basic dvd:

```
dvdauthor -o out -a ru /path/to/encoded/mpeg/*.mpg && \

dvdauthor -o out -T && \

growisofs [-dvd-compat] -Z /dev/dvd -V "MY_DVD_VOLUME" -dvd-video out
```

Note: "ru" -my native language; with "-dvd-video" not needed "-dvd-compat"(maintainer info - i don't test it)

PS. Hope this is useful for somebody

PPS. CVS-version of ffmpeg & mplayer recommended for MPEG2 encoding

----------

## m707

 *revo wrote:*   

> Ok, till now I've managed most of the hurdles. The last remaining one is this:
> 
> If I have films with different aspects, how do I author them the proper way?
> 
> 

 

IIRC Scott posts on dvdauthor-users, that you can not change aspect ration within a given titleset, sorry. However, you can use the vmgm menu to jump to different titlesets. IIRC that is the way commercial disks do it, too.

----------

## Sniet Pot

I have been playing around with dvdauthor and the other tools. Great stuff!! But I still have trouble adding subtitles to a movie. I converted the movie from avi to mpg with ffmpeg. Then I add the subtitles (which are in .srt format) to the mpg with spumux, with this xml

```
<subpictures>

   <stream>

      <textsub filename="Madadayo.srt"

         characterset="ISO8859-1" 

         fontsize="28.0"

         font="arial.ttf"

         horizontal-alignment="left" 

         vertical-alignment="bottom"

         left-margin="60"

         right-margin="60" 

         top-margin="20"

         bottom-margin="30"

         subtitle-fps="25" 

         movie-fps="25"

         movie-width="720"

         movie-height="574"

      />

   </stream>

</subpictures>
```

```
arnoud@magret:/Network/Servers/192.168.0.1/export2/dvd $ cat README.txt 

[arnoud@hex dvd]$ spumux Madadayo-subs.xml < Madadayo.avi.mpg > Madadayo.subbed.mpg

DVDAuthor::spumux, version 0.6.8.  Build options: gnugetopt

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Detected subtitle file format: subviewer

INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*

INFO: Read 1401 subtitles

INFO: Adjusted 1 subtitle(s).

INFO: Unicode font: 656 glyphs.

WARN: Sub on line 1 starts before 4s, (some players won't show it)

WARN: Sub on line 2 starts before 4s, (some players won't show it)

WARN:  Read 0, expected 4

INFO: Found EOF in .sub file.

INFO: 1401 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18

Statistics:

- Processed 1401 subtitles.

- The longest display line had 32 characters.

- The maximum number of displayed lines was 2.

- The normal display height of the font arial.ttf was 32.

- The bottom display height of the font arial.ttf was 38.

- The biggest subtitle box had 3680 bytes.

```

Seems to have worked. Now create the DVD layout with DVD autor using this xml:

```
<dvdauthor>

    <vmgm />

    <titleset>

        <titles>

            <pgc>

                <pre>subtitle=0;</pre>

                <vob file="Madadayo.subbed.mpg" />

            </pgc>

        </titles>

    </titleset>

</dvdauthor>
```

But when I play the DVD it shows no subtitles.    :Crying or Very sad: 

I have been fiddling with this for some days now. Googling my fingers sore, but I can't seem to find why it fails. So if anybody can point me in the right direction I would be very thankfull.

----------

## haylocki

Hi, I've had a go at writing an ebuild for lve, but lve fails to compile properly on my system using it.   :Crying or Very sad: 

I was wondering if someone could fix it for me

```

# Copyright 1999-2004 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2

# $Header: $

DESCRIPTION="Linux Video Editor"

HOMEPAGE="http://lvempeg.sourceforge.net"

SRC_URI="http://heanet.dl.sourceforge.net/sourceforge/lvempeg/lve-040322.src.tar.bz2

   http://heanet.dl.sourceforge.net/sourceforge/ffmpeg/ffmpeg-0.4.8.tar.gz"

LICENSE="GPL-2"

SLOT="0"

KEYWORDS="~x86"

IUSE=""

DEPEND=">=x11-base/xfree-4.3.0-r5

   >=media-libs/libsdl-1.2.6-r3

   >=x11-libs/qt-3.3.0-r1"

RDEPEND=""

# This is the version of ffmpeg lve must be compiled against 

FFMPEG="ffmpeg-0.4.8"

src_compile() {

# Create /usr/local dir because this is where lve must be installed

   mkdir -p ${WORKDIR}/usr/local

   mv ${WORKDIR}/lve ${WORKDIR}/usr/local/

   mv ${WORKDIR}/$FFMPEG ${WORKDIR}/usr/local/

   cd ${WORKDIR}/usr/local/lve

   emake || die "emake failed"

}

src_install() {

   einstall || die

}

```

Cheers Ian

----------

## Negated Void

When i try that ffmpeg style encode script, i get this:

```
Input #0, avi, from 'fma01.avi':

  Duration: 00:24:09.4, bitrate: 1017 kb/s

  Stream #0.0: Video: mpeg4, 640x480, 23.98 fps

  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s

Assuming NTSC for target.

Output #0, vob, to '/dev/null':

  Stream #0.0: Video: mpeg2video (hq), 720x480, 23.98 fps, q=2-31, pass 1, 6000 kb/s

Stream mapping:

  Stream #0.0 -> #0.0

[mpeg2video @ 0x401d2468]MPEG1/2 doesnt support 2997/125 fps

Error while opening codec for stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

```

----------

## sushyad

I am trying to burn some video from my Sony TRV17 to a DVD. I used Kino to capture dv2 format. Then I converted the video to NTSC DVD format using transcode 0.6.12. transcode and mplayer are compiled with mmx/sse support. I am surprised that I am never able to achieve speeds more than 7 fps. I have a 2GHz P4, with 1GB PC2100 DDR.

The command line I am using is:

```
transcode -i input.avi -V --export_prof dvd-ntsc -o outout.mpg
```

I converted the same input file using a TMpegEncPlus on a Windows box, and it processes at least 3-4 times faster than transcode/mp2enc (Windows box is 2.4GHz with Rambus though, but still).

Is that normal? What are the speeds achieved by others here?

TIA,

Susheel

----------

## der bastler

First let me say "Great tutorial".

I use it to make my Full-PAL recordings (german television) available in the living room (i.e. playable on stand-alone player). Recently they showed The Hakkenden and now I have to convert nearly 30GB of MJPEG-AVIs...   :Very Happy: 

But one point: stand-alone DVD players cut the edges of my 720x576 movies (aspect ratio defined as 4:3). Several lines and columns are missing on both sides (my menus turn ugly  :Sad: ). Xine displays the movies correctly --even on different computers.

My conversion skript ("schnitt_skript"):

```

#!/bin/bash

transcode -i vox_hakkenden.avi --nav_seek vox_hakkenden.index -V -y mpeg2enc,mp2enc -w 8500 -F 8,"-q 6 -H -4 1 -2 1 -r 32" -Z 720x576 --export_fps 25 --export_asr 2 -E 48000 -b 224 -c $1 -o vox_hakk_temp -J hqdn3d=luma=6:chroma=4.5:luma_strength=15:chroma_strength=11.5:pre=1,yuvmedian,normalize

tcmplex -i vox_hakk_temp.m2v -p vox_hakk_temp.mpa -o $2 -m d

rm vox_hakk_temp.m2v vox_hakk_temp.mpa

```

Usage: 

```
./schnitt_skript 0-250 test.mpg
```

(transcodes the first 250 frames into test.mpg)

Do I miss something? Or do I have to live with this "stand-alone error" (since there are no problems with Xine, Ogle or MPlayer)?

----------

## der bastler

 *sushyad wrote:*   

> 
> 
> Is that normal? What are the speeds achieved by others here?

 

With my schnitt_skript (see above), transcoding from MJPEG to MPEG2 I achieve 5-6 fps without and 2-3 fps with filters applied.

AMD Athlon 2500+ Barton with 512MB DDR-400

----------

## fehlfarbe

very good posting....

thanx a lot for sharing your know how  :Smile: 

----------

## der bastler

Nobody got an idea why rim parts of my full-PAL movie are not displayed on stand-alone DVD players?

I created MPEG-2 movies with a resolution of 720x576 and an aspect ratio of 4:3. Xine, MPlayer, tcprobe, they all detect this.

But on stand-alone DVD players the picture seems to be expanded so that parts are outside of the display's area.

Any ideas  :Question:  The recordings are blocking large parts of my HDD...

----------

## ixtow

I'm sure to be ignored for this, but I'm at my witts end, again.

I cannot perform even the first step of this tutorial, it simply does not work and I can find no reason why.

```
transcode -i matrix.mpg -V -y mpeg -F d -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o matrix
```

```
[export_mpeg.so] could not open mpa codec !
```

I've re-emerged every package prescribed, in every version with an available ebuild.  This task cannot be performed.  Transcode does not function, and/or this codec simply does not exist.

I then also attempted to use the DVD PS export of the newest avidemux.  It worked, and created a video I could view in mplayer and xine.  however, I am unsure if the format was proper because I get this:

```
dvdauthor -x dvdauthor.xml
```

```
dvdauthor.xml:3: parser error : Input is not proper UTF-8, indicate encoding !

ERR:  Error in parsing XML
```

And really, have no control at all over avidemux's behavior in this order.

The UTF-8 statement makes me believe that this is NOT actually an XML formatting issue, but possibly, I can't get the right output from avidemux instead of the prescribed output from the entirely non-functional transcode.

Any help?

----------

## saskatchewan46

What type of file are you trying to encode?  

What really helped me with similar transcoding problems was to copy the video and audio streams to a new file via an example like:

```
mencoder -ofps 29.97 -ovc copy -oac copy -o movie_new.avi movie_orig.avi
```

Also, what does your dvdauthor.xml file contain?  If you can transcode the mpg after avidemux is done with it it may help.

----------

## Blue Lightning

 *der bastler wrote:*   

> Nobody got an idea why rim parts of my full-PAL movie are not displayed on stand-alone DVD players?

 

Are you sure this is not just because of the normal TV overscan? I know TVs are designed so that the image extends off the left and right sides of the screen, historically because the projected image tended to get narrower over time as the TV warmed up, and because of the general inaccuracy of placement of the image in a lot of older TVs. With a PC video card's TV-out the overscan is often quite different to what you normally see from a VCR or normal TV broadcast (in fact sometimes you can adjust it).

----------

## blaasvis

any idea's on multi-languages sound and subtitles ?

i do not have a clue on how to do it !

----------

## pyro139

im a recouvered win user still have it for gaming, but dvd authoring was one last things i been keeping xp for thx for the gret tutorial, ill have print and read over it few times before i do my first project on linux,

if i get brave may even try build a simple gui front end to run all the commands if i get, brave never programed for nix only done win32 apps, but using mono may make easyer since uses alot the same code and syntax as visual studio, well again thx for proving to me that it's worth transfering my dvd-r to my linux box once i get a better vid card in it

 :Laughing: 

----------

## pyro139

orig "Nobody got an idea why rim parts of my full-PAL movie are not displayed on stand-alone DVD players? "

dude its a technology issue dvd players are made 4 4:3 tv's u know the nice slightly rectangualar(not wide screen)flat tubed digital tv's and older tv's are 1:1 and ur transcoding for a wide screen at that

this issue comes up even when encoding on a win32 or mac box

u need creat a safe frame a border around your footage usualy something that blends in but slight black border will work use about 4pixel over needed dimensions on either side of orig vid, most win gui dvd authoring tools show u the safe frame so do good video editors

hope this helps u and didnt confuse fuck out you

----------

## pyro139

 *der bastler wrote:*   

> First let me say "Great tutorial".
> 
> I
> 
> But one point: stand-alone DVD players cut the edges of my 720x576 movies (aspect ratio defined as 4:3). Several lines and columns are missing on both sides (my menus turn ugly ). Xine displays the movies correctly --even on different computers.
> ...

 

dvd video should be 740x480 hope that helps

----------

## der bastler

 *pyro139 wrote:*   

> dvd video should be 740x480 hope that helps

 

No, 720x576 is the correct PAL-DVD resolution, according to http://www.dvdrhelp.com/dvd

I will check which parameter can solve this problem (perhaps wrong pixel aspect ratio?). But our stand-alone DVD player does not read RWs, thus such experiments are a little bit expensive...

----------

## dieter

 *blaasvis wrote:*   

> any idea's on multi-languages sound and subtitles ?
> 
> i do not have a clue on how to do it !

 

all this has become easy now.

you can add multiple audio files now with "mplex"

just multiplex like this:

"mplex -f 8 -V audio1.mp2 audio2.mp2 audio3.mp2 .... video.m2v -o \ dvd.mpg"

And when you author it with dvdauthor, they will be there.

audios are selectable via the menu options in dvdauthor, for exactly how it works, you read the man page of dvdauthor, but s.th. like this:

......

<button name=xx1 >

             audio=0; //whatever audio, you choose it with a number

             subtitle=64; //!!!!!!! or was it 65? 

             jump title 1;

</button>

......

there is many more ways to do it......

with subtitles muxing, read the man page of submux.

hope that helps, (there had been another question about subtitles?!)

ciao

Dieter

----------

## michal65

I followed the instructions on first page but I get this error message at the end even though I have the exact same xml files the first post uses, any ideas?

bash-2.05b$ dvdauthor -x dvdauthor.xml

DVDAuthor::dvdauthor, version 0.6.10.

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

ERR:  Titles already defined

Thanks

----------

## EmAiL

I'm having problems with subtitles and dvdauthor. I want to burn a dvd from a .mpg and a .srt.

Muxing the subtitles (srt) into the mpeg file goes well (I think). But when I watch the mpeg file with different media players I don't see any.

Spumux:

```
 $ cat sublayout.xml

<subpictures>

  <stream>

    <textsub filename="movie.srt" font="arial.ttf" />

  </stream>

</subpictures>

 $ spumux sublayout.xml < movie.mpg > movie-sub.mpg

DVDAuthor::spumux, version 0.6.9.

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 1019 subtitles

INFO: Unicode font: 1185 glyphs.

WARN:  Read 0, expected 4

INFO: Found EOF in .sub file.

INFO: 1019 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18

 

Statistics:

- Processed 1019 subtitles.

- The longest display line had 45 characters.

- The maximum number of displayed lines was 2.

- The normal display height of the font arial.ttf was 32.

- The bottom display height of the font arial.ttf was 46.

- The biggest subtitle box had 3914 bytes.
```

Then I try to use dvdauthor:

```
 $ cat dvdlayout.xml

<dvdauthor dest="/home/emiel/movie/dvd/">

  <vmgm/>

  <titleset>

   <menus>

    <pgc entry="subtitle" />

   </menus>

   <titles>

    <pgc>

     <vob file="movie-sub.mpg"/>

    </pgc>

   </titles>

  </titleset>

</dvdauthor>

 $ dvdauthor -x dvdlayout.xml

DVDAuthor::dvdauthor, version 0.6.9.

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: dvdauthor creating VTS

STAT: Picking VTS 02

 

STAT: Processing movie-sub.mpg...

STAT: VOBU 7456 at 1141MB, 1 PGCS

INFO: Video pts = 0.184 .. 3617.184

INFO: Audio[8] pts = 0.184 .. 3616.288

INFO: Audio[32] pts = 32.064 .. 6868.301

STAT: VOBU 7464 at 1143MB, 1 PGCS

INFO: Generating VTS with the following video attributes:

INFO: MPEG version: mpeg2

INFO: TV standard: pal

INFO: Aspect ratio: 4:3

INFO: Resolution: 352x288

INFO: Audio ch 0 format: mp2/2ch, 20bps

 

STAT: fixed 7464 VOBUS

INFO: dvdauthor creating table of contents

INFO: Scanning /home/emiel/movie/dvd//VIDEO_TS/VTS_01_0.IFO

INFO: Scanning /home/emiel/movie/dvd//VIDEO_TS/VTS_02_0.IFO
```

After authoring:

```
 $ xine dvd://home/emiel/movie/dvd/VIDEO_TS/
```

But no subtitles   :Sad: 

Info about my two video files:

```
 $ mpginfo movie.mpg

warning: couldn't find any valid system header. I'm continuing anyway

movie.mpg

  Mpeg 2 Program Stream File [Video/Audio]

  Muxrate : 10.08 Mbps

  Estimated Duration: 06:45:28.42s

  Aspect ratio 4/3 (TV)

  Interlaced, chroma format: 4:2:0

  Video Format: PAL

  Display Size [720 x 576]

  Size [352 x 288]     25.00 fps    9.80 Mbps

  Audio : Mpeg 1 layer 2

  224 kbps  48000 Hz

  Stereo,  No emphasis

 $ mpginfo movie-sub.mpg

warning: couldn't find any valid system header. I'm continuing anyway

movie-sub.mpg

  Mpeg 2 Program Stream File [Video/Audio]

  Muxrate : 10.08 Mbps

  Estimated Duration: 13:16:21.62s

  Aspect ratio 4/3 (TV)

  Interlaced, chroma format: 4:2:0

  Video Format: PAL

  Display Size [720 x 576]

  Size [352 x 288]     25.00 fps    9.80 Mbps

  Audio : Mpeg 1 layer 2

  224 kbps  48000 Hz

  Stereo,  No emphasis
```

Can anybody tell me what I'm doing wrong ?

Thanks in advance  :Wink: 

----------

## cron0

After reading all this thread, I've finally been able to transcode to DVD with a good quality and good aspect ratio!

My only problem is that after mplexing, my audio is desynced... The audio seem to start playing AFTER the correct video frames...

transcode auto-probe my source with 0ms of correction:

```
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms
```

What can I do? I know I can force AV correction with -D option, but how do I know how many ms to put?

My full transcode command is (i'm encoding to NTSC):

```
transcode -i NarutoEP01.avi -V -y mpeg2enc,mp2enc -w 9000 -F 8,"-4 1 -2 1 -r 24" --export_fps 29.97 -E 48000 -b 224 -o Naruto_01
```

Please help, thank you!!

----------

## dishkuvek

I've been trying to transcode a divx file of 236MB to dvd-ntsc using the method described on the very first post, I let it run for 9 hours before I killed the process.  I have a 1.8GHz and 512 RAM system, is that normal?

----------

## cron0

 *dishkuvek wrote:*   

> I've been trying to transcode a divx file of 236MB to dvd-ntsc using the method described on the very first post, I let it run for 9 hours before I killed the process.  I have a 1.8GHz and 512 RAM system, is that normal?

 

No it's not... What is the full transcode command you are using? Also, are there any errors before it starts transcoding?

Cron0

----------

## dishkuvek

 *JF_Cron0 wrote:*   

>  *dishkuvek wrote:*   I've been trying to transcode a divx file of 236MB to dvd-ntsc using the method described on the very first post, I let it run for 9 hours before I killed the process.  I have a 1.8GHz and 512 RAM system, is that normal? 
> 
> No it's not... What is the full transcode command you are using? Also, are there any errors before it starts transcoding?
> 
> Cron0

 

```

transcode -i input.avi -V --export_prof dvd-ntsc -w 250 -o output

```

and 

```

transcode -i input.avi -V -y mpeg -F d -Z 352x240 --export_fps 29.970 --export_asr 2 -E 48000 -b 224 -o output

```

It produces one warning...

 *Quote:*   

> 
> 
> warning : no option -x found, option -i ignored, reading from "/dev/zero"
> 
> 

 

Which now is making me smack myself, for if transcode is using /dev/zero as its input, of course it will go forever!   :Embarassed: 

Thanks JF_Cron0, I will come back and post when I slap the -x option in there.

----------

## cron0

 *dishkuvek wrote:*   

>  *JF_Cron0 wrote:*    *dishkuvek wrote:*   I've been trying to transcode a divx file of 236MB to dvd-ntsc using the method described on the very first post, I let it run for 9 hours before I killed the process.  I have a 1.8GHz and 512 RAM system, is that normal? 
> 
> No it's not... What is the full transcode command you are using? Also, are there any errors before it starts transcoding?
> 
> Cron0 
> ...

 

transcode will require the -x option only if the input source format/codec cannot be auto-detected... From what I can understand, it didn't detect a proper format from your input source... Thus, you need to specify the format with -x vmod[,amod] ... See the transcode documentation page for more info: http://zebra.fh-weingarten.de/~transcode/

----------

## dishkuvek

Right, they were in WMV, tricked me because of the .avi endings.  Teaches me to look further than just the extentions.  After running them through mencoder, transcode worked perfectly.

----------

## dishkuvek

Could some one tell me what options I would need to add to transcode to accomplish: VBR video encoding and 16:9 letterbox aspect ratio?  I was reading the transcode man page, but I am having a hard time figuring it out.

----------

## ydleiF

Hello.

I'm using a DV camera attached via firewire, and i use kino to pull it down into raw DV, then use kino again to export to the proper format. Then I use dvdauthor to create the structure.

My question is how do I create a blank or minimalistic menu? I don't want a menu at all, so what's the minimum? I couldn't figure out the XML.

I was able to get dvdauthor to do it, but once I wrote it with growisofs, it wouldn't play in a standalone player, nor play as a regular dvd movie on linux. I had to mount it and point it at the VOB's.

Here is my XML, which sort-of worked (note the comments!):

```

<dvdauthor dest="DVD">

 <vmgm />

    <titleset>

<!--

     <menus>

       <pgc>

         <button> jump title 1; </button>

         <button> jump title 2; </button>

         <vob file="matrix_menu_final.mpg" pause="inf"/>

       </pgc>

     </menus>

-->

     <titles>

       <pgc>

         <vob file="my-crap.mpeg"/>

           <post>

             call menu;

           </post>

       </pgc>

     </titles>

<!--

     <titles>

       <pgc>

         <vob file="outtakes_dvd.mpg" />

           <post>

             call menu;

           </post>

       </pgc>

     </titles>

-->

   </titleset>

 </dvdauthor>

```

----------

## Kraymer

 *kram wrote:*   

> .......
> 
> When trying to change the frame rate with transcode I always lost A/V sync. So, I used mencoder:
> 
> mencoder -ofps 25.000 -ovc copy -oac copy -o output.avi input.avi

 

You should try to use the modfps filter (which takes care of sync issues when changing the frame rate):

```
transcode -i something -y mpeg -J modfps --export_fps 25 -o output
```

Hope that helps

Thanks for the guide, I'm eager to try it soon   :Smile: 

Sebastian

----------

## hippysurfer

I have a slightly odd issue. 

I want to use my Linux box to build the DVD but the only DVD burner I have is on a Windows laptop. 

How can I use the Windows box to burn the DVD image that is produced from following the howto?

Regards

Richard

PS. I would like to add my voice to the chorus of thanks for this thread.

----------

## Kraymer

 *hippysurfer wrote:*   

> How can I use the Windows box to burn the DVD image that is produced from following the howto?

 

Nero should do it - at least the dvd-version (obviously). 

It's quite normal (i guess) that people get dvd-capable software directly when buying a notebook with a dvd-drive builtin?

Also there is the built-in burning app (WinXP), but I don't know if it supports dvd-isos.

----------

## knobunc

I am having a problem playing back my encoded video to test it.

The transcode line I used was:

transcode -i tick_01x01.avi -V -y mpeg -F d -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o tick_01x01

The source file is a 320x240 24bpp 29.970 fp sDIVX AVI file that I can play in mplayer.

When I try to play the result from the transcode in mplayer I get:

```
MPlayer 1.0pre4-3.3.3 (C) 2000-2004 MPlayer Team

 

CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino 1669 MHz (Family: 6, Stepping: 2)

Detected cache-line size is 64 bytes

MMX supported but disabled

MMX2 supported but disabled

SSE supported but disabled

3DNow supported but disabled

3DNowExt supported but disabled

CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0

Compiled for x86 CPU with extensions:

 

Reading config file /usr/share/mplayer/mplayer.conf

Reading config file /home/fiji/.mplayer/config

Reading /home/fiji/.mplayer/codecs.conf: Can't open '/home/fiji/.mplayer/codecs.conf': No such file or directory

Reading /usr/share/mplayer/codecs.conf: 66 audio & 176 video codecs

font: can't open file: /home/fiji/.mplayer/font/font.desc

Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)

Failed to open /dev/rtc: No such file or directory (/dev/rtc should be readable by the user.)

Using usleep() timing

Can't open input config file /home/fiji/.mplayer/input.conf: No such file or directory

Input config file /usr/share/mplayer/input.conf parsed: 53 binds

 

Playing tick_01x01.mpg.

Cache fill:  0.00% (0 bytes)    MPEG-PS file format detected.

VIDEO:  MPEG2  352x240  (aspect 2)  29.970 fps  9800.4 kbps (1225.0 kbyte/s)

==========================================================================

Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

MP3lib: init layer2&3 finished, tables done

AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 28000->192000 (224.0 kbit)

Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)

==========================================================================

vo: X11 running at 1600x1200 with depth 16 and 16 bpp (":0.0" => local display)

==========================================================================

Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough

VDec: vo config request - 352 x 240 (preferred csp: Mpeg PES)

Could not find matching colorspace - retrying with -vf scale...

Opening video filter: [scale]

The selected video_out device is incompatible with this codec.

VDecoder init failed :(

Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1

Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))

==========================================================================

Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...

AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int

AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)

alsa-init: requested format: 48000 Hz, 2 channels, Signed 16-bit (Little-Endian)alsa-init: 1 soundcard found, using: hw:0,0

alsa1x: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little EndianAO: [alsa1x] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)

Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...

Starting playback...

VDec: vo config request - 352 x 256 (preferred csp: Planar YV12)

VDec: using Planar YV12 as output csp (no 0)

Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.

VO: [xv] 352x240 => 352x264 Planar YV12

 

 

MPlayer interrupted by signal 11 in module: calc_sleep_time

- MPlayer crashed by bad usage of CPU/FPU/RAM.

  Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and

  disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.

- MPlayer crashed. This shouldn't happen.

  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your

  gcc version. If you think it's MPlayer's fault, please read

  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and

  won't help unless you provide this information when reporting a possible bug.

```

I am not sure if my transcode is generating a bad file or if my mplayer is hosed.  Any suggestions would be appreciated.

I am also not clear on what I want my aspect settings to be... Ideally I would add black bands on the sides rather than changing the aspect ratio, but I can not get --keep_asr to work...

Thanks,

-ben

----------

## Wyckliff

Thanks to everyone for posting their tips.  This is an awesome thread!  I've been reading up on this topic from other forums after searching in vain for a GUI DVD authoring tool to fit my needs.  I've written a Perl script to take a directory of MPEGs and create normal, highlighted, and selected menu button images from the file names (using Gimp::Fu), create the spumux and dvdauthor XML files, create the menu mpg with spumux, remux the MPEGs into VOBs, and then finish up with dvdauthor and mkisofs.  I'd be willing to post the code if anyone is interested (NTSC).Last edited by Wyckliff on Fri May 21, 2004 3:00 pm; edited 1 time in total

----------

## knobunc

Ok... strangeness.  It appears that the problem is with the transcode (although mplayer shouldn't crash) because if I use avidemux to make an mpeg2 I can play it.

Here is the information I get when I play the avidemux version:

```

MPlayer 1.0pre4-3.3.3 (C) 2000-2004 MPlayer Team

 

CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino 1669 MHz (Family: 6, Stepping: 2)

Detected cache-line size is 64 bytes

MMX supported but disabled

MMX2 supported but disabled

SSE supported but disabled

3DNow supported but disabled

3DNowExt supported but disabled

CPUflags:  MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0

Compiled for x86 CPU with extensions:

 

Reading config file /usr/share/mplayer/mplayer.conf

Reading config file /home/fiji/.mplayer/config

[cfg] read config file: /home/fiji/.mplayer/gui.conf

Reading config file /home/fiji/.mplayer/gui.conf

vo: X11 running at 1600x1200 with depth 16 and 16 bpp (":0.0" => local display)

Reading /home/fiji/.mplayer/codecs.conf: Can't open '/home/fiji/.mplayer/codecs.conf': No such file or directory

Reading /usr/share/mplayer/codecs.conf: 66 audio & 176 video codecs

font: can't open file: /home/fiji/.mplayer/font/font.desc

Font /usr/share/mplayer/font/font.desc loaded successfully! (206 chars)

Failed to open /dev/rtc: No such file or directory (/dev/rtc should be readable by the user.)

Using usleep() timing

Can't open input config file /home/fiji/.mplayer/input.conf: No such file or directory

Input config file /usr/share/mplayer/input.conf parsed: 53 binds

SKIN dir 1: '/home/fiji/.mplayer/Skin'

SKIN dir 2: '/usr/share/mplayer/Skin'

 

Playing /home/fiji/DVD/tick_01x01.mpg.

MPEG-PS file format detected.

VIDEO:  MPEG2  352x240  (aspect 2)  29.970 fps  1500.0 kbps (187.5 kbyte/s)

==========================================================================

Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

MP3lib: init layer2&3 finished, tables done

AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 28000->192000 (224.0 kbit)

Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)

==========================================================================

==========================================================================

Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough

VDec: vo config request - 352 x 240 (preferred csp: Mpeg PES)

Could not find matching colorspace - retrying with -vf scale...

Opening video filter: [scale]

The selected video_out device is incompatible with this codec.

VDecoder init failed :(

Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1

Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))

==========================================================================

Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...

AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int

AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)

alsa-init: requested format: 48000 Hz, 2 channels, Signed 16-bit (Little-Endian)alsa-init: 1 soundcard found, using: hw:0,0

alsa1x: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little EndianAO: [alsa1x] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)

Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...

Starting playback...

VDec: vo config request - 352 x 240 (preferred csp: Planar YV12)

VDec: using Planar YV12 as output csp (no 0)

Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.

VO: [xv] 352x240 => 352x264 Planar YV12

alsa-uninit: pcm closed-0.001 ct:  0.063  224/224   7%  2%  1.3% 1 0 89%

```

As far as I can tell everything is the same as the transcoded file (in terms of how gmplayer is handling it).

What am I doing wrong?

Thanks,

-ben

----------

## slaterson

Wyckliff, please post the code.  I'm very interested...

----------

## slaterson

 *shiznix wrote:*   

> 
> 
> For NTSC:
> 
> [code]transcode -i matrix.mpg -V -y mpeg -F d -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o matrix
> ...

 

i have an mpg i encoded from a tv capture.  after running transcode with the above command, the resulting video only shows a green screen.  i have tried mplex-ing it to the dvd format and playing the resulting mpg file and i have tried to play the .m2v file directly also.

this happens when running the video through mplayer for transcoding also.

any ideas?  i'm new to the video editing/dvd creating world.

thanks,

slate

----------

## Wyckliff

This is a Perl script to take a directory of mpgs and create a DVD with a still menu.  Be sure to have the required Perl modules installed, plus the following packages (some of these packages are currently masked)

media-video/mjpegtools >= 1.6.2-r1 (for jpeg2yuv, mplex, ppmtoy4m)

media-sound/toolame

media-video/mpgtx

media-video/dvdauthor >= 0.6.8

app-cdr/cdrtools (for mkisofs, cdrecord)

```

#!/usr/bin/perl

# Turn a directory of mpgs into a DVD-Video file structure ISO image.

# This script runs smoothly when you pass a directory name as the first argument

# and the directory contains your mpgs in alpha-numeric order, plus one jpg.

# The button images are created by Gimp from the mpg file names.

# The jpg is used as a still for the menu, with the file names imposed.

# Remux the source mpgs, run through dvdauthor.

# If all is successful, the DVD file structure is made into an image and burned to disc.

use Gimp ":auto"; 

use Gimp::Fu;

use Term::ReadKey;

#Gimp::set_trace(TRACE_ALL);

$SIG{'INT'} = "katch";

our $src = shift || &Prompt("source directory");

chomp $src;

our $ssrc = $src;

our $image = `basename "$src"`;

chomp $image;

$image.=".iso";

our @mpgs;

our @parms;

our $fontSize = 18;

our $temp = "temp";

our $status;

our $stateFileName = "/tmp/.mkdvd.status";

our $stateFile;

our $dvdauthorFileName = "/tmp/dvdauthor.xml";

our $XML;

our $spumuxFileName = "/tmp/spumux.xml";

our $spumuxFile;

our $bgImageFileName;

our $menuFileName = "/tmp/menu.mpg";

my ($answer, $count);

&getStatus();

if($status && "$ssrc" eq "$src") {

  print "An earlier session was aborted.  Should I continue creation of that DVD? ";

  chomp($answer=<STDIN>);

  $status = "initialize" unless($answer =~ /y/i);

} else {

  $status = "initialize";

  &setStatus($status);

}

while("$status" ne "done") {

  $status->();

}

unlink("$stateFileName");

exit;

sub initialize {

  my $answer;

  if(-d "$temp") {

    print "The \"$temp\" directory must be cleaned.  Continue? ";

    chomp($answer=<STDIN>);

    unless($answer =~ /y/i) { exit; }

    exit 1 if(system("/bin/rm -fr \"$temp\""));

  }

  mkdir "$temp";

  &setStatus("makeAuxFiles");

}

sub makeAuxFiles {

# get file names from src directory and use them to create the XML

# and menu button images and convert them into a menu mpg

  my (@images, $XML, $parms);

  (@images) = `ls "$src"/*.jpg`;

  $bgImageFileName = $images[0];

  chomp $bgImageFileName;

  unless(-f "$bgImageFileName") {

    print "Could not find image in $src to use as a background.\n";

    $bgImageFileName = &Prompt("background image");

  }

  

  @mpgs = `ls "$src"/*.mpg`;

  &writeDvdauthorXml();

  &writeSpumuxXml();

  my $parmcount = 0;

  my $titlecount = 1;

  $parms->[$parmcount++] = 

    [PF_STRING, "normal", "Normal button color", "blue"];

  $parms->[$parmcount++] = 

    [PF_STRING, "highlighted", "Highlighted button color", "red"];

  $parms->[$parmcount++] = 

    [PF_STRING, "selected", "Selected button color", "tan"];

  $parms->[$parmcount++] = 

    [PF_INT, "size", "Font size", $fontSize];

  foreach $_ (@mpgs) {

    chomp;

    s/\.mpg//;

    s/.*\///;

    $parms->[$parmcount++] = 

      [PF_STRING, "title$titlecount", "Title$titlecount", $_];

    $titlecount++;

  }

  register "createdvdmenu", "Create normal, highlighted, and selected menu buttons", 

    "Create DVD Menus", "Wyckliff", "Wyckliff", "2004-05-10",

    "<Toolbox>/Xtns/Perl-Fu/DVD/Create Menu",

    "RGBA",

    $parms,

    \&createMenus;

  main();

#  exit 1 if(system("pngtopnm \"$bgImageFileName\" | ppmtoy4m -F 30000:1001 -I p -A 10:11 -L | mpeg2enc -f 8 -n n -o background.m2v"));

# it's better to have a clip > 4 sec to mux the subtitles into

  system("pwd");

  exit 1 if(system("jpeg2yuv -n 150 -I p -f 29.97 -j \"$bgImageFileName\" | mpeg2enc -f 8 -n n -o /tmp/background.m2v"));

  exit 1 if(system("dd if=/dev/zero bs=4 count=1602 | toolame -b 128 -s 48 /dev/stdin /tmp/silence.mp2"));

  exit 1 if(system("mplex -f 8 -o /dev/stdout /tmp/background.m2v /tmp/silence.mp2 | spumux -v 2 \"$spumuxFileName\" > \"$menuFileName\""));

  unlink("/tmp/background.m2v");

  unlink("/tmp/silence.mp2");

  unlink("$temp/main.png");

  unlink("$temp/mainh.png");

  unlink("$temp/mains.png");

  unlink("$spumuxFileName");

  &setStatus("remux");

}

sub writeDvdauthorXml {

  open($XML, ">$dvdauthorFileName") or die "Could not open $dvdauthorFileName: $!\n";

  print $XML "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";

  print $XML "<dvdauthor dest=\"$temp\">\n";

  print $XML "  <vmgm>\n";

  print $XML "    <menus>\n";

  print $XML "      <pgc entry=\"title\">\n";

  print $XML "        <vob file=\"$menuFileName\" pause=\"inf\"/>\n";

  for($count=1; $count<=@mpgs; $count++) {

    chomp; 

    print $XML "        <button>jump title $count;</button>\n";

  }

  print $XML "      </pgc>\n";

  print $XML "    </menus>\n";

  print $XML "  </vmgm>\n";

  print $XML "  <titleset>\n";

  print $XML "    <menus>\n";

  print $XML "      <pgc entry=\"root\">\n";

  print $XML "        <post>jump vmgm menu;</post>\n";

  print $XML "      </pgc>\n";

  print $XML "    </menus>\n";

  print $XML "    <titles>\n";

  for($count=0; $_=$mpgs[$count]; $count++) {

    chomp;

    print $XML "      <pgc>\n";

    print $XML "        <vob file=\"$temp/title$count.vob\" ";

    printf($XML "%s\/>\n", &printChapters($_));

    print $XML "        <post>call vmgm menu;</post>\n";

    print $XML "      </pgc>\n";

  }

  print $XML "    </titles>\n";

  print $XML "  </titleset>\n";

  print $XML "</dvdauthor>\n";

  close $XML;

}

sub writeSpumuxXml {

  open($spumuxFile, ">$spumuxFileName") or die "Could not open $spumuxFileName: $!\n";

  print $spumuxFile "<subpictures>\n";

  print $spumuxFile "  <stream>\n";

  print $spumuxFile "    <spu\n";

  print $spumuxFile "      force=\"yes\"\n";

  print $spumuxFile "      start=\"00:00:04.00\"\n";

  print $spumuxFile "      image=\"$temp/main.png\"\n";

  print $spumuxFile "      highlight=\"$temp/mainh.png\"\n";

  print $spumuxFile "      select=\"$temp/mains.png\"\n";

  print $spumuxFile "      autooutline=\"infer\"\n";

  print $spumuxFile "      outlinewidth=\"10\"\n";

  print $spumuxFile "      autoorder=\"rows\">\n";

  print $spumuxFile "    </spu>\n";

  print $spumuxFile "  </stream>\n";

  print $spumuxFile "</subpictures>\n";

  close $spumuxFileName;

}

sub createMenus {

  my @titles = @_;

  my $xoffset = 30;

  my $xinc = 30;

  my $yoffset = 40;

  my ($position, @colors, $color);

  my ($img, $drw, $text);

  push(@colors, shift(@titles));

  push(@colors, shift(@titles));

  push(@colors, shift(@titles));

  my $size = shift(@titles);

  foreach $color (@colors) {

    $position = $xoffset;

    $img = gimp_image_new(720, 480, RGB);

    # Create a new layer and draw it to the image at the top

    $drw = gimp_layer_new($img, $img->width, $img->height,

                    RGBA_IMAGE, "BG", 100, NORMAL_MODE);

    gimp_image_add_layer($img, $drw, -1);

    gimp_palette_set_background("black");

    gimp_edit_clear($drw);

    gimp_palette_set_foreground($color);

    my $border = 10;

    foreach $text (@titles) {

      my $text_layer = gimp_text($drw, $yoffset, $position, $text, $border, 0,

          $size, PIXELS, "Adobe", "Times", "Medium", "R", "*", "*", "*", "*");

      gimp_floating_sel_anchor($text_layer);

      $position += $xinc;

    }

    unless(-e "$temp/main.png") {

      file_png_save($img, $drw, "$temp/main.png", "$temp/main.png", 0, 6, 1, 0, 0, 1, 1);

      next;

    }

    unless(-e "$temp/mainh.png") {

      file_png_save($img, $drw, "$temp/mainh.png", "$temp/mainh.png", 0, 6, 1, 0, 0, 1, 1);

      next;

    }

    file_png_save($img, $drw, "$temp/mains.png", "$temp/mains.png", 0, 6, 1, 0, 0, 1, 1);

  }

  return $img;

}

sub remux {

  my $count = 0;

  my $f;

  foreach $f (`ls "$src"/*.mpg`) {

    chomp $f;

    exit 1 if(system("mpgtx -f -d \"$f\" -b \"$temp/title$count\""));

    exit 1 if(system("mplex -f 8 -o \"$temp/title$count.vob\" \"$temp/title$count-0.mp2\" \"$temp/title$count-0.m2v\""));

    exit 1 if(system("rm -f \"$temp/title*.mp2\" \"$temp/title*.m2v\""));

    $count++;

  }

  &setStatus("author");

}

sub author {

  system("/bin/rm -fr \"$temp/VIDEO_TS/*\"");

  exit 1 if(system("dvdauthor -x $dvdauthorFileName"));

  unlink("$menuFileName");

  exit 1 if(system("rm -f \"$temp/*.vob\""));

  unlink("$dvdauthorFileName");

  &setStatus("mkisofs");

}

sub mkisofs {

  exit 1 if(system("mkisofs -dvd-video -o \"$image\" \"$temp\""));

  exit 1 if(system("rm -fr \"$temp\""));

  &setStatus("burn");

}

sub burn {

  exit 1 if(system("cdrecord -v -dao driveropts=burnfree \"$image\""));

  &setStatus("done");

}

sub printChapters {

  my $file = shift;

  my $length = shift || 10;

  if("$file" eq "") { return; }

  my $guess = 60;

  my @stat = stat($file);

  my $size = $stat[7]/1048576;

  my $rate = `mpginfo "$file" | grep Mbps | tail -n 1 | awk \'{print \$7}\'`;

  chomp $rate;

  if(!$rate) { 

    print "Error: could not find bitrate of file $file\n";

    exit 1;

  }

  my $num = $size/$rate/$guess;

  my $ret = "chapters=\"0";

  my $pit = 0;

  my $i;

  for($i=1; $i<$num; $i++) {

    $pit += $length;

    $ret .= ",$pit:00";

  }

  $ret .= "\"";

  print "file $file\n\t$ret\n";

  return $ret;

}

sub katch {

  print STDOUT "Caught interrupt, exiting...\n";

  exit 1;

}

sub setStatus {

  $status = shift;

  open($stateFile, ">$stateFileName") or return;

  print $stateFile "$src\n$status\n";

  close($stateFile);

}

sub getStatus {

  open($stateFile, "<$stateFileName") or return;

  chomp($image=<$stateFile>);

  $image = `basename "$image"`;

  chomp $image;

  $image.=".iso";

  chomp($status=<$stateFile>);

  close($stateFile);

}

sub Prompt

{

  my $var = shift;

  my $val;

  ReadMode "noecho" if($var =~ /passw/);

  print "Please enter $var: ";

  chomp($val=<STDIN>);

  print "\n" if($var =~ /passw/);

  ReadMode "normal";

  return($val);

}

```

Note: found a bug with the above code and changed it in place.

----------

## bplatt_uk

In the latest dvdauthor - 0.6.10 - the titleset definition example given at the start of this thread no longer works: 

 *shiznix wrote:*   

> 
> 
> ```
>  <titleset>
> 
> ...

 

The issue is that multiple <titles>...</titles> blocks are no longer permitted since each <pgc>...</pgc> block defines a title within a titleset.  

The correct form of the previous XML fragment, which is the only form that will work in 0.6.10, is: 

```
 <titleset>

    <menus>

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 2; </button>

        <vob file="matrix_menu_final.mpg" pause="inf"/>

      </pgc>

    </menus>

    <titles>

      <pgc>

        <vob file="matrix_dvd.mpg"/>

          <post>

            call menu;

          </post>

      </pgc>

      <pgc>

        <vob file="outtakes_dvd.mpg" />

          <post>

            call menu;

          </post>

      </pgc>

    </titles>

  </titleset> 

```

Regards,

Barry

----------

## Surye

Maybe there's a reason you don't use it, but I have noticed -y ffmpeg -F mpeg2 to be almost double encoding speed. And doesn't a video-dvd need atleast one ac3 track? o.0 One more thing, isn't ntsc's dvd resolution 720x480? why the 352x240?

----------

## kilativv

Using any of the described above methods for NTSC i get half of the screen green on my Toshiba DVD player. The sound works, no errors during encoding. 

Did anyone got any similar problems?

Thanks

----------

## slaterson

 *kilativv wrote:*   

> Using any of the described above methods for NTSC i get half of the screen green on my Toshiba DVD player. The sound works, no errors during encoding. 
> 
> Did anyone got any similar problems?
> 
> Thanks

 

i get this exact problem on some video files.  on others, i get a _full_ green screen.  so far, no explanation for it.

----------

## Kanniball

anybody has tried avidemux2???

it seems that this can so the job...

*  media-video/avidemux

      Latest version available: 2.0.22

      Latest version installed: 2.0.22

      Size of downloaded files: 2,810 kB

      Homepage:    http://fixounet.free.fr/avidemux/

      Description: Great Video editing/encoding tool

      License:     GPL-2

----------

## dishkuvek

I think that bplatt_uk's earlier post should be noted, I ran into this problem as well.

In addition to that, avidemux is an amazing program, it has a nice gtk2 interface as well.  The only problem is that it's documentation needs some work.  This will come in time no doubt.  I've been trying to do all the things in avidemux that I have been doing with transcode.  Almost everything is there, however it is a little easier to batch transcode since it is command line.  Not that avidemux does not have a cli, it is just not as full featured as its GUI.

----------

## kilativv

This problem is really strange. I can't understand what is causing that stupid green.

With the stuff posted here all files I tried to encode have that strange fenomena.

I was also able to find this script

http://fredrik.hubbe.net/hacks/mkdvd.html (might be useful for somebody too)

Here is the tcprobe of the file that encodes fine with mkdvd

```

[tcprobe] RIFF data, AVI video

[avilib] V: 24.000 fps, codec=DIV3, frames=2882, width=320, height=240

[avilib] A: 44100 Hz, format=0x55, bits=0, channels=2, bitrate=159 kbps,

[avilib]    2871 chunks, 2399634 bytes, CBR

[tcprobe] summary for blur.avi, (*) = not default, 0 = not detected

import frame size: -g 320x240 [720x576] (*)

       frame rate: -f 24.000 [25.000] frc=2 (*)

      audio track: -a 0 [0] -e 44100,0,2 [48000,16,2] -n 0x55 [0x2000] (*)

                   bitrate=159 kbps

           length: 2882 frames, frame_time=41 msec, duration=0:02:00.083

```

This one becomes half green:

```

[tcprobe] MPEG program stream (PS)

[tcprobe] summary for Korol' i Shut-Eli Mjaso Muzhiki.mpg, (*) = not default, 0 = not detected

import frame size: -g 352x288 [720x576] (*)

     aspect ratio: 4:3 (*)

       frame rate: -f 25.000 [25.000] frc=3

                   PTS=47721.8588, frame_time=40 ms, bitrate=1150 kbps

      audio track: -a 0 [0] -e 44100,16,2 [48000,16,2] -n 0x50 [0x2000] (*)

                   bitrate=224 kbps

```

I noticed that second one is some kind of MPEG, but i doubt if it is a proper DVD mpeg...

I'm completely confused.

----------

## slaterson

```
[tcprobe] MPEG program stream (PS)

[tcprobe] summary for mmw-sessions.mpg, (*) = not default, 0 = not detected

      audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x50 [0x2000] (*)

                   PTS=1762.7190, bitrate=192 kbps

```

here is my tcprobe for the mpeg (pre-demux) that turns green.  notice that it shows no video info, only audio, howeve when i play the video in totem it works just fine.

also, after demuxing the video the raw video file (m2v) is green.  maybe transcode is having a problem with the file?

----------

## phekko

Thanks for the great tutorial. I don't think I'd be making DVDs without it.

For some odd reason I didn't get  that example XML to work, it complained about titles already being defined and suchlike. Just in case someone is interested, here's my version of it, for a menu with 3 buttons in it:

 *Quote:*   

> 
> 
> <dvdauthor dest="DVD">
> 
> <vmgm>
> ...

 

After careful studying of the board I noticed someone had already posted something on this. Sorry. Nevertheless, I leave this here just in case someone has use of it.

----------

## fireboy1919

Hey, not sure if anybody is actually still reading this thread, especially not this far down, but if you are, I've got something new.

I went through this process and was bugged by the "then make your titlesets in gimp" step.

So I wrote something that'll create the title sets automatically from picture files and sound files using the Gimp and perl.  It outputs an mpg file for use with dvdauthor (spumux step already done).

You can find it here:

http://rustyp.freeshell.org/projects/titlemaker.tar.gz

----------

## bogler

I have tried many different transcode commands to create a DVD from an avi but whatever i try i get major audio/visual syncing problems. Syncing is usually about 5 - 7 seconds.

Has anyone else experienced these issues and perhaps overcome them? I would like to get some of my larger avi's onto DVD but the syncing issues make the DVD unwatchable.

I am not at my machine or i would post the exact commands i use. I have tried transcoding on a number of avi and mpg files but they all seem to give the same result i.e. poor av sync

Any help greatfully received - i am a video noob so please go easy   :Smile: 

----------

## zuki

got the same probelem:

solv it like this:

convert it to avi again to make a real audio layer:

mencoder -o yournewmovie.avi -ovc lavc -oac lavc -ofps 25 yourmovie.avi

when it fails try to add somthing from that:

 -srate 32000 

-srate 22050

-srate 48000

Then make the transcode stuff!

----------

## bogler

 *zuki wrote:*   

> got the same probelem:
> 
> solv it like this:
> 
> convert it to avi again to make a real audio layer:
> ...

 

Thanks Zuki

I will try this out. Have you had much success with large avi files?

----------

## zuki

No Problems. On my website you can download a little script which detect the file extension and makes real good dvds. It creates also automaticaly the graphical dvdmenu and the dvdauthor files. The only one you have give it is the resolution and the filenames like this:

./mkdvd.sh -r 352x288 -f mov/* [-o] 

the -o is only when you want to decode it all to avi first. Here is the script, but you need the images.... So contact me or download it from http://www.technikz.de

here is the script whithout the files....  

```

#!/bin/bash

tput clear

function packs

        {

        echo "YOU NEED THE FOLLOWING PACKAGES:"

        echo "mplex     --      http://mjpeg.sourceforge.net/"

        echo "mencoder  --      http://www.mplayerhq.hu/"

        echo "transcode --      http://zebra.fh-weingarten.de/~transcode/"

        echo "dvdauthor --      http://sourceforge.net/projects/dvdauthor/"

        echo "jpeg2yuv  --      http://mjpeg.sourceforge.net/"

        echo "mpeg2enc  --      http://www.mpeg.org || http://mjpeg.sourceforge.net/"

        echo "convert   --      http://www.imagemagick.org/"

        echo "composite --      http://www.imagemagick.org/"

        echo "toolame   --      http://www.planckenergy.com"

        }

function usage()

        {

        echo "-----"

        echo "Usage:"

        echo "$0 -r resolution -f filename[s] [-o]"

        echo ""

        echo "Options:"

        echo " -r resolution (e.g. 768x576 or 352x288) "

        echo "-f files "

        echo "-o (other than mpg files)"

        echo "use -o when this is no mpg file "

        echo "(files which ends whith mpg MPG mpeg "

        echo "MPEG MPA or mpa will be detect "

        echo "automatic as mpeg files) "

        echo "or when you have trouble with the audio...."

        echo ""

        echo "Example:"

        echo "$0 -r 352x288 -f mymovies/* -o"

        echo "-----"

        }

function checkenvcom()

        {

        echo "checking for $1 ...."

        which $1 &> /dev/null

        if [ ! $? -eq 0 ]

        then

                echo "no $1 found :-("

        packs

        exit

        else

                echo "$1 found :-)"

        fi

        }

## check the needed packets

echo "      \|||/"

echo "      (o o)"

echo "-oOO---------OOo"

checkenvcom mplex

checkenvcom transcode

checkenvcom dvdauthor

checkenvcom mencoder

checkenvcom jpeg2yuv

checkenvcom mpeg2enc

checkenvcom convert 

checkenvcom composite 

checkenvcom toolame 

if [ "$#" -eq 0 ]

then 

        usage

        exit 

fi 

while getopts ":hr:of:" OPTIONS

do

        case $OPTIONS in

                h )     packs

                        usage

                        exit;;

                r)      RESOLUTION=$OPTARG

                        echo ""

                        echo "Set resolution to $RESOLUTION"

                        echo ""

                        ;;

                o)      echo ""

                        echo "NO MPEG files"

                        echo "Attention files will be encoded to avi first!!!"

                        echo "This will need more diskspace"

                        MPEGFILE="1"

                        ;;

                f)      for mydat in $*;

                                do

                                if [ ${mydat:0:1} != "-" ] && [ "$mydat" != "$RESOLUTION" ]

                                then

                                        MYFILES=$MYFILES" "$mydat

                                fi

                                done

                        ;;

                *) break;;

        esac

done

echo "files for transcode: $MYFILES"

echo "continue [Y/n]?"

read query

if [ $query = "N" ] || [ $query = "n" ]

then

        echo "Better play something before encode?"

        exit

fi

## check if all needed is here

if [ -z $MPEGFILE]

then

        MPEGFILE=0

fi

function checkmpeg()

        {

        if [ -n $1 ]

        then

        case "$1" in

                *mpg)

                MPEG=1

                ;;

                *MPG)

                MPEG=1

                ;;

                *mpeg)

                MPEG=1

                ;;

                *MPEG)

                MPEG=1

                ;;

                *mpa)

                MPEG=1

                ;;

                *MPA)

                MPEG=1

                ;;

                *)

                echo "file extension not like mpeg"

                echo "!!!file will be encoded to avi first!!!!"

                MPEG=0

                ;;  

        esac

        fi

        sleep 1

        }

#create the directorys

if [ -e DVD ]

then

        echo "DVD directory exsists"

else

        mkdir DVD

fi

if [ -e ready ]

then

        echo "ready directory exsists"

else

        mkdir ready

fi

if [ -e menu ]

then

        echo "menu directory exsists"

else

        mkdir menu

fi

if [ -e tmp ]

then

echo "tmp directory exsists"

else

        mkdir tmp

fi

function makempeg()

        {

        echo "Start encoding $1"

        if [ -e $1 ]

        then 

        # test if it is no mpg file

        if [ $MPEGFILE = 1 ]

        then

                MPEG=0

        else

                checkmpeg $1

        fi

        if [ $MPEG -eq 0 ]

        then

                mencoder -o $1.avi -ovc lavc -oac lavc -ofps 25 $1

                # if mencoder fails try other options for audio rate

                if [ $? -eq 0 ]

                then

                        avi=1

                else

                        mencoder -o $1.avi -ovc lavc -oac lavc -ofps 25 -srate 32000 $1

                fi

                if [ $? -eq 0 ]

                then

                        avi=1

                else

                        mencoder -o $1.avi -ovc lavc -oac lavc -ofps 25 -srate 22050 $1

                fi

                if [ $? -eq 0 ]

                then

                        avi=1

                else

                        mencoder -o $1.avi -ovc lavc -oac lavc -ofps 25 -srate 48000 $1

                fi

                if [ $? -eq 0 ]

                then

                        avi=1

                fi

                if [ $avi=1 ]

                then

                        rm $1.avi

                        transcode -i $1.avi -V -y mpeg -F d -Z $RESOLUTION --export_fps 25 --export_asr 2 -E 48000 -b 224 -o $1._pre

                        mplex -f 8 -o $1.mpg $1._pre.m2v $1._pre.mpa

                else

                        rm $1.avi

                        echo ""

                        echo "!!!ERROR!!!"

                        echo "codec not available -- aborting"

                        echo "!!!ERROR!!!"

                        echo ""

                        exit

                fi

        else

                 transcode -i $1 -V -y mpeg -F d -Z $RESOLUTION --export_fps 25 --export_asr 2 -E 48000 -b 224 -o $1._pre

                 mplex -f 8 -o $1.mpg $1._pre.m2v $1._pre.mpa

        fi

                rm $1._*

                mv $1 ready/

                mv $1.mpg DVD/

        fi

        }

function makemenu()

        {

        HEIGH=20

        HEIG=2

        TITLES="convert images/background.jpg -fill white -font arial -pointsize 16"

        NN=2

        N=1

        for TEXT in $*;

        do

                FILE=`basename $TEXT | sed s/\\\.//g | sed s/mpg//g`

                if [ $HEIGH = 20 ]

                then

                        convert images/background.jpg -fill white -pointsize 16  -draw "text 15,$HEIGH '$FILE'" tmp/out-1.jpg

                        composite -geometry +5+$HEIG images/high.png images/trans.png tmp/highlight-1.png

                        HEIGH=`expr $HEIGH + 26`

                        composite -geometry +5+$HEIG images/sel.png images/trans.png tmp/selec-1.png

                        HEIG=`expr $HEIG + 26`

                else

                        convert tmp/out-$N.jpg -fill white -pointsize 16  -draw "text 15,$HEIGH '$FILE'" tmp/out-$NN.jpg

                        sleep 1

                        composite -geometry +5+$HEIG images/high.png tmp/highlight-$N.png tmp/highlight-$NN.png

                        HEIGH=`expr $HEIGH + 26`

                        composite -geometry +5+$HEIG images/sel.png tmp/selec-$N.png tmp/selec-$NN.png

                        HEIG=`expr $HEIG + 26`

                        NN=`expr $NN + 1`

                        N=`expr $N + 1`

                fi

        done

        jpeg2yuv -n 50 -I p -f 25 -j tmp/out-$N.jpg | mpeg2enc -n p -f 8 -o tmp/background.m2v

        dd if=/dev/zero bs=4 count=1920 | toolame -b 128 -s 48 /dev/stdin tmp/background.mpa

        mplex -f 8 -o tmp/menu.mpg tmp/background.m2v tmp/background.mpa

        echo "<subpictures>" > tmp/spumux.xml

        echo "<stream>" >> tmp/spumux.xml

        echo "<spu start=\"00:00:00.00\" end=\"00:01:00.00\" highlight=\"tmp/highlight-$N.png\" select=\"tmp/selec-$N.png\" force=\"yes\" autooutline=

\"infer\" outlinewidth=\"1\" autoorder=\"rows\"></spu>" >> tmp/spumux.xml

        echo "</stream>" >> tmp/spumux.xml

        echo "</subpictures>" >> tmp/spumux.xml

        spumux tmp/spumux.xml < tmp/menu.mpg > tmp/menu_final.mpg

        }

function dvdmenu()

        {

        echo "<dvdauthor dest=\"dvd\">" > menu/titles.xml

        echo "<vmgm>" >> menu/titles.xml

        echo "<menus>" >> menu/titles.xml

        echo "<video />" >> menu/titles.xml

        echo "<audio />" >> menu/titles.xml

        echo "<pgc entry=\"title\" pause=\"inf\">" >> menu/titles.xml

echo "<vob file=\"tmp/menu_final.mpg\" />" >> menu/titles.xml

# here the loop for the buttons

        number=1

        for file in $*

        do

                echo "<button name=\"$number\">jump title $number;</button>" >> menu/titles.xml

                number=`expr $number + 1`

        done

        echo "</pgc>" >> menu/titles.xml

        echo "</menus>" >> menu/titles.xml

        echo "</vmgm>" >> menu/titles.xml

        echo "" >> menu/titles.xml

        echo "<titleset>" >> menu/titles.xml

        echo "<titles>" >> menu/titles.xml

        for file in $*

        do

                echo "<pgc>" >> menu/titles.xml

                echo "<vob file=\"DVD/$file\" />" >> menu/titles.xml

                echo "<post>call vmgm menu 1;</post>" >> menu/titles.xml

                echo "</pgc>" >> menu/titles.xml

        done

        echo "</titles>" >> menu/titles.xml

        echo "</titleset>" >> menu/titles.xml

        echo "</dvdauthor>" >> menu/titles.xml

        }

function burn()

        {

        echo ""

        echo "To direct burn the DVD use:"

        echo "growisofs -v -Z /dev/cdrw -dvd-video dvd/"

        }

function makeall()

        {

        for file in $*;

        do

                echo $file

                makempeg $file

        done

        dvdmenu `ls DVD`

        makemenu `ls DVD/`

        }

function makedvdauthor()

        {

        dvdauthor -x menu/titles.xml

        if [ $? -eq 0 ] 

        then

                echo "DVD ready in the directory dvd!"

        else

                echo "dvdauthor error. Please take a look at your menu/titles.xml and correct it!"

        fi

        }

## make the mpegs and the titles (pgcs) in menu/titles.xml

makeall $MYFILES

## make the dvd-structure

makedvdauthor

echo "Remove temporary FILES???? [N/y]?"

read query

if [ $query = "Y" ] || [ $query = "y" ]

then

        echo "Remove temporary files stay tuned..."

        sleep 5

        rm -r DVD/

        rm -r menu/

        rm -r tmp/

exit

fi

#will be replaced soon

burn

```

After that you will only have to do the growisofs.......

Attention this is for PAL only!

When you want to use NTSC you have to modify this script.

nice trip with gentoo!!!!!!

----------

## bogler

i take it the images are the jpg's and png's for the dvd menu creation? 

i visited your site (looks very good) but my german is very poor   :Sad: 

i'll download the files as an experiment if you can tell me which ones to take.. looking forward to trying the script.

Thanks a Million

bogler

----------

## zuki

you can choce english in the right top corner  :Smile: )))

download and extract the files in a directory (e.g /home/me/dvd/).

copy some videos in /home/me/dvd/DVD/mov

change dir  /home/me/dvd/DVD/ and then

(chmod +x for mkdvd.sh)

./mkdvd.sh -r 352x288 -f mov/*

Then go and eat a pizza....

When all is done all clear transcoded files are moved to /home/me/dvd/DVD/ready

the dvd is under /home/me/dvd/DVD/dvd and you can test it whith:

xine dvd:/home/me/dvd/DVD/dvd/VIDEO_TS

enjoy

----------

## bogler

Zuki

Getting this when i try and uncomopress your matrix.tar.gz file

tar zxvf matrix.tar.gz

technikz/the dvd is under /home/me/dvd/DVD/dvd and you can test it whith:

xine dvd:/home/me/dvd/DVD/dvd/VIDEO_TS

technikz/images/

technikz/images/home.gif

tar: Skipping to next header

gzip: stdin: invalid compressed data--format violated

tar: Archive contains obsolescent base-64 headers

tar: Child returned status 1

tar: Error exit delayed from previous errors

I have tried gunzip also.. just thought i'd let you know. I have tried it with a small avi file and the syncing is perfect - excellent. I don't have a /home/bogler/dvd/DVD/dvd directory with VIDEO_TS files, how are these files created?  Should i get these files if i convert an avi to DVD via the script? Sorry to be such a noob 

 :Embarassed: 

----------

## zuki

this was a theme for the cms system postnuke....

please use the script here:

http://www.technikz.de/modules.php?op=modload&name=Downloads&file=index&req=viewdownload&cid=4

----------

## mach

Hello,

  I am glad this thread is still active.  I have looked but I don't find any news on the mpeg2enc bugs.

   I just try to make the NTSC DVD menu but its failing.  Is this a problem with mpeg2enc or the switches I use?

jpeg2yuv -n 50 -I p -f 29.97 -j matrix_menu_background.jpg | mpeg2enc -n n -f 8 -o matrix_menu_background.m2v

to debug i first try jpeg2yuv then I try mpeg2enc ...

shell# jpeg2yuv -n 50 -I p -f 29.97 -j matrix_menu_background.jpg > video  2>STDERR

STDERR is this 

----------------------------------------------------------

   INFO: [jpeg2yuv] Parsing & checking input files.

   INFO: [jpeg2yuv] YUV colorspace detected.

   INFO: [jpeg2yuv] Starting decompression

   INFO: [jpeg2yuv] Image dimensions are 720x576

   INFO: [jpeg2yuv] Movie frame rate is:  29.970030 frames/second

   INFO: [jpeg2yuv] Non-interlaced/progressive frames.

   INFO: [jpeg2yuv] Frame size:  720 x 576

   INFO: [jpeg2yuv] Number of Loops 1

   INFO: [jpeg2yuv] Now generating YUV4MPEG stream.

   INFO: [jpeg2yuv] Processing non-interlaced/interleaved matrix_menu_background

.jpg, size 66817l.

   INFO: [jpeg2yuv] Rescaling color values.

   INFO: [jpeg2yuv] Processing non-interlaced/interleaved matrix_menu_background

.jpg, size 66817l.

 --- This repeats simalar mesages

----------------------------------------------------------

Next I try

Shell#  cat video  | mpeg2enc -n n -f 8 -o matrix_menu_background.m2v

   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!

   INFO: [mpeg2enc] SETTING MMX for TRANSFORM!

   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!

   INFO: [mpeg2enc] Selecting DVD output profile

++ WARN: [mpeg2enc] No aspect ratio specifed and no guess possible: assuming 4:3

 display aspect!

   INFO: [mpeg2enc] Progressive input - selecting progressive encoding.

   INFO: [mpeg2enc] Encoding MPEG-2 video to matrix_menu_background.m2v

   INFO: [mpeg2enc] Horizontal size: 720 pel

   INFO: [mpeg2enc] Vertical size: 576 pel

   INFO: [mpeg2enc] Aspect ratio code: 2 = 4:3 display

   INFO: [mpeg2enc] Frame rate code:   4 = 30000.0/1001.0 (NTSC VIDEO)

   INFO: [mpeg2enc] Bitrate: 7500 KBit/s

   INFO: [mpeg2enc] Quality factor: 8 (Quantisation = 9) (1=best, 31=worst)

   INFO: [mpeg2enc] Field order for input: none/progressive

   INFO: [mpeg2enc] Sequence unlimited length

   INFO: [mpeg2enc] Search radius: 16

   INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 18 

   INFO: [mpeg2enc] Setting colour/gamma parameters to "NTSC"

   INFO: [mpeg2enc] Progressive format frames = 1

**ERROR: [mpeg2enc] Sample rate is greater than permitted in specified Level

Viel dank fur diese helfpen

Thanks in advance,

Ciao

----------

## Wyckliff

mach, just wondering what version of mjpegtools you are using?  I prefer version >= 1.6.2-r2

----------

## mach

I am not sure what version ( 1.6.2 but r2 ?  I don't know )

I go it last week from

http://umn.dl.sourceforge.net/sourceforge/mjpeg/mjpegtools-1.6.2.tar.gz

I just took a look at the site to confirm the version but it seems to be down at the moment.

Is it posible that the images I am usrng are at fault?  I am trying every thing from the original post ( very cool indeed! ) .

With -n p ( pal ) and -f 8 OR -n n with out -f 8  I have no problems

Thanks you,

----------

## wlchase

This is a really incredible thread! Thanks a ton!

But....

did anybody ever come up with a fix for the problem where the transcode process tacks a 10 pel or so bar to the bottom of the resultant video? I'm working on a mpeg4 file already at 352x240, so I tried with and without the -Z option, and got the same result.

Here's the command used:

transcode -i file.mpeg4.avi -V -y mpeg -F d -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o file

My ver. transcode is 0.6.12-r1, and mjpegtools is 1.6.2-r3

Thanks, y'all!

Bill

----------

## theduke666

@zuki:

Your script works like a charm, saves much work.

Thank you!

cya,

theduke

----------

## zuki

I have updated it, now with submenus it can take up to 200 movies... Available soon at technikz.de

greetz zuki

----------

## bogler

Zuki

I have pm'd you regarding a problem i am having.

Here are the details...

The file i am using is a movie trailer i have named Star.avi

Apologies for the hassle  

I still haven't been able to burn a dvd of an avi. I have placed a small avi in directory mov. I then run the script ./mkdvd.sh -r 352x288 -f mov/* which goes off fine and transcodes the avi and places it in ready. 

I encounter an error before i get to dvdauthor - it is saying - 

Audio stream: 224.000 kbit/s (27999 bps) size: 4398912 bytes 157.104 secs 

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg 

[transcode] critical: invalid filename or host "mov/Star.avi.avi" 

INFO: [mplex] mplex version 2.2.1 ($Date: 2002/02/04 19:06:14 $) 

**ERROR: [mplex] Unable to open file mov/Star.avi._pre.m2v for reading. 

rm: cannot remove `mov/Star.avi._*': No such file or directory 

mv: cannot stat `mov/Star.avi.mpg': No such file or directory 

INFO: [jpeg2yuv] Parsing & checking input files. 

**ERROR: [jpeg2yuv] System error while opening: "tmp/out-1.jpg": No such file or directory 

**ERROR: [mpeg2enc] Could not read YUV4MPEG2 header: system error (failed read/write)! 

Reading from stdin 

Remember to set samplerate with '-s'. 

-------------------------------------------- 

Input File : '/dev/stdin' 48.0 kHz 

Output File: 'tmp/background.mpa' 

128 kbps MPEG-1 Layer II j-stereo Psy model 1 

[De-emph:Off Copyright:No Original:No CRC:Off] 

[Padding:Normal Byte-swap:Off Chanswap:Off DAB:Off] 

ATH adjustment 0.000000 

-------------------------------------------- 

encode_init: using tablenum 0 with sblimit 27 

1920+0 records in 

1920+0 records out 

Hit end of audio data 

Avg slots/frame = 384.000; b/smp = 2.67; bitrate = 128.000 kbps 

Done 

INFO: [mplex] mplex version 2.2.1 ($Date: 2002/02/04 19:06:14 $) 

**ERROR: [mplex] Unable to open file tmp/background.m2v for reading. 

./mkdvd.sh: line 271: tmp/menu.mpg: No such file or directory 

dvdauthor: invalid optDVD README images menu mkdvd.sh mov ready tmpion -- x 

ERR: getopt returned bad code 63 

dvdauthor error. Please take a look at your menu/titles.xml and correct it! 

Remove temporary FILES???? [N/y]? 

I am slightly confused - at this stage i have directories 

DVD which is empty 

images - background.jpg high.png sel.png trans.png 

menu - titles.xml 

mov - which is empty 

tmp - background.mpa spumux.xml 

ready - which has the avi 

Any help greatfully received - thanks a lot, your script is amazing

----------

## theduke666

@zuki:

I am testing your script in the moment.

I mean, I am testing it since 19hrs....  :Wink: 

Encoding the videos was not the problem, but jpeg2yuv and mpeg2enc is still calculating (>12hrs).

Is this normal for a xp2400+?

 And the background.m2v is now 2GB huge, still growing...

I think, I stop it now... :Wink: 

Any hints what could have went wrong?

6 Movies á ca.700MB, background.jpg ca. 68KB.

started with "./mkdvd.sh -r 352x288 -f mov/*"

A part of the current messages:

 *Quote:*   

> 
> 
> INFO: [jpeg2yuv] Rescaling color values.
> 
>    INFO: [jpeg2yuv] Processing non-interlaced/interleaved tmp/out-6.jpg, size 62063l.
> ...

 

cya,

theduke

----------

## zuki

@bogler

think this was a problem in the script. I have testet it with one movie... same problem.... Please download the newer version ( i have testet it with one movi and it works) this script can take up to 400 movies ( 20 titles with each 20 subtitles).

@theduke666

have you chooce your own background.jpg or the one which comes with the script? ????????

This error is confusing....

----------

## theduke666

@zuki

I tried to use my own:

> http://theduke.homelinux.org/pics/background.jpg

I transformed it according to the documentation (720x576, 75/80dpi).

btw, I didn't change anything within the script.

"Confusing" is the right expression...

[edit]

I've uploaded the whole "tmp"-directory without the background.m2v (2,6GB...).

Filelist (replace with "background.jpg" in the url above):

background.jpg

highlight-1.png

 ...

highlight-6.png

out-1.jpg

...

out-6.jpg

selec-1.png

...

selec-6.png

I hope, it helps.

I will retry later with the new script, one small video and your pic!

cya,

theduke

----------

## theduke666

@zuki:

I have it!

Pics are ok, your script is ok, was my fault:

I updated mjpegtools from  1.6.1.90-r2 to 1.6.2-r3...   :Embarassed:  , now it works.

Sorry for the disagreeableness and thank you for your attention.

Your script is great, keep on going!

cya,

theduke

----------

## bogler

 *zuki wrote:*   

> @bogler
> 
> think this was a problem in the script. I have testet it with one movie... same problem.... Please download the newer version ( i have testet it with one movi and it works) this script can take up to 400 movies ( 20 titles with each 20 subtitles).
> 
> @theduke666
> ...

 

The script runs fine now. I have another question however.

Once the script has run, there should be a DVD (i.e. VIDEO_TS) etc in the DVD directory?.. is this correct? should this happen for avi and mpg files (placed in mov)? I am getting an mpeg 2 stream i.e. film.mpg. in DVD but it is not a DVD.

If i place an avi in mov and run the script what can i expect in the DVD directory? I don't seem to be getting the necessary DVD structure i.e. VIDEO_TS etc and i am not getting zuki's menus or anything, when i play the file it is exactly the same as the original file i.e. no menus at beginning.

How do i get from this stage to a file that can be burned and played on a DVD?

Thanks

bogler

----------

## zuki

Please watch out what the script says... The DVD directory holds the encoded movies (when you chooce delete temporary files it will be lost) the ready directory holds your old clear encoded movies, the tmp directory temporary files. And the dvd directory holds the dvd with VIEDEO_TS and so....

greetz zuki

----------

## janimatic

can we read SPRMs or write GPRMs variables with any open source dvd authoring software?

If no, do you think that it would be hard to add this feature to dvd author for instance?

----------

## bogler

 *zuki wrote:*   

> you can choce english in the right top corner )))
> 
> download and extract the files in a directory (e.g /home/me/dvd/).
> 
> copy some videos in /home/me/dvd/DVD/mov
> ...

 

Zuki - Success i now have a working version of spumux and the script has built an AUDIO_TS and VIDEO_TS directory and everything seems good.

I tried the above command with xine to play the movie back but xine complains about the wrong MRL and is unable to play the movie.

Once again advice greatfully received...   :Shocked: 

----------

## outspoken

here is the ouput i get when trying to transcode something:

```
[transcode] warning : /usr/lib/transcode/export_avi.so: cannot open shared object file: No such file or directory

[transcode] warning : (dl_loader.c) loading "/usr/lib/transcode/export_avi.so" failed

[transcode] warning : (encoder.c) loading audio export module failed

[transcode] warning : failed to init export modules

[transcode] critical: plug-in initialization failed

bash-2.05b# transcode -i whatever.mpg -V -y mpeg -F d -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o whatever

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source whatever.mpg (ok)

[transcode] V: import format    | unknown RIFF data, AVI (V=(null)|A=null)

[transcode] warning : no option -x found, option -i ignored, reading from "/dev/zero"

```

this is my emerge -pv transcode output:

```
[ebuild   R   ] media-video/transcode-0.6.11  +3dnow +X -(altivec) +avi +encode +mmx +mpeg +quicktime +sdl +sse  0 kB

```

originally i was using QDVD-Author but that was another headache. any help is appreciate, im trying to get this working for a few days now.

----------

## outspoken

 *outspoken wrote:*   

> here is the ouput i get when trying to transcode something:
> 
> ```
> [transcode] warning : /usr/lib/transcode/export_avi.so: cannot open shared object file: No such file or directory
> 
> ...

 

i tried it again and noticed it says this at the bottom "Floating point exception"

here is the full output:

```
bash-2.05b# transcode -i whatever.mpg -V -y mpeg -F d -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o whatever

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source whatever.mpg (ok)

[transcode] V: import format    | unknown RIFF data, AVI (V=(null)|A=null)

[transcode] warning : no option -x found, option -i ignored, reading from "/dev/zero"

[transcode] V: import frame     | 480x480  1.00:1

[transcode] V: zoom             | 352x240  1.47:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.711

[transcode] V: decoding fps,frc | 29.970,4

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x2001  AC3/A52      [   0,16,0]

[transcode] A: export format    | 0x50    MPEG layer-2 [48000,16,0]  224 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 0 (0.000000)

[transcode] A: adjustment       | 0@1000

[transcode] V: IA32 accel mode  | 3dnow (3dnow mmxext mmx asm)

[transcode] V: video buffer     | 10 @ 480x480

[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null

[export_mpeg.so] v1.2.3 (2003-08-21) (video) MPEG 1/2 | (audio) MPEG 1 Layer II

INFO: using reference profile (DVD)

INFO: profile type is (NTSC)

Floating point exception

```

im using an Athlon XP 1800. here are my use and cflags:

```
USE="3dnow 3dnowext sse mmx X kde cdr dvdr dvd radeon alsa gtk2 ssl pam opengl m

ozilla python ncurses skey libwww spell truetype tcpd gif png jpeg tiff usb aim

yahoo msn avi aalib quicktime mpeg divx4linux xvid dv xmms sdl sasl perl qt zlib

"

CHOST="i686-pc-linux-gnu"

CFLAGS="-march=athlon-xp -mcpu=i686 -m3dnow -mmmx -ffast-math -funroll-loops -fa

lign-loops=5 -falign-jumps=5 -O3 -pipe -fomit-frame-pointer"

CXXFLAGS="-march=athlon-xp -mcpu=i686 -m3dnow -mmmx -ffast-math -funroll-loops -

falign-loops=5 -falign-jumps=5 -O3 -pipe -fomit-frame-pointer"

```

----------

## -[HC]-Fire_Fly312

test

----------

## -[HC]-Fire_Fly312

test

----------

## Pistos

For what it's worth, I was also having the problem where the "jpeg2yuv | mpeg2enc" step was seemingly taking forever.  Upgrading from 1.6.1.90-r2 to 1.6.2-r3 solved that problem.

----------

## GlennM

zuki, thanks for the interesting script, but I have a few questions.

First, on aspect ratios. I have some videos in widescreen format that I'd like to make DVD's out of, will using either of the sizes "stretch" the video up and down, or will it just make it the proper width and leave the same aspect ratio?

Second, is the script smart enough to only make a 4.7Gb DVD? I've got directories with 6-10gig of compressed video files, but I'm not exactly sure how large each one will be when converted to mpeg2. Is there a good way to make it stop converting at 4.7Gb?

Thanks-

----------

## Thorir

Hi Everyone,

Zuki, I have a question, too:

Why does the script convert an avi into an avi first?

Is this really necessary? Converting always reduces quality, I think.

Why can't we get the necessary mpg's in one converting-step.

Maybe the Script can recognize the Fileformat like Ripmake. http://www.lallafa.de/bp/ripmake.html

Thanks for your good work!

Thorir

----------

## GlennM

I see there are those of you, like me, who are not getting useful m2v files out of transcode, but instead getting something that promptly crashes mplayer. I seem to have solved it with a suggestion from earlier in the thread to use ffmpeg. The exact command I use is:

```

transcode -i filename.avi -V -y ffmpeg,mp2enc -F mpeg2 -Z 352x240 --export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o filename
```

This gives me the same m2v/mpa files I should have gotten with the other codecs, but they don't crash mplayer. However, I do have to run all my avi's through mencoder first in an avi -> avi transform, or else transcode only does ~150 frames and stops. Has anyone seen this?

EDIT: Oh yeah, ffmpeg is about 3x faster as well, which more than makes up for the lost time doing the mencoder step.

----------

## wmartino

I am trying to do some make some dvd's on my AMD64. I have emerged all of the packages required. When I try to run transcode I get the following error.

```
sh-2.05b$ transcode -i matrix.mpg -V -y mpeg -F d -Z 352x240

--export_fps 29.97 --export_asr 2 -E 48000 -b 224 -o matrix

transcode v0.6.12 (C) 2001-2003 Thomas Oestreich, 2003-2004 T.

Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source matrix.mpg (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 512x288  1.78:1

[transcode] V: zoom             | 352x240  1.47:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.852

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,1]  128

kbps

[transcode] A: export format    | 0x50    MPEG layer-2 [48000,16,1]  224

kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 3202 (3203.200000)

[transcode] A: adjustment       | 1200@1000

[transcode] V: video buffer     | 10 @ 512x288

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.10 (2003-12-30) (video)  FFmpeg0.4.8b4695: MS

MPEG4v1-3/MPEG4/MJPEG

[transcode] warning : /usr/lib/transcode/export_mpeg.so: cannot open

shared object file: No such file or directory

[transcode] warning : (dl_loader.c) loading

"/usr/lib/transcode/export_mpeg.so" failed

[transcode] warning : (encoder.c) loading audio export module failed

[transcode] warning : failed to init export modules

[transcode] critical: plug-in initialization failed

sh-2.05b$
```

I dont know if it is just an amd issue or what. Any help would be great.

----------

## vuud

I've been playing with making DVD menus for a few days before coming across this post... which is by far the best one out of the lot.  I've tried most of the ones that the author cites and I have a feeling he probably had all the same troubles as me.

Anyway

Under DVDAuthor 0.6.10, the titles attribute seems to only be allowed to occur once.  I have no idea if this is correct, but I had to change mine to something like this:

 *Quote:*   

> 
> 
>   <titleset>
> 
>     <menus>
> ...

 

So like I said, I was getting errors about "titles" already defined, so I am thinking that they must have changed the DTD or something.  Anyway, this may not be the right way, but its how I fixed it...

Bill

----------

## vuud

Hey all, 

I am taking mpg2 files from a Hauppauge PVR 350 and creating some DVD's out of them.  

I am taking a *.nuv file from Mythtv (mpeg2 when it comes from a 350)

Loading it in Avidemux 2.0.22

Removing commercials

Saving as a DVD PS

Following the majority of this wonderful post

I am ending up with three issues when I am done that I would love any advice on...

 *Quote:*   

> Discontinuity in audio channel 8; please remultiplex input

 

 *Quote:*   

> Skipping sector, waiting for the first VOBU...

 

 *Quote:*   

> Should I be worried that when I edited the commercials out the GOP table or whatever is bungled up now?

 

 *Quote:*   

> Too damn big for the DVD

 

Bascially getting three episodes onto one DVD results in the DVD being 4.6 gigs, 0.2 gigs too big.  I've already removed ads, but I am next going to go through and remove opening sequence and credits.  Is there anything else I can do that will not involve a 8 hour process of the video stream to a lower resolution?   Will reducing audio quality help?

Should I be saving the audio and video seperately out of avidemux2 and mixing them together outside of the program?  

I'm sooooo close

[/quote]

----------

## villiam

With the following transcode line that I have pieced together from posts in this thread:

```
transcode -i "$IN" \

  -V -y mpeg2enc,mp2enc -J modfps -w $bitrate -F8,"-4 1 -2 1 -r 24"  \

  -Z 720x480 --export_asr 2 --export_fps 29.97 \

  -E 48000 -b 224 \

  -o "$OUT"
```

I am able to produce a video file that plays nicely on my stand alone DVD player except for one minor annoyance. In order to here the audio I have to switch my players digital audio settings from All to 'PCM Only'. I would prefer to not have to switch the digital audio settings each time I put a disk in so wonder if anyone here had encountered a similar problem?

Thinking that if I could encode the audio into an AC3 stream this would resolve the problem I tried the following transcode line:

```
transcode -i "$IN" \

  -V -y mpeg2enc,ac3 -J modfps -w $bitrate -F8,"-4 1 -2 1 -r 24"  \

  -Z 720x480 --export_asr 2 --export_fps 29.97 \

  -E 48000 -b 224 \

  -o "$OUT"
```

This resulted in a movie that I could hear the audio when the settings were set to All but the audio was out of sync as well as being a little high (people sounded like the inhaled helium).

Any thoughts on how I can smooth out the audio issues? Either in encoding the audio as AC3 or having it so that I do not have to change my audio settings each time I put in a homemade disk?

----------

## Ladi

Does anybody know how to have semi transparent subpictures with DVDAuthor

hope anybody can help

----------

## vicious1

well i followed this really nice how-to, and got everything emerged with no problem.

The problem comes when i run the command with -y mpeg , it says it cant load module export_mpeg.so ... fine i googled around and some people use mpg2enc,mp2enc so i used that, and now it encodes but the files it creates is a mpa (which is as it should) and a m1v, not a m2v ... is this gonna be a problem?... i am capturing some videos from VCR and making DVD's out of them....

can anyone tell me if this is a problem?

//Vic,

----------

## vicious1

speed anyone?

i am encoding a 720x480 mpg with this command line:

transcode -i uncut.mpg -V -y mpeg2enc,mp2enc --export_fps 25 -Z 720x576 --keep_asr -E 48000 -b 224 -o test 

I am running an athlon64 3200+ (2ghz) with gentoo amd64, 1GB ram, have all the necessary tools installed and i get 7.5fps encoding????? this cant be right.

why is it so slow?is there a way to speed it up?

The thing is i have about 20GB of MPG2's ,VCR captured family videos which i would like to make into DVD's.

cheers vic.

----------

## GlennM

Just a helpful hint to those of you reading this tutorial...

Don't use the mpeg module from transcode (-y mpeg), it has been deprecated, and has lots of problems. Poke around at the other available options, I personally use "-y ffmpeg -F mpeg2" because it's damn fast, and the quality is fine for me.

----------

## steelrose

GlennM wrote "

 *Quote:*   

>  ust a helpful hint to those of you reading this tutorial...
> 
> Don't use the mpeg module from transcode (-y mpeg), it has been deprecated, and has lots of p

 

I get the following warning.Do i have to worry about it?

```
[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so] setting gop_size to 12 for mpeg1/2-video

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

Audio: using new version

Audio: using lame-3.96.1

Can't step back 323!

mpg123: Can't rewind stream by 100 bits!
```

Why dont you guys make a gui program : i tried many like polidori,varsha,dvdstyler but their not complete

----------

## Ladi

I would like to know if anybody already managed to use angle properties with mplex and dvdauthor

----------

## RealNitro

Hi,

I'm trying to add subtitles to my .mpg with spumux. My subtitles.xml:

```
<subpictures>

  <stream>

    <textsub filename="subs.sub" 

    characterset="ISO8859-1" 

    fontsize="28.0" font="arial.ttf"  

    horizontal-alignment="default" 

    vertical-alignment="bottom" 

    left-margin="60" 

    right-margin="60" 

    top-margin="20" 

    bottom-margin="30" 

    subtitle-fps="25" 

    movie-fps="25" 

    movie-width="720" 

    movie-height="574" />

  </stream>

</subpictures>
```

command:

```
spumux -m dvd -P subtitles.xml < test_dvd.mpg > test_dvd_sub.mpg
```

Everything is working fine, no errors, only a warning:

```
DVDAuthor::spumux, version 0.6.10.

Build options: gnugetopt magick iconv freetype

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=LC_CTYPE=nl_BE@euro;LC_NUMERIC=C;LC_TIME=C\ ;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER\ =C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUR\ EMENT=C;LC_IDENTIFICATION=C

INFO: Converting filenames to ISO-8859-15

INFO: Detected subtitle file format: microdvd

INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*

INFO: Read 852 subtitles

INFO: Adjusted 249 subtitle(s).

INFO: Unicode font: 1185 glyphs.

INFO: Found EOF in .sub file.a written

WARN:  Read 0, expected 4 data written

INFO: 852 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.16

Statistics:

- Processed 852 subtitles.

- The longest display line had 51 characters.

- The maximum number of displayed lines was 4.

- The normal display height of the font arial.ttf was 32.

- The bottom display height of the font arial.ttf was 46.

- The biggest subtitle box had 6088 bytes.
```

So, it should work, but my test_dvd_sub.mpg file does not have any subtitles (tried in mplayer and xine).  This has been asked before, but it wasn't answered. Also, I tried finding some help with google, but didn't find any.

Plz help.

----------

## bogler

 *theduke666 wrote:*   

> @zuki:
> 
> Your script works like a charm, saves much work.
> 
> Thank you!
> ...

 

I have the script working well. It converts avi to avi initially which takes quite a lot of time but i'm not complaining. My main problem is that when i try to use an avi of 750MB in size i sometimes find that everything proceeds smootly enough, takes a long time (probably 12 hours) all in all. I have a Pentium 3 850MHz and 0.5 gig of RAM. My problem is that once i have burned the image onto dvd i only get 20 minutes playtime. It seems to have chopped off most of the film? Can anyone think why this might be happening.

During the process i was tild that 103000 frames had to be transcoded (for a 750MB avi) which i thought was ok, it then proceeded, built the AUDIO_TS and VIDEO_TS directories but the VOB file in VIDEO_TS was only 117MB in size?

Any help greatfully received, i am using version 2 of zukis script with all relevant packages installed.

Regards

bogler

----------

## zuki

dosnt test it with such big files.... but take a look at dvdstyler, that would solve most of the problems.....

----------

## RealNitro

Bump.

Any idea on the subtitles problem?

----------

## xunil

 *wmartino wrote:*   

> I am trying to do some make some dvd's on my AMD64. I have emerged all of the packages required. When I try to run transcode I get the following error.
> 
> ```
> sh-2.05b$ transcode -i matrix.mpg -V -y mpeg -F d -Z 352x240
> 
> ...

 

I was having this problem, too, but if you use the -y mpeg2enc,mp2enc method described elsewhere in the thread, it works. I'm away from my AMD64 machine right now, but when I get back to it, I'm going to attempt to use --export_prof dvd-ntsc to see if that alleviates the problem as well.

----------

## CDiMa

Hi all!

I followed suggestions from all this thread and now I'm able to burn video dvds but still lack understanding how to properly create menus. I can create buttons that jump to other menus, I can jump to titles and chapters within titles.

My problem is that the menus that I create look different than intended and look different when viewed with either xine, ogle or my home dvd player. Since original dvd titles have menus that look the same regardless of the player, what am I missing?

What are the highlight, select and image attributes supposed to do? In all my attempts the results I got look like they act as masks that let pass through the mpg on wich I put them on.

Thanks for all your great work, keep authoring  :Smile: 

Ciao!!!

Claudio

----------

## RealNitro

If sb knows how to solve the problem mentioned in my previous post, plz tell me...

----------

## GlennM

 *vuud wrote:*   

> Hey all, 
> 
> I am taking mpg2 files from a Hauppauge PVR 350 and creating some DVD's out of them.  
> 
> I am taking a *.nuv file from Mythtv (mpeg2 when it comes from a 350)
> ...

 

You can easily requant the MPEG2 video using tcrequant or vamps. It's quite easy. I think tcrequant can only do elementary streams (ie, m2v), but I'm not sure if vamps can take the entire MPEG2. All you'd have to do to requant it is demux the video and audio, calculate the factor to requant by (in your case, something just over 1), run tcrequant (which shouldn't take long), then re-multiplex the two streams. It's a heck of a lot faster than re-encoding, and the quality loss is imperceptable, normally.

----------

## mkeadle

I just got a burner this past weekend, and emerged all the tools I thought I'd be using to have fun with it. Current dvdauthor happened to be 0.6.10 which has made it fun trying to follow a lot of the docs floating around on the net, as there have been at least two non-obvious changes that have cripled me so far.

The first is the change in the XML that dvdauthor uses.  As previously mentioned in this thread, you can only have a single <titles> block. Check the post by bplatt_uk somewhere about page 7 of this thread for more info and an example.

The second I just discovered today, and haven't seen mention of it anywhere else.  No matter how well formed, your dvdauthor.xml, spumux.xml, and ninja master skills still wouldn't be enough to create a good looking menu.  It seems ImageMagick, somewhere around 6.0.7, has reversed it's definition of transparency.  This makes sense, as all my test menus looked like they should have been created with reverse-masks instead of the proper way.  The other tip was that spumux was incapable of autodetecting buttons as advertised, turning my entire screen into a single button.  I check my system, and sure enough I'm a good Gentoo user, update frequently, and have ImageMagick 6.0.8.1 install.  So to get around it a little dvdauthor source hack is required.

In the dvdauthor-0.6.10 package, edit line 180 of src/subgen-image.c to read:

```
p.t=pdata[x*4+3];
```

The easiest way to make this change to your system is a quick edit to the ebuild.  Add the following line at the very end of src_unpack() in dvdauthor-0.6.10:

```
 sed -i -e "s:255-::" ${S}/src/subgen-image.c
```

Remerge dvdauthor and you should get predictable results when building menus/subtitles once again.

----------

## CDiMa

 *mkeadle wrote:*   

> I just got a burner this past weekend, and emerged all the tools I thought I'd be using to have fun with it.

 

Amazing what you have been up to do in so little time!

I've been fighting with dvdauthor/spumux in the last two weeks without any visible result  :Embarassed: 

 *mkeadle wrote:*   

> The second I just discovered today, and haven't seen mention of it anywhere else.  No matter how well formed, your dvdauthor.xml, spumux.xml, and ninja master skills still wouldn't be enough to create a good looking menu.  It seems ImageMagick, somewhere around 6.0.7, has reversed it's definition of transparency.

 

Well, an emerge search reveals that I've 6.0.7.1 installed, so it was very early in 6.0.7 ....

 *mkeadle wrote:*   

> This makes sense, as all my test menus looked like they should have been created with reverse-masks instead of the proper way.  The other tip was that spumux was incapable of autodetecting buttons as advertised, turning my entire screen into a single button.

 

Indeed it looks that all I get comes from reversed masks. And I dropped the autodetect stuff for the same reason. Lucky enough I found this dvdauthor-buttons plugin for gimp that helps a lot creating correct button definitions.

 *mkeadle wrote:*   

> In the dvdauthor-0.6.10 package, edit line 180 of src/subgen-image.c to read:
> 
> ```
> p.t=pdata[x*4+3];
> ```
> ...

 

Well, a few times I managed to make spumux abort a couple of lines earlier in subgen-image so definitely it needs some corrections...

I'm not sure if I'm able to edit an ebuild, but I'll look into it as soon as possible!!!

Many thanks for your tips, I'll let you know if this works in my case.

Ciao!!!

Claudio

----------

## CDiMa

 *CDiMa wrote:*   

> I'm not sure if I'm able to edit an ebuild, but I'll look into it as soon as possible!!!

 

I can now certify that I'm able to apply such an easy patch to an ebuild   :Cool: 

A quick spumux and it looks like it's fixed!!!  :Very Happy: 

I've made a lot of changes to my buttons so I'll have to remake the way I intended originally.

But the button I see now are of the color I gave them and not black holes as earlier...

Many, many, many thanks!!!

Ciao!!!

Claudio

----------

## GlennM

 *phekko wrote:*   

> Thanks for the great tutorial. I don't think I'd be making DVDs without it.
> 
> For some odd reason I didn't get  that example XML to work, it complained about titles already being defined and suchlike. Just in case someone is interested, here's my version of it, for a menu with 3 buttons in it:
> 
> After careful studying of the board I noticed someone had already posted something on this. Sorry. Nevertheless, I leave this here just in case someone has use of it.

 

The reason is because there shouldn't be more than one <title></title> in the xml file. Just remove the <title></title> tags from around all of the <pgc> blocks so that you only have one set, just inside <titleset></titleset> and then it works fine.

----------

## RoadRunner

I was having no problems, until I got to the spumux part.. When I run it I get:

```

DVDAuthor::spumux, version 0.6.10.

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

ERR: Picture highlight.png is too big: 1x720

WARN: Bad image,  skipping line -1

WARN:  Read 0, expected 4

INFO: 0 subtitles added, 1 subtitles skipped, stream: 32, offset: 0.18

```

The image is a regular 720x576 transparent png with the button borders. I even tried grabbing the how-to png's and the result is the same.

here's my .xml:

```

<subpictures>

  <stream>

      <spu start="00:00:00.0" end="00:00:00.0"

           highlight="highlight.png"

           select="select.png"

           autooutline="infer"     

           autoorder="rows"/>

  </stream>

</subpictures>

```

I already searched the forums, google, dvdauthor mailing lists and nothing.. Anyone has any idea why the picture too big error?

Thanks in advance

----------

## CDiMa

 *RoadRunner wrote:*   

> I was having no problems, until I got to the spumux part.. When I run it I get:

 

Make sure the png you saved is indexed and has no more than 3 colors (4 if you count the transparent color). 

Also make sure to read mkeadle's post and eventually reemerge dvdauthor with his patch applyed.

Ciao!!!

Claudio

----------

## RoadRunner

Thanks CDiMa. mkeadle's patch solved the problem, spumux can now read the image and generate the menu.

My only "problem" is the bad quality of the movies on the DVD.. 

I have several tv-rips I made, avi's with just jpeg compression, so 4Gb for every 22 minute episode. The quality is pretty good there. Using transcode, no matter what resolutions I set, the picture quality on the dvd get's bad. I mean, it's watchable, but I wanted quality, no matter if I can only put 2 episodes on a dvd. 

Anyone has a excelent quality transcode settings?

----------

## CDiMa

 *RoadRunner wrote:*   

> I have several tv-rips I made, avi's with just jpeg compression, so 4Gb for every 22 minute episode. The quality is pretty good there. Using transcode, no matter what resolutions I set, the picture quality on the dvd get's bad. I mean, it's watchable, but I wanted quality, no matter if I can only put 2 episodes on a dvd. 
> 
> Anyone has a excelent quality transcode settings?

 

I find that to get top quality encoding I have to use mjpegtools. That is surely sloooow but if source material is good the end result is the best you can get.

Ciao!!!

Claudio

----------

## nobrob

I got a problem converting to DVD-PAL format. This is the command I use:

```
transcode -i <movie> -V --export_prof dvd-pal -o <outfiles>
```

This gives me a m2v and a mpa file, with A/V in sync. But the video has the wrong framerate (as source). To fix this, I use --export_fps, but the A/V goes out of sync, any ideas on how to keep it in sync??

Also, is it normal for it to encode at 7-10fps? I have a 2GHz P4 with 256MB DDR RAM.

Thanks for any help.

----------

## genmich

Check the front page:

 *Quote:*   

> If audio/video(AV) sync is not correct, try overriding transcode's AV Sync auto correction with '-D 0' like so:
> 
> Code:
> 
> ```
> ...

 

So try adding -D 0.

I'm having 7.82 fps at the moment (AMD XP 1,8+,512 MB RAM)

----------

## nobrob

Sorry, forgot to say that: transcode doesn't try to sync A/V for me, the offset it 0. Even so, I've tried adding -D 0 and nothing changes.

----------

## CDiMa

 *nobrob wrote:*   

> Sorry, forgot to say that: transcode doesn't try to sync A/V for me, the offset it 0. Even so, I've tried adding -D 0 and nothing changes.

 

What kind of sync problem do you have? The delay you have is constant from beginning to end or increases during the movie?

I think that the -D switch cures the first problem. 

The second problem arises when you do the classical "film to video" fps conversion (that is from 24 fps to 30) or when you convert between video standard (NTSC to/from PAL i.e. 24 fps to 25).

In the case of film to video conversion you may use transcode's --pulldown filter (this leaves inaltered the time-lenght of the video by adding copies of the video frames to match the target fps). 

In the case of NTSC/PAL conversion you need to stretch the audio by altering its pitch so that it still matches the length of the video. The easiest way to do this is to process individually the video and audio streams and remultiplex them afterwards.

The audio part is easily done with rezound and its change rate effect.

I think you may use audacity's "change speed" effect (or even better "change tempo" which preserves the pitch) but I had some problems with audacity in the past and dropped it.

If you have a different problem then let us know  :Smile: 

Ciao!!!

Claudio

----------

## nobrob

Specifically I'm trying to convert 23.976fps to 25.000 fps.

I think it is the "film to video" effect I'm getting. One of the reasons is that at the beginning, the sound is only about a second out (during the intro), but around the middle of the movie, xine can't actually get the sound in sync - I've reached the A/V offset limit.

My problem now is this:

```
# transcode -i movie.avi -V --export_prof dvd-pal --pulldown --export_fps 25 -o out

[...]

**ERROR: [mpeg2enc] 3:2 movie pulldown not sensible for 25.000 fps dispay rate
```

```
# transcode -i movie.avi -V --export_prof dvd-pal --pulldown -o out

[...]

++ WARN: [mpeg2enc] 3:2 movie pulldown with frame rate set to decode rate not display rate

++ WARN: [mpeg2enc] 3:2 Setting frame rate code to display rate = 4 (29.970 fps)

**ERROR: [mpeg2enc] Sample rate is greater than permitted in specified Level
```

...?

----------

## Cold-Phoenix

I'm having problems with dvdauthor 0.6.10, i've converted 4 avis to mpg perfectly and they playback fine in all the players i've thrown at them. However when i combine them with dvdauthor it spits out a load of sound errors on the last bit of the convertion. When i playback the output the sound is fine on the videos untill the last few mins which are silent.

Anyone seen this before and know how to fix?

----------

## CDiMa

 *nobrob wrote:*   

> Specifically I'm trying to convert 23.976fps to 25.000 fps.

 

This is a classical "NTSC converted film" to "PAL" conversion.

 *nobrob wrote:*   

> 
> 
> ```
> # transcode -i movie.avi -V --export_prof dvd-pal --pulldown --export_fps 25 -o out
> 
> ...

 

You don't want to use pulldown in this case, It is used when converting from NTSC FILM to NTSC VIDEO.

The easiest way is to convert video and audio separately. Convert the video part as you were used with the --export-fps 25 option. Then use rezound or audacity and stretch the audio with a ratio of 25025/24000 i.e. 1.04270833333333333333. Remultiplex the two streams and you're done. If you don't know how to demultiplex the two streams, feel free to ask!

Ciao!!!

Claudio

----------

## CDiMa

 *Cold-Phoenix wrote:*   

> I'm having problems with dvdauthor 0.6.10, i've converted 4 avis to mpg perfectly and they playback fine in all the players i've thrown at them. However when i combine them with dvdauthor it spits out a load of sound errors on the last bit of the convertion. When i playback the output the sound is fine on the videos untill the last few mins which are silent.
> 
> Anyone seen this before and know how to fix?

 

How did you convert the avis to mpeg? Probably you obtained valid mpg streams, but not all streams are suitable for DVD authoring. Usually encoding/multiplexing tools have presets to enforce DVD/SVCD/VCD conformance.

Ciao!!!

Claudio

----------

## nobrob

I take it transcode can't stretch the audio?

----------

## Cold-Phoenix

 *CDiMa wrote:*   

>  *Cold-Phoenix wrote:*   I'm having problems with dvdauthor 0.6.10, i've converted 4 avis to mpg perfectly and they playback fine in all the players i've thrown at them. However when i combine them with dvdauthor it spits out a load of sound errors on the last bit of the convertion. When i playback the output the sound is fine on the videos untill the last few mins which are silent.
> 
> Anyone seen this before and know how to fix? 
> 
> How did you convert the avis to mpeg? Probably you obtained valid mpg streams, but not all streams are suitable for DVD authoring. Usually encoding/multiplexing tools have presets to enforce DVD/SVCD/VCD conformance.
> ...

 

```
nice -n -5 transcode -i input.avi -V -y mpeg,ac3 -F d -Z 352x288 --export_fps 25 --export_asr 2 -E 48000 -b 224 -D 0 --pulldown -o output  -x mplayer,mplayer

mplex -f 8 -o output.mpg output.m2v output.ac3
```

Those are the commands i've used ac3 was the only one thats kept sync converting this to dvd pal: 

```
VIDEO:  [XVID]  640x368  24bpp  23.976 fps  972.9 kbps (118.8 kbyte/s)

AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 20000->192000 (160.0 kbit)
```

I'll take ntsc if that'll work but the asr screws up trying that. I've played around with --keep_asr and --export_asr 3 but the video gets borders on all four sides. I just want a 16:9 convertion with audio in sync that'll work on dvd after all the playing around i've done.

----------

## oiper

This howto is great! I'm in the process of transcoding right now and have everything else set up. I'm anticipating a disaster though. I noticed that transcoding with -Z 352x240 gives my video a green bar at the bottom. So I changed it to 352x224 to avoid that.

Anyone else experience that?

EDIT:

Scratch that question, what I'm really wondering is, why is the resolution being set to 352x240 for NTSC? I'm confused b/c aren't DVD's usually at 720x480 for NTSC?

----------

## Cold-Phoenix

YAY, i've solved my own problem.

I had to emerge -U transcode as mpeg2enc was broken (pipe errors as seen before on this thread) then i used this command to avoid the screwed up colours and upside down video.

```
transcode -i input.avi -V -y mpeg2enc,mpeg -F 8 -E 48000 -b 224 -o output --export_asr 3 -Z 720x480 
```

The result: perfect colours, no borders at all, dvd res, yet 16:9 asr and its complient with dvdauthor  :Very Happy: 

Now i just need to make some menus and i'm set. Speaking of which is there a site with menus premade for dvds or are people interested in posting some up  :Smile: .

----------

## kronon

hi, thnx for the great howto, but I've got a problem.

all goes well untill "

mplex -f 8 -o output.mpg output.m2v output.mpa

the mpa file has no problems and gives good audio (no noice). But when I merge it with the m2v file using mplex, the new mpg file has realy anoing noice in it (like static). How can I get that noice out of it.

:EDIT

Now I've managed to get the noise away (different mplayer settings) but now I noticed the video is out of sync (video is playing slower as audio) so I tried using the -O option, but that doesn't help. Any other suggestions?

----------

## oiper

ok, after MUCH tickering, my results are, choppy audio but it is trying to work.   :Confused: 

----------

## kronon

After much searching I found some page about transcode that mentioned bugs. It seems that the codec can't convert the audio from ntsc to pal:(.

It had ** priority on a scal from 0 to 3. Which meant it would be fixed in some later version but wouldn't emediatly be fixed. So I tried mkdvd (a program not in portage but in fact it's more like a pike script). But that gave me a Division by zero error, so that whasn't much help either.

*sigh*I don't want my audio streched.

Alert: Stopid noob posting below me..Last edited by kronon on Tue Oct 12, 2004 3:36 pm; edited 1 time in total

----------

## nobrob

lmfao, thanks for the info about not being able to convert audio. I, like you, tried mkdvd, and it gave me division by zero... it's posted on the forums, when I get home I'll post the link here.Last edited by nobrob on Thu Oct 14, 2004 12:11 am; edited 1 time in total

----------

## nobrob

Sorry, forgot about this thread completely...

http://fredrik.hubbe.net/hacker/viewtopic.php?t=160

School kids can be cruel; grow up kronon.

----------

## nife

 *ajayrockrock wrote:*   

> I finally got around to getting some screenshots of the funky colors (the red streaks through the picture):
> 
> http://www.odc.net/~ssharma/curb1.png
> 
> http://www.odc.net/~ssharma/curb2.png
> ...

 

I Get exactly this was it ever resolved ?

----------

## nife

As for my previous post about mplayer, I got it fixed by upgrading.  However I am still having color issues.  I am running the command below.  Though I have tried it with and without the -y ffmpeg,mp2enc -F mpeg2 part and still same funky sort of red colors.  What gives.

```
transcode -x mplayer,mplayer -i sample.mpg  -V -y ffmpeg,mp2enc -F mpeg2 --export_asr 2 --export_prof dvd-ntsc -o sample 
```

I keep getting this error and the quality is horrible.  The colors are a little bit red and not at all correct.

```
[transcode] V: Y'CbCr           | YV12/I420

```

This is what transcoder shows for the Y'CbCr value referenced below

```
[video_trans.c] warning: odd clip parameter invalid for Y'CbCr processing mode

```

I keep seeing that as a warning.  Now could that cause the weird color that I am getting.  Mplayer shows the colors correctly so the video. Encoding seems way too fast too.  I am getting 15 - 20 fps.  I am looking for like a 2 -3 pass encode that will produce a better quality.  I know it can be done I just don't remember how.  Any suggestions.[/code]

----------

## ir_jumper

yeeeeeehaa

nice nice first time i`ve found a guide like this. video coding was the last thing i`ve done with win0w$ now i don't need win any more thanks  :Smile: 

sorrz my english isn`t very good

 :Embarassed:   :Mr. Green: 

----------

## vrghost

OK got it all working in the end. And even got a menu together. My problem is that I need to be able to call parts in chapters. So for example I need a button that calls chapter 1 sub 3 (the one starting at 00:01:07.934 in the below example. Anuone has any sugestions?

```

<vob file="/home/vrghost/ian/new/URBAN6_1.mpg" chapters="0,00:00:34.400,00:01:07.934,00:05:56.222,00:06:08.432,00:10:36.168,00:10:49.849,00:13:54.300,00:14:09.315"/>

```

----------

## Negated Void

I'm having trouble spumixing subs from a .srt into my .mpeg file.

They turn out HUge, Green, and red!

```

<subpictures>

   <stream>

      <textsub filename="gits2_dvd.srt" fontsize="14.0" />

   </stream>

</subpictures>

```

Any clue what i'm doing wrong here? *Confused*

-Murph

----------

## tuxicated

I heard that when you have each scene in a seperate mpeg file (all identical resolution, interlacing, etc), merging them into one title like so:

```

<titles>

<pgc>

<vob file="Scene1.mpg" />

<vob file="Scene2.mpg" />

<vob file="Scene3.mpg" />

</pgc>

</titles>

```

some players fail to play this title seamlessly. I even heard that players can get stuck for several seconds between the scenes.

Has anyone tried this? Is this rumor true?

----------

## Bigbeanpole

Not to take away from the post... because I  agree, it is extremely well done, however, that was from a website, and I think credit should be given where due. I'm not sure if the original poster was the original author of the site, however, I thought I would leave this note:

http://mightylegends.zapto.org/dvd/dvdauthor_howto.php  <- Check it out

----------

## shiznix

 *Bigbeanpole wrote:*   

> Not to take away from the post... because I  agree, it is extremely well done, however, that was from a website, and I think credit should be given where due. I'm not sure if the original poster was the original author of the site, however, I thought I would leave this note:
> 
> http://mightylegends.zapto.org/dvd/dvdauthor_howto.php  <- Check it out

 

Actually the post on forums.gentoo.org came first. The howto on mightylegends was posted without being Gentoo specific & to make it apply to all modern Linux operating systems. Originally only being for our local LUG, it wound up in google's cache thanks to our LUG's mailing list.

So yes, the original poster & the author/host of that website are one & the same   :Wink: 

However, I cannot take total credit, and for giving credit where credit is due, there is the 'Credits' link at the bottom of the page.

I've just now had the time to sit down & do some pretty big updates to it, but thought I'd clear up any thought of plagiarism straight away. Thanks.

----------

## shiznix

Updates are in for those interested.

Some fairly major ones including changes for latest dvdauthor's handling of Titles.

Changes added:Transcoding lines now use the ffmpeg encoder for speed.

'-J modfps' option for those converting to a higher frame-rate (NTSC), this should fix nearly all the previous AV sync problems people were experiencing.

Small howto on converting aspect ratios to comply with dvdauthor.

Change sample dvdauthor.xml to reflect changes in newer dvdauthor's xml syntax changes, additional Titles within a given Titleset are now handled with the <pgc> tag instead of the previous <title> tag.

Cheers,

Shiznix   :Cool: 

----------

## cayenne

 *Quote:*   

> In the dvdauthor-0.6.10 package, edit line 180 of src/subgen-image.c to read:
> 
> Code:
> 
> p.t=pdata[x*4+3];
> ...

 

Where are these files located? What is the full path to an ebuild or the src file listed above? I've looked around, but, don't know where they are kept.

EDIT: Ok, I found the .ebuild file, made the change, re-emerged this version of dvdauthor. Re-ran through the tutorial example starting at the menu construction part with spumux.  This is the output of that:

```
DVDAuthor::spumux, version 0.6.10.

Build options: gnugetopt magick iconv freetype

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=C

INFO: Converting filenames to ANSI_X3.4-1968

INFO: Picture had 1 colors

INFO: Picture had 1 colors

INFO: Constructing blank img

INFO: Found EOF in .sub file.

INFO: Max_sub_size=988

WARN:  Read 0, expected 4

INFO: 1 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18

Statistics:

- Processed 0 subtitles.

- The longest display line had -1 characters.

- The maximum number of displayed lines was 0.

- The normal display height of the font arial.ttf was 0.

- The bottom display height of the font arial.ttf was 0.

- The biggest subtitle box had 988 bytes.
```

Not sure what that WARM msg. means, but, otherwise looks successful. 

When I run dvdauthor, it looks mostly fine with a few of these messages at the end:

```
STAT: Processing thx_onestep_dvd.mpg...

WARN: Discontinuity in audio channel 8; please remultiplex input.

WARN: Previous sector: 0.178 - 0.178

WARN: Current sector: 0.308 - 0.308

WARN: Discontinuity in audio channel 8; please remultiplex input.

WARN: Previous sector: 0.308 - 0.308
```

When I play this file in xine, it starts just fine, the opening thx comes on, then, it goes into the menu showing the image I created with the green code background and image clips from the movies. However, the highlights and selects don't show...in fact, the menu looks useless,  nothing happens when I click it. On the xine controller, no matter if I select left or right and hit 'select' it starts the 2nd title, the 'outtakes'.

The earlier versions I tried, before these mods, did seem to let me click on a menu option and start the right one...trouble is, no select or highlight could be seen...just an almost black screen, where I could just make out the menu images. I'm new to Gimp...I looked at my select and highlight images..the looked ok (red/yellow)..but, the backgrounds on them was black...aren't these supposed to be transparent? When I created them, it showed the checked background, but, when I save and re-open them in Gimp..they have the background color...I changed the background color to white...and now when I play the 'dvd', I can see the menu background...but, no highlight or selects appear when clicking the screen or the xine controller...

So, I think I'm lost in a couple areas here...how to keep the Gimp created .png files transparent, and how to get them to show up and be functional when dvdauthor step is finished...

I'm very close..but, something is blowing me up...

K

----------

## 3n0k

hi,

after doing the transcode + avidemux2 to code .avi to .mpg (after 1h i finish with a 10mb mpg file?! strange) + mplex, i can't preview the file either at xine or mplayer...  :Sad: 

i have the log on all the procedure... but what i find strange is that the mpg file is so small! (original .avi has 700mb).

transcode seens to work fine. atleast i get the 2 files: m2v and mpa (tho very small in size too)

avidemux2

 *Quote:*   

> 
> 
> Size looks good, maybe type 1 avi
> 
> Trying avi type 1 index
> ...

 

mplex

 *Quote:*   

> 
> 
>    INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)
> 
>    INFO: [mplex] File eddie.m2v looks like an MPEG Video stream.
> ...

 

can someone help me plz?  :Sad: 

----------

## ivanova

I just found out that pgcedit is available for linux as well - might be useful to some  :Wink: 

get it here

http://home.tiscali.be/debie.roland/pgcedit/index.html

----------

## shiznix

 *3n0k wrote:*   

> hi,
> 
> after doing the transcode + avidemux2 to code .avi to .mpg (after 1h i finish with a 10mb mpg file?! strange) + mplex, i can't preview the file either at xine or mplayer... 
> 
> i have the log on all the procedure... but what i find strange is that the mpg file is so small! (original .avi has 700mb).
> ...

 

Check the howto, it has been updated (again).

Avidemux has been dropped in favour of transcode's '--export_prof' option which will automatically convert the aspect ratio if needed.

ChrisCol, my apologies as you were on the money with this one back in January.

The reason it took longer to encode back then was that it scaled the video res. up to 720x??? which was correct & an oversight on my part (and yes it does sort out the aspect ratios too).

/me eats humble pie  :Embarassed: 

This seems to not only be a much more compatible option, but also takes far less time to encode as it uses one less step (being avidemux).

If you still experience problems encoding your file, either use '-x mplayer,mplayer' to have mplayer feed transcode the file, or pass it through mencoder first as discussed in the howto.

Good luck, and thanks for your patience while changes were made.

Shiznix   :Cool: 

----------

## ast3rix

hi guys,

this thread is awesome...its been such a great help...great job!!

just a few questions regarding subtitles. I see you haven't mentioned much about them, is there an extensive thread outlining their use???

what's the deal with forced subtitles? is there a way to identify one stream as a forced subtitle whereas the other one is optional?

in the documentation of dvdauthor, there is a part on the subtitle variable, but I don't understand it very well. 

"Simply selecting the track (0-31) means that only the forced subtitles will be displayed, whereas enabling the track (64-95) means that all the subtitles will be displayed"

Is there some way to multiplex my own forced subtitles? or does it depend on the subtitle file i am using. (i'm using subrip -> *.sub)

any help in this regard is appreciated. thanks a lot.

regards

ast3rix

PS. some other ppl were having problems where they could not see their subtitles in their player. I was having the same problem until i realized that when dvdauthor compiles into a folder (say x:\dvd\) it does not overwrite the contents...this means that every time you run dvdauthor it adds a new .ifo, .bup,.vob file but only the first one is run by the player which will not be your most recently compiled version, but rather the first compilation that u made!! so u should make sure that the destination drive of dvdauthor is empty. hope that was of some help, bye

----------

## shiznix

 *ast3rix wrote:*   

> hi guys,
> 
> just a few questions regarding subtitles. I see you haven't mentioned much about them, is there an extensive thread outlining their use???
> 
> what's the deal with forced subtitles? is there a way to identify one stream as a forced subtitle whereas the other one is optional?
> ...

 Hi ast3rix,

For the record, muxing subtitles into your dvd.mpg from a *.sub/*.srt file is done with spumux and is discussed on Page 4 of this thread.

There is also a sample spumux.xml file located near the bottom of spumux's manpage.

What dvdauthor's manpage means by: *Quote:*   

> Simply selecting the track (0-31) means that only the forced subtitles will be displayed, whereas enabling the track (64-95) means that all the subtitles will be displayed

 

Subtitle numbers 0-31 are subtitle track numbers 0-31 turned off by default (have to be chosen & enabled while playing the DVD).

Subtitle numbers 64-95 are subtitle track numbers 0-31 turned on by default (are always shown).

For example, to have the first subtitle track forced on, the dvdauthor.xml syntax would look something like this:

```
<pgc >

    <pre>subtitle=64;</pre>

    <vob file="your_dvd.mpg" />

</pgc>
```

Note that while I do know the above xml works, the one shown below I have not personally tested (though it should work I think).

To have the first subtitle track forced on, but the second turned off, the dvdauthor.xml syntax would look something like this:

```
<pgc >

    <pre> { subtitle=64; subtitle=1; } </pre>

    <vob file="your_dvd.mpg" />

</pgc>
```

Hope this helps,

Shiznix

----------

## tudorv

Hi All,

First of all, thanks for the great howto! I was able to follow the instructions and ended up with a working DVD on the first try. I couldn't get transcode to work properly though, so I resorted to avidemux, which did all the encoding and multiplexing nicely.

The one thing that still bothers me is related to the DVD menus. I have an animated menu, which I've set it to loop. However, each time it reaches the end of the mpg, it pauses for a second or less, then plays it again from the beginning. It's quite annoying... By the way, this happens with the stand-alone DVD player, but works fine in xine.

Does anybody have an idea why this happens?  Is it the fault of the DVD player, or there is some specific way to create the mpg or set up dvdauthor?

I'm using pretty much the same XML file for dvdauthor as the one on the first page of this thread, slightly modified to allow looping of the menu, so:

    <menus>

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 2; </button>

        <vob file="matrix_menu_final.mpg" pause="inf"/>

      </pgc>

    </menus>

becomes:

    <menus>

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 2; </button>

        <vob file="matrix_menu_final.mpg"/>

        <post> jump menu 1; </post>

      </pgc>

    </menus>

Any help would be appreciated!

----------

## shiznix

 *tudorv wrote:*   

> Hi All,
> 
> The one thing that still bothers me is related to the DVD menus. I have an animated menu, which I've set it to loop. However, each time it reaches the end of the mpg, it pauses for a second or less, then plays it again from the beginning. It's quite annoying... By the way, this happens with the stand-alone DVD player, but works fine in xine.
> 
> Does anybody have an idea why this happens?  Is it the fault of the DVD player, or there is some specific way to create the mpg or set up dvdauthor?
> ...

 

Try replacing

```
        <post> jump menu 1; </post>
```

with

```
        <post> jump cell 1; </post>
```

----------

## tudorv

Thanks for the quick reply!

I've tried to use

```
<post> jump cell 1; </post>
```

and the result is better, but not  perfect... Now the video only stops for a barely noticeable amount of time, while the audio stops for the same amount of time as before.

I wonder if this could have anything to do with the length of the menu video? Mine is 9s, should I try a longer one?

Does the media matter? I'm using a DVD+RW right now.

Thanks again!

----------

## shiznix

 *tudorv wrote:*   

> I've tried to use
> 
> ```
> <post> jump cell 1; </post>
> ```
> ...

 

The media shouldn't matter.

One thing I can suggest is to make sure your video & audio lengths are perfectly matched. Probably by getting the audio length as close as possible to the video length then time stretching the audio to exactly match the length of the video (don't ask me howto do this, I don't know but surely there would be a tool for Linux that could do this).

That said, it's a known problem with dvdauthor & even commercial DVDs suffer from it, though most will fade the audio out before the skip to make it less noticeable.

Only other suggestion would be to try:

```
<menus>

<pgc>

<button> jump title 1; </button>

<button> jump title 2; </button>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<vob file="matrix_menu_final.mpg"/>

<post> jump cell 1; </post>

</pgc>

</menus>
```

If that works, then you would only notice the skip every 90 secounds (9s video clip X 10)

Sorry I couldn't be of more help, google may have an answer on this.  :Sad: 

----------

## tudorv

 *shiznix wrote:*   

> 
> 
> One thing I can suggest is to make sure your video & audio lengths are perfectly matched. Probably by getting the audio length as close as possible to the video length then time stretching the audio to exactly match the length of the video (don't ask me howto do this, I don't know but surely there would be a tool for Linux that could do this).
> 
> 

 

What I did was to check the length of the video (8.68s as reported by avidemux) and cut the audio in audacity to match it. The audio was slightly longer than the video, but now it should be perfectly matched: audacity reports it as 8.680001s  :Smile: 

However, I have the same problem... I believe the audio might be slightly out of sync, for other files I've encoded following the same path I had to use a timeshift value of 400ms. Unfortunately it's very difficult to determine if there's a sync issue for the menu video, since it's so short...

I'll try more options and report back to this thread if I manage to find something useful.

Thanks again!

----------

## cadaverus

Wonderful guide, very well done. Been having trouble doing this with Window$ for a long time now...

----------

## Malak

When using transcode, it messes up the colours, it takes all the green out, all the faces look blue in the film, is there a quick fix or will it be automatically corrected by the dvd player or something?

----------

## shiznix

 *Malak wrote:*   

> When using transcode, it messes up the colours, it takes all the green out, all the faces look blue in the film, is there a quick fix or will it be automatically corrected by the dvd player or something?

 

You'll need to add '-k' to your transcode line.

From 'man transcode':

" -k     swap red/blue (Cb/Cr) in video frame [off]. Use if people have blue faces."

This is also a known bug in transcode that I think has been fixed in 0.6.14.

Are you using transcode version 0.6.14 ?

Cheers,

Shiznix  :Wink: 

PS> Have updated the howto somewhat: '-J modfps --export_fps xx' is now used by default as it only throws a warning if no fps modding is necessary, so saves the user having to tcprobe every file and decide whether to use or not.

 Have included a small guide on howto create a 5.1 surround sound audio track from a 2-track audio file.

----------

## Malak

You know too much.  You must be stopped!   :Cool: 

I'm using transcode-0.6.11, the ~x86 masked package from portage.

I will sync and see if i can get an update, thanks again!

----------

## Malak

$ mplex -f 8 -o output.mpg title.m1v title.mpa

   INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)

   INFO: [mplex] File title.m1v looks like an MPEG Video stream.

   INFO: [mplex] File title.mpa looks like an MPEG Audio stream.

   INFO: [mplex] Video stream 0: profile 9 selected - ignoring non-standard options!

   INFO: [mplex] Found 1 audio streams and 1 video streams

   INFO: [mplex] Selecting generic DVD output profile (PROVISIONAL)

   INFO: [mplex] Multiplexing video program stream!

   INFO: [mplex] Scanning for header info: Video stream e0 (title.m1v)

   INFO: [mplex] VIDEO STREAM: e0

   INFO: [mplex] Frame width     : 720

   INFO: [mplex] Frame height    : 576

   INFO: [mplex] Aspect ratio    : 16:9 display

   INFO: [mplex] Picture rate    : 25.000 frames/sec

   INFO: [mplex] Bit rate        : variable

   INFO: [mplex] Vbv buffer size : 47104 bytes

   INFO: [mplex] CSPF            : 0

   INFO: [mplex] Scanning for header info: Audio stream c0 (title.mpa)

   INFO: [mplex] MPEG AUDIO STREAM: c0

   INFO: [mplex] Audio version  : 1.0

   INFO: [mplex] Layer          :        2

   INFO: [mplex] CRC checksums  :       no

   INFO: [mplex] Bit rate       :    28672 bytes/sec (224 kbit/sec)

   INFO: [mplex] Frequency      :     48000 Hz

   INFO: [mplex] Mode           :        0 stereo

   INFO: [mplex] Mode extension :        0

   INFO: [mplex] Copyright bit  :        0 no copyright

   INFO: [mplex] Original/Copy  :        1 original

   INFO: [mplex] Emphasis       :        0 none

   INFO: [mplex] SYSTEMS/PROGRAM stream:

   INFO: [mplex] rough-guess multiplexed stream data rate    : 0235296

   INFO: [mplex] target data-rate specified               : 10080000

   INFO: [mplex] Setting specified specified data rate: 10080000

   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 c0: buf=   4096 frame=000000 sector=00000000

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=19712292 required(DTS)=19712219

++ WARN: [mplex] Video e0: buf= 183969 frame=005472 sector=00027632

++ WARN: [mplex] Audio c0: buf=   3387 frame=009120 sector=00003034

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=19756178 required(DTS)=19748219

++ WARN: [mplex] Video e0: buf= 235543 frame=005482 sector=00027927

++ WARN: [mplex] Audio c0: buf=   4096 frame=009135 sector=00003039

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=19800064 required(DTS)=19784219

++ WARN: [mplex] Video e0: buf= 235543 frame=005492 sector=00028221

++ WARN: [mplex] Audio c0: buf=   4096 frame=009153 sector=00003045

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=19843949 required(DTS)=19823819

++ WARN: [mplex] Video e0: buf= 235543 frame=005503 sector=00028515

++ WARN: [mplex] Audio c0: buf=   4096 frame=009171 sector=00003051

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=19887835 required(DTS)=19859819

++ WARN: [mplex] Video e0: buf= 235543 frame=005513 sector=00028809

++ WARN: [mplex] Audio c0: buf=   4096 frame=009189 sector=00003057

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=19931721 required(DTS)=19895819

++ WARN: [mplex] Video e0: buf= 235543 frame=005523 sector=00029104

++ WARN: [mplex] Audio c0: buf=   4096 frame=009204 sector=00003062

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=19975606 required(DTS)=19935419

++ WARN: [mplex] Video e0: buf= 235543 frame=005534 sector=00029398

++ WARN: [mplex] Audio c0: buf=   4096 frame=009222 sector=00003068

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=20019492 required(DTS)=19975019

++ WARN: [mplex] Video e0: buf= 235543 frame=005545 sector=00029692

++ WARN: [mplex] Audio c0: buf=   4096 frame=009240 sector=00003074

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=20063378 required(DTS)=20018219

++ WARN: [mplex] Video e0: buf= 235543 frame=005557 sector=00029985

++ WARN: [mplex] Audio c0: buf=   4096 frame=009261 sector=00003081

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=20107264 required(DTS)=20061419

++ WARN: [mplex] Video e0: buf= 235543 frame=005569 sector=00030278

++ WARN: [mplex] Audio c0: buf=   4096 frame=009282 sector=00003088

++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=20151149 required(DTS)=20115419

++ WARN: [mplex] Video e0: buf= 235543 frame=005584 sector=00030570

++ WARN: [mplex] Audio c0: buf=   4096 frame=009306 sector=00003096

**ERROR: [mplex] Too many frame drops -exiting

Help!

----------

## shiznix

 *Malak wrote:*   

> $ mplex -f 8 -o output.mpg title.m1v title.mpa
> 
> <big snip>
> 
> Help!

 

What's the transcode line you are using ?

Include any extra steps you have done in between the first transcode line & the mplex line.

Use the transcode lines shown in the howto.

The created files should be title.m2v & title.ac3.

----------

## Malak

transcode -i movie.avi -y mpeg --export_asr 3 -o title -D0 -E 48000 -b 224 -s2 -m title -z -Z 720x576 --export_fps 25 -k

( i live in the uk )

( -y ffmpeg didnt work, it couldnt initialise the codec or something, even though it is installed, somewhere, right? )

then..

mplex -f 8 -o output.mpg title.m1v title.mpa

then i would have done..

dvdauthor -x dvdconf

(i have a valid conf file)

----------

## shiznix

 *Malak wrote:*   

> transcode -i movie.avi -y mpeg --export_asr 3 -o title -D0 -E 48000 -b 224 -s2 -m title -z -Z 720x576 --export_fps 25 -k
> 
> ( i live in the uk )
> 
> ( -y ffmpeg didnt work, it couldnt initialise the codec or something, even though it is installed, somewhere, right? )
> ...

 

Your transcode line has created a non-dvd compliant mpeg1 video stream that mplex will have problems with using '-f8' (which is needed for dvdauthor).

Transcode's '-y mpeg' export module is also obsolete & will be removed soon.

The following line should get you out of trouble for now, but I'd be seriously looking at why '-y ffmpeg' is not working for you. Does it work on other video files ?

Do 'emerge -pv transcode' & check you have enabled all the necessary USE flags.

As of transcode's 0.6.14 version, it has major changes to it's configure script so that each function/library must be explicitly enabled (ie. has a lot more USE flags than before).

Be warned that the following transcode line will create an mpeg2 audio track & this is not compatible with a lot of DVD players, particularly those that don't support playing (S)VCD (ie. you may end up with a silent audio track).

For greater compatibility & faster encoding, it's recommended to use ffmpeg. You'll also need it working if later on you want to create a 5.1 surround sound audio track.

```
transcode -i movie.avi -y mpeg2enc,mpeg --export_prof dvd-pal --export_asr 3 -o title -D0 -E 48000 -b 224 -s2 -J modfps --export_fps 25 -z -k
```

Good luck!

----------

## Lokheed

shiznix, I added the first initial post of your to the wiki: http://gentoo-wiki.com/HOWTO_Author_a_DVD_Complete_with_Menus

If you want to update it and play around with the layout that would be awesome. Hopefully I have gotten some of the "boring" work away from you putting most of the data up there. It could use some TLC on the layout though.

----------

## shiznix

 *Lokheed wrote:*   

> shiznix, I added the first initial post of your to the wiki: http://gentoo-wiki.com/HOWTO_Author_a_DVD_Complete_with_Menus
> 
> If you want to update it and play around with the layout that would be awesome. Hopefully I have gotten some of the "boring" work away from you putting most of the data up there. It could use some TLC on the layout though.

 

I did not agree to this, nor was asked.

I would feel honoured that someone has taken the time to mirror the post, but it's apparent that a lot of other people's work is also being harvested from forums.gentoo.org in an effort to gain site-hits on gentoo-wiki for money. Do the original posters see any of this money ?

Gentoo-wiki is a 'for profit' commercial front for thrashcorp & as such I have to decline on the offer of maintaining it & ask that you remove it.

As an aside, I am already spending way too much time maintaining my own non-Gentoo specific version & the original forums.gentoo.org post (am committed to this as it is linked from dvdauthor's homepage).

Cheers,

Shiznix   :Cool: 

PS> Pass on my regards to thrasher, haven't seen him in #gentoo for a while   :Wink: 

----------

## forevertheuni

guys :/ I followed this HOWTO for menux exactly has presented but It doesn't work I have a jpg background that in the menu appear in the rectangles outlines of highligh.(the inside of the first rectangle becomes the color that I use in highligh.png for outline boxes) and background is black .by the way :/ it always goes to title 1 no matter what place I hit .I really need help(PAL system)

Thanks for the HOWTO by the way

----------

## Lokheed

 *shiznix wrote:*   

>  *Lokheed wrote:*   shiznix, I added the first initial post of your to the wiki: http://gentoo-wiki.com/HOWTO_Author_a_DVD_Complete_with_Menus
> 
> If you want to update it and play around with the layout that would be awesome. Hopefully I have gotten some of the "boring" work away from you putting most of the data up there. It could use some TLC on the layout though. 
> 
> I did not agree to this, nor was asked.
> ...

 

I had no idea it was for money. Always thought the wiki was just another extension of Gentoo, so its all new to me. I dont get a cent for the time I put into the wiki, just like you dont get a cent for the stuff you do here. I dont talk to trasher so you are going to have to pass on your own regards.

I spent a couple of hours transfering it over to the wiki. I didnt know it was a profit entity and I didnt know that some members dont want their guides on there, I'll be more careful in the future. Was just trying to help out Gentoo anyway I could, so I thought I would put in some work on the wiki. Sorry to have upset you. You know the link to it, anyone can edit a wiki, you can remove it at your leasure.

----------

## forevertheuni

Hi again I took a snapshot of the final menu and I give links to my pictures :/ what can I do?

dvd-1.png is the snapshot.the other ones are the pictures created the url is the url of the final mpg of the menu

http://nebioq.ath.cx/dvd-1.png

http://nebioq.ath.cx/atlantis_menu_highlight.png

http://nebioq.ath.cx/atlantis_menu_select.png

http://nebioq.ath.cx/atlantis_menu_background.jpg

this file have sound and is too big 101MB ...I reccommend not open it :p

http://nebioq.ath.cx/atlantis_menu_final.mpg

----------

## LinuxThis

NICE tutorial I just came across this, though it threw me for a loop once the main post 

changed stuff to .ac3 recently but the date didn't change.

ok apologies If someone said this stuff before, I only quickly browsed the first couple pages of posts.

alright so

everything works fine.. but I did encounter some minor issues with different movie players.  I can't say that its not the versions of the tools I am using though.

one thing I did notice was that for the menus, after the 'Merge background menu video/audio:' step, I was using a 45 second audio clip in the background, and if I played back that .mpg file (or assembled after dvdauthor) in Xine it was fine, but if I played it back in Mplayer (or as an actual DVD on a Playstation 2), the audio would be cut off around 2 seconds.  

This 2 seconds corresponds to the 50 frames generated by 'jpeg2yuv -n 50' line.  Changing this number to around 1800 to force that much more video into the menu fixed the problem.

I just wanted to point out that if this whole thing were made into a script by someone, it might be a good idea to calc the number (1800 in this case) based on the fps x audio length. (script)

The other thing is that in the first transcode step for the movies you have the option 'transcode .. -s2' in there to increase the gain on the audio, you should really warn the user that this is happening because the output dvd file I made had some nasty clipping going on.

offtopic stuff: 

btw, I also wanted to plug something else I found very useful for a DVD I was working on, that would be GIMP's animation plugin callled GAP.  Really useful for doing the end scrolling credits, but also looks like its very useful for doing per-frame video editing and simple logos/etc.

thanks for the nice tutorial

-Dom

----------

## Malak

I used xcdroast to write my dvd instead of growisofs (i tried many variations on the -Z device option, but with no luck).

My DVD player reads the disc, then ejects it.

Is the video encoded wrong?

Has the disc been written in the wrong format?

Does it spew it out because it's a DVD-R?

I used transcode, then mplex, then dvdauthor, then xcdroast, using these commands..

transcode -i movie.avi -y mpeg2enc,mpeg --export_asr 3 -o title -D0 -E 48000 -b 224 -s2 -J modfps --export_fps 25 -z -Z 720x576 -k

mplex -f 8 -o output.mpg title.m1v title.mpa

dvdauthor -x dvdconf

my dvdconf file is as follows:

<dvdauthor dest="dvd">

<titleset>

    <titles>

      <pgc>

        <vob file="output.mpg"/>

      </pgc>

    </titles>

</titleset>

</dvdauthor>

then i mastered an image in xcdroast, from the "dvd" folder, and made sure it was in the root of the disc, and burned it

output of growisofs is:

growisofs -Z /dev/cdrom -dvd-video dvd/

Executing 'mkisofs -dvd-video dvd/ | builtin_dd of=/dev/cdrom obs=32k seek=0'

mkisofs: Unable to make a DVD-Video image.

 :Sad:  write failed: Input/output error

Thanks

----------

## Malak

how about this instead? ..

```
<dvdauthor dest="dvd">

  <vmgm>

    <menus>

      <pgc>

          <post> jump titleset 1 menu; </post>

      </pgc>

    </menus>

  </vmgm>

  <titleset>

    <titles>

      <pgc>

        <vob file="output.mpg"/>

          <post> call menu; </post>

      </pgc>

    </titles>

  </titleset>

</dvdauthor>
```

----------

## Malak

What was the command mentioned originally in the tutorial to find information about a video file?

Should they be m1v or m2v files?  If they are meant to be m2v, then why does my code produce m1v?

Does a DVD NEED a VGSM menu, or just a title with a single chapter?

Thanks again

----------

## shiznix

Hi Lokheed,

Apologies for the lateness in reply, been doing the xmas thing.

 *Quote:*   

> I had no idea it was for money. Always thought the wiki was just another extension of Gentoo, so its all new to me. I dont get a cent for the time I put into the wiki, just like you dont get a cent for the stuff you do here.

 

OK, to set the record straight:Gentoo-wiki is not affiliated with forums.gentoo.org in any way, is not a Gentoo project & is not supported by Gentoo.

Forum post content remains the copyright of the forum post author under US Copyright Law & cannot be reproduced without permission from that poster (none has been given), unless the author has specifically stated that the content of their post(s) is in the public domain (this has not been stated).You're right, I do not get paid. I like many others do this in the interests of goodwill. It's for this reason that my principles object to having a posting copied without permission for an end result of monetary gain (be it knowingly or not).

 *Quote:*   

> I spent a couple of hours transfering it over to the wiki. I didnt know it was a profit entity and I didnt know that some members dont want their guides on there, I'll be more careful in the future. Was just trying to help out Gentoo anyway I could, so I thought I would put in some work on the wiki. Sorry to have upset you. You know the link to it, anyone can edit a wiki, you can remove it at your leasure.

 

Really, I'm not offended at all & your efforts meant well.

Just remember to ask first in future   :Wink: 

----------

## shiznix

 *LinuxThis wrote:*   

> One thing I did notice was that for the menus, after the 'Merge background menu video/audio:' step, I was using a 45 second audio clip in the background, and if I played back that .mpg file (or assembled after dvdauthor) in Xine it was fine, but if I played it back in Mplayer (or as an actual DVD on a Playstation 2), the audio would be cut off around 2 seconds.  
> 
> This 2 seconds corresponds to the 50 frames generated by 'jpeg2yuv -n 50' line.  Changing this number to around 1800 to force that much more video into the menu fixed the problem.

 

At this point, Mplayer behaves exactly the same here, with xine working ok.

However, once proceeding through the next few steps & getting to the "Test the new menus in xine before burning:" step, the end result should play OK in xine as well as a normal DVD player & PS2 DVD player once burnt (mplayer won't work as it cannot handle DVD menus).

Having a shorter video track than an audio track should only be an issue if you are creating animated DVD menus, not static menus.

If you are creating a static menu, then dvdauthor will only need enough video frames to bring up the display initially & then pause the menu video, this is what the

```
<spu start="00:00:00.0" end="00:00:00.0"
```

part of the spumux.xml file does.

The menu audio plays in the background while the menu video is paused indefinitely.

It maybe that your PS2 needs a longer time period to bring up that initial display & then pause it. If that's the case, then using 'jpeg2yuv -n 150' should do the trick.

For animated menus, this has been addressed & the animated menu howto has been updated to use LiVES to fit the video to the audio -> http://mightylegends.zapto.org/dvd/dvdauthor_howto_animenu.html

 *Quote:*   

> The other thing is that in the first transcode step for the movies you have the option 'transcode .. -s2' in there to increase the gain on the audio, you should really warn the user that this is happening because the output dvd file I made had some nasty clipping going on.

 

I agree, this could probably be an option for those with low volume encodings. Originally added because transcoding to .ac3 results in a lower audio gain in the audio track.

 *Quote:*   

> btw, I also wanted to plug something else I found very useful for a DVD I was working on, that would be GIMP's animation plugin callled GAP.  Really useful for doing the end scrolling credits, but also looks like its very useful for doing per-frame video editing and simple logos/etc.

 

Very handy!   :Cool: 

----------

## shiznix

 *forevertheuni wrote:*   

> Hi again I took a snapshot of the final menu and I give links to my pictures :/ what can I do?
> 
> dvd-1.png is the snapshot.the other ones are the pictures created the url is the url of the final mpg of the menu
> 
> http://nebioq.ath.cx/dvd-1.png
> ...

 

That's some crazy menus you have there.

Can only suggest you re-emerge Imagemagick & dvdauthor to the latest unmasked versions & start afresh. May also be a missed or incorrect step in the Gimp menu making process.

Be interested to see what your spumux output message is.

Sorry can't be of more help, not seen this before   :Confused: 

----------

## thrasher6670

 *shiznix wrote:*   

>  *Lokheed wrote:*   shiznix, I added the first initial post of your to the wiki: http://gentoo-wiki.com/HOWTO_Author_a_DVD_Complete_with_Menus
> 
> If you want to update it and play around with the layout that would be awesome. Hopefully I have gotten some of the "boring" work away from you putting most of the data up there. It could use some TLC on the layout though. 
> 
> I did not agree to this, nor was asked.
> ...

 

I'd just like to point out that althou http://gentoo-wiki.com is un-official I do not make any money off of it, I have in the past had a link to my hosting company in the bottom left of the site but I have never actually made mony off of that or my other site http://gentoo-portage.com.  Until recently I have not even tried to cover the costs with any effort.   

As someone will inevitably point out I have added a banner to http://gentoo-portage.com today, I have done this because the $80 i have been spending monthly on the server I can no longer afford now that I no longer live at my parents home.

----------

## forevertheuni

 *shiznix wrote:*   

>  *forevertheuni wrote:*   Hi again I took a snapshot of the final menu and I give links to my pictures :/ what can I do?
> 
> dvd-1.png is the snapshot.the other ones are the pictures created the url is the url of the final mpg of the menu
> 
> http://nebioq.ath.cx/dvd-1.png
> ...

 

well i'm using it in 2 computers...without gentoo tough! i'll post the spumux message other day :/ I'm using gimp 2.0 and it's a little diferent from 1.2 versio ns and the steps :/ well I'l keep trying!! the dvdauthor version is 0.6.9 i'll try 0.6.10..tnx for the help :/

----------

## motub

 *Malak wrote:*   

> What was the command mentioned originally in the tutorial to find information about a video file?

 

I was trying to remember that, too, and in looking around for related-information, I saw mention of tcprobe, which I think was the command given, since the man page says

 *Quote:*   

> NAME
> 
>        tcprobe - probe multimedia streams from medium and print information on the standard output
> 
> SYNOPSIS
> ...

 

So that was what we were both trying to remember (tcprobe -i /path/to/input.avi), but I do wonder why it was removed from the HOW-TO. tcprobe is much easier to use than mplayer to get this info. Getting the info about the framerate and codec of an *.avi (so that one knows if one needs to re-encode it to another framerate or not, and which input codecs to specify to transcode) was the only part of this tutorial that I could not easily follow in Linux (I was using GSpot via Wine to check the video info) until I heard of tcprobe in the previous version of this tutorial, before mention of it disappeared. I think it should reappear, as it's quite a useful tool that may not be well-known (I'd sure not heard of it before I saw it in the tutorial, and only one of the other tutorials I've ever seen on this subject mentioned it).

----------

## Malak

Does a DVD NEED a VGSM menu, or just a title with a single chapter?

What is the most simple xml configuration I can get away with?

----------

## orlot

awesome post.

I am amazed that it was so easy to create my own custom menu.  At first, I had some problems creating my m2v files... but adding -x mplayer,mplayer seemed to help transcode! that -x solved a problem where the output video was flipped vertically and the colors were in bgr instead of rgb.

Has anyone found a solution to the pause that happens when the menu loops? mine looks like this:

```

<dvdauthor dest="DVD">

  <vmgm/>

  <titleset>

    <menus>

      <pgc>

        <button> jump title 1; </button>

        <button> jump title 3; </button>

        <vob file="../menu_final.mpg" />

        <post> jump cell 1; </post>

      </pgc>

    </menus>

    <titles>

    ...

```

There is also something else that is kind of weird with the menus I am creating.  They appear to be stretched vertically just a little bit. I compaired the menu to the menu-background.jpg file i created it from and it has the same width but its stretched vertically.

Is that a problem with choosing the wrong pixels per inch setting when making a new picture in The Gimp?

----------

## gkmac

 *Malak wrote:*   

> Does a DVD NEED a VGSM menu, or just a title with a single chapter?
> 
> What is the most simple xml configuration I can get away with?

 

No you don't menus at all. I've tried making a little DVD of my digital camera movies, but I haven't been brave enough to draw my own menus yet.

Here's a one chapter example

```
<dvdauthor dest="DVD">

  <vmgm />

  <titleset>

   <titles>

    <pgc>

     <vob file="myvideo.mpg" />

     <post>exit;</post>

    </pgc>

   </titles>

  </titleset>

</dvdauthor>
```

The post exit command stops the player at the end, otherwise I've found it pauses on the last frame.

Also look at http://dvdauthor.sourceforge.net/doc/ex-title.html for how you can extend the above to include multiple MPG files and/or chapters. Without menus you can still jump to chapters using the DVD player next/previous buttons.

----------

## Wedge_

OK, I've just finished reading through the whole thread, and I haven't found anything that fixes my particular problem. I've tried at least 6 different variations on the initial transcode command, and all of them produce an m2v file that is displayed by mplayer as a blank green box, with the occasional frame from the film visible from time to time. Does anyone know what's going on here? It's not limited to a single source file either, it's happened with all three I've tried so far.

----------

## LinuxThis

 *Quote:*   

> initial transcode command, and all of them produce an m2v file that is displayed by mplayer as a blank green box, with the occasional frame from the film visible from time to time

 

i've seen this too, I was running debian/unstable with some weird transcode packages, I fixed it by compiling from source (tho I guess you're doing that in gentoo anyway...).  Some codecs transcode really doesn't like for some reason.

are all 3 of the movie files the same kind of file?  transcode was giving me hell with some quicktime files that I encoded for cinelerra, and some other divx files, same kind of error.  also, check for old versions of transcode (I had one installed that was wacking it out like that)

----------

## LinuxThis

hey, I was wondering if it would be OK to use the info here in my own wiki for a LUG (strictly strictly nonprofit, something either on http://www.baltolug.org or http://lug.loyola.edu).  It would be mainly adapted from this version, but I wanted to go into a little more depth about other stuff like using cinelerra, gimp-gap, blender, audacity and other stuff.  I wouldnt be copying it, but the commands would be pretty close to identical.

----------

## Wedge_

 *LinuxThis wrote:*   

>  *Quote:*   initial transcode command, and all of them produce an m2v file that is displayed by mplayer as a blank green box, with the occasional frame from the film visible from time to time 
> 
> i've seen this too, I was running debian/unstable with some weird transcode packages, I fixed it by compiling from source (tho I guess you're doing that in gentoo anyway...).  Some codecs transcode really doesn't like for some reason.

 

I'm not actually using the ebuild version because it wouldn't compile, and the problem seems to be in the ebuild itself. I ended up just configuring and compiling it manually, which worked fine. I'll need to check the codecs - I think at least two of the files are xvid encoded. I did try using mplayer to feed the videos to transcode but that doesn't work either.

----------

## Magneto

great post- seems like the most popular linux dvd writing howto

I have a question- I made a dvd with subtitles and everything is fine with it except 2 things

1. What are the maximum tweaks I can put on this command to boost the picture quality?  The video I end up with is choppy at certain points and blotchy in dark areas of the film. File size isnt an issue, Im ending up with a file about 1700mb after transcoding it and it was a 700mb xvid with alot better quality.

```

transcode -i matrix.avi -y ffmpeg --export_prof dvd-pal --export_asr 2 -o matrix -D0 -E 48000 -b 224 -s2 -m matrix.ac3 -J modfps --export_fps 25 
```

2. When I try to capture the 5.1 audio from the 2nd part of the movie using the command you listed in the howto, the build of the ac3 file is fine but when I try to build the mpeg it always fails with an error that it cant find the audio, basically saying its useless.  The thing is when I use the transcode above instead of the 

```
tcextract -d2 -i matrix.avi -a0 -x ac3 > matrix.ac3
```

  the stereo 2 channel ac3 builds fine into the mpeg.  Any idea as to why? Im thinking maybe the way the avi was split is causing this but Im not sure.

Also just remembered do you know of any way to merge .srt files - I would have joined this movie into one whole movie but I couldnt figure out a way to join the srt files- but I guess I could just join the mpeg's that I processed with spumux right?  What's the best way to do that? 

Thanks for any answers- I did go through the whole thread but didnt see a good answer to the first question and no answer to the others.

----------

## LeTene

 *Magneto wrote:*   

> Also just remembered do you know of any way to merge .srt files - I would have joined this movie into one whole movie but I couldnt figure out a way to join the srt files- but I guess I could just join the mpeg's that I processed with spumux right?  What's the best way to do that?.

 

You can use srttool to do this - it used to be a part of the transcode package but mysteriously vanished. To get it, go to http://subtitleripper.sourceforge.net/, download & compile it, then copy the srttool to /usr/bin or somewhere.

Now you can atually use it to merge two .srt files. What you'll need to do is get the very last subtitle timestamp from file 1,  and the very first one from file 2 and do a small calculation before proceeding.

Say the last timestamp of file 1 is 56:10:30,243 and the first one from file 2 is 00:00:02,102. (Those are HH:MM:SS,msec)

You'd need to add them together to produce an offset, the answer in this case is 56:10:32,345 and add this offset to file 2, and merge the result with file 1. Here's a quick example:

```
# cat subtitle_CD2.srt | srttool -a 56:10:32,345 > tmp.srt

# cat subtitle_CD1.srt tmp.srt > subtitle_JOINED.srt
```

CAVEAT!! Rememeber that there are only 60 seconds in minute, and 60 minutes in an hour - take care when adding up!

I hope this is reasoably clear...srttool has an -h swich with a few nice operations available.

----------

## Magneto

 *LeTene wrote:*   

>  *Magneto wrote:*   Also just remembered do you know of any way to merge .srt files - I would have joined this movie into one whole movie but I couldnt figure out a way to join the srt files- but I guess I could just join the mpeg's that I processed with spumux right?  What's the best way to do that?. 
> 
> You can use srttool to do this - it used to be a part of the transcode package but mysteriously vanished. To get it, go to http://subtitleripper.sourceforge.net/, download & compile it, then copy the srttool to /usr/bin or somewhere.
> 
> Now you can atually use it to merge two .srt files. What you'll need to do is get the very last subtitle timestamp from file 1,  and the very first one from file 2 and do a small calculation before proceeding.
> ...

 

Thanks! That's clear but I had to reread it because of my ADD  :Smile: 

Im so happy that I finally made appleseed into a dvd and made a menu  :Smile: 

http://dolemite777.spymac.net/appleseed_menu_background.jpg

and now I can join the parts and change my menu to a chapter menu

----------

## venquessa2

To The Fallen Weeble

Thanks mate.

I hunted for nearly 2 hours through this thread to find out why my title menu's werent working.

Your post advising me to remove the destination directory between runs of dvdauthor sorted it out and they now work.

Cheers mate.

----------

## venquessa2

Just a quick question....

How do I lower the bitrate on the output to use (Super) Long Play, Extended Play?

Also, is it possible, or even useful to use multipass encoding with transcode?  Would this make better quality DVDs and if so, how would one modify the transcode lines...

Thanks in advance, great thread.

----------

## uglyman

hi guys. great howto. I tried to take an avi I had of a PAL tv show (the first episode of coupling from the BBC) and put it on a disc for use in my dvd player (NTSC). I used the faster encode method (lower quality). The only thing I did different from the howto is I used dvdstyler to just throw a quick one button menu on, I just wanted to see if I had done the video right. 

here are the transcode and tcmplex commands I used:

```
transcode -i Coupling\ -\ 01x01\ -\ Flushed.avi -y ffmpeg -F mpeg2 -Z 352x240 --export_asr 3 --zoom=L,1.25:1 -o Coupling\ -\ 01x01\ -\ Flushed -D0 -E 48000 -b 224 -N 0x2000 -s2 -m Coupling\ -\ 01x01\ -\ Flushed.ac3 -J resample,modfps --export_fps 29.97

tcmplex -N -o Coupling\ -\ 01x01\ -\ Flushed.vob -i Coupling\ -\ 01x01\ -\ Flushed.m2v -p Coupling\ -\ 01x01\ -\ Flushed.ac3 -m d   

```

Everything came out fine and played properly on the dvd player, EXCEPT the audio sync is behaving very strangely. At the start of the video it is fine, but by the end it is off by a HUGE amount. I am new to this stuff so I probably just missed something simple. any ideas? Sorry if this has been covered. I tried to look for it in the thread but it is a long thread... and I didn't read it word for word.

Thanks!

----------

## uglyman

hmm I was looking at the man pages for transcode. it appears that -J resample,modfps is backward.. I am trying it the other way. will post back when it is done

----------

## uglyman

nope didn't work

----------

## uglyman

sorry to clutter the forums but I am crunching away on this and I think I figured it out.

I got rid of resample all together. now it is very slightly out of sync but by a constant amount so I can fix that easy enough. I could swear I had seen that sync error that required resample...but it isn't there now.. I probably changed something else like the frame rate or something and made it go away.

oh well. thanks again for the howto

----------

## uglyman

well it plays perfect on one player... on another the audio keeps dropping out. weird. oh well. I guess I am stuck on my other dvd player for now.

----------

## SouthOfHeaven

i have ripped a movie file from a bin / cue file with mencoder

```
mencoder MTF1.bin -o mtf.avi -oac copy -ovc copy
```

then i wanted to be able to burn it on dvd and used the command as explained in this tutorial but i cant do it successfully as it always gives me this error 

```
transcode -V -i mtf.avi -y ffmpeg --export_asr 2 -x dvd -o mtf -D0 -E 48000 -b 224 -s2 -m mtf.ac3 --export_fps 29.97
```

```

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source mtf.avi (ok)

[transcode] V: import format    | unknown RIFF data, AVI (V=dvd|A=(null))

[transcode] V: import frame     | 352x240  1.47:1

[transcode] V: bits/pixel       | 0.711

[transcode] V: decoding fps,frc | 29.970,4

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x50    MPEG layer-2 [44100,16,2]  128 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 5884 (5885.880000)

[transcode] A: adjustment       | 1880@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | 3dnow (3dnow mmxext mmx asm)

[transcode] V: video buffer     | 10 @ 352x240

[import_dvd.so] v0.4.0 (2003-10-02) (video) DVD | (audio) MPEG/AC3/PCM

[export_ffmpeg.so] v0.3.8 (2003-10-11) (video) FFmpeg0.4.8b4683 | (audio) MPEG/AC3/PCM

libdvdread: Using libdvdcss version 1.2.8 for DVD access

libdvdread: Can't open file VIDEO_TS.IFO.

Can't open VMG info.

[import_dvd.so] failed to open DVD mtf.avi

audio import module error: OPEN failed

[transcode] critical: failed to open input source

```

i tried a whole bunch of alternatives but it doesnt make sense, any ideas please ?

----------

## venquessa2

Im a noob here too, but from your output Im confused as to how an avi can be a DVD filesystem.

The import detection seems to see DVD for video, but null for audio, (might be normal) and then it attempts to find the DVD filesystem and fails.

What format is the input CD/DVD from the bin file in?  Can you convert it to an iso and mount it/read it?

Is the bin file from a VCD per chance?  Changing -x dvd to -x vcd might help, but I've never done what you are trying to do.

----------

## venquessa2

This is a tiny warning about a gotcha that can be a complete nightmare to find the cause of....  I speak from first hand experience.

Transcoding using cluster mode.  

You can't export a FAT32 partition with NFS and expect it to work.  [see the NFS howto, search for VFAT]

Transcode will segfault and NFS may destroy the FAT32 partition, slowly and painfully.  I got constant file truncations and mismatched long/short filenames during fsck after the drive was exported with NFS for a few days.

----------

## SouthOfHeaven

i thought that this is what the howto should do is convert a regular avi file into DVD filesystem.

----------

## ivanova

 *SouthOfHeaven wrote:*   

> i have ripped a movie file from a bin / cue file with mencoder
> 
> ```
> mencoder MTF1.bin -o mtf.avi -oac copy -ovc copy
> ```
> ...

 

Is the bin/cue an image of a vcd or dvd? is the avi file playable in mplayer?

The -x option tells transcode what import format to use. You specified dvd, and that is what transcode expects and has a problem with (it looks for the dvd structure, VIDEO_TS.IFO and can't find it). Assuming the avi file is valid, do not use the -x option, so that transcode will autodetect the import format. You can also use tcprobe to see what format the avi file is in.

You probably should mount the image and the use the -x dvd option in transcode though. No need to convert to avi.

----------

## nife

VCDGear is the solution you are looking for to take the mpg outta the .mpg

try using -x mplayer,mplayer that will play anything that mplayer will.  so you should be all good.

----------

## shiznix

 *Magneto wrote:*   

> great post- seems like the most popular linux dvd writing howto
> 
> I have a question- I made a dvd with subtitles and everything is fine with it except 2 things
> 
> 1. What are the maximum tweaks I can put on this command to boost the picture quality?  The video I end up with is choppy at certain points and blotchy in dark areas of the film. File size isnt an issue, Im ending up with a file about 1700mb after transcoding it and it was a 700mb xvid with alot better quality.
> ...

 

The choppiness & poor quality maybe due in part to a mis-calculated --pre_clip value by transcode's --export_prof option (this is rare).

There is a work around you can try that involves calculating your own --pre_clip values instead.

The equation to use is as follows:

```
pre_clip = ((x / a) - y) / 2
```

Say you have for example, a source input file with a resolution of 448x240 that you are encoding to PAL DVD, the desired output resolution would be 720x576 (720x480 for NTSC DVD).

x = the resolution width of the source input file

a = 720/576 = 1.25

y = the resolution height of the source input file

So, using the above, it would translate to:

```
pre_clip = ((448 / 1.25) - 240) / 2 = 59.2 
```

Round up to the nearest whole even number, in this case 60.

So --pre_clip=-60,0,-60,0.

Use it in the following transcode line:

```
transcode -i matrix.avi -y ffmpeg -F mpeg2 -Z 720x576 --export_asr 2 --pre_clip=-60,0,-60,0 --export_fps 25 -o matrix -D0 -E 48000,16,2 -b 224 -N 0x2000 -s2 -m matrix.ac3
```

 *Quote:*   

> 2. When I try to capture the 5.1 audio from the 2nd part of the movie using the command you listed in the howto, the build of the ac3 file is fine but when I try to build the mpeg it always fails with an error that it cant find the audio, basically saying its useless.  The thing is when I use the transcode above instead of the 
> 
> ```
> tcextract -d2 -i matrix.avi -a0 -x ac3 > matrix.ac3
> ```
> ...

 

I came across a similar problem recently with certain .ac3 extracted audio streams in that mplex would just not work on them for some reason. The solution was to pipe the extraction to another tcextract process as raw data & extract that like so:

```
tcextract -d2 -i matrix.avi -a0 -x ac3 | tcextract -d2 -x ac3 -t raw > matrix.ac3
```

The original post has been updated to reflect this as it provides greater compatibility.

Generally speaking, re-encoding split video files into one can be a recipe for disaster & I've not had a great deal of experience on the subject.

In the past I have just encoded the parts to .avi, used transcode's 'avimerge' to join the parts, then transcoded the result to DVD. However, this process will more than likely mess with subtitles & 5.1 streams.

For joining .mpg streams there is either mpgtx or avidemux, they may preserve subtitle & 5.1 streams, worth a shot.

Do let me know how you go.

Thanks  :Smile: 

PS> The howto's transcode lines have been updated to replace '-E 48000' with '-E 48000,16,2' for input source files with a mono soundtrack.

----------

## shiznix

 *SouthOfHeaven wrote:*   

> i have ripped a movie file from a bin / cue file with mencoder
> 
> ```
> mencoder MTF1.bin -o mtf.avi -oac copy -ovc copy
> ```
> ...

 

Do please read the howto carefully, at no point does it say to use the command:

```
transcode -V -i mtf.avi -y ffmpeg --export_asr 2 -x dvd -o mtf -D0 -E 48000 -b 224 -s2 -m mtf.ac3 --export_fps 29.97
```

Where is the '--export_prof' option & where does '-x dvd' or '-V' come from ?

I think the command you need is:

```
transcode -i mtf.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o mtf -D0 -E 48000,16,2 -b 224 -s2 -m mtf.ac3 -J modfps --export_fps 29.97
```

Good luck   :Rolling Eyes: 

----------

## shiznix

 *uglyman wrote:*   

> hi guys. great howto. I tried to take an avi I had of a PAL tv show (the first episode of coupling from the BBC) and put it on a disc for use in my dvd player (NTSC). I used the faster encode method (lower quality). The only thing I did different from the howto is I used dvdstyler to just throw a quick one button menu on, I just wanted to see if I had done the video right. 
> 
> here are the transcode and tcmplex commands I used:
> 
> ```
> ...

 

You may have better success using mplex (as described in the howto) instead of tcmplex.

At this point, dvdauthor is written to work only with mplex.

To quote Scott T. Smith (Dvdauthor's creator) "DO NOT USE TCMPLEX"

Also am a bit perplexed at your '--zoom=L,1.25:1' option, do you mean '--zoom_filter=..." ?

Btw, great TV show, one of the few that makes me cry with laughter  :Smile: 

----------

## shiznix

 *venquessa2 wrote:*   

> Just a quick question....
> 
> How do I lower the bitrate on the output to use (Super) Long Play, Extended Play?
> 
> Also, is it possible, or even useful to use multipass encoding with transcode?  Would this make better quality DVDs and if so, how would one modify the transcode lines...
> ...

 

You can manually lower/raise the bitrate by using the '-w' flag on your transcode line. eg. add '-w3000' to your transcode line if a video bitrate of 3000 kbits/s is desired.

This has just recently been added to the "Tweakage" section.

It is possible to do multi-pass encoding by adding a '-R1' to your transcode line for the first pass, then adding a '-R2' to the same line for the second pass.

When multi-pass encoding I can really only see a difference when encoding to .avi & not to DVD, so I cannot see a use for it in this case.

Would be interested in others reports or screenshots to contradict this though   :Wink: 

----------

## lhurgoyf

Do note. if your using a full length dvd movie (eg 1,5 hours) you might run into filesize-to-big problems. be sure to split up your movie into sections.

----------

## Malak

transcode doesnt even accept the --export_profile dvd-pal option, its an invalid option

why is everythnig different on my system????  ive been trying everything on here with NO success at all, its crazy, ive even reinstalled gentoo from stage1..... NO difference, what am i doing different???

ive re-emerged thigns with all possible use flags, in desperation even used "ffmpeg" etc, even though they are not actual flags, ive tried the masked version, the unmasked version, and its all the same - useless...... please tell me why!!!!

----------

## ivanova

 *Quote:*   

> transcode doesnt even accept the --export_profile dvd-pal option, its an invalid option

 

You realy should start by reading transcode's man page ( type 'man transcode'                without the quotes)

If you do that, you will see that it should be '--export_prof dvd-pal' and not '--export_profile dvd-pal' (without the quotes)

----------

## Malak

..that isnt my problem... ive tried different ways of typing arguments, because nothing works

now i get this......

```
[transcode] auto-probing source movie.avi (ok)

[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x480  1.33:1  

XXX: zoom=yes pre_clip=no

[transcode] V: zoom             | 720x576  1.25:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [44100,16,2]  111 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7056 (7056.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | 3dnowext (3dnowext 3dnow mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[transcode] warning : libavcodec.so: cannot open shared object file: No such file or directory

Loading video import module failed

Did you enable this module when you ran configure?

[transcode] failed to init import modules

[transcode] critical: plug-in initialization failed

```

----------

## tlippy01

Hi guys, I'm having a problem encoding some video (I think the problem starts with mplex): I transcode the original .avi into .mpa and .m2v files using -V -y ffmpeg,mp2.  These files play fine on their own, but after I mplex them together (-f  :Cool:  the resulting .mpg file skips on my computer, and when played in a standalone dvd-player it won't even get past the skip, just kinda loops there.  If I jump a minute or so into the movie it plays alright (though it still skips, unlike the original .avi).  So, since it seems that everything goes smoothly up 'til mplex, I was wondering if anyone could suggest some sort of optimization of/sees anything wring with the way I'm doing this.  Thanks!

----------

## Magneto

 *shiznix wrote:*   

> 
> 
> The choppiness & poor quality maybe due in part to a mis-calculated --pre_clip value by transcode's --export_prof option (this is rare).
> 
> There is a work around you can try that involves calculating your own --pre_clip values instead.
> ...

 

Thanks for the reply 

I tried this out with a new avi file that was merged via avimerge and plays fine in xine and mplayer with no errors however transcode dies everytime with a header error.  I tried avifix and it seemed to work and the transcode process proceeded further but still died quickly

The avifix man is not that indepth im trying to fix the header correctly so I can proceed with the optimal transcoding

```
 transcode -i ghost.avi -y ffmpeg -F mpeg2 -Z 720x480 --export_asr 2 --pre_clip=-37,0,-37,0 --export_fps 25 -o innocence -D0 -E 48000,16,2 -b 224 -N 0x2000 -s2 -m innocence_stereo.ac3

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source ghost.avi (ok)

[transcode] V: import format    | DivX RIFF data, AVI (V=ffmpeg|A=ac3)

[transcode] V: import frame     | 704x396  1.78:1

[transcode] V: pre clip frame   | 704x470 (-37,0,-37,0)

[transcode] V: zoom             | 720x480  1.78:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.208

[transcode] V: decoding fps,frc | 25.000,0

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x2000  AC3          [48000,16,6]  448 kbps

[transcode] A: downmix          | 6 channels -> 2 channels

[transcode] A: export format    | 0x2000  AC3          [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x480

[import_ac3.so] v0.3.2 (2002-02-15) (audio) AC3

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4718: MS MPEG4v1-3/MPEG4/MJPEG

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4718 | (audio) MPEG/AC3/PCM

[import_ac3.so] AC3->PCM

[import_ac3.so] tcextract -a 0 -i "ghost.avi" -x ac3 -d 0 | tcdecode -x ac3 -d 0 -s 1.000000,1.000000,1.000000 -A 0

tc_memcpy: using mmxext for memcpy

[mpeg4 @ 0x4215e428]header damaged

[transcode] warning : [import_ffmpeg.so] frame decoding failed

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: WARNING: Interlacing parameters unknown, use --encode_fields

[export_ffmpeg.so]: INFO: No profile selected

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.333333

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 0.888889

[mpeg2video @ 0x4215e428]removing common factors from framerate

clean up | frame threads | unload modules | cancel signal | internal threads | done

[transcode] encoded 0 frames (0 dropped, 0 cloned), clip length   0.00 s

 
```

----------

## kupopo

Hi.  This seems to be a problem that only I've experienced.  I can't find any other references to it elsewhere.  Every time I try to use multimux to get 5.1 surround, it doesn't work.  I get this output:

```
$ multimux -v -o out.wav left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav

Panteltje multimux-0.1

found input file left.wav

found input file centre.wav

found input file right.wav

found input file left_surround.wav

found input file right_surround.wav

found input file lfe.wav

main(): wave header_size=44

input_files=6

statptr[0]=0x804e310 i=0 statptr[0] -> st_size=117596160

input file left.wav size is 117596160 delay is 0.00 milli seconds

statptr[1]=0x804e310 i=1 statptr[1] -> st_size=117587968

input file centre.wav size is 117587968 delay is 0.00 milli seconds

statptr[2]=0x804e310 i=2 statptr[2] -> st_size=117596160

input file right.wav size is 117596160 delay is 0.00 milli seconds

statptr[3]=0x804e310 i=3 statptr[3] -> st_size=117596160

input file left_surround.wav size is 117596160 delay is 0.00 milli seconds

statptr[4]=0x804e310 i=4 statptr[4] -> st_size=117596160

input file right_surround.wav size is 117596160 delay is 0.00 milli seconds

statptr[5]=0x804e310 i=5 statptr[5] -> st_size=117579776

input file lfe.wav size is 117579776 delay is 0.00 milli seconds

longest_input_file_length=117596160

bytes_to_add[0]=0

bytes_to_add[1]=0

bytes_to_add[2]=0

bytes_to_add[3]=0

bytes_to_add[4]=0

bytes_to_add[5]=0

longest_input_data_length=2147479552

longest_input_file_length=117596160

out_header -> data_length=4294942720

out_header -> length 4294942764

expected_output_filesize is 4294942764

writing wave format file

writing output file out.wav 10998068 (0.26%)
```

You might notice that the output size wants to be 4GB.  I never had the patience to see it out, but this happens every time (and takes a heck of a long time to do it, too).  I can't seem to get multimux to work at all, ever.  Has anyone else had similar problems, or successes?

Edit: it seems that the problem lies in sox.  The output files think they are 328 minutes long:

```
sox: Chunk fmt

sox: Chunk data

sox: Reading Wave file: Microsoft PCM format, 2 channels, 48000 samp/sec

sox:         192000 byte/sec, 4 block align, 16 bits/samp, 235204608 data bytes

sox: Input file out.s1e003.ac3.wav: using sample rate 48000

        size shorts, encoding signed (2's complement), 2 channels

sox: Input file out.s1e003.ac3.wav: comment "out.s1e003.ac3.wav"

sox: Writing Wave file: Microsoft PCM format, 1 channel, 48000 samp/sec

sox:         96000 byte/sec, 2 block align, 16 bits/samp

sox: Output file right.wav: using sample rate 48000

        size shorts, encoding signed (2's complement), 1 channel

sox: Output file: comment "out.s1e003.ac3.wav"
```

I'm not sure what would cause it to think this, but here's the output.  The file plays fine with "play", but XMMS detects that it thinks its 328 minutes, although it skips to the next track after the normal 20 minutes are up.  Any help/ideas are much appreciated.

Thanks,

-steve[/code]

----------

## venquessa2

This is a little add on to the original posting, coupled with the Animated Menu post on page 2.  It just takes it one more step.

Basically this post will tell you how to take multiple titles on the DVD and add snippets of them as thumbnails to the menu.  All the thumbnails run at 25 fps over an animated background, with audio and standard buttons.

Example frames from menu...

http://campbell-multimedia.co.uk/temp/menu1.jpg

http://campbell-multimedia.co.uk/temp/menu2.jpg

http://campbell-multimedia.co.uk/temp/menu3.jpg

http://campbell-multimedia.co.uk/temp/menu4.jpg

These commands assume PAL.  You are advised to read both the above mentioned posts for reference to various stages.

First.

Encode your movies to DVD compliant mpegs, using the original posts methods.  If you are attempting to put 3 whole movies on a disc, like the example below, you will need to calculate the bitrates very carefully... usually around 1800kbps.

Menu background, as per the Animated Menus post.  

I used a terragen movie I made a year or so ago, but you can use any movie you wish.  You can use mine if you wish, download at http://campbell-multimedia.co.uk/terra/test.avi (if you distribute it elsewhere, tag my name on somewhere please).

Convert the avi (or mpeg) to frames.

```

transcode -i test.avi -J fps --export_fps 25 --export_asr 2 --keep_asr -Z 720x576 -y jpg,null -o pics/background 

```

You may need to use "-c <start-frame>-<end-frame>" as well to snip a section out.

Getting the movie thumbnail frames.

Open each movie up in mplayer and press "o" twice to view the time counter.  Now skip through until you find a section of the movie that is the same length as your background movie (test.avi is ten seconds).  This will be your thumb nail, a section at the start will work much faster.

For each movie extract the frames you want, in the example here 3 moives, dodge, oldschool and tgnd are being used...

```
transcode -i dodge.mpg --export_fps 25 -Z 180x144 -y jpg,null -o pics/dodge -c"00:02:38.0-00:02:48.0"
```

```
transcode -i oldschool.mpg --export_fps 25 -Z 180x144 -y jpg,null -o pics/oldschool -c"00:00:45.0-00:00:55.0"
```

```
transcode -i tgnd.mpg --export_fps 25 -Z 180x144 -y jpg,null -o pics/tgnd -c"00:01:02.0-00:01:12.0"
```

This will give you a directory containing (we hope) 3 sets of frames.  Using 10 seconds of test.avi as the base time in this example you will have about 245 frames for each movie.

NOTE: the export size -Z 180x144 is up to you to choose, so you can fit the thumbnails on the background.  Experiment with these, but they become important in just a moment.

Composite the frames together

The theory here is, we combine...

background-frame1 -> movie1-frame1 -> movie2-frame1 -> movie3-frame1

background-frame2 -> movie1-frame2 -> movie2-frame2 -> movie3-frame2 

...

and so on.

First execute the commands for frame one, to get the idea of how your menu will look.

```
composite -geometry +120+100 pics/dodge000000.jpg pics/background000000.jpg   temp.png

```

Check how it looks with "display".  The +120+100 says, merge dodge000000.jpg into background000000.jpg starting at 120 pixels from the left and 100 from the top.

Then, merge the second and third movies to create the final frame.

```
composite -geometry +420+100 pics/oldschool000000.jpg temp.png temp2.png

```

```
composite -geometry 270+336 pics/tgnd000000.jpg  temp2.png   temp.png 

```

Now check out temp.png

Play with the sizes of the thumbnails and their postioon (the geometry option +120+100 for example) to get the shape of the menu you want.

Composite the 4 sets of frames together.

For this I wrote a perl script.  It could be improved Im sure, but it works.

```

#!/usr/bin/perl

# SET THESE!!!!!!!!!!!!!

$mov1 = "dodge";

$mov2 = "oldschool";

$mov3 = "tgnd";

$frames="245";

print "Processing frame: ";

for( $i=0; $i<$frames+1; $i++ ) {

        $count="000$i";

        if ( $i<100 ) {

                $count="0000$i";

        }

        if ( $i<10 ) {

                $count="00000$i";

        }

        $bgf = "background$count.jpg";

        $m1f = $mov1."$count.jpg";

        $m2f = $mov2."$count.jpg";

        $m3f = $mov3."$count.jpg";

        $m1g = "+120+100";      # ALTER ME!!!!!!

        $m2g = "+420+100";      # ALTER ME!!!!!!

        $m3g = "+270+336";      # ALTER ME!!!!!!

        print $i.", ";

`composite -geometry $m1g $m1f $bgf tmp.png`;

`composite -geometry $m2g $m2f tmp.png tmp2.png `;

`composite -geometry $m3g $m3f tmp2.png final$count.png`;

}

print "\n";

```

**Bug fixed on forum.

Alter the appropriate values as marked, save the file as compose.pl

cd into the pics directory and run...

```
perl ../compose.pl
```

Everything should go well.

You will now have another 245 frames called final000xxx.png, check them in your image viewer to be sure they all look OK.

Now... return to the animated menus post and create the menu mpg and audio. Use the final000xxx.pngs for the menu in the png2yuv command

The menu highlights and select areas

Just load up any one of the final000xxx.jpg frames and draw your select and highlight layers.  Save these files as pngs as per the original post.

Basically everything else remains the same.  The only magic I have added is the composition of the movie thumbnails instead of a static menu.

Hope this works for you.  I'll answer what ever queastions I can on it..

----------

## shiznix

Fantastic!

Not tried it yet, but can see how it works, very nice.

Btw, if you are interested in adding audio to looping animated menus, the LiVES video editing system has a handy option to make the video the same length as whatever audio track you select.

http://www.xs4all.nl/~salsaman/lives

----------

## shiznix

 *lhurgoyf wrote:*   

> Do note. if your using a full length dvd movie (eg 1,5 hours) you might run into filesize-to-big problems. be sure to split up your movie into sections.

 

This should simply not happen & so not be necessary.

Are you perhaps trying to encode on a VFAT partition ?

You will run into the 4GB filesize limit if  that's the case.

Perhaps one of your applications used is either old or been miscompiled with large file support(LFS)  missing.

You will run into a 2GB filesize limit if that's the case.

Check installed version release numbers with those listed in the howto post, these versions are known to work.

Thanks

----------

## shiznix

 *Malak wrote:*   

> ..that isnt my problem... ive tried different ways of typing arguments, because nothing works
> 
> now i get this......
> 
> ```
> ...

 

What's the transcode command you are using ?

----------

## shiznix

 *tlippy01 wrote:*   

> Hi guys, I'm having a problem encoding some video (I think the problem starts with mplex): I transcode the original .avi into .mpa and .m2v files using -V -y ffmpeg,mp2.  These files play fine on their own, but after I mplex them together (-f  the resulting .mpg file skips on my computer, and when played in a standalone dvd-player it won't even get past the skip, just kinda loops there.  If I jump a minute or so into the movie it plays alright (though it still skips, unlike the original .avi).  So, since it seems that everything goes smoothly up 'til mplex, I was wondering if anyone could suggest some sort of optimization of/sees anything wring with the way I'm doing this.  Thanks!

 

Hi tlippy01,

Can you post the complete transcode & mplex lines you are using ?

Does mplex give warnings about SCR & DTS ?

----------

## shiznix

 *Magneto wrote:*   

> Thanks for the reply
> 
> I tried this out with a new avi file that was merged via avimerge and plays fine in xine and mplayer with no errors however transcode dies everytime with a header error.  I tried avifix and it seemed to work and the transcode process proceeded further but still died quickly
> 
> The avifix man is not that indepth im trying to fix the header correctly so I can proceed with the optimal transcoding

 

An alternative could be to use avidemux's 'Append video..' option to join the avi parts instead of avimerge.

Do the seperate .avi parts have the same resolution & framerate before joining ?

If they aren't then you may have to extract the 5.1 stream, re-encode parts to a common resolution/framerate, re-mux extracted 5.1 streams with re-encoded parts using avidemux, then join parts.

----------

## shiznix

 *kupopo wrote:*   

> Hi.  This seems to be a problem that only I've experienced.  I can't find any other references to it elsewhere.  Every time I try to use multimux to get 5.1 surround, it doesn't work.  I get this output:
> 
> ```
> $ multimux -v -o out.wav left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav
> 
> ...

 

Not sure why this is occurring.

I do know that if sox doesn't encode properly, multimux will try & create a stupidly huge output.wav (eg. telling sox to extract the left or right channel from a non-stereo, single channel input.wav).

I notice that your multimux-0.1 version is old.

Try upgrading to multimux-0.2.3, it has large file support (>2GB).

Cheers

----------

## Magneto

 *shiznix wrote:*   

>  *Magneto wrote:*   Thanks for the reply
> 
> I tried this out with a new avi file that was merged via avimerge and plays fine in xine and mplayer with no errors however transcode dies everytime with a header error.  I tried avifix and it seemed to work and the transcode process proceeded further but still died quickly
> 
> The avifix man is not that indepth im trying to fix the header correctly so I can proceed with the optimal transcoding 
> ...

 

Youre the shiznix  - im gonna try that they seem to be slightly different frame rates but the same resolution - I'll try avidemux's append instead of the avimerge - I also was gonna try the avifix app for windows

ill be bak with the results  thanks again

----------

## venquessa2

shiznix,

I only just noticed your reply to my query about setting bit rates for the output mpeg.

The problem I had was that when using the -export_prof dvd-pal the -w option was ignored completely.  I believe the docs say that any options specified after the -export_prof will override the implied options, but this didnt work for me  :Sad: 

The solutions were to set all the options myself and not use the export profile or...

Force set the ffmpeg max bit rate.  Transcode would attempt to set the bitrate as per the export_profile (6000 I think) which would cause an abort by ffmpeg "Bit rate higher than max".

Once this was done however, transcode would accept the -w flag.

This was messy until I wrapped it up in a script.  As follows...

```

#!/bin/bash

IN_FILE="$1"

OUT_FILE="$2"

RATE=$3

EX_AS=$4

EX_OPTS=$5

cat >ffmpeg.cfg<<EOF

[mpeg2video]

vrc_minrate=0

vrc_maxrate=$RATE

vrc_buf_size=3584

vrc_buf_aggressivity=99

EOF

transcode -i "$IN_FILE" -o "$OUT_FILE" -y ffmpeg -export_prof dvd-pal -export_asr $EX_AS   -pre_clip 2 -D0 -E 48000 -b 224 -s2 -J modfps -export_fps 25 -w $RATE -m "${OUT_FILE}.ac3" $EX_OPTS

mplex -f 8 -o "$OUT_FILE.mpg" "$OUT_FILE.m2v" "$OUT_FILE.ac3"

```

Usage:

```

./scriptname infile outfile bitrate export_aspect extra_opts

```

ffmpeg will use the file ./ffmpeg.cfg first, so this only sets things up for the current project and it's overwritten for each run.

Of course this might just have been my copy of transcode being funny.

----------

## venquessa2

Just another little script that might help peeps, even though it's for the reverse, aka, DVD to AVI, I thought i'd post it anyway.

It starts by autocalculating the clip factor using the "detectclipping" plugin of transcode.  It then rounds this to a mulltiple of 8 so that fast resize can be used.

It might be of use, so I posted it.

```

#!/bin/bash

VOBS=$1

V_RATE=$2

A_RATE=128

V_RES="576x328,fast" # 16:9

V_ASPECT=3 # 16:9

V_ENCODER="xvid"

OUTPUT_AVI=$3

P1_EX_OPTS=$4

P2_EX_OPTS=$5

# Determing pre clip params.

transcode -i $VOBS -w 3000 -export_asr $V_ASPECT -x vob,null -o /dev/null -y raw -c 4000-4500 -Jdetectclipping | tee | grep detectclipping > $3.temp

CLIP=$(tail -n 1 $3.temp | tr -s " " | cut -d " " --fields 10)

for PARM in $( echo $CLIP | tr "," " " )

do

        C=$(( (($PARM+4) / 8) * 8 )) # fixed point round to mod 8 = 0

        CLIPPARM="${CLIPPARM}${SEP}${C}"

        SEP=","

done

P2_EX_OPTS="${P2_EX_OPTS} -j $CLIPPARM"

transcode \

        -i ${VOBS} \

        -w ${V_RATE} \

        -b ${A_RATE},0,0,0 -M 2 -a 0 \

        -Z $V_RES -export_asr $V_ASPECT \

        -R 1,$3.log -x vob,null -o /dev/null -y $V_ENCODER $P1_EX_OPTS -Jmodfps,resample &&

transcode \

        -i ${VOBS} \

        -w ${V_RATE} \

        -b ${A_RATE},0,0,0 -M 2 -a 0 \

        -Z $V_RES -export_asr $V_ASPECT \

        -R 2,$3.log -x vob -o $OUTPUT_AVI -y $V_ENCODER $P2_EX_OPTS -Jmodfps,resample -pre_clip=0

```

----------

## slaterson

i just created a dvd with this howto (fantastic work!), however there is no VIDEO_TS.IFO file.  therefore i can't play it, view it with xine, or burn it.  there are several VTS_#_#.VOB files, but no VIDEO_TS.* files.

any clues?

thanks,

slate

----------

## shiznix

 *venquessa2 wrote:*   

> shiznix,
> 
> I only just noticed your reply to my query about setting bit rates for the output mpeg.
> 
> The problem I had was that when using the -export_prof dvd-pal the -w option was ignored completely.  I believe the docs say that any options specified after the -export_prof will override the implied options, but this didnt work for me 
> ...

 

Strange, '-w' overrides the export profile here as per the manpage.

Tested using:

```
transcode -i matrix.avi -y ffmpeg --export_prof dvd-pal --export_asr 2 -o matrix -D0 -s2 -m matrix.ac3 -J modfps --export_fps 25 -w9000
```

One way to immediately know if it's working is that

```
[export_ffmpeg.so]: INFO: Set video bitrate to 5000
```

 is no longer present & the bits/pixel value is increased:

```
[transcode] V: bits/pixel       | 0.868
```

----------

## kupopo

 *kupopo wrote:*   

> Hi.  This seems to be a problem that only I've experienced.  I can't find any other references to it elsewhere.  Every time I try to use multimux to get 5.1 surround, it doesn't work.  I get this output:
> 
> ```
> $ multimux -v -o out.wav left.wav centre.wav right.wav left_surround.wav ...
> 
> ...

 

Indeed, I was able to trace the problem down to sox's output.  I don't know why sox continually gives me these incorrectly-timed files, but I wrote a script (which I call soxfix) to fix them:

```
#!/usr/bin/perl

# usage: soxfix [-d] file.wav [file2.wav [...]]

# -d deletes the old file, which is otherwise renamed to file_broken.wav

my $delete = 0;

my $sox = "/usr/bin/sox";

stat($sox) or die "Error: $sox not present!\n";

if ($#ARGV == -1) { # no options

    print "Usage: soxfix [-d] file.wav [file2.wav [...]]\n";

    print "Fixes the length of .wav files, renaming the broken file\n";

    print "  to file_broken.wav unless -d is given.\n";

}

while ($_ = shift(@ARGV)) {

    if ($_ eq "-d") {

        $delete = 1;

    } else { # filename

        $file = $_;

        if (stat($file)) {

            my $newfile = "$file.broken";

            if ($delete == 0) {

                if ($file =~ /\.wav/) {

                    $newfile = $file;

                    $newfile =~ s/\.wav/_broken.wav/;

                }

            }

            system("mv $file $newfile");

            my $length;

            open INFO, "sox $newfile -e stat 2>&1 | sed -ne '/Length/p' | sed -e 's/Length (seconds):\\s*//g'|";

            $length = <INFO>;

            system("$sox $newfile $file trim 0 $length");

            if ($delete == 1) {

                system("rm $newfile");

            }

        }

    }

}
```

-steve

----------

## kupopo

Hi.  I'm  not sure if this has been addressed yet (I have searched and not found anything), but is there any way to get an automatically generated chapter list based on scene changes.  If nothing else, it seems like a TV show would be really easy to "chapterize" based on the commercial breaks, since the screen momentarily goes entirely black and the audio fades completely.  I have seen reference to a few windows tools that offer this feature, but does anyone know of a tool in linux to accomplish this?

Thanks,

-steve

----------

## Malak

Hi,

Ive been making good progress, after reinstalling gentoo, changing all my use flags, compiler options, environment variables, moving files around, compiling, recompiling, recompiling, and experimentation.

Progress so far:

1. Got DivX movie file.

2. 

```
transcode -i movie.avi -y ffmpeg -F mpeg2video --export_prof dvd-pal --export_asr 2 -o out -D0 -s2 -m out.ac3 -J modfps --export_fps 25 -z
```

Please notice the -F option, this was absolutely required, but has not been mentioned once in this thread so far.  Why do I need it when no-one else does? :s

I also moved my DivX file away from a fat32 partition, isnt linux support for this filesytem complete? :s  How can a standard linux app not use the kernel fat32 modules?  It cant have its own filesytem support, right?  Why does it not like fat32?

3. 

```
mplex -f 8 -o output.mpg out.m2v out.ac3
```

4. 

```
dvddirgen -o dvd
```

I had to work around this, because dvdauthor does not accept the -x option, my only guess as to why is that my /etc/make.conf file has -O3.... *recompiles with -O2 and tries again*

```
bash: dvdauthor -x /dconf2.xml 

dvdauthor: invalid option -- x

ERR:  getopt returned bad code 63
```

.. Nope.. didnt work either..

5. 

```
dvdauthor -o dvd --file=output.mpg --video=pal+16:9+720x576 --audio=ac3+en
```

6.  Then...

```
# growisofs -Z /dev/cdrom -dvd-video /dvd

Executing 'mkisofs -dvd-video /dvd | builtin_dd of=/dev/cdrom obs=32k seek=0'

mkisofs: No such file or directory. Faild to open /dvd//VIDEO_TS/VIDEO_TS.IFO

mkisofs: Can't open VMG info for '/dvd/'.

mkisofs: Unable to parse DVD-Video structures.

mkisofs: Unable to make a DVD-Video image.

:-( write failed: Input/output error
```

So.. I had to remove the -dvd-video option..

```
growisofs -Z /dev/cdrom /dvd
```

And that worked, but, again, when I put the DVD in the DVD player it simply reads it for a moment and ejects it. - Why wont dvdauthor act like it does for everyone else?

..it is version 0.5.0 and has no optional use flags

What is wrong with my system?

Why does no-one else have these problems?

As far as I know, the problem from which all others stem is the fct that dvdauthor is messed up.. somehow.. but it just doesnt make any sense.

Nothing on linux has ever given me so many problems or taken so much time to figure out, I cant take anymore.

----------

## slaterson

 *slaterson wrote:*   

> i just created a dvd with this howto (fantastic work!), however there is no VIDEO_TS.IFO file.  therefore i can't play it, view it with xine, or burn it.  there are several VTS_#_#.VOB files, but no VIDEO_TS.* files.

 

i think i figured this one out.  i didn't want an intro video, so i deleted the entire VMGM from dvdauthor.xml.  after reading through the original post, i tried leaving the VMGM section in and only deleted the VOB FILE tag.  now i have the required VIDEO_TS.* files and can make an image.  now i just need to get back home so i can test playback.

slate

----------

## Wedge_

 *Malak wrote:*   

> I also moved my DivX file away from a fat32 partition, isnt linux support for this filesytem complete? :s How can a standard linux app not use the kernel fat32 modules? It cant have its own filesytem support, right? Why does it not like fat32? 

 

What problems did you have? I did everything on a FAT32 partition until the final growisofs command without any problems. That last command wouldn't work because growisofs calls mkisofs, and it's dvd-video flag requires that all the files in the image have uppercase filenames. Changing case doesn't work on FAT32 files, so I had to copy everything to a ReiserFS partition instead. Other than that I had no problems.

----------

## slaterson

ok, i got a playable dvd created.  on the computer the dvd plays fine, however, when i play in my home player the bottom 1/4 of the movie is off the bottom of the screen.  is this an aspect ratio problem?  do i need to re-encode the movie with the aspect ratio set to 3 as opposed to 2?

this is a long process, i'm hoping someone else can offer some experience...

thanks,

slate

----------

## ivanova

There is also some other methods for making animated buttons similar to the method venquessa2 posted.

dvdanimenu is a python script using PIL and is maybe a bit faster than IM. A nice feature is that you can use a template to place the different clips - you can even rotate them a little.

http://ewww.scarymonster.net/dvdanimenu/

y4merge combines the video directly to another video stream and uses y4mscaler ( http://www.mir.com/DMG/Software/ )

This can be a bit faster and does not need temporary files.

http://home.wanadoo.nl/meilof/projects/y4merge/

A nice dvdauthor button plugin for gimp I find useful is at

http://registry.gimp.org/list?baseVersion=6

This makes button highlights easy and you don't have to mess with the spumux xml file (unless you want to  :Wink: 

----------

## kupopo

Slate,

Perhaps you encoded something at 720x576 (PAL) rather than 720x480 (NTSC)?  I'm not sure what an NTSC device would do with a PAL file, but cutting off the bottom 1/4 seems reasonable.

-steve

----------

## Malak

Does anyone know why dvdauthor does not accept the -x argument?

Ive had and used valid xml files before, its not a corrupt file or typographcial error

It really doesnt accept -x, is 0.50 old or something?  What am I missing?   :Confused: 

----------

## Wedge_

 *Malak wrote:*   

> Does anyone know why dvdauthor does not accept the -x argument?
> 
> Ive had and used valid xml files before, its not a corrupt file or typographcial error
> 
> It really doesnt accept -x, is 0.50 old or something?  What am I missing?  

 

The tools list in the first post by Shiznix specifies dvdauthor-0.6.10, which is in portage but marked ~x86. Try upgrading to that version.

----------

## Malak

I love your signature quote Wedge_  i must have typed ACCEPT-KEYWORDS instead of ACCEPT_KEYWORDS or soemthing when i did the emerge command or something, man im stupid   :Crying or Very sad:   :Rolling Eyes:   :Confused:   :Shocked:   :Very Happy: 

----------

## slaterson

 *kupopo wrote:*   

> Slate,
> 
> Perhaps you encoded something at 720x576 (PAL) rather than 720x480 (NTSC)?  I'm not sure what an NTSC device would do with a PAL file, but cutting off the bottom 1/4 seems reasonable.
> 
> -steve

 

i just checked.  my menu is 720x480 and the video was encoded with ntsc, not pal.  when played in my home player, menu is partially off screen and the bottom of the video is off.  i'm stumped...

----------

## slaterson

 *slaterson wrote:*   

>  *kupopo wrote:*   Slate,
> 
> Perhaps you encoded something at 720x576 (PAL) rather than 720x480 (NTSC)?  I'm not sure what an NTSC device would do with a PAL file, but cutting off the bottom 1/4 seems reasonable.
> 
> -steve 
> ...

 

kupopo, i just had the bright idea of checking the original avi video.  the resolution of the avi is 480x272.  the resolution of the video on the dvd is 720x576, as is the resolution of the .m2v files that were created by transcode.  i used the following command to encode:

```
transcode -i /mnt/local/music/video1.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o video1 -D0 -s2 -m video1.ac3 -J modfps --export_fps 29.97
```

why would this produce a pal video instead of ntsc?

----------

## slaterson

ok, with this transcode line:

```
transcode -i /mnt/local/music/video1.avi -y ffmpeg -F mpeg2 -Z 720x480 --export_asr 2 --encode_fields b -o video1 -D0 -E 48000,16,2 -b 224 -N 0x2000 -s2 -m video1.ac3 -J modfps --export_fps 29.97
```

i am able to get a 720x480 video.  but now the picture is a bit warped.  any way to convert this from pal to ntsc and keep the aspect ratio of the video the same?  i would suppose by scaling the vertical resolution a bit (from 480 down to 408)?  is this even reasonable?

i got the numbers by using the aspect ratio of the original file.

----------

## ivanova

for ntsc: 720x480 on dvd with Pixel Aspect Ratio (PAR) of:

              72/79 for non-anamorphic (4:3)

72/79 * 4/3 = 96/79 for anamorphic     (16:9)

So after the dvd player resized, the size on your screen is:

New width = 720*72/79 = 656 for non-anamorphic  Aspect Ratio = 656/480=1.367

New width = 720*96/79 = 875 for anamorphic                AR = 875/480=1.823

To reverse this, get the clip (480x272) to have the resized AR on screen:

new width: 272*1.367=372 for non-anamorphic

           272*1.823=496 for anamorphic

or

new height: 480/1.367=351 for non-anamorphic

            480/1.823=263 for anamorphic

so for anamorphic you can: add  (496-480)/2=8 to sides of the clip

                       or: crop (272-263)/2=4 from top and bottom

and for non-anamorphic you can: add  (351-272)/2=40 to top and bottom

                            or: crop (480-372)/2=54 from sides

Then resize to 720x480 final size and choose correct asr to put on the dvd.

eg. for anamorpic:

   # transcode -Z 720x480 --export_asr 3 -j 0,-8,0,-8  <other options>   

or # transcode -Z 720x480 --export_asr 3 -j 4,0,4,0  <other options>

and for non-anamorpic:

   # transcode -Z 720x480 --export_asr 2 -j -40,0,-40,0  <other options>     

or # transcode -Z 720x480 --export_asr 2 -j 0,54,0,54  <other options>

The above assumes the original clip has the correct AR  :Wink: 

And finally - non of the above is necessary if you use the --export_prof options.  :Wink: 

Everything is calculated for you.

--export_prof dvd-ntsc should produce a clip with size 720x480. If it doesn't something is wrong.

----------

## slaterson

ivanova,

thanks for the detailed reply!  when i user --export_prof dvd-ntsc i am getting 720x576.  if i use -Z 720x480 i get exactly what i ask for.

what could be wrong?

----------

## kupopo

That's good that you can get what you want, although it's odd that you need to tell it the size explicitly.  I've transcoded 720x576 .avi's and they popped out NTSC just fine, so I can't imagine what's going on there.

On another note, I'll just raise this question again - I've seen plenty of mention of scene change detection in various gui packages and encoders, etc., and I can't imagine it's very difficult, but I'm trying to automate setting chapters and it seems to me that the easiest way to do this would be to look for fade-outs, where the screen goes black for a moment.  I haven't been able to find any linux command-line tools that can just tell me what time-indices these occur at, or even possibly splice the file at these places - does anyone know of anything?

-steve

----------

## ivanova

 *slaterson wrote:*   

>  when i use --export_prof dvd-ntsc i am getting 720x576.  if i use -Z 720x480 i get exactly what i ask for.
> 
> what could be wrong?

 

post your whole commandline and the output and add the -q1 option

----------

## slaterson

```
transcode -i /mnt/local/music/video1.avi -y ffmpeg -F mpeg2 --export_asr 2 --encode_fields b -o video1 -D0 -E 48000,16,2 -b 224 -N 0x2000 -s2 -m video1.ac3 -J modfps --export_fps 29.97 -w3000 --export_prof dvd-ntsc -q1

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source /mnt/local/music/Long Way Round/Long Way Round - Episode 02 [digitaldistractions].avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 480x272  1.76:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 480x362 (-46,0,-44,0)

[transcode] V: zoom             | 720x576  1.66:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.289

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] A: export format    | 0x2000  AC3          [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 6408 (6406.400000)

[transcode] A: adjustment       | -1600@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4718: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 29.9700fps

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4718 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "/mnt/local/music/video1.avi" -x mp3 -d 1 | tcdecode -x mp3 -d 1 -z 16000

tc_memcpy: using mmxext for memcpy

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, ntsc video type for video

[export_ffmpeg.so]: INFO: Set frame rate to 29.97

[export_ffmpeg.so]: INFO: Set GOP size to 18

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.333333

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.066667

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

(decode_mp3.c) channels=2, samplerate=48000 Hz, bitrate=128 kbps, (1152)

[mpeg2video @ 0xb53bb388]rc buffer underflow

encoding frames [000000-000048],  18.43 fps, EMT: 0:00:01, ( 8| 1| 0)

[transcode] (sighandler) SIGINT received

clean up | frame threads | unload modules | cancel signal | internal threads | done

[transcode] encoded 44 frames (0 dropped, 7 cloned), clip length   1.76 s
```

here is what i am getting...

----------

## kupopo

Slate,

Your input aspect ratio is 1.76:1 = 16:9.  I am very confused about all of this, so maybe I'm way off, in which case ignore me, but it seems like you want to be using

```
--export_asr 3
```

However, my understanding was that it shouldn't matter and that the aspect ratio and the screen format could be scaled independently, so maybe I don't know what I'm talking about.

(edit) Maybe the --export_asr is overriding the --export_prof dvd-ntsc argument?

-steve

----------

## slaterson

 *kupopo wrote:*   

> Slate,
> 
> Your input aspect ratio is 1.76:1 = 16:9.  I am very confused about all of this, so maybe I'm way off, in which case ignore me, but it seems like you want to be using
> 
> ```
> ...

 

tried this line:

```
transcode -i /mnt/local/music/video1.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o lwr1-asr3 -D0 -s2 -m video1-asr3.ac3 -J modfps --export_fps 29.97
```

this results in the following output:

```
transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source /mnt/local/music/video1.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 480x272  1.76:1

XXX: zoom=yes pre_clip=no

[transcode] V: zoom             | 720x576  1.25:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 6408 (6406.400000)

[transcode] A: adjustment       | -1600@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4718: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 29.9700fps

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4718 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "/mnt/local/music/video1.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 16000

tc_memcpy: using mmxext for memcpy

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, ntsc video type for video

[export_ffmpeg.so]: INFO: Set interlacing to bottom-first

[export_ffmpeg.so]: INFO: Set frame rate to 29.97

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 18

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.422222

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: INFO: No audio resampling necessary, using 48000 Hz

[export_ffmpeg.so]: INFO: Set audio bit rate to 224 kbps

[export_ffmpeg.so]: INFO: Set audio codec to ac3

[mpeg2video @ 0xb53bb388]rc buffer underflow

encoding frames [000000-000023],  11.70 fps, EMT: 0:00:00, ( 8| 1| 0)

[transcode] (sighandler) SIGINT received

encoding frames [000000-000024],  10.76 fps, EMT: 0:00:00, ( 8| 1| 0)

clean up | frame threads | unload modules | cancel signal | internal threads | done

[transcode] encoded 20 frames (0 dropped, 3 cloned), clip length   0.80 s
```

which you can see is still 720x576.  i'm a bit confused as to why, but ivanova solution of cropping the video seems to work.

----------

## ivanova

I get the same as you - the output is resized to 720x576 even when using --export_prof dvd-ntsc . This only happens when the input clip is 25 fps, so I guess this causes transcode to default to PAL. You will have to specify all the options manualy without relying on the profiles. Check the transcode mailing list - maybe it has been discussed before.

The --export_asr setting only sets a flag in the video. This is used by the player  to know if it should resize to 4:3 or 16:9

----------

## slaterson

ivanova,

i made the dvd tonight with the forced resolution of 720x480 and the option -j -40,0,-40,0.  this does the trick top to bottom, so i see the full image, however the left and right are slightly cropped.  is there any way to make the entire video fit?  would -j -40,54,-40,54 work?

in essence, i'm trying to convert a pal video to ntsc, but not having much luck so far.

thanks for the help,

slate

----------

## ivanova

Maybe you mean -j -40,-54,-40,-54 ? Positive numbers will crop the image further.

But that won't work either, you want to keep the Display Aspect Ratio close to 1.367 (for non-anamorphic).

(480+0 +0 )/(272+40+40) = 1.363  :Smile: 

(480+54+54)/(272+40+40) = 1.670  :Sad: 

I assume you are trying to watch the dvd on a tv and because of overscan the sides are chopped off. To add some 54 pixel black bars on the sides:

new height: (480+54+54)/1.367 = 430 

So you want to add 430-272/2=79 to top and bottom and 54 to the sides

When you crop and resize it is usualy best to use multiples of 2 and sometimes 4, otherwise strange things can happen. So we will add 80 pixels to the top and bottom.

-Z 720x480 --export_asr 2 -j -80,-54,-80,-54

----------

## soupus

Hey, guys, when I run spumux I'm getting this error:

Err: Cannot pick button masks

Is anyone else having this problem/know a solution?

Thanks in advance,

Lucas

----------

## slaterson

 *soupus wrote:*   

> Hey, guys, when I run spumux I'm getting this error:
> 
> Err: Cannot pick button masks
> 
> Is anyone else having this problem/know a solution?
> ...

 

how many colors were identified?

i tried making a menu with a fuzzy button highlight.  the button highlight had a lot of colors due to the fade to the menu background color.  spumux identied 58 colors and wouldn't make the menu.

----------

## kupopo

Lucas,

I had a similar problem for a while.  Are you making sure that the .PNG files are transparent everywhere outside the buttons?

-steve

----------

## soupus

 *slaterson wrote:*   

>  *soupus wrote:*   Hey, guys, when I run spumux I'm getting this error:
> 
> Err: Cannot pick button masks
> 
> Is anyone else having this problem/know a solution?
> ...

 

I believe it was fifteen. What colours is spumux identifying exactly? The colours of the background or of the .PNG layers? 

 *kupopo wrote:*   

> Lucas,
> 
> I had a similar problem for a while.  Are you making sure that the .PNG files are transparent everywhere outside the buttons?
> 
> -steve

 

I thought so.  Is there an accurate way to verify this? 

Thanks for the speedy replies guys.  :Very Happy: 

----------

## ivanova

You can have no more than 4 colors in your picture. That is 3 colors and a transparent color. If you don't have transparency in the picture you have to specify in the xml file which color to use as the transparent color. You also have to make sure that the same pixels are used in the different layers (image/highlight/select). An easy way to get compliant images is to use the 

dvdauthor-buttons plugin for gimp that you can get here:

http://registry.gimp.org/list?baseVersion=6

Just copy the script to your ~/.gimp-<version>/scripts/ directory and it will show up under the Script-Fu menu.

----------

## shiznix

 *Malak wrote:*   

> Hi,
> 
> Ive been making good progress, after reinstalling gentoo, changing all my use flags, compiler options, environment variables, moving files around, compiling, recompiling, recompiling, and experimentation.
> 
> Progress so far:
> ...

 

I'd be most interested to see what your transcode version is, 0.6.11 perhaps ?

My thought is that you are trying to use commands listed in the howto which are only available in masked package versions.

For example, transcode versions 0.6.12, 0.6.13, 0.6.14 are masked in portage & need to be unmasked before they can be emerged.

If I recall correctly, the '--export_prof' option is only present in transcode versions >=0.6.12, which is probably why this option is not working for you & also why you have to specify '-F mpeg2video', this is not necessary with '--export_prof'.

I have added a small section at the start of the guide to list what packages are masked & include a small example on howto unmask these packages ready for emerging.

 *Quote:*   

> I also moved my DivX file away from a fat32 partition, isnt linux support for this filesytem complete? :s  How can a standard linux app not use the kernel fat32 modules?  It cant have its own filesytem support, right?  Why does it not like fat32?
> 
> 3. 
> 
> ```
> ...

 

More masked package version problems here I believe, using dvdauthor version 0.5.0 below I see.

Dvdauthor's '-x' option specifies an .xml configuration file. XML support made it into dvdauthor around 0.6.8 I think.

 *Quote:*   

> 
> 
> ```
> bash: dvdauthor -x /dconf2.xml 
> 
> ...

 

Unmask, unmask, unmask   :Wink: 

----------

## shiznix

 *slaterson wrote:*   

>  *kupopo wrote:*   Slate,
> 
> Your input aspect ratio is 1.76:1 = 16:9.  I am very confused about all of this, so maybe I'm way off, in which case ignore me, but it seems like you want to be using
> 
> ```
> ...

 

This is a known bug in transcode, see https://bugs.gentoo.org/show_bug.cgi?id=76453

When '--export_prof' decides a zoom or pre_clip is necessary, it defaults to the PAL profile's resolution no matter what profile is selected (eg. NTSC).

The problem lies in transcode's 'educated guess', commenting out the following lines in src/transcode.c fixes this:

```
      // Make an educated guess if this is pal or ntsc

/*    if (vob->im_v_height == 288 || vob->im_v_height == 576) impal = 1;

      if ((int)vob->fps == 25 || vob->im_frc == 3) impal = 1;*/
```

Transcode-devel have been informed, patch also available here:

http://mightylegends.zapto.org/dvd/transcode-0.6.14-profiles_fix.diffLast edited by shiznix on Sun Jan 23, 2005 11:32 pm; edited 1 time in total

----------

## soupus

 *ivanova wrote:*   

> You can have no more than 4 colors in your picture. That is 3 colors and a transparent color. If you don't have transparency in the picture you have to specify in the xml file which color to use as the transparent color. You also have to make sure that the same pixels are used in the different layers (image/highlight/select). An easy way to get compliant images is to use the 
> 
> dvdauthor-buttons plugin for gimp that you can get here:
> 
> http://registry.gimp.org/list?baseVersion=6
> ...

 

Hm, so the colours it identifies are infact the colours in highlight and select layers and not the background, right? Sorry, I'm just trying to clarify the process for my own devious reasons.

You've been a great help. Thank you.

----------

## rapsure

When I run:

```
dvdauthor -x startrekdvd.xml
```

I receive this error message:

```
DVDAuthor::dvdauthor, version 0.6.10.

Build options: gnugetopt magick iconv freetype

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=C

INFO: Converting filenames to ANSI_X3.4-1968

dvdauthor: src/dvdauthor.c:908: pgc_set_post: Assertion `!p->posti' failed.

Aborted

```

Does anyone have a solution to this?[/code]

----------

## rapsure

I thought that you might want the XML file to see if it was done right.

```

<dvdauthor dest="dvd">

   <titleset>

      <menus>

         <pgc>

            <button> jump title 1; </button>

            <button> jump title 2; </button>

            <button> jump title 3; </button>

            <vob file="startrekmenu.mpg"/>

         </pgc>

      </menus>

      <titles>

         <pgc>

            <vob file="startrek120404.mpg" chapters="0,7:00,14:00,21:00,28:00,35:00"/>

               <post> jump title 2;</post>

            <vob file="startrek011405.mpg" chapters="0,7:00,14:00,21:00,28:00,35:00"/>

               <post> jump title 3;</post>

            <vob file="startrek012105.mpg" chapters="0,7:00,14:00,21:00,28:00,35:00"/>

               <post> call menu;</post>

         </pgc>

      </titles>

   </titleset>

</dvdauthor>
```

The system was updated one week ago using: emerge -uD world, and the kernel is gentoo-dev-sources-2.6.10-r4

----------

## rapsure

I got it to work.  So I guess I don't need any help.  :Very Happy: 

----------

## LinuxThis

2 things:

1) I'd suggest that each time you make an update to the first post, put the last date of modification and say a version number of the revision, that we we can easily know if something has changed.

2) alright, this isn't exactly on topic but its related.  I've been trying to get this figured out for about 2 weeks now, its driving me nuts!

I've generated some video from cinelerra, a mpeg2 video stream at 29.97fps (its interlaced) and ac3 audio.

tcprobe reports the .m2v file from cinelerra as 29.97 fps 

the weird part is:

if I then multiplex it with either 'mplex -f 8' or 'tcmplex' and run tcprobe on the final .mpg file to be burned to DVD, it is reported as 23.97fps (not good)!  The original video is interlaced, and the final video is also interlaced, so I don't see why it takes the framerate down...

also, say I export out of cinelerra as any other file formats (like quicktime), the resulting video is 29.97fps (correct).  if I take that video and then run transcode on it like in this tutorial, the result .m2v file is also 29.97 fps (correct), but mplex'ing it together like in the tutorial results in the same thing: a file reported as 23.97 fps (not good)!

the video actually plays fine on the computer, but on the dvd player it looks like the frames are blended somehow (motion is consistently jerky).  for example, one shot of someone throwing a ball, if paused, shows two balls on the screen at once (like its being duplicated somehow?)

any ideas what might be going wrong?  I'd almost guess it was a bug in mplex or tcmplex, but they've worked for other stuff on this box before...

-Dom

----------

## ivanova

 *soupus wrote:*   

> Hm, so the colours it identifies are infact the colours in highlight and select layers and not the background, right? Sorry, I'm just trying to clarify the process for my own devious reasons.

 

If by background you mean the actual video that is overlayed with the subtitle/highlights then yes.  :Wink: 

----------

## ZmiyGorinich

I use avidemux2 for convert avo to mpeg.

This is very cool program

----------

## shiznix

 *LinuxThis wrote:*   

> 2 things:
> 
> 1) I'd suggest that each time you make an update to the first post, put the last date of modification and say a version number of the revision, that we we can easily know if something has changed.

 

This is done automatically by the bulletin board, read the bottom of the post:

'Last edited by shiznix on Sat Jan 22, 2005 5:42 am; edited 68 times in total'

 *Quote:*   

> 2) alright, this isn't exactly on topic but its related.  I've been trying to get this figured out for about 2 weeks now, its driving me nuts!
> 
> I've generated some video from cinelerra, a mpeg2 video stream at 29.97fps (its interlaced) and ac3 audio.
> 
> tcprobe reports the .m2v file from cinelerra as 29.97 fps 
> ...

 

I would say that the problem lies not with mplex or tcmplex.

To have the same bad result using two very different muxers tends towards problems with the files being muxed

If frames look blended or duplicated, then the NTSC (29.97 FPS) file has probably already been converted from a Film NTSC (23.976 FPS) file, or telecined.

Read here -> /usr/share/doc/transcode/README.Inverse.Telecine.txt

----------

## lavish

 *wmartino wrote:*   

> I am trying to do some make some dvd's on my AMD64. I have emerged all of the packages required. When I try to run transcode I get the following error.
> 
> ```
> [CUT]
> ```
> ...

 

Same here... I opened this bug

----------

## shiznix

 *lavish wrote:*   

>  *wmartino wrote:*   I am trying to do some make some dvd's on my AMD64. I have emerged all of the packages required. When I try to run transcode I get the following error.
> 
> ```
> [CUT]
> ```
> ...

 

Just a 64-bit issue, use '-y ffmpeg', see here -> https://bugs.gentoo.org/show_bug.cgi?id=7878

Your system specs at the bottom of your post mention that you are also using NPTL threads.

Expect more problems with this, transcode falls asleep & hangs after a short while waiting for a thread process that doesn't exist, when using NPTL.

The workaround for now is to issue an 'export LD_ASSUME_KERNEL=2.2.5' in the same terminal you will be transcoding from, before you start the transcode process.

----------

## slaterson

 *shiznix wrote:*   

> The problem lies in transcode's 'educated guess', commenting out the following lines in src/transcode.c fixes this:
> 
> ```
>       // Make an educated guess if this is pal or ntsc
> 
> ...

 

shiznix,

this did the trick.  now all i need to do is re-encode 7 hours of video to see if my home player performs correctly.  :Smile:   i'm hoping it will....

thanks,

slate

----------

## kupopo

I have a few questions about audio.  First, this has been on the main post for a while, but I always get an error from dd when I run this:

 *shiznix wrote:*   

> For NTSC: 
> 
> ```
> dd if=/dev/zero bs=4 count=1601.6 | toolame -b 128 -s 48 /dev/stdin menu_audio.ac3
> ```
> ...

 

```
dd: invalid number `1601.6'
```

What should the number be?  I've just been using 1601, but I don't really know.

Also, were the references to "-J resample" removed from the post?  Are they obsolete?  I find I still need to use them or else my sound gets out of sync.

-steve

----------

## nife

Thanks for this thread.  It got me started on Transcode.  Great peice of software.  Anyway I now use a script from a regular of the lists there.  I love aviToVob.  http://inferno.slug.org/cgi-bin/wiki?AviToVob  Its great.  It takes a little longer then the fastest way I've seen, but it doesn't need to worry about the sync issues.  ffmpeg is great.  The latest releases are pretty good.

----------

## shiznix

 *nife wrote:*   

> Thanks for this thread.  It got me started on Transcode.  Great peice of software.  Anyway I now use a script from a regular of the lists there.  I love aviToVob. 

 Well written, but for NTSC only (sorry PAL users) & uses mencoder to convert the framerate resulting in less smooth motion in high activity scenes than using '-J modfps'.

The author Phil Ehrens has talked about adding in PAL support for a while now, but nothing has eventuated (I may just come to the party on this one)  :Wink: 

 *Quote:*   

> http://inferno.slug.org/cgi-bin/wiki?AviToVob  Its great.  It takes a little longer then the fastest way I've seen, but it doesn't need to worry about the sync issues.

 '-J modfps' takes care of this (see above).

 *Quote:*   

> ffmpeg is great.  The latest releases are pretty good.

 

Phil also does an appreciative job at maintaining the transcode wiki at http://www.transcoding.org/cgi-bin/transcode

----------

## shiznix

 *kupopo wrote:*   

> I have a few questions about audio.  First, this has been on the main post for a while, but I always get an error from dd when I run this:
> 
>  *shiznix wrote:*   For NTSC: 
> 
> ```
> ...

 

You are right, it should be 1601, not 1601.6, this has been fixed & thanks.

 *Quote:*   

> Also, were the references to "-J resample" removed from the post?  Are they obsolete?  I find I still need to use them or else my sound gets out of sync.

 

Yes, '-J resample' was recently removed from the post, no it is not obsolete, but no longer applies in this situation.

'-J modfps' will still need to be used, but adding or removing '-J resample' should not affect sync in any way.

'-J resample' was added to remedy the following error...

```

WARNING: Selected audio sample rate (48000 Hz) not equal to input sample rate (44100 Hz), use -J
```

...and to have transcode create a correctly re-sampled audio stream that dvdauthor would recognise.

This error was only occurring because I was specifying '--export_prof' & '-E 48000,16,2 -b 224' both on the same line, when '--export_prof' does the job of both.

In a nutshell, confusing the export profile by telling transcode to resample twice.

Removing '-E 48000,16,2 -b 224' & letting '--export_prof' do the work means the error will no longer appear & so '-J resample' is no longer necessary here.

Hope that makes sense.

Also makes the transcode command line much easier to read/remember.

----------

## neilhwatson

Your Howto mentions using the transcode option --export-prof.  However, that option is not available to me:

```
transcode: unrecognized option `--export_prof'

transcode v0.6.11 (C) 2001-2003 Thomas Oestreich, 2003 T. Bitterberg

'transcode -h | more' shows a list of available command line options.
```

----------

## shiznix

 *neilhwatson wrote:*   

> Your Howto mentions using the transcode option --export-prof.  However, that option is not available to me:
> 
> ```
> transcode: unrecognized option `--export_prof'
> 
> ...

 

Hi Neil,

You need to unmask & upgrade your transcode version from 0.6.11 to 0.6.14, this is described in the howto.

Thanks   :Wink: 

----------

## qwijibow

ive tried mkdvd, ive tried this script... but nomatter  what i try, i cannot encode an AVI to a dvd  :Sad: 

poor old me.

```
 transcode -i Shaun.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o shaun -D0 -s2 \

> -m shaun.ac3 -J modfps --export_fps 25

transcode v0.6.12 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Shaun.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x272  2.35:1

[transcode] V: pre clip frame   | 640x338 (-33,0,-33,0)

[transcode] V: zoom             | 720x576  1.55:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  113 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.10 (2003-12-30) (video)  FFmpeg0.4.8b4695: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 25.0000fps

[filter_modfps.so] No framerate conversion requested, exiting

[transcode] warning : filter plugin 'modfps' returned error - plugin skipped

[export_ffmpeg.so] v0.3.11 (2003-12-30) (video) FFmpeg0.4.8b4695 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Shaun.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 48000

[export_ffmpeg.so] You must chose a codec by supplying '-F <codecname>'. A list of supported codecs can be obtained with '-F list'.

[transcode] warning : (encoder.c) video export module error: init failed

[transcode] critical: failed to init encoder

```

whats wrong !???

im using an upto date Gentoo on the AMD64

----------

## shiznix

 *qwijibow wrote:*   

> ive tried mkdvd, ive tried this script... but nomatter  what i try, i cannot encode an AVI to a dvd 
> 
> poor old me.
> 
> ```
> ...

 

Hi qwijibow,

You need to unmask & upgrade your transcode version from 0.6.12 to 0.6.14, this is described in the howto.

Thanks  :Wink: 

----------

## qwijibow

Ever spent hours stareing at an infinite loop like,

while(x=0) { // do somthing untill x is non zero }

 and not being able to work out why its not working correctly ????

then it suddenly comes to you.

thats how i feel right now  :Very Happy: 

just couldnt work out why it was working perfect for everyone except me.

i was --->this<---- close to opening up an X-file... lol.

thanks !!!

----------

## qwijibow

OOPS, nope, still not there. i npw have the correct versions of software.

```

bash-2.05b$  transcode -i Movie.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o movie -D0 -s2

 -m movie.ac3 -J modfps --export_fps 25

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Movie.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x272  2.35:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)

[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  113 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

tc_memcpy: using libc for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4718: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 25.0000fps

[filter_modfps.so] No framerate conversion requested, exiting

[transcode] warning : filter plugin 'modfps' returned error - plugin skipped

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4718 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Movie.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 48000

bash-2.05b$ tc_memcpy: using libc for memcpy

Can't step back 48!

```

i did a strace and found the following lines of interest at the end

```

brk(0x5d4000)                           = 0x5d4000

brk(0x5f5000)                           = 0x5f5000

brk(0x616000)                           = 0x616000

mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a9ba28000

mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2a9ba68000

rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0

write(4, "\240\24W\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240"..., 168) = 168

rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0

rt_sigsuspend([INT TERM] <unfinished ...>

--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---

<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)

rt_sigreturn(0x20)                      = -1 EINTR (Interrupted system call)

rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0

write(4, "\240\24W\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20R"..., 168) = 168

rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0

+++ killed by SIGKILL +++

```

any more idea's ?

thanks for the help so far.

----------

## nife

 *qwijibow wrote:*   

> OOPS, nope, still not there. i npw have the correct versions of software.
> 
> ```
> 
> bash-2.05b$  transcode -i Movie.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o movie -D0 -s2
> ...

 

do you have nasm installed ?

I have

```
nasm -v

NASM version 0.98.38 compiled on Sep 12 2004
```

memcpy in transcode 0.6.14 uses nasm so that could be one issue, though I'm almost reaching at straws.

----------

## qwijibow

```
tux root # nasm -v

-bash: nasm: command not found

```

Pingo !?

there is anouther grat dvd encoding software at freshmeat called mkdvd.

it fails the exact same way this does, with a mysteriouse sig_kill.

im guessing this is a simple emerge nasm ?

oops, nope. emergeed the same nasm version as you and i get a similar error

```

bash-2.05b$ transcode -i Movie.avi -y ffmpeg --export_prof dvd-pal --export_asr3 -o movie -D0 -s2 -m movie.ac3 -J modfps --export_fps 25

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Movie.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x272  2.35:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)

[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  113 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

tc_memcpy: using libc for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4718: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 25.0000fps

[filter_modfps.so] No framerate conversion requested, exiting

[transcode] warning : filter plugin 'modfps' returned error - plugin skipped

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4718 | (audio)MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Movie.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 48000

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

tc_memcpy: using libc for memcpy

[export_ffmpeg.so]: INFO: Selected dvd profile, pal video type for video

[export_ffmpeg.so]: INFO: Set interlacing to top-first

[export_ffmpeg.so]: INFO: Set frame rate to 25

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 15

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.422222

[mpeg2video @ 0x2a98cc0cd0]removing common factors from framerate

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: INFO: No audio resampling necessary, using 48000 Hz

[export_ffmpeg.so]: INFO: Set audio bit rate to 224 kbps

[export_ffmpeg.so]: INFO: Set audio codec to ac3

Can't step back 48!

Killed

```

----------

## shiznix

For convenience sake & as a workaround to some annoying bugs cropping up with using transcode's  '--export_prof' option, the Any2Vob script has been created.

The export profiles are still in my opinion the easiest way to encode & do work fine ~90% of the time, though for stability & successful encodings, the script uses the old tried & true method of manually zooming & issuing clip values via '-j' instead of '--pre_clip' (very close to reverting the howto back to this method & ditching '--export_prof' for the time being).   :Confused: 

The script basically automates the entire 'Encoding the movies' section.

Encodes PAL/NTSC DVD compliant VOBs from any PC multimedia file, ready for dvdauthoring.

Optionally compresses the encoded file by reducing the resolution & video bitrate (--compress=yes).

Optionally creates a 5.1 surround sound audio track if one does not already exist in the original input file (enabled by default).

Usage:        ./any2vob -h

Example1:     ./any2vob --aspect=16:9 --format=ntsc --compress=yes -i movie.avi video.mov wedding.wmv mythtv.nuv svcd.bin stuff.asf foo.mpg

Example2:     ./any2vob --aspect=4:3 --surround=no -i /path/to/directory/containing/files/*

Anyway, try it out here -> http://mightylegends.zapto.org/dvd/any2vob-0.14.sh

Appreciate any feedback, thanks.   :Cool: Last edited by shiznix on Fri Jan 28, 2005 10:40 am; edited 2 times in total

----------

## qwijibow

```
./any2vob-0.12.sh --format=pal --surround=no --aspect=16:9 -i ./Movie.avi

Program 'multimux' is missing, please install it first.
```

no mention of multi-mix in the portage tree, soureforge or freshmeat, or in th folder the download link is in.

any clues about where to obtain this dependency ?

EDIT

 *Quote:*   

> http://panteltje.com/panteltje/dvd/

 

REPEAT 10 times... i WILL read scripts i WILL read scripts, i WILL READ SCRIPTS !

sorry for this stupid post.

im getting so frustrated at this, everything on my machine works perfecct, but for reasons nobdy can explain, it just refuses to allow me to make DVD's

----------

## qwijibow

```

bash-2.05b$ ./any2vob-0.12.sh --aspect=16:9 --format=pal --surround=no --compress=no -i Movie.avi

File(s) to process: Movie.avi

*********** NEW ENCODING of Movie.avi started at Thu Jan 27 14:13:44 GMT 2005 ***********

File Movie.avi is of type: AVI

Running: transcode -i Movie.avi -y ffmpeg -F mpeg2 -Z 720x576 --export_asr 3 --encode_fields t -j -56,0,-54,0 -o Movie -D0-E 48000,16,2 -b 224 -N 0x2000 -s2 -m Movie.ac3 -J modfps --export_fps 25

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Movie.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x272  2.35:1

[transcode] V: clip frame (<-)  | 640x382

[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  113 kbps

[transcode] A: export format    | 0x2000  AC3          [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

tc_memcpy: using libc for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4718: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 25.0000fps

[filter_modfps.so] No framerate conversion requested, exiting

[transcode] warning : filter plugin 'modfps' returned error - plugin skipped

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4718 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Movie.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 48000

tc_memcpy: using libc for memcpy

./any2vob-0.12.sh: line 227:  8897 Killed                  transcode -i $file -y ffmpeg -F mpeg2 -Z 720x576 --export_asr $ASPECT --encode_fields t $PRECLIP_ARGS -o $name $AUDIO_ARGS -J modfps --export_fps $FPS

Running: mplex -f8 -o Movie.VOB Movie.m2v Movie.ac3

   INFO: [mplex] mplex version 1.6.2 (2.2.3 $Date: 2004/01/13 20:45:26 $)

**ERROR: [mplex] Unable to open file Movie.m2v for reading.

rm: cannot remove `Movie.m2v': No such file or directory

rm: cannot remove `Movie.ac3': No such file or directory

Movie.avi finished, new VOB file is called Movie.VOB

bash-2.05b$ Can't step back 48

```

but my problem seems to stem from transcode, not your script.

should i be converned about the following  *Quote:*   

> [ transcode ] warning : filter plugin 'modfps' returned error - plugin skipped

 

is this normal ? is it possable this modfps module is killing the whole porcess ?

----------

## qwijibow

ahaaaaa.....

after tweaking and fidleing ive managed to get transcode working.. (doing the first part from pae one now)

however i had to remove the modfps package, liuckily my movies are already in 25fps, but to save effort use other scripts that have modfps hard coded, howdi i determine whats wrong with modfps and fix it ???

----------

## nife

 *qwijibow wrote:*   

> ahaaaaa.....
> 
> after tweaking and fidleing ive managed to get transcode working.. (doing the first part from pae one now)
> 
> however i had to remove the modfps package, liuckily my movies are already in 25fps, but to save effort use other scripts that have modfps hard coded, howdi i determine whats wrong with modfps and fix it ???

 

Are 

filter_modfps.la  filter_modfps.so

in /usr/lib/transcode

----------

## shiznix

 *qwijibow wrote:*   

> ahaaaaa.....
> 
> after tweaking and fidleing ive managed to get transcode working.. (doing the first part from pae one now)
> 
> however i had to remove the modfps package, liuckily my movies are already in 25fps, but to save effort use other scripts that have modfps hard coded, howdi i determine whats wrong with modfps and fix it ???

 This is strange.

Btw, don't be concerned about

```
[ transcode ] warning : filter plugin 'modfps' returned error - plugin skipped
```

It just means that it is being skipped as the source file's frame rate is the same as the frame rate being asked to encode to.

I would throw a guess & say that it is probably a 64-bit problem.

 *Quote:*   

> Are filter_modfps.la filter_modfps.so in /usr/lib/transcode

 

This is important, some libs have been known to go awol when compiling transcode for AMD64 (eg. export_mpeg.so springs to mind).

Does this happen with other movies that have different resolution/frame rate etc. ?

----------

## qwijibow

```
bash-2.05b$ ls /usr/lib/transcode/ | grep filter_modfps

filter_modfps.la

filter_modfps.s
```

yes they are.

but if i remove the -J modfps --export-fps 25 part, then everything encodes beautifully.

all my AVI's are taken from the same source, and so are all identicly format, when i have time, i will attempt to encode the matrix trailer.

thanks for all the help.ill post back next time i have chance to work on it.

----------

## soupus

Hey guys, I've successfully completed a dvd that runs absolutely perfect on my computers dvd rom, but fails in a regular dvd player. The menu page audio cuts out early and then repeats, and the movie's audio is a higher frequency and skips. I'd expect it was just a mplexing error, except it runs fine on my computer?

Any suggestions?

----------

## slaterson

shiznix,

i have an mpeg2 video, 480x480, that i want to make into a dvd.  then i run transcode, the m2v file that is created is just a green video.  does transcode need some different options for working with mpg input?

the transcode command:

```
transcode -i essions.mpg -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o sessions -D0 -s2 -m sessions.ac3 -J modfps --export_fps 29.97
```

thanks,

slate

----------

## ivanova

 *soupus wrote:*   

> The menu page audio cuts out early and then repeats

 

Check if the video and audio stream duration is the same - my dvdplayer (and ogle) doesn't like it when the video stream is shorter than the audio stream.

 *soupus wrote:*   

> the movie's audio is a higher frequency and skips.

 

Check that the audio samplerate is 48kHz - hardware dvd players expect 48kHz  and will play eg. 44.1kHz a bit faster. 

@slaterson

Post the output from transcode

----------

## decourl

It appears that many film-sourced commercial DVDs contain MPEG

which is encoded at 23.97 fps rather than the NTSC standard 29.97 fps.

I understand that these DVDs have a flag set which instructs the player

to perform a pulldown in cases where a television set is targeted.

As far as the Linux tools for DVD mastering are concerned, I see that

most of the documentation instructs the user to perform a frame rate

adjustment to 29.97 fps before coding the MPEG.

In fact, I have found that dvdauthor will produce a warning if it

encounters some other frame rate.

If commercial DVD producers find it advantageous to utilize soft 

telecine - presumably to allow for longer features and/or higher

bitrates - is it not all the more advantageous for a home user (already

disadvantaged with lower-capacity media) to use the same technique?

With regard to this "telecine flag", at what step/layer would this flag

be introduced: encoding, multiplexing, or mastering?  Do Linux tools

exist for this purpose?

Thanks,

-Lincoln DeCoursey

----------

## shiznix

 *decourl wrote:*   

> It appears that many film-sourced commercial DVDs contain MPEG
> 
> which is encoded at 23.97 fps rather than the NTSC standard 29.97 fps.
> 
> I understand that these DVDs have a flag set which instructs the player
> ...

 

Introduced at the encoding level.

Keep the encoded framerate at 23.97 & use transcode's '--pulldown' option to set this flag on.

----------

## kupopo

I've been trying to make this pulldown work, but have had very elusive errors.  Specifically, I can get an authored DVD image which xine plays perfectly.  But when I burn it on a DVD+RW to try on my set top (Phillips DVP642), the sound, while in synch and not drifting (I think), skips horribly.  I don't understand what is going wrong.  This is my command line:

```
transcode -y ffmpeg --export_prof dvd-ntsc -w 3600 -Z 720x480 --export_asr 3 --pulldown --export_fps 23.976,1 -J fps -i in.avi -o out -m out.ac3
```

I can eliminate --pulldown and change to --export_fps 29.97 and it works fine, although I think the video is not as smooth (maybe that's in my head).

Thanks,

-steve

----------

## paladin151

 *ixtow wrote:*   

> I'm sure to be ignored for this, but I'm at my witts end, again.
> 
> I cannot perform even the first step of this tutorial, it simply does not work and I can find no reason why.
> 
> ```
> ...

 

I had this same problem too but found out that i had entered -b 244 instead of -b 224

----------

## soupus

 *ivanova wrote:*   

>  *soupus wrote:*   The menu page audio cuts out early and then repeats 
> 
> Check if the video and audio stream duration is the same - my dvdplayer (and ogle) doesn't like it when the video stream is shorter than the audio stream.
> 
>  *soupus wrote:*   the movie's audio is a higher frequency and skips. 
> ...

 

Sorry, how can I check the samplerate?

----------

## slaterson

 *ivanova wrote:*   

> @slaterson
> 
> Post the output from transcode

 

ivanova, regarding my green m2v file...  here is the transcode output:

```
transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 29 (1160 ms) | AV 1196 ms | 36 ms

[transcode] auto-probing source mmw-sessions.mpg (ok)

[transcode] V: import format    | MPEG-2  (V=null|A=vob)

[transcode] V: AV demux/sync    | (1) sync AV at initial MPEG sequence

[transcode] V: import frame     | disabled

XXX: zoom=yes pre_clip=no

[transcode] V: zoom             | 720x480   nan:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.208

[transcode] V: decoding fps,frc | 25.000,0

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x50    MPEG layer-2 [48000,16,2]  192 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 6408 (6406.400000)

[transcode] A: adjustment       | -1600@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x480

[import_vob.so] v0.6.0 (2003-10-02) (video) MPEG-2 | (audio) MPEG/AC3/PCM | (subtitle)

[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 29.9700fps

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4718 | (audio) MPEG/AC3/PCM

[import_vob.so] tccat -i "mmw-sessions.mpg" -t vob -d 0 -S 0 | tcdemux -a 0 -x mp3 -S 0 -M 1 -d 0 | tcextract -t vob -a 0 -x mp2 -d 0 | tcdecode -x mp2 -d 0

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, ntsc video type for video

[export_ffmpeg.so]: INFO: Set interlacing to bottom-first

[export_ffmpeg.so]: INFO: Set frame rate to 29.97

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 18

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.333333

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 0.888889

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: INFO: No audio resampling necessary, using 48000 Hz

[export_ffmpeg.so]: INFO: Set audio bit rate to 224 kbps

[export_ffmpeg.so]: INFO: Set audio codec to ac3

tc_memcpy: using mmxext for memcpy

[mpeg2video @ 0xb5739388]rc buffer underflow

encoding frames [000000-000060],  45.70 fps, EMT: 0:00:02, ( 8| 1| 0)

[transcode] (sighandler) SIGINT received

encoding frames [000000-000062],  45.39 fps, EMT: 0:00:02, ( 7| 1| 1)

clean up | frame threads | unload modules | cancel signal | internal threads | done

[transcode] encoded 58 frames (0 dropped, 10 cloned), clip length   2.32 s
```

after a _very_ quick look, i don't see anything odd...  any clues?

thanks!

----------

## ivanova

@slaterson

 *Quote:*   

> 
> 
> ```
> [transcode] V: import format    | MPEG-2  (V=null|A=vob)
> 
> ...

 

Maybe this?  :Wink: 

@soupus

Open the file in an audio editor like audacity - that should tell you.

----------

## slaterson

 *ivanova wrote:*   

> @slaterson
> 
>  *Quote:*   
> 
> ```
> ...

 

probably.   :Embarassed: 

now, how do i fix it?

----------

## slaterson

 *slaterson wrote:*   

>  *ivanova wrote:*   @slaterson
> 
>  *Quote:*   
> 
> ```
> ...

 

ok.  i have been pulling my hair out trying to get this video through transcode.  finally gave up and tried using demux directly with the command:

```
tcdemux -i mmw-sessions.mpg -f 29.97 -x mpeg2 > sessions-demux.m2v
```

and sure enough, i get the video stream out.

slate

----------

## juliebread

First off, great tutorial!  I've found it indespensible in getting my hands around this mysterious topic.   :Very Happy: 

However, I ran into a problem with the DVD menu.  It's a very simple menu scheme with just 4 links pointed to 4 video files.  Near the last few steps, I ran xine to test the files produced (VIDEO_TS, AUDIO_TS), and the menu worked perfectly.   After burning the DVD, the menu works just fine on my computer via xine.

However, the menu simply does not work on my stand-alone DVD player.  After inserting the DVD, the menu comes up, and I can select all 4 of the links, but when I hit enter/play, it just returns to the menu w/o playing anything.  

Here are the menu/burn commands I ran:

```
jpegtopnm menu_background.jpg | ppmtoy4m -n 1 -F30000:1001 -I t -A 10:11 -L | mpeg2enc -f 8 -n n -o menu.m2v
```

```
mplex -f 8 -o menu_background.mpg menu.m2v menu_audio.ac3
```

Here is my spumux config file (menu.xml):

http://epierce.freeshell.org/dvd/menu.xml

And menu images:

http://epierce.freeshell.org/dvd/menu_background.jpg

http://epierce.freeshell.org/dvd/menu_quiet.png

http://epierce.freeshell.org/dvd/menu_highlighted.png

http://epierce.freeshell.org/dvd/menu_selected.png

```
spumux menu.xml < menu_background.mpg > menu_final.mpg
```

Here's my dvdauthor config file (dvdauthor.xml):

http://epierce.freeshell.org/dvd/dvdauthor.xml

```
dvdauthor -x dvdauthor.xml
```

Tested files with Xine:

```
xine "dvd:/data3/Long Vacation/dvd/"
```

An produce the DVD:

```
/usr/bin/growisofs -Z /dev/dvd -dvd-video /data3/Long\ Vacation/dvd/
```

Media used: Khypermedia DVD-R

Any ideas?  Thanks for reading all of this!

Julie

Ps. Would throwing a -dvd-compat onto growisofs make any difference?Last edited by juliebread on Mon Feb 07, 2005 10:28 pm; edited 1 time in total

----------

## slaterson

a couple things i noticed in a very quick glance at your dvdauthor.xml file...

1) in the <menus> section you have the buttons jump to a specific chapter (1 in this case), maybe synxtax is incorrect?

2) after the '<titleset>' tag you have a '<menus/>' tag.

in my dvdauthor.xml file i don't have either of these.  i'm new to dvd creation, having only created one so far, so take what i say with caution.  it could be completely wrong.

slate

ps - the link in the above post to your dvdauthor file is wrong.  should be http://epierce.freeshell.org/dvd/dvdauthor.xml

----------

## theaks

 *soupus wrote:*   

> Hey guys, I've successfully completed a dvd that runs absolutely perfect on my computers dvd rom, but fails in a regular dvd player. The menu page audio cuts out early and then repeats, and the movie's audio is a higher frequency and skips. I'd expect it was just a mplexing error, except it runs fine on my computer?
> 
> 

 

I'm having a similar problem. DVDs work fine for me and a friend (on our computers and dvd players) However another friend with an older dvd player has the first title lock up after one second.  On my work computer i have the same problem (except windows media player crashes after a second)

Any ideas? I'm using a fake_menu.mpg with the dvds, no jump pad

----------

## gkmac

 *soupus wrote:*   

> I'd expect it was just a mplexing error, except it runs fine on my computer?

 Computers tend to be much more tolerant of non-standard things than standalone DVD players. I find this quite annoying; I'd love to replace my standalone DVD player with a PC, but I'd have to keep it to ensure my home-made DVDs work.

 *theaks wrote:*   

> I'm having a similar problem. DVDs work fine for me and a friend (on our computers and dvd players) However another friend with an older dvd player has the first title lock up after one second.
> 
> Any ideas?

 Is it an old Pioneer player? Apparently ffmpeg (and anything that uses it) makes Dolby Digital streams which are mainly OK, but there is something slightly non-standard about them which chokes old Pioneer players. I have a Pioneer DVD-525 and all attempts to make DVDs with Dolby Digital sound fail miserably here.

It's easy to say "It's Pioneers fault" but all commercial Dolby Digital DVDs out there work, so it's actually ffmpegs fault.

Unfortunately there is nothing that can be done, so you're stuck with making DVDs with MPEG audio (which aren't guaranteed to work on NTSC players) or LPCM audio (which is uncompressed, so takes up more space).

----------

## theaks

 *gkmac wrote:*   

> Is it an old Pioneer player? 

 

Yes, apparently it is.

 *gkmac wrote:*   

> Unfortunately there is nothing that can be done, so you're stuck with making DVDs with MPEG audio (which aren't guaranteed to work on NTSC players) or LPCM audio (which is uncompressed, so takes up more space).

 

How do I do these work arounds? I'd like to try the MPEG audio solution first.

----------

## gkmac

 *theaks wrote:*   

>  *gkmac wrote:*   Is it an old Pioneer player? Yes, apparently it is.
> 
> How do I do these work arounds? I'd like to try the MPEG audio solution first.

 

For MPEG audio, I use something like this...

```
transcode -i video.avi -y null,mp2enc -b 256 -m videosound
```

...the number after the -b is the bitrate, 256 should be sufficient for stereo. If transcode complains "bitrate not allowed for MONO" then try something like 128. I haven't tested mono soundtracks thus I don't know if the final DVD will work, but stereo .mpa files definitely do work (for me).

You can use xine to preview the .mpa file, and then supply that to the mplex command as normal.

LPCM is trickier, you need to extract the soundtrack as WAV and convert it to raw LPCM. I've found that this works...

```
transcode -i video.avi -y null,wav -m videosound.wav

sox videosound.wav -t raw -x videosound.lpcm
```

...you won't be able to play the resulting .lpcm file, but supply that to mplex as normal and you should be able to play the multiplexed file in xine and hear the result. Again, I don't know if this will work for mono soundtracks when it comes to playing the DVD "for real".

As I've said before, apparently some NTSC DVD players will not work with MPEG soundtracks but all PAL players will.

----------

## paladin151

 *slaterson wrote:*   

>  *kilativv wrote:*   Using any of the described above methods for NTSC i get half of the screen green on my Toshiba DVD player. The sound works, no errors during encoding. 
> 
> Did anyone got any similar problems?
> 
> Thanks 
> ...

 

I am having the same problem. I encoded to 352x240 29.97 fps and created the vob files with dvdauthor.  The vob's play correctly with mplayer but when I burn the dvd I get the screen problem on my Toshiba dvd player.

On this link someone is having the same problem with a Philips dvd player. 

http://www.dealdatabase.com/forum/archive/index.php/t-30859

Here someone is also having the problem.

http://itdp.fh-biergarten.de/transcode-users/2004-03/msg00041.html

Another thing. I found out that transcode wouldn't convert from ac3 44100 samplerate to ac3 48000 samplerate even with -E 48000,16,2 when the source and destination were .mpg's.  Mplex stated it was still 44100. This caused my vob's to play fast. I fixed this with "mencoder -i file.mpg -ovc copy -oac mp3lame -o file.avi" then transcoding the resulting avi's.

----------

## juliebread

 *slaterson wrote:*   

> 1) in the <menus> section you have the buttons jump to a specific chapter (1 in this case), maybe synxtax is incorrect?
> 
> 2) after the '<titleset>' tag you have a '<menus/>' tag.
> 
> in my dvdauthor.xml file i don't have either of these. 

 

Good eye!  I removed the extraneous <menus/> tag.  Actually, my dvdauthor.xml file was generated by qdvdauthor.  I was initially using that as my base.  But I went back and modeled my dvdauthor config after what was presented in this tuorial.

Everything worked great 2nd time around!  Thanks Slaterson!

Ps. Interestingly, a friend at work got my initial 'dud' DVD to work on his x-box.  I also got it to work on this stand alone DVD burner/player we have at work.  But another co-worker tried the 'dud' DVD on her player at home and had no luck.    Oh well... lesson's learned!

I've been combing the web for the past week or so, and this tut seemed the easiest to understand and was pretty comprehensive too.  Thanks again for your hard work, shiznix!

----------

## DrAcKe

Hi

I have the "export_mpeg.so failed" problem and doing this

the problem dissapear.

```
emerge unmerge transcode
```

Then

```
USE="+sdl +mmx +mpeg +sse +3dnow +encode +X +quicktime +avi -altivec

" emerge transcode
```

I'll try to DIVX->SVCD now

By3z, DrAcKe

----------

## slaterson

does ffmpeg support 24bit audio files?  i have some 24bit 48khz 2ch recordings i'd like to burn.  my idea is to burn them on a dvd.  i'm trying to do this by creating black, 50 frame m2v file and the running mplex on the m2v and the audio files(s) to get a set of mpgs with all black video and 24 bit, 48 khz sound.

i'm stuck at encoding the audio.  i've started by trying to use ffmpeg, which gives me the following:

```
# ffmpeg -i easterjam2004-04-11t01-2448.wav -ab 2304 -ar 48000 -ac 2 track1.ac3

ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard

  built on Jan 15 2005 23:08:28, gcc: 3.3.5  (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)

Input #0, wav, from 'track1-2448.wav':

  Duration: 00:01:37.0, bitrate: 2304 kb/s

  Stream #0.0: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s

Output #0, ac3, to 'track1.ac3':

  Stream #0.0: Audio: ac3, 48000 Hz, stereo, 2304 kb/s

Stream mapping:

  Stream #0.0 -> #0.0

Error while opening codec for stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
```

notice the bitrate is given twice for the input file.  on the duration line it's 2304 kb/s (a rate for 24 bit), on the next line its 1536 kb/s (for 16 bit).  i have verified the files are indeed 24 bit.  looks like ffmpeg is chopping off 8 bits.  and, of course, it gives an error when trying to write.

i'm trying to duplicate what audio-dvd-creator does (http://www.audio-dvd-creator.com) with the tools in linux.  anyone else doing anything similar?

any feedback is welcome (and encouraged  :Smile: ).

thanks,

slate

----------

## ranmakun

Hi, I've done a DVD using this guide and it was great, but most of the time I only want to encode a video into a DVD and thats all, making all the menus is a lot of work and I really don't need it.

Is there a way to make a DVD with a default video, audio and subtitles that I can put in the DVD player and it just starts playing?, Can I create a valid DVD without menus?, Any ideas?

Thank you.

----------

## Lucifeer

As there are 17 pages and I only got thru the first 5-6 you have to excuse me if this has already been brought up ;]

Let's say you wish to make a dvd out of a serie of video-clips, home-video's, lanparty-videos etc and its perhaps 20-30 episodes of diffrent sized clips from 10 to 30min long, now I want to fit as many of these as I can onto one dvd using this method. How would I know how many I could fit? Should I go by size in the dvd/-folder and not let it exceed ~4.6GB or should I try to calculate how long time all episodes would be together and leave a small space for the menu so it doesn't go over 120min?

Gonna try this method when I get my mobo back >_< And also has anyone tried if all this compiles on a amd64-system?

----------

## Danuvius

I got to the point where I create the movie with dvdauthor, and it works without complaint of errors; but alas all is not well.

When testing the DVD via Xine, the initial THX intro plays (I can tell from the sound) but the screen is blank (presumably because the dvd menu was not "drawn" yet).

Then after, the DVD menu is displayed. Looks good, plays the music, buttons react as they should to mouseovers. Then when I click on a button, the movie starts playing, the buttons are no longer available, but the menu background remains visible and you cannot see the movie.

Please help?

----------

## Danuvius

 *Danuvius wrote:*   

> I got to the point where I create the movie with dvdauthor, and it works without complaint of errors; but alas all is not well.
> 
> When testing the DVD via Xine, the initial THX intro plays (I can tell from the sound) but the screen is blank (presumably because the dvd menu was not "drawn" yet).
> 
> Then after, the DVD menu is displayed. Looks good, plays the music, buttons react as they should to mouseovers. Then when I click on a button, the movie starts playing, the buttons are no longer available, but the menu background remains visible and you cannot see the movie.
> ...

 

It seems this has to do with the VOB files, because dvdstyler produces the same results (but works as expected when used with regular mpg files).

I used any2vob script to create the VOBs... any ideas?

----------

## venquessa2

ranmakun,

Follow the steps to get your..

movie.mpg

Then...

```
dvdauthor -o DVD/    movie.mpg

growisofs -dvd-video -Z   /dev/dvd   DVD/
```

But... as far as subtitles go, your on your own... or ask again in the forums.

----------

## point3

```

$ transcode -i final.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o final -D0 -s2 -m final_sound.ac3

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source final.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=ac3)

[transcode] V: import frame     | 704x304  2.32:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 704x376 (-36,0,-36,0)

[transcode] V: zoom             | 720x480  1.86:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.217

[transcode] V: decoding fps,frc | 23.976,1

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x2000  AC3          [48000,16,2]  192 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 23.976,1

[transcode] A: bytes per frame  | 8008 (8008.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x480

[import_ac3.so] v0.3.2 (2002-02-15) (audio) AC3

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4743: MS MPEG4v1-3/MPEG4/MJPEG

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM

[import_ac3.so] AC3->PCM

[import_ac3.so] tcextract -a 0 -i "final.avi" -x ac3 -d 0 | tcdecode -x ac3 -d 0 -s 1.000000,1.000000,1.000000 -A 0

tc_memcpy: using mmxext for memcpy

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, ntsc video type for video

[export_ffmpeg.so]: INFO: Set interlacing to bottom-first

[export_ffmpeg.so]: INFO: Set frame rate to 29.97

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 18

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.185185

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: INFO: No audio resampling necessary, using 48000 Hz

[export_ffmpeg.so]: INFO: Set audio bit rate to 224 kbps

[export_ffmpeg.so]: INFO: Set audio codec to ac3

[mpeg2video @ 0x422c6e68]rc buffer underflow

```

As you can see here - framerate being converted from 23.97 to 29.97. Plus, the sound I have in ac3 in that avi being re-encoded to ac3 (??) with lower bitrate.

How to enforce transcode to leave original framerate and original sound from source avi? I've done one movie already, the picture seems shacking to me. Source framerate was 25, new was 29.97.

Thank you!

----------

## venquessa2

 *Quote:*   

> How to enforce transcode to leave original framerate and original sound from source avi? I've done one movie already, the picture seems shacking to me. Source framerate was 25, new was 29.97. 

 

The frame rate is being converted by the --export_prof dvd-ntsc.  You can override it with --export_fps but your milage may vary, I dont think dvdauthor will create a DVD with a movie in 23.976, I think that is NTSC Pulldown, telecine converted film.  Try it an see.

For the AC3 audio you could try using -P for passthrough.  Check the man page for the option you want to pass out the audio.  I think it's -P 2

Otherwise you could try using ..

```
tcextract -i movie.avi -x ac3 > movie.ac3
```

Which might work.  The catch is this...

If you are converting the frame rate, then the A/V sync might get lost unless you let transcode do both the audio and video processing.  EG:

```
transcode -i....    --export_prof dvd-ntsc --import_fps 23.976 --export_fps 29.97 -Jmodfps
```

----------

## jevidl

Even though it is slow, transcodes softtelecine support is invaluable to me. There is one thing I haven't found a way to do with transcode yet however. 

Much of what I convert it is advantageous to add a 16 pixel border around the entire clip so that subtitles are not cut off by the television. with ffmpeg I was encoding DVD video with a command like this:

```
ffmpeg -i input.avi -f dvd -hq -s 720x448 -padtop 16 -padbottom 16 -padleft 16 -padright 16 -qscale 1-ar 48000 -ac 2 -acodec mp2 output.mpg
```

This produced great results with one snafu - I had a 23.976 source, and ffmpeg will not add the softtelecine. Hence, my brand new dvd came out looking like an interlacing experiment gone oh so wrong. I add 

```
-r 29.97
```

 to the command above to change the video frame rate to 29.97 the video is jerky due to the way in which ffmpeg is increasing the frame rate. So, I am back to transcode and a lack of padding. 

I have been at this for about 6 hours now, and my brain is nearly fried. Not to mention I can't play with my brand new DVD burner now! I feel like I am caught in an infinite loop  :Mad:  If anyone can suggest a way to get ffmpeg adding the softelecine information, or a tool that will do it to an existing mpg, I would be ecstatic. ffmpeg is about twice as fast for me as transcode, which makes it the preferred tool. 

If anyone can suggest a way to get padding on the file using transcode, I will be very happy, even if it takes longer. 

I have considered just adding the padding using ffmpeg ahead of time, but I am trying to avoid two steps to getting the files working. 

Shiznix, thanks for the great how-to. It got me well on my way.

*EDIT* I must have been really dead last night when I posted this. Transocode does have support for adding borders if you use the following switch: 

```
 -Y top[,left[,bottom[,right]]]

              select (encoder) frame region by clipping border. Negative  val-

              ues add a border [off].

```

While it will be slower, I guess I will be able to use transcode at least to get where I need to be.

----------

## jevidl

I had previously posted about adding borders. If it is helpful to anyone, here's a working way to add borders to transcode files: 

```
transcode -i input_file.avi -y ffmpeg -F mpeg2video -j -16,-16 --export_prof dvd-ntsc --export_asr 2 -o output -D0 -s2 -m output.ac3
```

Personally, I use it for raising the subtitles on files that have them hardcoded in too low, such that they get cut off by the television. I have not had a chance to test the files yet, but the stats on them appear to be valid. I will try to post back when I have burned the DVD.

----------

## jevidl

Well, it has been a while sinc eanyone has posted to this thread, but I am trying to stay hopeful through all of this. I am struggling quite a bit with getting 23.98fps source to a DVD. If I allow transcode to convert it to 29.97 the quality is degraded and the audio sync is way off. If I try to burn an ntsc-film dvd, my set top dvd player chokes on it.  :Crying or Very sad: 

Does anyone have any suggestions on how to get this to work?

----------

## fyreflyer

 *Quote:*   

> File types other than AVI or MPEG
> 
> For file types other than .avi/.mpeg, such as .wmv,.mov,.asf, .mkv, .ogm and .bin (S)VCD etc. it's necessary to first encode the movie to .avi with mencoder, like this:
> 
> Code:
> ...

 

Sorry if this has already been posted. I didn't read the entire thread.

Just wanted to mention that adding -ofps 29.97 to this line results in much better video quality when converting wmv files.

Thanks for the guide!  It was very helpful! =D

Fyreflyer

----------

## hulmeman

I'm getting this error with ffmpeg:

baz DrWho # ffmpeg -v -i final.wav -ab 384 -ar 48000  -ac 6 final.ac3

ffmpeg version 0.4.9-pre1, build 4743, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib --libdir=/usr/lib --enable-shared-pp --enable-shared --disable-static --disable-mmx --enable-faac --enable-ogg --enable-vorbis --enable-faad --enable-faac --enable-faadbin --disable-altivec --enable-debug --enable-mp3lame --enable-a52 --enable-a52bin --enable-audio-oss --enable-v4l --enable-dv1394 --enable-pthreads --enable-xvid --enable-gpl --enable-pp --disable-optimize 

  built on Mar 25 2005 12:59:02, gcc: 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110-r1, ssp-3.4.3.20050110-0, pie-8.7.7)

File 'final.wav' already exists. Overwrite ? [y/N] y

Resampling with input channels greater than 2 unsupported.Can't resample.  Aborting.

Abort at ffmpeg.c:1573

Aborted

Any suggestions?

Baz

----------

## der bastler

With the german free-tv premiere of "Band of Brothers" I gave tv recording a new try.

While creating the menu (title sequence + two options "Part 1: Currahee" and "Part 2: Der erste Tag") I wondered how to do a nice little intro sequence with various fading effects which can do a smooth transition into the menu...

My solution:

1.) Open the first picture of the menu sequence (see page 2 of this thread: animated menus) in Gimp, rename it to a xcf file (someting like "introseq.xcf").

2.) Add pictures you want to fade in/out/over as layers; I had the following layer configuration (last pic of sequence on top, first pic at bottom):

Start Title

Black3

Band of Brothers

Band of Brothers

Black2

bastler presents

bastler presents

Black1

background

Result should be a animation Black -> "bastler presents" (multiple layers for longer duration) -> Black -> "Band of Brothers" (long, too) -> Black -> menu start picture

3.) Apply the blend script in "Script-Fu -> Animators", resulting in a new Gimp picture with layers "Frame 1" to "Frame XXX". With 23 or 24 frames inbetween one should get one second Pal (25 fps) for every transition.

--- next two steps only have to performed once to install script ---

4.) Copy the following script, paste it into a file "save-layers.scm" in your ~/.gimp-2.0/scripts directory

```
(define (script-fu-gds-save-layers img drw filename)

    (let*

        (

            (num-layer (car (gimp-image-get-layers img)))

            (layers (cadr (gimp-image-get-layers img)))

            (index  0)

            (basename (unbreakupstr (butlast (strbreakup

filename ".")) "."))

            (extension (car (last (strbreakup filename "."))))

            (layer)

            (filename)

        )

        (while (< index num-layer)

            (gimp-drawable-set-visible (aref layers index)

FALSE)

            (set! index (+ index 1))

        )

        (set! index 0)

        (while (< index num-layer)

            (set! layer (aref layers index))

            (gimp-drawable-set-visible layer TRUE)

            (set! filename (string-append basename (car

(gimp-drawable-get-name layer)) "." extension))

            (gimp-file-save RUN-NONINTERACTIVE img layer

filename filename)

            (gimp-drawable-set-visible layer FALSE)

            (set! index (+ index 1))

        )

    )

)

(script-fu-register "script-fu-gds-save-layers"

    "<Image>/Script-Fu/Utils/Save layers..."

    "Save each layer of an image individually"    ;comment

    "G. de Sercey"    ;author

    "Gd32@xxxxxxxxxx"    ;copyright

    "June 2003"      ;date

    "*A"

    SF-IMAGE "img" 0

    SF-DRAWABLE "drw" 0

    SF-FILENAME "destination" ""

)
```

(Source: http://www.spinics.net/lists/gimpwin/msg04191.html)

5.) Click "Xtns -> Script-Fu -> Refresh" in Gimp's toolbox to load the new script.

--- end of script installation ---

6.) Right-click in your xcf image, activate "Script-Fu -> Utils -> Save layers..." and type in an appropriate file name, e.g. "introseq..png" (see the double colons?). This script saves every layer into a separate file with the layer's name as filename. For this example, you'd get "introseq.Frame 1.png", "introseq.Frame 2.png", "introseq.Frame 3.png" etc...

7.) Open a terminal. If you don't have the program "renamexm", install it (emerge rename). Rename the separate layer pictures to a scheme we can work with (i.e. remove ".Frame "):

```
renamexm -s /".Frame "/""/g *.png
```

Fill in some zeros for small frame numbers so that all images have the same number of digits.

(Did it manually with the gentoo file manager, perhaps I can write a script later).

8.) Create the video:

```
png2yuv -f 25 -j introseq%06d.png -I p | mpeg2enc -f 8 -I 0 -4 1 -2 1 -H -o introsequence.m2v
```

(introseq%06d.png is refering to pictures with six digits as frame number; adjust it to your filenames)

9.) Audio and final movie: See page one for mp2/ac3 editing and multiplexing.

Todo: write scripts to automate transition of given pictures.

----------

## der bastler

And another tip: Use the newer version of multimux.

http://panteltje.com/panteltje/dvd/

multimux-0.2.3.tgz

 *Quote:*   

> Now with support for files > 2 GB.

 

I noticed that after the AC3 conversion process failed due to the 2 GB limit...

Edit: quick installation guide

```
su

cd 

mkdir programs

cd programs

wget http://panteltje.com/panteltje/dvd/multimux-0.2.3.tgz

tar -xvvzf multimux-0.2.3.tgz 

cd multimux-0.2.3

make

make install

exit
```

Explanation:

switch to root, change to /root/ directory, create and change to directory "programs" (provides a better overview over custom installed programs imo), download and unpack multimux-0.2.3, compile and install; exit.

Edit2: D'Oh! The Multimux-note on the surround sound page has escaped my notice. Nevermind.

----------

## hulmeman

 *hulmeman wrote:*   

> I'm getting this error with ffmpeg:
> 
> baz DrWho # ffmpeg -v -i final.wav -ab 384 -ar 48000  -ac 6 final.ac3
> 
> ffmpeg version 0.4.9-pre1, build 4743, Copyright (c) 2000-2004 Fabrice Bellard
> ...

 

Bumping back up, anyone have any ideas how to create 5.1 channel audio from wav 5.1?

----------

## der bastler

 *hulmeman wrote:*   

> I'm getting this error with ffmpeg:
> 
> baz DrWho # ffmpeg -v -i final.wav -ab 384 -ar 48000  -ac 6 final.ac3
> 
> Any suggestions?

 

Suggestions? Maybe... Why run it as root?

Anyway, it says that it can't resample 5.1 wav files. Does final.wav have a sample rate of 48000 Hz?

----- Edit -----

I've encountered problems with a short movie. It has a resolution of 720x288 with 29.97fps (apparently NTSC). I need 25 fps (PAL) so I tried modfps...

Problem 1: Transcode dies with an error in modfps regarding a too small video_size. Cause? I suspect the way "--export_prof dvd-pal" cuts and squeezes the picture in conjunction with the NTSC frame rate:

* If I don't use "--export_prof", the movie can be transcoded with modfps. 

* If I don't use any fps filter, audio and video are out of sync so that's no solution

* Another short with same resolution but 23.976 fps could be successfully transcoded.

Problem 2: How about creating an ultra-widescreen anamorphic DVD by myself? Is that possible with existing tools? Afaik I have to set correct pixel and display aspect ratios. Any suggestions for standard-compliant values which can be interpreted by stand-alone dvd players?

----------

## hulmeman

 *der bastler wrote:*   

>  *hulmeman wrote:*   I'm getting this error with ffmpeg:
> 
> baz DrWho # ffmpeg -v -i final.wav -ab 384 -ar 48000  -ac 6 final.ac3
> 
> Any suggestions? 
> ...

 

Yes, sample rate is 48000Hz:

sox -V audio_out.wav -r 48000 -c1 left.wav avg -l

sox -V audio_out.wav -r 48000 -c1 right.wav avg -r

cp left.wav left_surround.wav

cp right.wav right_surround.wav

soxmix -V left.wav right.wav -r 48000 -c1 centre.wav

sox -V -v 0.5 centre.wav lfe.wav lowp 150

multimux -d 0,0,0,15,15,0 -o final.wav -w left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav

ffmpeg -i final.wav -ab 384 -ar 48000 -ac 6 final.ac3

Baz

----------

## der bastler

 *hulmeman wrote:*   

> multimux -d 0,0,0,15,15,0 -o final.wav -w left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav

 

Refer to http://mightylegends.zapto.org/dvd/dvdauthor_howto_surround.html

The multimux line should look like this:

```
multimux -d 0,0,0,15,15,0 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav -o matrix_final.wav
```

Notice the difference? You have included a "-w" after "-o final.wav". According to multimux, this means:

```
-w                   use special multimux container format (do not use for multi channel .wav)
```

So, remove the "-w" and ffmpeg should work. I used the same stereo-to-surround manual for my Band of Brothers TV recording and the sound is improved imo (pseudo surround at our stereo TV set -> more depth). 

-----

Still working on the 720x288 issue (just examined my first DVD, M:I-2, which is wide-screen)...

----------

## hulmeman

Thanks for your prompt reply, I tried it but:

baz1@baz1 /share/DrWho $ multimux -d 0,0,0,15,15,0 -o out.ac3 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav                    

Panteltje multimux-0.1

input file left.wav size is 253667372 delay is 0.00 milli seconds

input file centre.wav size is 253667372 delay is 0.00 milli seconds

input file right.wav size is 253667372 delay is 0.00 milli seconds

input file left_surround.wav size is 253667372 delay is 15.00 milli seconds

input file right_surround.wav size is 253667372 delay is 15.00 milli seconds

input file lfe.wav size is 253667372 delay is 0.00 milli seconds

Floating point exception

I'm pulling my hair out, the -w switch (which I think is for ac3) works!

----------

## der bastler

 *hulmeman wrote:*   

> 
> 
> baz1@baz1 /share/DrWho $ multimux -d 0,0,0,15,15,0 -o out.ac3 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav                    
> 
> Panteltje multimux-0.1
> ...

 

1.) Install multimux-0.2.3 as described above (https://forums.gentoo.org/viewtopic-p-2238139.html#2238139)

2.) Your code:

```
multimux -d 0,0,0,15,15,0 -o out.ac3 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav
```

Try to output the sound not to "out.ac3" but to "out.wav":

```
multimux -d 0,0,0,15,15,0 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav -o out.wav
```

----------

## hulmeman

 *der bastler wrote:*   

>  *hulmeman wrote:*   
> 
> baz1@baz1 /share/DrWho $ multimux -d 0,0,0,15,15,0 -o out.ac3 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav                    
> 
> Panteltje multimux-0.1
> ...

 

Oops, yes it was a mistake, but I still get the same error:

multimux -d 0,0,0,15,15,0 -o out.wav left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav 

Panteltje multimux-0.1

input file left.wav size is 253667372 delay is 0.00 milli seconds

input file centre.wav size is 253667372 delay is 0.00 milli seconds

input file right.wav size is 253667372 delay is 0.00 milli seconds

input file left_surround.wav size is 253667372 delay is 15.00 milli seconds

input file right_surround.wav size is 253667372 delay is 15.00 milli seconds

input file lfe.wav size is 253667372 delay is 0.00 milli seconds

Floating point exception

I think I know what the problem is, multimux doesn't work on AMD64, I've just succesfully done the mulitimux on another machine, transferred final.wav to AMD64 machine and ffmpeg works fine on AMD64. I will submit a bug report.

Thanks for your help

Baz

----------

## der bastler

I gave up! Modfps is crashing when I use the profile "dvd-pal". If I can get modfps to work with lots of transcode parameters the video is slightly skipping (although is used clonetypes 3 to 5) and there are frame dropping problems with mplex.

The Source: Movs from http://www.bmwfilms.com

720x300, 23.976fps

44.1kHz, 16bit, 2 channels

The Target: PAL-DVD

720x576, 16:9, 25fps

48kHz AC3

My solution: Encode source with 25fps and throw away the audio output of transcode. Extract the original audio and speed it up about 4% (exact factor: 25/23.976) with sox. Result: smooth movements, slightly pitched-up sound (but you need to compare it directly to the source to notice the minor difference) and perfect sync.

I'll add a detailed explanation including the process .mov -> .avi -> .m2v and the 16:9 conversion soon.

----------

## pdr

I wanted my menu to be a clip from movie (credits) to run with music, and to slowly fade in 4 menu item images in order (fade in first, wait 1 second, fade in second, wait 1 second, etc). Used directions on second page of this post to extract the credits clip, extract it's sound, and convert it to a series of 1007 jpg files. Create 4 separate item selection images called bkgd1.png, bkgd2.png, bkgd3.png, and bkgd4.png. Then wrote following script to to fade them into the clip images. Afterward followed the page 2 post to convert back to mpeg for use with spumux.

```
#!/bin/sh

srcdir='pics'               # images are in ./pics/

template='background%06d.jpg'    # image names are background00000000.jpg, etc

destdir='picsplus'       # put fixed up images in ./picsplus/

num_items=4            # there are 4 menu items to fade in

itemtemplate='bkgd%d.png'     # menu item image names are bkgd1.png, etc

start_frame=60          # start fading in first item after 2 seconds (60 frames)

pause_frames=30      # pause 1 second (30 frames) after 1 item faded in before fading in next item

percent_fade=2         # fade in items with 2% opacity per frame (ie fades in in 100/2=50 frames)

temp_bkgd='temp.png'    # name of temp work file

temp_file='temp2.png'     # name of another temp work file

# Copy all the frames before the blending start (ie frame 0..start_frame-1)

frame=0

while [ $frame -ne $start_frame ]; do

  f=`printf $template $frame`    # f is the name of the file for this frame

  cp $srcdir/$f $destdir/$f || exit 1   # just copy it into the dest dir unchanged

  echo "$f: copied"                    # show progress

  frame=$(($frame + 1))           # increment to next frame

done

# Start dissolving in the menu item images

item=0

while [ $item -ne $num_items ]; do

  # Increment to next menu item

  item=$(($item + 1))

  bkgd=`printf $itemtemplate $item`   # bkgd = name of current menu item image

  # Fade in the current menu item until 100%

  percent=$percent_fade            # no sense starting at 0% - that is what the previous frame used

  while [ $percent -lt 100 ]; do

    f=`printf $template $frame`   # f = name of current background frame image file

    # If first image, just composite it with the background frame

    if [ $item -eq 1 ]; then

      composite -dissolve $percent% $bkgd $srcdir/$f $destdir/$f || exit 1

      echo "$f: $percent% $bkgd"

    # Otherwise, fade into current bkgd (a composite) and composite

    else

      # first, composite menu item with the already-faded-in menu items (temp_bkgd)

      composite -dissolve $percent% $bkgd $temp_bkgd $temp_file || exit 1

      # take the result of that (temp_file) and composite with background

      # frame to create final output image

      composite $temp_file $srcdir/$f $destdir/$f

      echo "$f: items + $percent% $bkgd"

    fi

    percent=$(($percent + $percent_fade))    # fade it in a little more on next frame

    frame=$(($frame + 1))   # move to next frame

  done

  # Update the current item temp bkgd image (composite of items already faded in)

  if [ $item -eq 1 ]; then

    convert $bkgd $temp_bkgd   # only one item has faded in - just copy it

  else

    composite $bkgd $temp_bkgd $temp_bkgd   # 2+ items - composite them together

  fi

  # If this is not the last menuitem, skip the inter-fade frames (pause between fade effects)

  if [ $item -ne $num_items ]; then

    i=0

    while [ $i -ne $pause_frames ]; do

      f=`printf $template $frame`       # f = name of background image file for this frame

      composite $temp_bkgd $srcdir/$f $destdir/$f || exit 1  # composite with items already faded in

      echo "$f: items (gap)"

      frame=$(($frame + 1))    # move on to next frame

      i=$(($i + 1))        # increment gap frame counter

    done

  fi

done

# Blend the full items image to any remaining frames

done=0

while [ $done -ne 1 ]; do

  f=`printf $template $frame`    # f = name of next background image file

  if [ -f $srcdir/$f ]; then

    composite $temp_bkgd $srcdir/$f $destdir/$f || exit 1   # composite with the all-items composite image

    echo "$f: items"

    frame=$(($frame + 1))    # increment to next frame

  else

    done=1

  fi

done

# Clean up leftover temp files

rm $temp_bkgd

rm $temp_file
```

----------

## der bastler

@pdr: Thanks for the script, I might be able to use it for my titles. Until now I made them --as posted earlier-- with Gimp and the Script-Fu and a lot of layers. Needs pretty much memory and cpu time to hold all the images...  :Shocked: 

Anyway, I did some experiments with the BMWFilms. With my solution of encoding the sound separately I'm also able to use the director's comments provided in these short films(!).

A first code snippet:

```
#!/bin/bash

film="Ambush_efe_mac.mov"

### Mov -> Avi -> DVD-Mpeg2

mencoder -o "$film".avi -ovc lavc -oac pcm -lavcopts vcodec=mjpeg:vbitrate=10000:vhq "$film" -noskip

transcode -i "$film".avi -y ffmpeg --export_prof dvd-pal -o "$film"_roh -m "$film"_roh.ac3 -D0 -J hqdn3d --export_asr 3 --export_par 4 --pre_clip -52,0,-52,0 -Z 720x576

### extract audio track

mplayer -aid 4 -ao pcm -aofile "$film"_roh.wav -vo null -vc dummy "$film"

### extract comments of director

mplayer -aid 5 -ao pcm -aofile kommentar.wav -vo null -vc dummy "$film"

### speed up wavs to match frame rate (23.976 to 25 fps -> 25/23.976 = 1.0427094) and reduce pitch by 4.27094 %

sox -V "$film"_roh.wav "$film"_roh2.wav speed 1.0427094 pitch -4.27094

sox -V kommentar.wav kommentar2.wav speed 1.0427094 pitch -4.27094

### convert stereo wav to 5.1 ac3

./umwandeln_ac3.sh  "$film"_roh2.wav

./umwandeln_ac3.sh  kommentar2.wav

### mix final mpeg with two audio tracks and custom delay

tcmplex -i "$film"_roh.m2v -p "$film"_roh2.wav.ac3 -s kommentar2.wav.ac3 -o "$film".mpg -m d -d 2 -D 0,0,20350
```

"umwandeln_ac3.sh" is a script doing the stereo-to-5.1 conversion explained at http://mightylegends.zapto.org/dvd/dvdauthor_howto_surround.html

In "Ambush" the comment starts after the titles, so I had to add 20.35 sec delay to match movie and comment (trial&error). In "Chosen" Ang Lee begins to talk right with the title, so this seems to need some manual correction...

The movies can be downloaded for free and have a resolution of 720x300. Framerate is mostly NTSC progressive, i.e. 23.976fps. 

With --pre_clip I add some black borders at top and bottom of the picture to get a 16:9 aspect ratio. During transcoding, the movie is stretched in its height to full PAL resolution (720x576) and Pixel aspect ratio resp. display aspect ratio are set.

Right now I'm working on "Beat the Devil" with James Brown. This short is encoded in 24fps and does not use the entire 720x576 frame. Besides, there are some video tracks 6 through 11 showing a BMW roadster driving around from different povs. Must be some sort of gimmick...

 :Very Happy: 

----------

## der bastler

Here's my picture fader script:

```

#!/bin/bash

# Feel free to use it.

# If you want to publish it add a link to 

#   http://forums.gentoo.org/viewtopic-p-2262451.html#2262451

echo "fafader 0.2"

echo "Frank Abelbeck, April 2005"

echo

piccounter=0;

if [[ $# > 0 && -e $1 ]]; then

   echo "List file found!"

   if [ $# == 2 ]; then

      basename=$2

   else

      basename="fafader_seq"

   fi;

   echo Using $basename as basename

   echo

   filename="$1"

   cat $filename |

   while read line; do

      set -- $line

      if [ $# == 3 ]; then

         pic1="$1"; pic2="$2"; numframes="$3"

         if [[ -e $pic1 && -e $pic2 ]]; then

            if [ $pic1 == $pic2 ]; then

            

               echo "[task]   pictures seem equal, copying $pic1 $numframes times"

               nextbar=5; let "numframes = $numframes - 1"; totalnumframes=$numframes

               echo -n "0 [                    ] 100"

               echo -en "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"

               while (( $numframes >= 0 )); do

                  cp $pic1 `printf "%s%06d" $basename $piccounter`.png

                  let "piccounter += 1"

                  let "numframes -= 1"

                  let "percent = 100 - (numframes*100) / totalnumframes"

                  if (( $percent > $nextbar )); then

                     echo -n "="

                     let "nextbar += 5"

                  fi

               done

               echo

               

            else

               echo "[task]   fading $pic1 into $pic2 with $numframes frames"

               nextbar=5; let "numframes = $numframes - 1"; totalnumframes=$numframes

               nextbar=0; totalnumframes=$numframes;

               echo -n "0 [                    ] 100"

               echo -en "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"

               while (( $numframes >= 0 )); do

                  targetname=`printf "%s%06d" $basename $piccounter`.png

                  let "percent = 100 - (numframes*100) / totalnumframes"

                  composite -dissolve $percent $pic2 $pic1 $targetname

                  let "piccounter += 1"

                  let "numframes -= 1"

                  if (( $percent > $nextbar )); then

                     echo -n "="

                     let "nextbar += 5"

                  fi

               done

               echo

            fi;

            echo

         fi;

      fi;

   done

else

   echo "List file not found! Nothing to do for me."

fi;

```

Usage:

```
./fafader listfile [basename]
```

"listfile" is a plain text file containing lines with three elements like this:

```
pics/black.png   pics/logo.png  25
```

The first element is the start picture, second element denotes the end picture and the last element is the number of frames of the transition between these pics. Elements are divided by spaces or tabs, therefore your filenames should not contain spaces.

Think of "listfile" as a movie script in which every line describes a scene:

 *Quote:*   

> Fade from element1 to element2 in element3 frames.

 

"basename" is optional and if given is used as the base filename for the created pictures; if not given the created pictures are placed in the current directory with "fafader_seq" as base filename.

Example: For my DVDs I use simple text as logo, "Frank Abelbeck präsentiert" in white Utopia or Times letters on black background. It fades in, stays for some moments and fades black again. With this script I only need to create two pictures "black.png" and "logo.png" and a list file with following lines:

```
black.png   logo.png   25

logo.png   logo.png   50

logo.png   black.png   25
```

Reading this list the "fafader" script...

...produces 25 pictures fading from "black.png" to "logo.png", 

...copies "logo.png" 50 times (start and end filename are equal) and 

...fades from "logo.png" to "black.png" in another 25 frames. 

Afterwards you can use "png2yuv" to create a movie of your newly created pictures.

Edit: Update to V0.2 -- fixed some "dirty" bash commands (correct comparison brackets use) and percentage calculation

Edit: added little link note

----------

## slaterson

according to this site: http://en.wikipedia.org/wiki/DVD#DVD-Video it is possible to use pcm audio (a wav file) for the sound track on a dvd.  has anyone done this?  i'm trying to make some dvds with the highest sound quality possible, but can't figure out whether mplex and supports this or not.  anyone know?

any help is appreciated.

slate

----------

## pdr

Even if mplex supports it (haven't checked), then (1) no 5.1 sound with wav?, and (2) will there be problems with dvd players (non-computer)?

On a different note:

More playing with "post production" menu building this weekend. Am putting 4 tv show episodes on a dvd and wanted to spruce up the menu more with animated menu items - in particular, with a short clip from each episode that play in order.

At first I was going to have the clip be full screen, then slowly shrink in size while it played and move to its final menu item location. Gradually shrinking the size of the clip image files went well with bash and ImageMagick, but I realized that when the second clip started playing at full screen, it would cover over previous items (until it shrunk/moved enough to uncover them). I thought about using transparency so you could see "under" it, but figured that wouldn't work out well as an end product. Even if it might be fun to make.  :Very Happy: 

So instead, I went with this algorithm:

1. Pause 1 second (30 frames) showing just the background image. Gives stand-alone players a chance to "wake up". For now, just silence for the background music.

2. Over 2 seconds, fade in the four menu items, which are first frame of each clip with title painted on them. Menu items are 300x162 (same aspect as the 720x480 background), located at (90,30), (90,288), (390,30), and (390,288). Lesson learned from previous DVD menus of tv shows: include the episode number in the label (eg: "1. Send in the Clown", instead of just "Send in the Clown").

3. Leaving items 2,3,4 showing static first frame of their clips, play the first item clip in-place. When generating the images for the frames, I kept track of which frame a clip starts for making the final wav file for the menu. eg: this first item clip starts playing at frame 78, so I wanted the associated wav for the clip to start playing at 78/29.97 seconds (ntsc timing).

4. Duplicate the last frame generated (item 1 is on last frame of its clip, items 2,3,4 are still on the first frame of their clips) for 30 images for a 1 second delay.

5. Repeat to play item 2, 3, and 4 clips.

To start, I ripped the background image from one of the episodes using avidemux and stored this as bkgd.png. Then I wrote a small bash script that is given the name of the episode mpg, the output name for the music wav, the directory to store images in, and the start/end frame numbers to rip from, and rips a clip from the mpg into a wav and a set of jpegs (see second page of this post for details). This gave me music01.wav, music02.wav, music03.wav, music04.wav, and image directories pics01/, pics02/, pics03/, and pics04/. The bash script just saved trying to remember all the parms I passed into transcode.

I used the techniques on the first post to use gimp and clip000000.jpg for each episode to create labels that were pasted onto each clip, and named them label01.png, label02.png, label03.png, and label04.png. To paste this transparent label onto each frame of a clip, AND to resize them to 300x162 for compositing onto the background, I just made a new directory for the fixed pics called newpics01/ etc, and then just did a one-line command like:

```
for FILE in $(ls -1 pics01/); do composite label01.png pics01/$FILE -resize 300x162 newpics/$FILE; done
```

Don't need them any more, so can rm -fr pics01/, etc now.

Because of needing trial and error, I built the final composited set of images using a bash script so that I could re-run it if mods were needed.

First I wanted a 30 frame (1 second) display of just the background, so did:

```
FRAME=0

while [ $FRAME -lt 30 ]; do

  F=$(printf "menupics/clip%06d.png" $FRAME)

  cp bkgd.png $F

  FRAME=$(($FRAME + 1))

done
```

Now I wanted to fade in the first frame from each clip over 2 seconds. At 2% opacity per frame, that gives me 50 frames - close enough for 2 seconds. Did this with:

```
PERCENT=2

while [ $PERCENT -lt 100 ]; do

  F=$(printf "menupics/clip%06d.png" $FRAME)

  composite -dissolve $PERCENT -geometry 300x162+90+30 newpics01/clip000000.jpg -noop bkgd.png -quality 100 - | \

  composite -dissolve $PERCENT -geometry 300x162+90+288 newpics02/clip000000.jpg -noop - -quality 100 - | \

  composite -dissolve $PERCENT -geometry 300x162+390+30 newpics03/clip000000.jpg -noop - -quality 100 - | \

  composite -dissolve $PERCENT -geometry 300x162+390+288 newpics04/clip000000.jpg -noop - -quality 100 $F

  FRAME=$(($FRAME + 1))

  PERCENT=$(($PERCENT + 2))

done
```

I now had the script print out the value of $FRAME so I would know when the first clip starts playing - so I could tell when in the final wav to start playing music01.wav.

I was already displaying newpics01/clip000000.jpg (ie the first frame of the first clip), so to play the clip I just wanted to start compositing clip000001.jpg (up to 000310 - last image in the clip) while leaving the other items display the first clip. At this point I hadn't actually displayed the other items at 100% opacity, so the script makes a new background image with all of them fully faded in:

```
composite -geometry 300x162+90+288 newpics02/clip000000.jpg -noop bkgd.png -quality 100 - | \

composite 300x162+390+30 newpics03/clip000000.jpg -noop - -quality 100 - | \

composite 300x162+390+288 newpics04/clip000000.jpg -noop - -quality 100 temp.png
```

Now to play clip 1:

```
CFRAME=1

while [ $CFRAME -le 310 ]; do # 310 is the last image in this clip

  F=$(printf "menupics/clip%06d.png" $FRAME)

  FRM=$(printf "newpics01/clip%06d.jpg" $CFRAME)

  composite -geometry 300x162+90+30 $FRM -noop temp.png -quality 100 $F

  FRAME=$(($FRAME + 1))

  CFRAME=$(($CFRAME + 1))

done
```

The last image written to menupics/ shows the last frame of clip 1and the first frame of clip 2,3,4. This is fine to duplicate for a 1 second pause before playing clip 2, and will also be fine as a background image while playing clip 2 (will just overwrite the area currently displaying clip000000.jpg for clip 2). So I delete temp.png (don't need it any more), and save the name of this new temp background image:

```
rm temp.png

T=$(($FRAME - 1))

REF=$(printf "menupics/clip%06d.png" $T)
```

Now to add my 1 second pause between the end of clip 1 and the start of clip 2, I just dup $REF 30 times:

```
CFRAME=0

while [ $CFRAME -lt 30 ]; do

  F=$(printf "menupics/clip%06d.png" $FRAME)

  cp $REF $F

  FRAME=$(($FRAME + 1))

  CFRAME=$(($CFRAME + 1))

done
```

Now the script would print the value in $FRAME so I know at what frame clip 2 starts playing (for when, in the final wav, music02.wav should start).

To play clip 2 I do just like above, but instead of temp.png as the background I use $REF instead, and my geometry is 300x162+90+288 for its location.

Repeating for clips 3 and 4 (using a new $REF as the last image written for when the previous frame finished playing), I ended up with a lot (1811) images in menupics/clipxxxxxx.png, and my display showed me when each clip started as a frame number (same as the image number). For example, clip 1 started at frame 78, clip 2 started at 417, etc. I wrote down these frames, and then used the instructions on the second page of this post to convert these images into menu.m2v (png2yuv piped into mpeg2enc), playing at 29.97 frames/second for ntsc. Could now rm -fr newpics/ since I didn't need the images any more. Note I used feh to step through image directories to ensure all was well, and used mplayer on menu.m2v to make sure it looked and played right.

To make menu.wav - a composite of silence gaps with music01.wav, music02.wav, music03.wav, and music04.wav - I used Audacity. First I inserted a silence (Audacity put in about 30 seconds worth, so I had to trim it down to (78 frames) / (29.97 frames/second) = 2.6 seconds), and pasted music01.wav after it. Then I concatenated another silence, and trimmed it so the current total length was 417/29.97 = 13.91 seconds and then concatenated music02.wav to it, etc until I had a sound track that looked like:

```
silence - music01 - silence - music02 - silence - music03 - silence - music04
```

where each music block starts at the time when the frame for that clip starts playing. I saved this off as menu.wav

Following the instructions on page 2 of this post I converted menu.wav to ac3 (although I could have just done this when saving from Audacity) to get menu.ac3, and used mplex to combine menu.m2v with menu.ac3. mplayer showed that I got exactly what I was after.

Thanks of course to this post, ImageMagick, Audacity, transcode, ffmpeg, avidemux et al. Note that you want to save one of the menupics/clipxxxxxx.png images that clearly shows all menu items faded in for use with gimp to make the menu selection and highlight images for finalizing the menu, or for known locations like mine you can just paint them where needed...

And if, like me, you don't have a calculator program emerged (and realize that bc wants to print integers), you can fire up interactive python to convert frame offsets to seconds:

```
me $ python

Python....

...

>>> print 78 / 29.97

2.6026026026

>>>(ctrl+D to exit)
```

----------

## slaterson

 *pdr wrote:*   

> Even if mplex supports it (haven't checked), then (1) no 5.1 sound with wav?, and (2) will there be problems with dvd players (non-computer)?

 

you can create a wav file with 5.1 surround sound.  using pcm audio is part of the dvd standard, so i would think all dvd players support it.

----------

## slaterson

 *slaterson wrote:*   

>  *pdr wrote:*   Even if mplex supports it (haven't checked), then (1) no 5.1 sound with wav?, and (2) will there be problems with dvd players (non-computer)? 
> 
> you can create a wav file with 5.1 surround sound.  using pcm audio is part of the dvd standard, so i would think all dvd players support it.

 

here's another website with a bit more info on lpcm audio.    http://www.infomicro.ca/Knowledge/audio_coding_formats.htm

----------

## shiznix

 *der bastler wrote:*   

> I've encountered problems with a short movie. It has a resolution of 720x288 with 29.97fps (apparently NTSC). I need 25 fps (PAL) so I tried modfps...
> 
> Problem 1: Transcode dies with an error in modfps regarding a too small video_size. Cause? I suspect the way "--export_prof dvd-pal" cuts and squeezes the picture in conjunction with the NTSC frame rate:
> 
> * If I don't use "--export_prof", the movie can be transcoded with modfps. 
> ...

 

This is a known bug with transcode.

Your suspicions are correct, it is a bug with the way '--pre_clip' & the modfps plugin interact with each other, but I've only ever seen it manifest itself on 2.22:1 (640x288) sources, and not 2.5:1 (720x288), though I'm starting to see a pattern emerging.

This may or may not have been fixed in transcode-1.0.0_beta2, not sure.

At any rate, here is a workaround:

Do a dummy run with '--export_prof' to calculate the clip values:

```
transcode -i movie.avi -y ffmpeg --export_prof dvd --export_asr 3 -c 0-00:00:00 2>&1 | grep "pre clip frame"

[transcode] V: pre clip frame   | 640x476 (-94,0,-94,0)
```

Use the clip value for the '-j' option & set '--pre_clip=no':

```
transcode -i movie.avi -y ffmpeg --export_prof dvd-pal --pre_clip=no -j -94,0,-94,0 --export_asr 3 -o movie-short -D0 -E 48000 -b 224 -s2 -m movie-short.ac3 -J modfps --export_fps 25
```

 *Quote:*   

> Problem 2: How about creating an ultra-widescreen anamorphic DVD by myself? Is that possible with existing tools? Afaik I have to set correct pixel and display aspect ratios. Any suggestions for standard-compliant values which can be interpreted by stand-alone dvd players?

 

Closest I've got to a decent widescreen encoding is to encode to a 16:9 aspect, creates a nice wider video in comparison to 4:3.

I've not played much with transcode's anamorphic options for ultra widescreen (--export_par), but I think the largest obstacle will be getting dvdauthor to play nice with it & not round the aspect up or down to what it thinks is best.Last edited by shiznix on Sun Apr 10, 2005 12:36 am; edited 2 times in total

----------

## der bastler

Original Quicktime movies from BMWFilms.com: 720x300, 23.976fps.

Same problem with modfps. I solved it by encoding the 23.976fps movie in 25fps and did a 4% speed up on the audio tracks.

"Making of" and "Driving Techniques" are 720x300 at 29.97fps. Here I used the 29to23 filter plus my 23to25 method.

Regarding anamorphic, my transcode options were:

--pre_clip -52,0,-52,0 (convert 720x300 into 720x404 by adding black bars, resulting in roughly 16:9 aspect ratio)

--export_asr 3

--export_par 4

-Z 720x576

DVDAuthor accepts it, xine plays fine. Switch between 4:3 menus and 16:9 movies seems to be no problem, too. Let's see what the stand-alone will do with it...

----------

## shiznix

Have made several updates to the guide:

Added a small section on ffmpeg.cfg for when '--export_prof' is not used. By not using the ffmpeg.cfg file, you run the risk of transcode encoding to a higher video bitrate than the DVD spec, causing mplex to error out with SCR/DTS errors.

Offered a simpler dvdauthor.xml file for those not wishing to create any menus.

Added a note about resulting video problems with some cheap DVD media, (-speed=1).

Released a new version of any2vob (0.16) -> http://mightylegends.zapto.org/dvd/any2vob/

This one automates adding in of subtitles from external subtitle files, as well as encoding from container formats with multiple audio & subtitle tracks such as .OGM & .MKV, all subtitle & audio tracks are preserved in the resulting .VOB.

Now also supports encoding from Macromedia Flash .SWF files (experimental) & MythTV generated .NUV files with the option to automatically remove MythTV detected commercials.

Thanks

Shiznix  :Very Happy: 

----------

## dgrant

http://gentoo-wiki.com/HOWTO_Create_a_DVD

If anyone wants to help merge this information with the article above on the wiki, please do!

----------

## shiznix

 *der bastler wrote:*   

> Original Quicktime movies from BMWFilms.com: 720x300, 23.976fps.
> 
> Same problem with modfps. I solved it by encoding the 23.976fps movie in 25fps and did a 4% speed up on the audio tracks.
> 
> "Making of" and "Driving Techniques" are 720x300 at 29.97fps. Here I used the 29to23 filter plus my 23to25 method.
> ...

 

Thank you for the bmwfilms.com link, this is the first time I've come across a multi-angled, multi-audio track .MOV file, very interesting indeed.

To put my own mind at ease, I downloaded & tried to process one of the 720x300, 23.976 fps files (Hostage) ready for DVD.

Using the standard mencoder/transcode/mplex lines described in the howto, it gave no errors & worked beautifully:

```
transcode -i Hostage_EFE.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o hostage -D0 -s2 -m hostage.ac3 -J modfps --export_fps 25

mplex -f8 -o Hostage.VOB hostage.m2v hostage.ac3
```

I'd be most interested to see your transcode command line used, along with transcode's output that leads to the 'video size too small' error.

As mentioned previously, a less painless workaround to this error is to use '-j' as an alternative to '--pre_clip', however if you feel you are getting better results with speeding up the audio, you can do so on your transcode line without the extra sox process (although it does indirectly use sox to achieve it's result), like so:

```
transcode -i your.avi -y ffmpeg,mp2=speed=1.0427 -F mpeg2 -o output

mv output.mpa output.mp2

ffmpeg -i output.mp2 -ab 224 -ar 48000 output.ac3
```

This is discussed in greater detail in '/usr/share/doc/transcode-0.6.14/export_mp2.txt'.

Regarding your frame dropping errors with mplex, I suspect they are arising from you not using '--export_prof', but using '-Z' instead. If that is the case, then you'll need to create an ffmpeg.cfg file as mentioned in the 'Tweakage' section.

With respect on encoding to widescreen, I found no difference transcoding with & without '--export_par 4' while encoding a 16:9 vob (with & without using '--export_prof'). Only time it did make a difference was to manually specify --export_par values without using the table as mentioned in transcode's manpage. eg. '--export_par 60,1' in which case it would bump the aspect ratio up to 2.21:1 (even with '--export_asr 3').

Looks great in xine/mplayer, but will cause an 'unknown aspect ratio' with dvdauthor, will round down to a 16:9 ratio & the video will end up 'squished'.

These are just my own experiences however. Would be glad if you could prove me wrong on this.  :Wink: 

----------

## discostu

Question: I already have the vob files for a dvd I want to create. I'm not copying a whole dvd, just 4 of the titles from it. I have generated a menu using this tutorial as a basis. Can dvdauthor accept vob files as input? because when I run dvdauthor i get: 

```
WARN: Skipping sector, waiting for first VOBU...

WARN: Skipping sector, waiting for first VOBU...

WARN: Skipping sector, waiting for first VOBU...

WARN: Skipping sector, waiting for first VOBU...

WARN: Skipping sector, waiting for first VOBU...

STAT: VOBU 0 at 0MB, 4 PGCS

Segmentation fault
```

```
<dvdauthor dest="DVD">

  <vmgm />

    <titleset>

      <menus>

   <pgc>

          <button> jump title 1; </button>

          <button> jump title 2; </button>

          <button> jump title 3; </button>

          <button> jump title 4; </button>

          <vob file="menu_final.mpg"/>

          <post> jump cell 1; </post>

   </pgc>

      </menus>

      

      <titles>

   <pgc>

          <vob file="/home/stuart/tmp/file1.vob" />

          <post> call menu; </post>

   </pgc>

   <pgc>

          <vob file="/home/stuart/tmp/file2.vob" />

          <post> call menu; </post>

   </pgc>

   

   <pgc>

          <vob file="/home/stuart/tmp/file3.vob" />

          <post> call menu; </post>

   </pgc>

   <pgc>

          <vob file="/home/stuart/tmp/file4.vob" />

          <post> call menu; </post>

   </pgc>

      </titles>

      

    </titleset>

  </dvdauthor>
```

----------

## shiznix

 *discostu wrote:*   

> Question: I already have the vob files for a dvd I want to create. I'm not copying a whole dvd, just 4 of the titles from it. I have generated a menu using this tutorial as a basis. Can dvdauthor accept vob files as input? because when I run dvdauthor i get: 
> 
> ```
> WARN: Skipping sector, waiting for first VOBU...
> 
> ...

 

DVDauthor can accept vob files as input, but in this case the vob files must already be decrypted & copied to your hard-drive by a program that preserves VOBU/NAV packets within the vob.

How did you copy these vob files ?

A DVD compliant VOB file is made up of many VOBU (Video Object Unit) packets.

Contained within these, at the start of every packet is what's called a NAV packet, which is basically used for navigiation & seeking in the program.

DVDauthor needs these VOBU & NAV packets to be present to be able to process & author the DVD.

If you copied these VOBs from a DVD, then I would either look to see if there is some option you are missing that preserves these NAV/VOBU packets or look at an alternative copying program.

One such program is transcode & can copy VOBs while preserving VOBUs like so:

```
tccat -i /dev/dvd -T 2,-1 -P
```

The above example will copy title two from the DVD.

Another is vobcopy:

```
vobcopy -n2
```

If re-copying the VOBs from the original DVD is not an option, then you can use mplex to re-insert the needed NAV/VOBU packets.

To do this you will need to de-mux each VOB, then mux the audio/video back together with mplex:

```
transcode -i input_file.vob -y raw,raw -N 0x2000 -A -P1 -o video_tmp.m2v -m audio_tmp.ac3
```

Use 'tcextract' to extract any extra audio tracks by incrementing '-a0' for each:

```
tcextract -d2 -i input_file.vob -a1 -x ac3 | tcextract -d2 -x ac3 -t raw > audio_tmp2.ac3
```

Finally mux back together:

```
mplex -f8 -o output_final.vob video_tmp.m2v audio_tmp.ac3 audio_tmp2.ac3
```

----------

## padhead

I have a question that I didn't find in the forum:

how can I split the vob files that are on the dvd to vob files with a specific length? I want to have a command-line tool with input parameters the dvd path and how big the vob files should be and that then copies the files to my harddisk. Is there something like this or do i have to develop it myself?

----------

## awrobinson

 *paladin151 wrote:*   

>  *slaterson wrote:*    *kilativv wrote:*   Using any of the described above methods for NTSC i get half of the screen green on my Toshiba DVD player. The sound works, no errors during encoding. 
> 
> Did anyone got any similar problems?
> 
> Thanks 
> ...

 

This may be a similar problem or it may be different. I'm recording basketball games from TV and trying to save them on DVDs with a little editing. All the DVDs I have created with dvdauthor on Linux play on every computer I've tried. However, on my Toshiba standalone player, I get audio but no video. I have one DVD that I created using Nero software on windows. It plays just fine on the Toshiba DVD player. Being a complete newbie at this, I decided the difference must be that the Nero-created DVD had a menu while the dvdauthor ones did not. So I spent a week figuring out how to make menus with spumux and dvdauthor. When I had one that worked well with xine, I burned it to a DVD-RW and popped it in the Toshiba player. The menu displayed and worked correctly. When I selected a title, the player played the audio but not the video. Argh!

So now my newbie deduction skills make me think the issue is the mpeg file for the title. I use avidemux2 to edit the video and output a dvdauthor-friendly format mpg file. My string of vague questions run thusly: Do these symptoms suggest a way to correct the problem? Is there information on the mpg file that I could provide that might indicate the problem? How would I obtain that information? Is there a better forum to ask these questions? Is there a more appropriate question to ask? What is the meaning of life, the universe and everything? (OK, we all know the answer to the last question is 42.)

Thanks!

----------

## icantthinkofaname

I'm having problems getting both movies to play off a DVD.

```

<dvdauthor dest="DVD">

  <vmgm />

   <titleset>

     <titles>

       <pgc>

         <vob file="matrix_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00"/>

       </pgc>

       <pgc>

         <vob file="outtakes_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00,4:30,5:00"/>

       </pgc>

     </titles>

   </titleset>

 </dvdauthor>

```

That should make the DVD play "matrix_dvd.mpg" then go onto "outtakes_dvd.mpg" right? When I put that in dvdauthor.xml and run dvdauthor, it puts both movies in the vob file together, but the DVD player stops after the first clip. If I just do 'mplayer whatever.vob' both files are there.

----------

## hulmeman

I'm having trouble using dvdauthor, I'm getting this error message, and I'm not sure what it refers to. Can anyone help?

Thnx Baz

ERR:  Cannot call to a specific menu PGC, only an entry

ERR:  in VTS pgc 19, <post>

My dvd.xml:

<?xml version="1.0" encoding="utf-8"?>

<dvdauthor>

  <vmgm>

    <menus>

      <pgc>

        <post>jump titleset 1 menu;</post>

      </pgc>

    </menus>

  </vmgm>

  <titleset>

    <menus>

      <pgc>

        <button name="1">jump title 32;</button>

        <button name="2">jump title 1;</button>

        <button name="3">jump title 59;</button>

        <button name="4">jump menu 2;</button>

        <button name="5">jump title 21;</button>

        <button name="6">jump title 1;jump title 21;jump title 32;jump title 59;jump title 62;</button>

        <vob file="/home/baz1/dvd/menu1-0.mpg" pause="inf"/>

        <post>jump menu 1;</post>

      </pgc>

      <pgc>

        <button name="1">jump title 62;</button>

        <button name="2">jump title 63;</button>

        <button name="3">jump title 64;</button>

        <button name="4">jump menu 1;</button>

        <button name="5">jump title 62;jump title 63;jump title 64;</button>

        <vob file="/home/baz1/dvd/menu1-1.mpg" pause="inf"/>

        <post>jump menu 2;</post>

      </pgc>

    </menus>

    <titles>

      <pgc>

        <vob file="/vobs/1.VOB"/>

        <post>jump title 2;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/2.VOB"/>

        <post>jump title 3;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/3.VOB"/>

        <post>jump title 4;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/4.VOB"/>

        <post>jump title 5;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/5.VOB"/>

        <post>jump title 6;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/6.VOB"/>

        <post>jump title 7;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/7.VOB"/>

        <post>jump title 8;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/8.VOB"/>

        <post>jump title 9;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/9.VOB"/>

        <post>jump title 10;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/10.VOB"/>

        <post>jump title 11;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/11.VOB"/>

        <post>jump title 12;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/12.VOB"/>

        <post>jump title 13;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/13.VOB"/>

        <post>jump title 14;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/14.VOB"/>

        <post>jump title 15;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/15.VOB"/>

        <post>jump title 16;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/16.VOB"/>

        <post>jump title 17;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/17.VOB"/>

        <post>jump title 18;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/18.VOB"/>

        <post>jump title 19;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/19.VOB"/>

        <post>jump title 20;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/20.VOB"/>

        <post>call menu 1;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/21.VOB"/>

        <post>jump title 22;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/22.VOB"/>

        <post>jump title 23;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/23.VOB"/>

        <post>jump title 24;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/24.VOB"/>

        <post>jump title 25;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/25.VOB"/>

        <post>jump title 26;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/26.VOB"/>

        <post>jump title 27;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/27.VOB"/>

        <post>jump title 28;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/28.VOB"/>

        <post>jump title 29;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/29.VOB"/>

        <post>jump title 30;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/30.VOB"/>

        <post>jump title 31;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/31.VOB"/>

        <post>call menu 1;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/32.VOB"/>

        <post>jump title 33;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/33.VOB"/>

        <post>jump title 34;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/34.VOB"/>

        <post>jump title 35;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/35.VOB"/>

        <post>jump title 36;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/36.VOB"/>

        <post>jump title 37;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/37.VOB"/>

        <post>jump title 38;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/38.VOB"/>

        <post>jump title 39;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/39.VOB"/>

        <post>jump title 40;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/40.VOB"/>

        <post>jump title 41;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/41.VOB"/>

        <post>jump title 42;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/42.VOB"/>

        <post>jump title 43;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/43.VOB"/>

        <post>jump title 44;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/44.VOB"/>

        <post>jump title 45;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/45.VOB"/>

        <post>jump title 46;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/46.VOB"/>

        <post>jump title 47;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/47.VOB"/>

        <post>jump title 48;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/48.VOB"/>

        <post>jump title 49;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/49.VOB"/>

        <post>jump title 50;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/50.VOB"/>

        <post>jump title 51;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/51.VOB"/>

        <post>jump title 52;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/52.VOB"/>

        <post>jump title 53;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/53.VOB"/>

        <post>jump title 54;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/54.VOB"/>

        <post>jump title 55;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/55.VOB"/>

        <post>jump title 56;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/56.VOB"/>

        <post>jump title 57;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/57.VOB"/>

        <post>jump title 58;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/58.VOB"/>

        <post>call menu 1;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/59.VOB"/>

        <post>jump title 60;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/60.VOB"/>

        <post>jump title 61;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/61.VOB"/>

        <post>call menu 1;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/62.VOB"/>

        <post>call menu 2;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/63.VOB"/>

        <post>call menu 2;</post>

      </pgc>

      <pgc>

        <vob file="/vobs/64.VOB"/>

        <post>call menu 2;</post>

      </pgc>

    </titles>

  </titleset>

</dvdauthor> 

----------

## Xamindar

I tried to use the script but it givs me errors.  Anyone know what I am doing wrong?

```
Running: ffmpeg -i MySassyGirl.ac3 -f wav MySassyGirl.wav

ffmpeg version 0.4.9-pre1, build 4743, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared-pp --enable-shared --disable-static --disable-mmx --enable-ogg --enable-vorbis --disable-faad --disable-faac --disable-faadbin --disable-altivec --disable-debug --enable-mp3lame --enable-a52 --enable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-pthreads --enable-xvid --enable-gpl --enable-pp --disable-optimize

  built on Apr  7 2005 09:52:52, gcc: 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)

MySassyGirl.ac3: I/O error occured

Usually that means that input file is truncated and/or corrupted.

sox: Can't open input file 'MySassyGirl.wav': No such file or directory

sox: Can't open input file 'MySassyGirl.wav': No such file or directory

Creating left rear surround channel

cp: cannot stat `left.wav': No such file or directory

Creating right rear surround channel

cp: cannot stat `right.wav': No such file or directory

```

----------

## shiznix

 *awrobinson wrote:*   

> I am having the same problem. I encoded to 352x240 29.97 fps and created the vob files with dvdauthor.  The vob's play correctly with mplayer but when I burn the dvd I get the screen problem on my Toshiba dvd player.
> 
> On this link someone is having the same problem with a Philips dvd player. 
> 
> http://www.dealdatabase.com/forum/archive/index.php/t-30859
> ...

 

Hi Awrobinson,

Could you post the transcode line you used + the output of transcode, thanks.

 *Quote:*   

> This may be a similar problem or it may be different. I'm recording basketball games from TV and trying to save them on DVDs with a little editing. All the DVDs I have created with dvdauthor on Linux play on every computer I've tried. However, on my Toshiba standalone player, I get audio but no video. I have one DVD that I created using Nero software on windows. It plays just fine on the Toshiba DVD player. Being a complete newbie at this, I decided the difference must be that the Nero-created DVD had a menu while the dvdauthor ones did not. So I spent a week figuring out how to make menus with spumux and dvdauthor. When I had one that worked well with xine, I burned it to a DVD-RW and popped it in the Toshiba player. The menu displayed and worked correctly. When I selected a title, the player played the audio but not the video. Argh!
> 
> So now my newbie deduction skills make me think the issue is the mpeg file for the title. I use avidemux2 to edit the video and output a dvdauthor-friendly format mpg file. My string of vague questions run thusly: Do these symptoms suggest a way to correct the problem? Is there information on the mpg file that I could provide that might indicate the problem? How would I obtain that information? Is there a better forum to ask these questions? Is there a more appropriate question to ask? What is the meaning of life, the universe and everything? (OK, we all know the answer to the last question is 42.)
> 
> Thanks!

 Could you post the output of 'tcprobe -i your_movie.VOB' please.

At first glance this would seem to me to be a major problem with this particular brand's firmware in the way it handles peak video bitrates.

Try encoding at a much lower video bitrate, create a file called 'ffmpeg.cfg' like the one below & place it in either your working directory or in ~/.transcode/

```
[mpeg2video]

vrc_minrate=0

vrc_maxrate = 7500

vrc_buf_size = 1792
```

The important line being 'vrc_maxrate = 7500', which will encode to a video bitrate of 7500kbps (the default is to normally encode to 9000kbps).

Hope that helps!  :Cool: 

----------

## shiznix

 *icantthinkofaname wrote:*   

> I'm having problems getting both movies to play off a DVD.
> 
> ```
> 
> <dvdauthor dest="DVD">
> ...

 

No, you select the next clip by selecting the next Title via your DVD player's own system menu.

To have it behave in the way you describe you would edit the dvdauthor.xml like this:

```

<dvdauthor dest="DVD">

  <vmgm />

   <titleset>

     <titles>

       <pgc>

         <vob file="matrix_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00"/>

         <post> jump title 2; </post>

       </pgc>

       <pgc>

         <vob file="outtakes_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00,4:30,5:00"/>

       </pgc>

     </titles>

   </titleset>

 </dvdauthor>

```

----------

## shiznix

 *Xamindar wrote:*   

> I tried to use the script but it givs me errors.  Anyone know what I am doing wrong?
> 
> ```
> Running: ffmpeg -i MySassyGirl.ac3 -f wav MySassyGirl.wav
> 
> ...

 

Could you please post the full output of the script that leads up to this error, thanks  :Wink: 

----------

## Xamindar

I re-emerged transcode with dvdread and fame enabled and it is encoding now.  I'll check it in the morning and see if it finishes.

----------

## shiznix

 *hulmeman wrote:*   

> I'm having trouble using dvdauthor, I'm getting this error message, and I'm not sure what it refers to. Can anyone help?
> 
> Thnx Baz
> 
> ERR:  Cannot call to a specific menu PGC, only an entry
> ...

 

It's referring to the <post> line here:

```
<vob file="/vobs/20.VOB"/> 

 <post>call menu 1;</post> 

 </pgc>
```

It is saying that you cannot 'call' to a specific menu number (number '1' in this case).

This is a menu entry:

```
<menus>
```

This is a specific menu PGC:

```
<menus>

   <pgc> ....
```

With that in mind, the following would work if using 'call':

```
<vob file="/<vob file="/vobs/20.VOB"/> 

 <post>call menu;</post> 

 </pgc>
```

Using 'call menu' will always move you back to the first menu within the Titleset it's used, which is not what you want in this case as further down in your .xml config you use:

```
<post>call menu 2;</post>
```

Try using 'jump' instead of 'call'.

You are also using...

```
<post>jump menu 1;</post>
```

...to loop your menus.

If you use...

```
<post>jump cell 1;</post>
```

...instead, the loop point will be less noticeable on playback.

----------

## elvisthedj

Hey shiznix,

Just wanted to say a big thanks for all of this information.   :Very Happy:    I might play around with some of the gui's, but I really like to know what exactly is going on (and quite frankly it's much easier for me to tweak shell scripts than source code).

Much appreciation!

----------

## danorris

First of all, my most sincere thanks to shiznix for this great guide. I'm making some DVDs for mother's day and so far, they're looking great! It would have taken me ten times as long to learn this stuff without such a good, helpful guide.

I do have a quick question, though. I created a simple root menu, and it works fine. But when I play the DVD on a standalone player, the menu's edges are cut off on all sides, by (very roughly) 50 pixels or so. Xine displays them perfectly. Is there some quirk of the DVD spec that's causing this on my standalone player? Is there a certain amount of space on the edges of the 720x480 viewport that are supposed to be like "gutters," left blank?

Here are the commands I'm running to generate the menu program (straight out of the guide), together with some info on the source files:

```
% jpeg2yuv -n 50 -I p -f 29.97 -j menu-background.jpg | mpeg2enc -n n -f 8 -o menu.m2v

% mplex -f 8 -o menu.vob menu.m2v menu.ac3

% identify -verbose menu-background.jpg

menu-background.jpg JPEG 720x480 DirectClass 54kb 0.030u 0:01

Image: menu-background.jpg

  Format: JPEG (Joint Photographic Experts Group JFIF format)

  Geometry: 720x480

  Class: DirectClass

  Type: TrueColor

  Endianess: Undefined

  Colorspace: RGB

  Depth: 8 bits

  Channel depth:

    Red: 8-bits

    Green: 8-bits

    Blue: 8-bits

  Channel statistics:

    Red:

      Min: 0 (0)

      Max: 255 (1)

      Mean: 129.629 (0.50835)

      Standard deviation: 81.8431 (0.320954)

    Green:

      Min: 0 (0)

      Max: 255 (1)

      Mean: 75.7809 (0.29718)

      Standard deviation: 78.5632 (0.308091)

    Blue:

      Min: 0 (0)

      Max: 255 (1)

      Mean: 35.4989 (0.139211)

      Standard deviation: 61.3636 (0.240642)

  Colors: 74337

  Rendering-intent: Undefined

  Resolution: 81x72

  Units: PixelsPerInch

  Filesize: 54kb

  Interlace: None

  Background Color: white

  Border Color: #DFDFDF

  Matte Color: grey74

  Dispose: Undefined

  Iterations: 0

  Compression: JPEG

  Quality: 80

  Orientation: Undefined

  JPEG-Colorspace: 2

  JPEG-Sampling-factors: 2x2,1x1,1x1

  Signature: 2c28b12e445684c9ae065b425b6d54e779f1612cf53fb64765279c3d513e4909

  Profile-exif: 20 bytes

0x00000000: 78696600 004d4d00 2a000000 08000000 00000000  Exif--MM-*----------

  Tainted: False

  User Time: 0.030u

  Elapsed Time: 0:01

  Version: ImageMagick 6.2.0 04/23/05 Q16 http://www.imagemagick.org

% file menu.ac3

../../menu-audio/menu.ac3: ATSC A/52 aka AC-3 aka Dolby Digital stream, 48 kHz,, complete main (CM) 2 front/0 rear, LFE on,, 224 kbit/s reserved Dolby Surround mode
```

I'm open to the possibility that my DVD player / TV settings are out of whack. I've never noticed any cropping of store-bought DVDs, but I've never really looked for it either. So if you think this is the case, cool, I'll do some fiddling. I just wonder if anyone else has run into the same issue.

In any case, really, thanks again... what an impressive user community!

Cheers!

----------

## shiznix

 *danorris wrote:*   

> I do have a quick question, though. I created a simple root menu, and it works fine. But when I play the DVD on a standalone player, the menu's edges are cut off on all sides, by (very roughly) 50 pixels or so. Xine displays them perfectly. Is there some quirk of the DVD spec that's causing this on my standalone player? Is there a certain amount of space on the edges of the 720x480 viewport that are supposed to be like "gutters," left blank?
> 
> I'm open to the possibility that my DVD player / TV settings are out of whack. I've never noticed any cropping of store-bought DVDs, but I've never really looked for it either. So if you think this is the case, cool, I'll do some fiddling. I just wonder if anyone else has run into the same issue.

 Hi Danorris,

I'm fairly sure the phenomena you are experiencing is quite normal for NTSC & is called NTSC overscan, something I personally have not experienced or been able to test as I live in a PAL region.

See here for more detail -> http://www.transcoding.org/cgi-bin/transcode?NTSC

Adjust your Transcode line like so & please report back:

```
transcode -i your_movie.avi -y ffmpeg --export_prof dvd-ntsc -j -18,-34,-22,-34 --export_asr 3 -o your_movie -D0 -s2 -m matrix.ac3 -J modfps --export_fps 29.97
```

The guide should be updated with a short blurb on what it is & the workaround.

For the menus, create as usual with jpeg2yuv piped through mpeg2enc, then run the resulting menu.m2v through transcode like this:

```
transcode -i menu.m2v -y ffmpeg,null --export_prof dvd-ntsc -j -18,-34,-22,-34 --export_asr 3 -o menu_output
```

Thanks  :Wink: 

----------

## danorris

Thanks, I'll give that a try when I get home. Earlier, I tried shrinking the menu to 620x380 and adding a 50-pixel gutter. This worked fine, but some of the black border was visible, and the non-black portion of the menu wasn't really centered. So maybe these overscan dimensions are exactly what I need!

And this brings up another question. The guide says to use jpeg2yuv, but the man page for jpeg2yuv contains the following blurb:

```
This is not the utility you are looking for.  This program is primarily

a  diagnostic  utility  for  debugging MJPEG recordings, not for making

movies from standard graphics  JPEG  images.   It  does  not  make  any

attempt  to convert the full-range pixel data from standard JPEG's into

the padded-range pixel data used in digital video.  The utility you are

probably  looking  for is ppmtoy4m(1), which is also included in MJPEG-

tools.
```

And I did get this to work:

```
# for NTSC

% convert menu-background.jpg ppm:- \

   | ppmtoy4m -n 50 -F 30000:1001 -A 10:11 -I p -r \

   | mpeg2enc -n n -f 8 -b 5000 -o menu.m2v
```

Aside from the technical reasons mentioned in the man page, this has an added advantage of allowing you to save the background image in any format, as long as ImageMagick can read it. (To be fair, you could do this with jpeg2yuv too.) The disadvantage, of course, is that it adds ImageMagick to the list of required software. Anyway, I don't personally understand the bit about the "full-range pixel data" in the man page, so I don't know whether it's actually something to worry about or not. But if so, it might be a good update to the guide.

Also, I've been passing -b 5000 to mpeg2enc when making the menu. I've noticed that its default settings leave some compression artifacts that are VERY visible on my Sony Trinitron CRT. 5000 makes it a LOT better, but it might be overkill.

Finally, I also made a little diagram -- just for myself -- that plots out all the different steps involved in the authoring process. It's basically a flowchart, with all the different source files and intermediate files and arrows between them indicating the steps that need to be taken. The arrows are labelled with the name of the program used. For me, just drawing this out was a big help in understanding the "big picture." Anyway, would it be worth scanning this in, or redrawing it in Dia? I'd be happy to do this if you think it would help others. The least I could do for such a good guide!

Thanks!

----------

## danorris

Ok, I went ahead and redrew my flowchart in Dia. Here's a "first draft," if you will. I haven't thoroughly checked it for mistakes, and also it does not include subtitles. But it's a start.

382x300 thumbnail

1200x943 full-size

If you think this is helpful, feel free to include it in your guide; although I would ask that you download the images and place them on another site, as this is my personal webserver and it doesn't have much bandwidth at all. I also don't guarantee I'll leave them there forever.  :Wink: 

I'm releasing these as public domain. I'm open to suggestions on changes / additions / improvements, etc.

Cheers!

Edit: I cleaned it up a bit, just some cosmetic enhancements, and changed the URL (the old one still works but is now a symlink). All the files (including the Dia source file) are also available.

----------

## shiznix

 *danorris wrote:*   

> Thanks, I'll give that a try when I get home. Earlier, I tried shrinking the menu to 620x380 and adding a 50-pixel gutter. This worked fine, but some of the black border was visible, and the non-black portion of the menu wasn't really centered. So maybe these overscan dimensions are exactly what I need!
> 
> And this brings up another question. The guide says to use jpeg2yuv, but the man page for jpeg2yuv contains the following blurb:
> 
> ```
> ...

 

This looks good, verified to work with PAL also. Imagemagick is a dependency of dvdauthor anyway as spumux uses it to merge the button masks.

Also read the same passage in the manpage & was just as confused.

 *Quote:*   

> Aside from the technical reasons mentioned in the man page, this has an added advantage of allowing you to save the background image in any format, as long as ImageMagick can read it. (To be fair, you could do this with jpeg2yuv too.) The disadvantage, of course, is that it adds ImageMagick to the list of required software. Anyway, I don't personally understand the bit about the "full-range pixel data" in the man page, so I don't know whether it's actually something to worry about or not. But if so, it might be a good update to the guide.
> 
> Also, I've been passing -b 5000 to mpeg2enc when making the menu. I've noticed that its default settings leave some compression artifacts that are VERY visible on my Sony Trinitron CRT. 5000 makes it a LOT better, but it might be overkill.

 

Excellent, have immediately updated to reflect this. 5000 isn't overkill at all, it ties in beautifully with '-y ffmpeg --export_prof', which also uses 5000kbps as it's default video bitrate.

The difference is noticeable here also.

 *Quote:*   

> Finally, I also made a little diagram -- just for myself -- that plots out all the different steps involved in the authoring process. It's basically a flowchart, with all the different source files and intermediate files and arrows between them indicating the steps that need to be taken. The arrows are labelled with the name of the program used. For me, just drawing this out was a big help in understanding the "big picture." Anyway, would it be worth scanning this in, or redrawing it in Dia? I'd be happy to do this if you think it would help others. The least I could do for such a good guide!
> 
> Ok, I went ahead and redrew my flowchart in Dia. Here's a "first draft," if you will. I haven't thoroughly checked it for mistakes, and also it does not include subtitles. But it's a start. 
> 
> 382x300 thumbnail 
> ...

 

WOW WOW WOW, all I can is WOW!

This is fantastic! Have uploaded the images on another site, will link to them in the guide.

Many thanks   :Very Happy: 

PS> Do let me know if re-running your menu.m2v through the transcode line mentioned above fixes the viewable area problem on an NTSC television.

----------

## danorris

 *Quote:*   

> PS> Do let me know if re-running your menu.m2v through the transcode line mentioned above fixes the viewable area problem on an NTSC television.

 

Hmm. No, this didn't quite work. It's better, but there's still some clipping on the left and right edges and a little bit of the gutter visible on the top and bottom (i.e. the top and bottom borders are too large). But the more I experiment with this, the more I suspect it's actually a problem with my TV. I've started to notice that it cuts off (small) pieces of its own setup menus. Given that this TV spent considerable time in a repair shop, I'm gonna write it off as a hardware issue until I can test it on someone else's TV.

----------

## lizardloop

I'm trying to do the first step of the avi to DVD process but transcode keeps bombing out on me.

```

loop@loops dvd $ transcode -i Witch_Hunter_Robin_-_01_-_Replacement_-_\[R-B\]\(b09d5713\)\[AniDB\].avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o witch1 -D0 -s2 -m witch1.ac3 -J modfps --export_fps 25 

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Witch_Hunter_Robin_-_01_-_Replacement_-_[R-B](b09d5713)[AniDB].avi (ok)

[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x480  1.33:1  

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x360 (60,0,60,0)

[transcode] V: zoom             | 720x576  0.94:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.181

[transcode] V: decoding fps,frc | 23.976,1

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [44100,16,2]  111 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [44100,16,2]  128 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7056 (7056.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse (sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4743: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 23.9760fps to 25.0000fps

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Witch_Hunter_Robin_-_01_-_Replacement_-_[R-B](b09d5713)[AniDB].avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 13973

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, pal video type for video

[export_ffmpeg.so]: INFO: Set interlacing to top-first

[export_ffmpeg.so]: INFO: Set frame rate to 25

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 15

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.422222

[mpeg2video @ 0xb5434b90]removing common factors from framerate

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: WARNING: Set audio sample rate to 48000 Hz, input rate is 44100 Hz

[export_ffmpeg.so]: WARNING:    loading resample plugin

[filter.c] Filter "resample" with args (resample)

[filter.c] Filter "resample" not loaded. Loading ...

[filter.c] Loading (resample) ..

[filter_resample.so] v0.1.4 (2003-08-22) audio resampling filter plugin

[filter_resample.so] options=(null)

[export_ffmpeg.so]: INFO: Set audio bit rate to 224 kbps

[export_ffmpeg.so]: INFO: Set audio codec to ac3

tc_memcpy: using mmxext for memcpy

Segmentation fault

loop@loops dvd $ 

```

Use flags:

```

USE="quicktime sse acpi artswrappersuid curl dga flash foreign-package freetds gd hbci innodb mmx moznocompose pic tiff usb wmf xface xvid -arts -cups kde -gnome -directfb -esd sd gtk2 mysql network mmx2 opengl 

nvidia nptl nptlonly nas live rtc real divx4linux"

CFLAGS="-march=i686 -msse -mmmx -mfpmath=sse -Os -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

```

Computer is an Epia M10000 Nehemiah.

----------

## danorris

What version of transcode? Does the crash happen right away, or after it's been encoding for a while? Have you tried other files, and if so, do they work? Have you run it in gdb to get a stack trace (preferably without -fomit-frame-pointer in your CFLAGS)?

----------

## lizardloop

transcode is version 0.6.14

Here is what happens when I try to encode another file:

```

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterbergwitch1 -

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Sharky & George - 1.05 - Doctor Jake Eel And Mr Crab.avi (ok)

[transcode] V: import format    | DivX5 RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 352x288  1.22:1  

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 352x202 (42,0,44,0)

[transcode] V: zoom             | 720x576  0.88:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  112 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse (sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4743: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 25.0000fps to 25.0000fps

[filter_modfps.so] No framerate conversion requested, exiting

[transcode] warning : filter plugin 'modfps' returned error - plugin skipped

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Sharky & George - 1.05 - Doctor Jake Eel And Mr Crab.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 14000

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, pal video type for video

[export_ffmpeg.so]: INFO: Set interlacing to top-first

[export_ffmpeg.so]: INFO: Set frame rate to 25

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 15

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.422222

[mpeg2video @ 0xb5434b90]removing common factors from framerate

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: INFO: No audio resampling necessary, using 48000 Hz

[export_ffmpeg.so]: INFO: Set audio bit rate to 224 kbps

[export_ffmpeg.so]: INFO: Set audio codec to ac3

tc_memcpy: using mmxext for memcpy

[mpeg2video @ 0xb5434b90]rc buffer underflow

encoding frames [000000-000015],   2.85 fps, EMT: 0:00:00, ( 0| 0| 9) 

[transcode] (sighandler) SIGINT received

clean up | frame threads | unload modules | cancel signal | internal threads | done

[transcode] clipped 11333 audio samples

[transcode] encoded 16 frames (0 dropped, 0 cloned), clip length   0.64 s

```

The error with the other file has now changed as well:

```

loop@loops dvd $ transcode -i Witch_Hunter_Robin_-_01_-_Replacement_-_\[R-B\]\(b09d5713\)\[AniDB\].avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o witch1 -D0 -s2 -m witch1.ac3 -J modfps --export_fps 25 

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Witch_Hunter_Robin_-_01_-_Replacement_-_[R-B](b09d5713)[AniDB].avi (ok)

[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x480  1.33:1  

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x360 (60,0,60,0)

[transcode] V: zoom             | 720x576  0.94:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.181

[transcode] V: decoding fps,frc | 23.976,1

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [44100,16,2]  111 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [44100,16,2]  128 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7056 (7056.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse (sse mmxext mmx asm C)

tc_memcpy: using mmxext for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  FFmpeg0.4.9-pre1b4743: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 23.9760fps to 25.0000fps

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Witch_Hunter_Robin_-_01_-_Replacement_-_[R-B](b09d5713)[AniDB].avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 13973

tc_memcpy: using mmxext for memcpy

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, pal video type for video

[export_ffmpeg.so]: INFO: Set interlacing to top-first

[export_ffmpeg.so]: INFO: Set frame rate to 25

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 15

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.422222

[mpeg2video @ 0xb5434b90]removing common factors from framerate

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: WARNING: Set audio sample rate to 48000 Hz, input rate is 44100 Hz

[export_ffmpeg.so]: WARNING:    loading resample plugin

[filter.c] Filter "resample" with args (resample)

[filter.c] Filter "resample" not loaded. Loading ...

[filter.c] Loading (resample) ..

[filter_resample.so] v0.1.4 (2003-08-22) audio resampling filter plugin

[filter_resample.so] options=(null)

[export_ffmpeg.so]: INFO: Set audio bit rate to 224 kbps

[export_ffmpeg.so]: INFO: Set audio codec to ac3

[mpeg2video @ 0xb5434b90]rc buffer underflow

Segmentation fault00000-000005],  31.32 fps, EMT: 0:00:00, ( 0| 0| 0) 

loop@loops dvd $ 

```

Not sure how to run it in gdb and get a stack trace but once I figure out how to do that I will.

----------

## danorris

It's the same error, it just got a little farther before crashing (it survived long enough to print out some progress text). Is this the only file you've had trouble with? If so then it seems to me like a potential bug in ffmpeg, or possibly transcode itself. It might just be a broken AVI file that transcode doesn't like. Can you play this file back in mplayer or xine? Any error or warning messages about the file? I did a quick search of both the transcode-users and ffmpeg-users mailing list archives but couldn't find anything. You may be able to narrow the search down a bit. If you have mplayer emerged (highly recommended), try this:

```
mplayer -vfm ffmpeg Witch*.avi
```

If this crashes too, it would suggest an ffmpeg bug. Otherwise, it may be a bug in transcode itself, or something wrong with your build. If you have the opportunity, you could try transcoding it on another system. Faililng that, you might do a more thorough search on the transcode-users / ffmpeg-users mailing list archives. If you don't find anything, consider posting on transcode-users; they'll want to know the version numbers of transcode and ffmpeg, and they'll probably also want you to run transcode with an extra "-v" option and post the results.

Run gdb like this:

```
gdb transcode [options...]
```

Once gdb starts up, it'll give you a "(gdb)" prompt. Type "run". Transcode will then run just like it does normally (although much slower). When it crashes, you'll go back to the "(gdb)" prompt. Type "backtrace". This output is generally very useful to programmers when hunting down errors like this. The topmost function in gdb's stack trace is also usually a very good thing to put into Google, to help you find others with the same problem! Note that -fomit-frame-pointer in your CFLAGS will make the stack trace impossible to recover in general (gdb will give you lots of question marks). To get useful information you may need to rebuild everything without -fomit-frame-pointer. But don't bother with this unless one of the transcode gurus asks you to (it won't help me personally, I'm not a transcode developer).

----------

## lizardloop

The video plays fine in mplayer. I will try some other videos and see if it is just this one. If so I'll start mucking about with mailing lists. Thanks for all your help.

Edit:

Seems as though this is the only video file that causes the fault. Will run the backtrace and send the results off to the transcode mailing list.

----------

## jflintz

All works great thanks to the HOWTO. Only issue that I have is with converting the ac3 file to wav to create the 5.1

here is the error that I get when trying as root or regular user

ffmpeg -i thx.ac3 -f wav thx.wav

ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard

  built on May  5 2005 22:07:08, gcc: 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)

thx.ac3: could not find codec parameters

I have read the whole post and search the forums and have not found an answer.

Thanks

jflintz

----------

## danorris

Not sure about the ffmpeg problem, but you might try skipping this step. I could be wrong, but I thought most 5.1 receivers were smart enough to correctly handle 2-channel input. My Onkyo receiver, for example, has two selectable ways of handling this. It can either send the two channels to the left and right fronts, muting the other speakers, or it can upmix it on-the-fly, exactly like this guide suggests doing with sox (it does the delayed rear output and everything). If you can live with your stereo's handling of 2-channel input, then it's a good idea to skip this step because you're taking a quality hit when you re-encode, whereas you could just be passing the original AC3 straight through to the DVD.

----------

## jflintz

It appears to be working good through the system even though it is only 2 channel audio so I am not going to worry about it. Sound is coming out of all speakers (front, back, center, sub). I just thought that it was wierd that I was getting that error when trying to use ffmpeg to convert the ac3 to wav.

What codec parameters is it exactly complaining about? Even though the sound is working through all the speakers this error is bugging me. I have tried it on 3 different systems and get the same error.

----------

## circuit_breaker

Anyone got a copy of this script, any2vob ? the filename is any2vob-0.18.sh 

(the author's site in this HOWTO has had a squid error displaying for a few days.)

google gives me -nothing-, don't think i didn't try!

Please, I need the script badly- gotta make some movies for a party tonight.

thanks!! :Wink: 

----------

## shiznix

 *circuit_breaker wrote:*   

> Anyone got a copy of this script, any2vob ? the filename is any2vob-0.18.sh 
> 
> (the author's site in this HOWTO has had a squid error displaying for a few days.)
> 
> google gives me -nothing-, don't think i didn't try!
> ...

 

Apologies, site is back up. :Embarassed: 

----------

## gmichels

Hi All

This is an excellent howto! However I have a few doubts and it's hard to find if they have been already asked on a 20-page thread  :Shocked: 

I have some experience on this process using Windows tools (mainly CCESP,  Avisynth and DVDLab Pro), but I'd really like to do everything in Linux. In fact, that's the only thing I still do in Windows.

So here's the video I am trying to convert to DVD:

```
$ tcprobe -i movie.avi

[tcprobe] RIFF data, AVI video

[avilib] V: 23.976 fps, codec=XVID, frames=308989, width=608, height=256

[avilib] A: 48000 Hz, format=0x2000, bits=0, channels=5, bitrate=448 kbps,

[avilib]    201345 chunks, 721689538 bytes, CBR

[tcprobe] summary for movie.avi, (*) = not default, 0 = not detected

import frame size: -g 608x256 [720x576] (*)

       frame rate: -f 23.976 [25.000] frc=1 (*)

      audio track: -a 0 [0] -e 48000,0,5 [48000,16,2] -n 0x2000 [0x2000] (*)

                   bitrate=448 kbps

           length: 308989 frames, frame_time=41 msec, duration=3:34:47.429
```

I would like to encode it to NTSC Half D1 DVD size, due to its large length, while using a better bitrate so the quality does not suffer (that) much. So, the final resolution would be 352x480.

I also would like to keep the original AC3 audio intact (I mean don't process it, use the original). Actually that was my main question, but I decided to show you the whole process just to be sure I am doing the right thing.

Here's what I have done so far:

- extracted the audio using tcextract:

```
$ tcextract -d2 -i movie.avi -a0 -x ac3 | tcextract -d2 -x ac3 -t raw > audio.ac3
```

- discovered what clipping should be done as I won't use the "--export_prof" option:

```
$ transcode -i movie.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -c 0-00:00:00 2>&1 |grep "pre clip frame"

[transcode] V: pre clip frame   | 608x360 (-52,0,-52,0)
```

- created the ffmpeg.cfg (I am using 5000 as maxrate since I am encoding to Half D1 size):

```
$ cat ffmpeg.cfg

[mpeg2video]

vrc_minrate=1000

vrc_maxrate = 5000

vrc_buf_size = 1792
```

- created the m2v file using the following command line:

```
$ transcode -i movie.avi -y ffmpeg -F mpeg2 -Z 352x480 --export_asr 3 --encode_fields b -j -52,0,-52,0 --pulldown -o movie -P 2 -w 2200
```

The video is encoding, at roughly 31 fps, for an hour already, so I am at this step.

So here are the questions:

 :Arrow:  As you can see, I am using the "-P 2" option to bypass audio processing. Is that the correct way of doing that?

 :Arrow:  I am using "--pulldown" to add the flag and get 29.97 fps, so I don't have to deal with frame rates. Is that the correct way of doing that?

As for the rest of the process, everything is pretty much straightforward, so I guess there won't be any problems.

Thanks for your help and this excellent howto!

----------

## danorris

 *gmichels wrote:*   

>  As you can see, I am using the "-P 2" option to bypass audio processing. Is that the correct way of doing that?

 

No; instead, you probably want to say "-y ffmpeg,null" to select a null audio codec. This is from the transcode man page:

```
-P flag

       pass-through flag (0=off|1=V|2=A|3=A+V) [0].

       Pass-through for flag != 1 is broken and not a trivial thing  to

       fix.
```

 *gmichels wrote:*   

>  I am using "--pulldown" to add the flag and get 29.97 fps, so I don't have to deal with frame rates. Is that the correct way of doing that?

 

I don't think so, but I'm not entirely positive. I would suggest using the modfps plugin on the transcode commandline:

```
-J modfps=clonetype=3 --export_fps=29.97,4
```

The clonetype tells it how to replicate frames to get up to 29.97 fps. 3 means to take an average of the two adjacent frames, which seems (for me) to give the best results, although for normal CRT TVs you might want to try clonetype=1. The full list of modfps options is available on the Transcode Wiki.

 *gmichels wrote:*   

> As for the rest of the process, everything is pretty much straightforward, so I guess there won't be any problems.

 

Good luck!

----------

## gmichels

 *danorris wrote:*   

> No; instead, you probably want to say "-y ffmpeg,null" to select a null audio codec. This is from the transcode man page:
> 
> ```
> -P flag
> 
> ...

 

Thanks! Strangely my ffmpeg installation doesn't  have any man pages, so I got that from google. I already changed the ffpmeg command line.

 *danorris wrote:*   

> :I don't think so, but I'm not entirely positive. I would suggest using the modfps plugin on the transcode commandline:
> 
> ```
> -J modfps=clonetype=3 --export_fps=29.97,4
> ```
> ...

 

Ok, as you are not certain, I will first try using the --pulldown option. If that doesn't work, I'll try your method, but then I would need to process the ac3 audio also, right?

Thanks a lot!

----------

## gmichels

Ok, the --pulldown option really didn't work, dvdauthor complainted about the frame rate.

So, I used the same application I used in Windows, called PULLDOWN.EXE. I ran it thru wine (it's a CLI application) and then the movie had its frame rate changed to 29.97 fps, allowing dvdauthor to use the muxed m2v file.

Regarding quality, I would say it's pretty good for my needs (even considering the length of the movie), however using CCE SP gives me somewhat better quality. Perhaps it's because I usually do a 2-pass encoding in CCE SP (apart from the first analysis pass, so it's more like 3-pass) and in transcode I did only one pass.

I'll try 2-pass encoding with transcode to see if quality gets better. First I have to figure out how to do that!  :Very Happy: 

----------

## redguy666

Maybe this was mentioned before, but...

how about "jump titleset x menu y;" and "call titleset x menu y;" commands? according to the dvdauthor documentation these commands are correct, but in reality dvdauthor throws error on them...

this functionality would be very useful for me...

is there any fixup, tip or plans to implement such commands?

----------

## nife

I am now having trouble creating the menus in gimp.  I have a png that is transparent except for 9 lime green boxes.  They are each about 2 pixels.  However when I try to use spumux it never works.  It finds the buttons then gives me an error about not being able to find the masks.... I'm not sure what has happened since my old png's still work just fine with spumux.

Here is the image:

[img=http://img164.echo.cx/img164/6061/sel8ep.th.png]

Here is the output

```

spumux spumux.xml < menu.mpg > menu_final.mpg

DVDAuthor::spumux, version 0.6.11.

Build options: gnugetopt magick iconv freetype

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=C

INFO: Converting filenames to ANSI_X3.4-1968

INFO: Picture sel.png had 15 colors

INFO: Picture sel.png had 15 colors

INFO: Constructing blank img

INFO: Autodetect 0 = 495x52-576x109

INFO: Autodetect 1 = 273x124-436x160

INFO: Autodetect 2 = 248x164-411x200

INFO: Autodetect 3 = 221x204-384x240

INFO: Autodetect 4 = 212x244-375x280

INFO: Autodetect 5 = 193x284-356x320

INFO: Autodetect 6 = 210x324-373x360

INFO: Autodetect 7 = 237x364-400x400

INFO: Autodetect 8 = 272x405-435x441

ERR: Cannot pick button masks

ERR: Blank image, skipping line -1

WARN:  Read 0, expected 4

INFO: 0 subtitles added, 1 subtitles skipped, stream: 32, offset: 0.18

Statistics:

- Processed 0 subtitles.

- The longest display line had -1 characters.

- The maximum number of displayed lines was 0.

- The normal display height of the font arial.ttf was 0.

- The bottom display height of the font arial.ttf was 0.

- The biggest subtitle box had 0 bytes.

```

so it looks like it is getting the buttons but failing.... I don't know....

and running 

```

convert -colors 2 sel.png sel-out.png

convert: Invalid bit depth for RGBA image `sel-out.png'.

```

 so I can't change the number of colors.... What have I done wrong ?  The only thing that I can think of is that one of my export settings in gimp is wrong, but I'm not sure what it could be.  I have tried all the combonations... I think they all fail to change anything... all I know is that I am outta ideas... any help would be grealy appreciated.

----------

## viperlin

hey, that any2vob script is "da bomb" as some people would say

using it on an avi but i think theres a small corruption in the avi, is there any way to make it ignore the fact and keep going because it wont encode past 23 mins

```
[mpeg4 @ 0xb53d59d0]header damaged15.70 fps, EMT: 0:23:39, ( 1| 0| 8) 

[transcode] warning : [import_ffmpeg.so] frame decoding failed| 0| 4) 

sh: line 1: 13476 Broken pipe             tcextract -a 0 -i "Easy_Rider.avi" -x mp3 -d 0

     13477                       | tcdecode -x mp3 -d 0 -z 44100

```

----------

## shiznix

 *nife wrote:*   

> I am now having trouble creating the menus in gimp.  I have a png that is transparent except for 9 lime green boxes.  They are each about 2 pixels.  However when I try to use spumux it never works.  It finds the buttons then gives me an error about not being able to find the masks.... I'm not sure what has happened since my old png's still work just fine with spumux.
> 
> Here is the image:
> 
> [img=http://img164.echo.cx/img164/6061/sel8ep.th.png]
> ...

 

Try using '-depth 8' in your convert command line.

For creating the PNG files from gimp without the need to 'convert', your button mask layers need to have no more than 4 colours in each.

Some things to note:Transparency counts as being one colour, so your really limited to 3.

Anti-aliased or hinted text cannot be used as it uses hundreds of colours.

When creating a new layer, ensure 'Layer fill type' is set to 'Transparent'

Change colours using either 'Color exchange' or 'Color map rotation' (under Right click in image -> Filters -> Colors -> Map) in Gimp-2.0

When saving the layer as a PNG, leave everything as default with only the following enabled:

* Save background color

* Save resolution

* Save creation time (optional)

* Save comment (optional)

* Save color values from transparent pixels

* Compression level: 9You can double check how many colours you have in an image in Gimp by doing:

Right click in image -> Filters -> Colors -> Colorcube Analysis

Good luck!

----------

## shiznix

 *viperlin wrote:*   

> hey, that any2vob script is "da bomb" as some people would say
> 
> using it on an avi but i think theres a small corruption in the avi, is there any way to make it ignore the fact and keep going because it wont encode past 23 mins
> 
> ```
> ...

 Hey Viperlin,

Thanks for the compliment, and thanks to those who have submitted patches, bugfixes & suggestions.

A new version (0.20) was released a few days ago with numerous enhancements, check the Changelog.

As far as your problem with 'header damage' goes, there's not a lot that can be done about it in the script aside from maybe using ffmpeg to do the encoding instead of transcode (this is an idea that I am toying with, but if it does happen, transcode will be left in as a legacy option).

Outside the script you could try running 'avifix' on the avi to repair the header.

Avifix is part of transcode, so perhaps a good idea for the transcode devels is to include an option where if transcode comes across an error like this, it invokes avifix automatically.

If avifix doesn't work, try running it through mencoder or ffmpeg first, before trying it on transcode again.  :Wink: 

----------

## shiznix

 *redguy666 wrote:*   

> Maybe this was mentioned before, but...
> 
> how about "jump titleset x menu y;" and "call titleset x menu y;" commands? according to the dvdauthor documentation these commands are correct, but in reality dvdauthor throws error on them...
> 
> this functionality would be very useful for me...
> ...

 

They do work, but it depends on where they are called from.

Could you post your dvdauthor.xml & the error that dvdauthor is giving you ?

----------

## shiznix

 *gmichels wrote:*   

> Ok, the --pulldown option really didn't work, dvdauthor complainted about the frame rate.
> 
> So, I used the same application I used in Windows, called PULLDOWN.EXE. I ran it thru wine (it's a CLI application) and then the movie had its frame rate changed to 29.97 fps, allowing dvdauthor to use the muxed m2v file.
> 
> Regarding quality, I would say it's pretty good for my needs (even considering the length of the movie), however using CCE SP gives me somewhat better quality. Perhaps it's because I usually do a 2-pass encoding in CCE SP (apart from the first analysis pass, so it's more like 3-pass) and in transcode I did only one pass.
> ...

 

With regard to changing from 23.976->29.97 fps, I agree with danorris that using '-J modfps' is the better more compatible option. And also that if you find the video jerky, experiment with different clonetypes.

However, if you still would like to use 3:2 pulldown telecine to go from 23.976 to 29.97 fps, here's how you do it:

Do not use Transcode's '--pulldown' option, dvdauthor will fail every time.

Have transcode use ffmpeg's 'fps_code = 4' option, (you can also do this with Transcode's mpeg2enc export module '-y mpeg2enc,ac3 -F 8,-p', but ffmpeg is much faster & mpeg2enc cannot handle '-Z 352x240', only '-Z 720x480')

Create an ffmpeg.cfg file like so:

```
[mpeg2video]

fps_code = 4
```

```
transcode -i movie.avi -y ffmpeg -F mpeg2 -Z 352x240 --export_asr 3 --encode_fields b -o movie -E 48000,16,2 -b 224 -N 0x2000 -s2 -m movie
```

The above will result in a telecined movie.m2v video file which will report itself as now being 29.97fps, & a movie.ac3 audio file which will need to be sped up to be in sync with the new framerate.

Note that Transcode's mp2 export module can speed the audio up with '-y ffmpeg,mp2=speed=1.25', however it's not an option. Voices will sound like chipmunks as it changes the pitch also.

To process the audio track correctly, convert the movie.ac3 to WAV format:

```
ffmpeg -i movie.ac3 movie.wav
```

Emerge libsoundtouch ( homepage here -> http://sky.prohosting.com/oparviai/soundtouch/ ), it comes with an app. called soundstretch:

```
soundstretch movie.wav movie_new.wav -tempo=25
```

Convert back to AC3 format:

```
ffmpeg -i movie_new.wav -ar 48000 -ab 384 movie_new.ac3
```

Then mplex

```
mplex -f8 -o movie.VOB movie.m2v movie_new.ac3
```

This is not just limited to 23.976->29.97 framerate conversions however.

Specifying a different 'fps_code' in ffmpeg.cfg will have the same effect, here are the different codes as taken from 'man mpeg2enc':

        1 - 24000.0/1001.0 (NTSC 3:2 pulldown converted FILM)

        2 - 24.0 (NATIVE FILM)

        3 - 25.0 (PAL/SECAM VIDEO / converted FILM)

        4 - 30000.0/1001.0 (NTSC VIDEO)

        5 - 30.0

        6 - 50.0 (PAL FIELD RATE)

        7 - 60000.0/1001.0 (NTSC FIELD RATE)

        8 - 60.0

Obviously the audio will need to stretched/shrunk depending on what the source file framerate is.

The 'tempo=' value for soundstretch is calculated using the following formula:

(( OUTPUT_FPS / SOURCE_FPS ) - 1 ) * 100

Converting from 23.976->29.97:

(( 29.97 / 23.976 ) - 1 ) * 100 = 25

Converting from 23.976->25:

(( 25 / 23.976 ) - 1 ) * 100 = 4.27

Using this method may only have the advantage of creating smoother frames as not a single frame is dropped or cloned.

The encoding process is neither faster nor slower than when using modfps.

One major drawback is that if your source contains a 5.1 surround audio track you'll lose it during the audio shrinking/stretching process, you can try & re-encode it back to 5.1 but front-to-rear panning will be lost.Last edited by shiznix on Thu Jun 02, 2005 10:08 pm; edited 3 times in total

----------

## danorris

Shiznix, I don't understand why you would need to stretch the audio track. Suppose I have a demuxed 60-second video clip, so I have a 60-second audio track and a 60-second video track at 23.976 fps. Then I convert the video up to 29.97 fps. It hasn't gotten any longer... it's still 60 seconds long... it just has more frames and is in a bigger file. If I now mux the new video back in with the original audio stream, won't everything be fine? The player should still keep everything in sync since the timestamps on the video frames have been updated to reflect the new frame rate, right?

The only time I have ever needed to stretch an audio track is when converting PAL DVDs of NTSC source material back to NTSC. When the studios convert NTSC source material to PAL, they just speed up the audio, pitch shifting and all, to go from 23.976 to 29.97. In these cases I change the video's fps flag back to 23.976 (without actually doing any resampling or frame interpolation) and then use sox to slow down the audio (with pitch shifting, downward, to counteract the original pitch shifting done by the PAL studios). Then I remux and everything's fine.

But I don't see why you'd need to do this for a 3:2 pulldown conversion. Am I thinking about this the wrong way?

----------

## shiznix

 *danorris wrote:*   

> Shiznix, I don't understand why you would need to stretch the audio track. Suppose I have a demuxed 60-second video clip, so I have a 60-second audio track and a 60-second video track at 23.976 fps. Then I convert the video up to 29.97 fps. It hasn't gotten any longer... it's still 60 seconds long... it just has more frames and is in a bigger file. If I now mux the new video back in with the original audio stream, won't everything be fine? The player should still keep everything in sync since the timestamps on the video frames have been updated to reflect the new frame rate, right?

 

Using pulldown conversion, the converted file does not have more (or less) frames.

It still contains the same number of frames, it just has a flag set within the output file that tells the player to play those same number of frames at 29.97 instead of 23.976.

This means the video plays quicker & so is no longer 60-seconds (23.976 fps) long, it is approx. 48-seconds (29.97 fps).

Therefore the audio needs to be sped up so that it plays at the same new rate as the video.

I previously made the mistake of saying 'stretching' where I should have said shrinking.

For clarity:

Shrinking audio = speeding up

Stretching audio = slowing down

As far as PTS timestamps go, a new set are created when the audio/video streams are muxed back together.

 *Quote:*   

> The only time I have ever needed to stretch an audio track is when converting PAL DVDs of NTSC source material back to NTSC. When the studios convert NTSC source material to PAL, they just speed up the audio, pitch shifting and all, to go from 23.976 to 29.97.

 

Assume you mean 23.976 to 25 fps  :Wink: 

Naughty studios, this is bad & I'd be shocked if this is common practice.

Still, those studios maybe able get away with a less noticeable pitchshift of 23.976 to 25, but certainly not one from 23.976 to 29.97 - the speed up factor is too great.

----------

## shiznix

 *jflintz wrote:*   

> All works great thanks to the HOWTO. Only issue that I have is with converting the ac3 file to wav to create the 5.1
> 
> here is the error that I get when trying as root or regular user
> 
> ffmpeg -i thx.ac3 -f wav thx.wav
> ...

 

Try without '-f wav', ffmpeg should be able to detect what format to encode from/to based on the input & output filename extensions.

Have changed the 5.1 guide to reflect this.

----------

## darcon

Thanks for the great howto shiznix! My dvd plays great on my standalone dvd player, now I've just gotta figure out why my ps2 refuses to play it. Also I had 2 suggestions.

 *Quote:*   

> transcode -i outtakes.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o outtakes -s2 -m outtakes.ac3 -J modfps=clonetype=1 --export_fps 29.97

  is missing the -D0 flag on ntsc

 *Quote:*   

> Combine the new audio & video files into one DVD mpg

  Could you make this blue? First time going through the guide I thought the mplex commands were part of  *Quote:*   

> Convert 2-channel stereo audio track to 5.1 surround sound (optional) 

 

----------

## shiznix

 *darcon wrote:*   

> Thanks for the great howto shiznix! My dvd plays great on my standalone dvd player, now I've just gotta figure out why my ps2 refuses to play it. Also I had 2 suggestions.
> 
>  *Quote:*   transcode -i outtakes.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o outtakes -s2 -m outtakes.ac3 -J modfps=clonetype=1 --export_fps 29.97  is missing the -D0 flag on ntsc
> 
>  *Quote:*   Combine the new audio & video files into one DVD mpg  Could you make this blue? First time going through the guide I thought the mplex commands were part of  *Quote:*   Convert 2-channel stereo audio track to 5.1 surround sound (optional)  

 

Done, and thanks  :Very Happy: 

I've had no problems playing dvdauthored movies on a PS2.

However this was a while ago so I'll re-test, something may have changed in either the guide or in some of the software used that might be causing it to fail.

----------

## qwijibow

Just wondering if anyone has managed to get transcode working on AMD64 ???

```

bash-2.05b$ transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o HOL1 -D0 -s2 -m HOL1.ac3 -J modfps=clonetype=3 --export_fps 25

transcode v1.0.0beta3 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

(dvd_reader.c) no support for DVD reading configured - exit.

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source /home/chris/media/vids/holiday1.avi (ok)

[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x272  2.35:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)

[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.181

[transcode] V: decoding fps,frc | 23.976,1

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  145 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32/AMD64 accel | sse3 (sse3 sse2 sse 3dnowext 3dnow mmxext mmx asm C)

tc_memcpy: using amd64 for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 23.9760fps to 25.0000fps

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "/home/chris/media/vids/holiday1.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 48000

tc_memcpy: using amd64 for memcpy

Killed
```

I cant seem to find any clues as to why tanscode keeps ketting killed.

i have tried an strace, but there is nothing there either.

```
rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0

write(4, "\340*V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0NA\0"..., 168) = 168

rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0

rt_sigsuspend([INT TERM] <unfinished ...>

--- SIGRTMIN (Unknown signal 32) @ 0 (0) ---

<... rt_sigsuspend resumed> )           = -1 EINTR (Interrupted system call)

rt_sigreturn(0x20)                      = -1 EINTR (Interrupted system call)

rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0

write(4, "\340*V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\240RA"..., 168) = 168

rt_sigprocmask(SIG_SETMASK, NULL, [INT TERM RTMIN], 8) = 0
```

i have been trying to get transcode on gentoo to work on and off for several months now, (every time i notice this guide getting updated)

i am using all the software versions for each package as given on the first post.

any ideas anyone ?

EDIT:

i tried transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg -F mpeg2video --export_asr 3 -o matrix -D0 -s2 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 25

(using -F mpeg2video instea of  --export_prof dvd-pal) and its encoding

file types are....

```

bash-2.05b$ file matrix.ac3

matrix.ac3: MPEG ADTS, layer III, v1, 128 kBits, 48 kHz, JntStereo

bash-2.05b$ file matrix.m2v

matrix.m2v: MPEG sequence, v2, MP@ML progressive Y'CbCr 4:2:0 video, 25 fps

```

Will my stand alone DVD player be able to play this ???

EDIT2: AHAAAA getting somwhere...

-F mpeg4 works too... its the --export_prof dvd-pal option that is causing the porblem.

any ideas on how to fix this ?

EDIT3:

Nope, didnt work. plays fine on my PC, but fails to play on the standalone DVD player. the dvd accepts the disk, but plays strange hirzontal lies of colour.

still looking for a solution.

----------

## shiznix

 *qwijibow wrote:*   

> Just wondering if anyone has managed to get transcode working on AMD64 ???
> 
> ```
> 
> bash-2.05b$ transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o HOL1 -D0 -s2 -m HOL1.ac3 -J modfps=clonetype=3 --export_fps 25
> ...

 

Greets qwijibow,

Try using '-y ffmpeg,null' instead of '-y ffmpeg', sometimes if transcode has problems decoding/encoding the audio, it outright refuses to encode anything.

If this doesn't work, have a look at transcode's output when you include '-q2' in your transcode line (sets info output level to DEBUG) & see if it sheds any light.

 *Quote:*   

> EDIT:
> 
> i tried transcode -i /home/chris/media/vids/holiday1.avi -y ffmpeg -F mpeg2video --export_asr 3 -o matrix -D0 -s2 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 25
> 
> (using -F mpeg2video instea of  --export_prof dvd-pal) and its encoding
> ...

 

No, video seems ok but the audio has been encoded to MP3.

DVD audio track must be in the format of either AC3, MP2, DTS or PCM.

If you decide not to use '--export_prof', then you will need a transcode line similar to those discussed in the 'Tweakage' section.

Amongst other things, you will need to specify '-E 48000,16,2 -b 224 -N 0x2000' to encode to AC3 with 48000Hz sample rate, 16-bit, 2-channel, bitrate (224) can be higher (and maybe lower), but usually 224-448 kbit range is recommended.

You'll also need to specify framesize ('-Z 720x576' for PAL), & setup an ffmpeg.cfg file as discussed so that video bitrate will be high enough to be of good quality, but max video bitrate low enough to make room for audio bandwith (10.08Mbit max).

 *Quote:*   

> EDIT2: AHAAAA getting somwhere...
> 
> -F mpeg4 works too... its the --export_prof dvd-pal option that is causing the problem.
> 
> any ideas on how to fix this ?

 

Unfortunately I don't own a 64-bit machine to test  :Sad: 

But I thought that most or all 64-bit problems had been ironed out in transcode-1.0.0beta3.

 *Quote:*   

> EDIT3:
> 
> Nope, didnt work. plays fine on my PC, but fails to play on the standalone DVD player. the dvd accepts the disk, but plays strange hirzontal lies of colour.

 

Some DVD players do support playback of MPEG4/Divx/Xvid, but it's not yet common place.

 *Quote:*   

> still looking for a solution.

 

If none of the above help in any way, someone else on this forum may answer the call.

Otherwise there is the transcode-user mailing list, usually a helpful bunch of people  :Smile: 

----------

## qwijibow

Thanks for the quick reply, unfortunatly im still in the same place.

same error, and no error message.

running with -q2 -y ffmpeg,null i get.

```
bash-2.05b$ transcode -q2 -i /home/chris/media/vids/JnSBSB.avi -y ffmpeg,null --export_prof dvd-pal --export_asr 3 -o JnSBSB -D0 -s2 -m JnSBSB.ac3 -J modfps=clonetype=3 --export_fps 25

transcode v1.0.0beta3 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

(dvd_reader.c) no support for DVD reading configured - exit.

[tcprobe] RIFF data, AVI video

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

(probe.c) V magic=0x17, A magic=0x17, V codec=0x31b3, A codec=0x55

(probe.c) V magic=RIFF data, AVI, A magic=RIFF data, AVI, V codec=DivX;-), A codec=MPEG layer-3

[transcode] auto-probing source /home/chris/media/vids/JnSBSB.avi (ok)

[transcode] V: import format    | DivX;-) RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x272  2.35:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)

[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.181

[transcode] V: decoding fps,frc | 23.976,1

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [48000,16,2]  145 kbps

[transcode] A: export           | disabled

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32/AMD64 accel | sse3 (sse3 sse2 sse 3dnowext 3dnow mmxext mmx asm C)

tc_memcpy: using amd64 for memcpy

[transcode] encoder delay = decode=40000 encode=40000 usec

[transcode] V: video buffer     | 10 @ 720x576

[transcode] allocating 10 framebuffer (static)

loading audio import module /usr/lib64/transcode/import_mp3.so

loading video import module /usr/lib64/transcode/import_ffmpeg.so

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

Audio capability flag 0x1 | 0x1

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG

Video capability flag 0x2a | 0x2

(filter.c) modfps=clonetype=3

[transcode] loading filter module (0) /usr/lib64/transcode/filter_modfps.so

Filter[0].name (modfps) instance # (0)

Filter[1].name (-) instance # (0)

Filter[2].name (-) instance # (0)

Filter[3].name (-) instance # (0)

Filter[4].name (-) instance # (0)

Filter[5].name (-) instance # (0)

Filter[6].name (-) instance # (0)

Filter[7].name (-) instance # (0)

Filter[8].name (-) instance # (0)

Filter[9].name (-) instance # (0)

Filter[10].name (-) instance # (0)

Filter[11].name (-) instance # (0)

Filter[12].name (-) instance # (0)

Filter[13].name (-) instance # (0)

Filter[14].name (-) instance # (0)

Filter[15].name (-) instance # (0)

(filter.c) successfully loaded 1 filter plugin(s)

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 23.9760fps to 25.0000fps

loading audio export module /usr/lib64/transcode/export_null.so

loading video export module /usr/lib64/transcode/export_ffmpeg.so

[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null

(encoder.c) audio capability flag 0xffffffff | 0x1

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM

(encoder.c) video capability flag 0x21f | 0x2

[transcode] starting 1 frame processing thread(s)

[transcode] starting 1 frame processing thread(s)

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "/home/chris/media/vids/JnSBSB.avi" -x mp3 -d 3 | tcdecode -x mp3 -d 3 -z 48000

tc_memcpy: using amd64 for memcpy

[tcextract] (pid=6411) RIFF data, AVI video

[tcextract] (pid=6411) starting, doing mp3

(decoder.c) audio thread id=65541

(decoder.c) video thread id=81926

Killed

bash-2.05b$ (decode_mp3.c) channels=2, samplerate=48000 Hz, bitrate=112 kbps, (1152)

bash-2.05b$    
```

i know almost nothing about the inner workings of transcode. but i would hope to see some kind of error, or warning message.

a simple "Killed" could be coming from anywhere.

From what i understand, the --export_prof is just shorthand for all those other little settings tha need to be set for pal dvd's.

so i dont expect entering them manually as in the tweakage section to help much. but ill give it a go anyways.

again, thanks for the reply.

EDIT:

would you believe it.... i just coppied and pasted the transcode line from the tweakage section, and the whole things encodes fine.

before i tried this, i used diferent profiles, like --export_prof vcd-pal but this suffered the same problem.

so it seems that the killing is caused by some kind of audo detection done by --export_prof.

im going to try and tweak the tweakage transcode line to get similar quality as --export_prof dvd-pal

the problem severity just got downgraded from critical, to minor inconvinience.

My DVD writer came with a great DVD authoring suit (for windows only) but didnt provide an mpeg2 codec.

Linux has an mpeg2 codec,  but the tools to use it go way over my head.

After 20 pages and you are still answering questions on this guide, thanks, i truely apreciate it.

----------

## dontremember

 *qwijibow wrote:*   

> 
> 
> ```
> 
> (decoder.c) audio thread id=65541
> ...

 

Just a shot in the dark, but I've seen "Killed", with no other message, when running out of swap.  You might retry whatever you were doing while keeping an eye on swap/memory usage.

----------

## qwijibow

Thanks for the input, but i dont think memory is the problem.

i have 1Gb of ram, and 1.5Gb of swap. swappynss is set to 60, and the swap free never below 100%. (im on a bit of a monster of a machine)

the killed error message pops up instantly, before any encoding is done.

----------

## dontremember

 *qwijibow wrote:*   

> Thanks for the input, but i dont think memory is the problem.
> 
> i have 1Gb of ram, and 1.5Gb of swap. swappynss is set to 60, and the swap free never below 100%. (im on a bit of a monster of a machine)
> 
> the killed error message pops up instantly, before any encoding is done.

 

Hmmm....  Running out of slots in the process table??  I think it's a fixed size.  Could it be forking a lot of  processes and wiping out the process table??

Dunno, just feeding in ideas in case it helps someone out.  The main point being that sometime the kernel just runs out of some critical resource and kills something in the hopes that it can preserve enough order to recover from the shortfall.  This gives users and admins a chance to save-and-quit before heat-death sets in.

I've seen this kind of thing happen on*BSD boxes in the past - at kernel build time you would specify how many users the kernel would be expected to support, and the build process would allocate some number N*no-of-users in the process table.

----------

## shiznix

 *qwijibow wrote:*   

> EDIT:
> 
> would you believe it.... i just copied and pasted the transcode line from the tweakage section, and the whole things encodes fine.
> 
> before i tried this, i used diferent profiles, like --export_prof vcd-pal but this suffered the same problem.
> ...

 

That's great news, happy to help!

Glad it finally works, but does using '--export_prof' also break for you in the same way on other .avi files ?

If so, you'd be doing a great service to bring this bug to the attention of the transcode-devel or transcode-user mailing list.

----------

## qwijibow

 *Quote:*   

> Glad it finally works, but does using '--export_prof' also break for you in the same way on other .avi files ?
> 
> If so, you'd be doing a great service to bring this bug to the attention of the transcode-devel or transcode-user mailing list.

 

Yep, --export_prof killas of all attempts to transcode any of my avi files.

If i had more technical data like a usefull strace log, or just an error message, maybe they could do somthing.

Other than my hardware, make.conf gcc version etc, i wouldnt know what to submit in the report.

EDIT:

FIXED, but its pretty strange. Before i start trancoding, i passed the avi through mencoder.

after this, the transcode works fine, even with --export_prof dvd-pal.

what i dont understand is....

when i run mencoder...

```
Pos:5723.7s 171540f (99%) 106fps Trem:   0min 1159mb  A-V:0.065 [1462:224]

Skipping frame!

Pos:5723.9s 171546f (100%) 106fps Trem:   0min 1153mb  A-V:0.065 [1462:224]

Skipping frame!

Pos:5724.1s 171552f (100%) 106fps Trem:   0min 1153mb  A-V:0.065 [1462:224]

Skipping frame!

Pos:5724.2s 171556f (100%) 106fps Trem:   0min 1153mb  A-V:0.065 [1462:224]

```

mencoder apears to skip every frame. but the output is a working avi file.

i assume this is because im mencoding from AVI to AVI.

origonal file = RIFF (little-endian) data, AVI, 720 x 352, 29.97 fps, video: DivX 3 Fast-Motion, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

mencoded file = RIFF (little-endian) data, AVI, 720 x 352, 25.00 fps, video: DivX 3 Low-Motion, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

changed the frames per second, and changed from fast motion to low motion (i dont even know what this is, lol)

but toherwise, these files are the same ?

I thought that maybe mencoder was fixing bugs in the origonal AVI stream, but since transcode fails before it even starts encoding, this doesnt make sence.

ALSO, the mencoded file is taking twice as long to transcode (running at 25fps instead of 60 as before)

I am VERY confused !

----------

## shiznix

 *qwijibow wrote:*   

>  *Quote:*   Glad it finally works, but does using '--export_prof' also break for you in the same way on other .avi files ?
> 
> If so, you'd be doing a great service to bring this bug to the attention of the transcode-devel or transcode-user mailing list. 
> 
> Yep, --export_prof killas of all attempts to transcode any of my avi files.
> ...

 

Mencoder is skipping frames because you are encoding down from 29.97 to 25 fps, this is normal.

If the file works in transcode after being passed through mencoder, then it is unfortunately a transcode problem either auto-probing or decoding the original's video/audio codec(s).

----------

## lokojones

I'm a bit lost.. I dont know where to start from, there are so many pages to search.. I'm a gentoo AMD64 user, and in ~amd64, the lastest transcode version is 0.6.14-r2.. 

I decided to try it anyway, but It fails in encoding the video, telling me that lame encoding is not available, but Its installed...

could someone make a quick summary of the status of this guide for amd64 people?

thx  :Smile: 

----------

## shiznix

Hi all,

Have just released a new version of any2vob (0.24) -> http://mightylegends.zapto.org/dvd/any2vob/

Many enhancements, check the Changelog.

Most funky is the new feature of being able to watch the movie as it's being encoded (--preview=yes).

In keeping with making this a CLI only tool, preview mode will work on the console without the need for X11 (as long as mplayer is compiled with +fbcon, or --enable-fbdev), uses mplayer's SDL video driver if running in X11.

Cheers,

Shiznix  :Wink: 

----------

## steelrose

Hi Shizniz.Thanx for any2vob.Seems to work nice 4 me at the moment?May i ask if it can encode .ts (transport streams) files now and how ?

----------

## shiznix

 *steelrose wrote:*   

> Hi Shizniz.Thanx for any2vob.Seems to work nice 4 me at the moment?May i ask if it can encode .ts (transport streams) files now and how ?

 

Hi Steelrose,

Glad it's working well for you.

Yes, it can take a .ts file as input & encode to a vob.

Example:

```
any2vob -i your_file.ts
```

Many .ts transport streams have more than one video and/or audio track (PIDs) in them & these can be extracted & encoded also (by default any2vob only encodes the first or main PID).

To extract & encode all PIDs to seperate vobs, do:

```
any2vob --mpegts_allpids=yes -i your_file.ts
```

As far as the internal workings of it go, it uses the 'replex' tool to extract & convert PIDs to mpeg PS Program Streams, then 'ffmpeg' encodes to DVD.

* EDIT * - I've just fixed the toolcheck routines, seems the new bash arrays were causing some missing programs to go unchecked under certain circumstances (not sure if this affected anyone, but had the potential to).

A new release with this fix has been posted (0.26)  :Embarassed: 

----------

## Beetle B.

 * wrote:*   

> Have just released a new version of any2vob (0.24)

 

Just tried this whole DVD authoring thing for the first time, and used your any2vob.

Unfortunately, I'm having the overscanning issue, and part of the picture is cut off. I know with transcode, I can add "'-j -18,-34,-22,-34'" to fix this. But how do I handle this problem with your any2vob. Any place in the script I can quickly edit?

Thanks.

----------

## marcos

Hi averybody!

I'm having a subtitle problem. I've tried everything posted in this thread, every script, every xml file, EVERYTHING, and the subtitles just keep on fu... me  :'(. They just won't show up!

Please! HELP! Y don't know what else to do ....

 THANKS!

----------

## shiznix

 *Beetle B. wrote:*   

>  * wrote:*   Have just released a new version of any2vob (0.24) 
> 
> Just tried this whole DVD authoring thing for the first time, and used your any2vob.
> 
> Unfortunately, I'm having the overscanning issue, and part of the picture is cut off. I know with transcode, I can add "'-j -18,-34,-22,-34'" to fix this. But how do I handle this problem with your any2vob. Any place in the script I can quickly edit?
> ...

 Hi Beetle,

In the latest any2vob (0.26), change the ffmpeg_crop() routine to the following:

```
ffmpeg_crop () {

        if [ ! -z "$SRC_ASPECT" ]; then

                T_REAL_WIDTH=`perl -le "print ( $HEIGHT / ( $ASPECT_E ))"`

                S_REAL_WIDTH=`perl -le "print ( $HEIGHT / $SRC_ASPECT )"`

                CLIP=`perl -le "print int(( $T_REAL_WIDTH - $S_REAL_WIDTH ) / 2 )"`

                # Even up $CLIP #

                CLIP=`perl -le "print int( $CLIP / 2 ) * 2"`

                OSCAN=([1]=18 [2]=34 [3]=22 [4]=34)

                if [ ! -z `echo $CLIP | grep "-"` ]; then

                        CROP_ARGS="-padtop ${OSCAN[1]} -padleft ${OSCAN[2]} -padbottom ${OSCAN[3]} -padright ${OSCAN[4]}"

                else

                        CROP_ARGS="-padtop $(( ${OSCAN[1]}+$CLIP )) -padleft ${OSCAN[2]} -padbottom $(( ${OSCAN[3]}+$CLIP )) -padright ${OSCAN[4]}"

                fi

        fi

}
```

I'll include this in the next version, so that it will be ON by default for NTSC encodings, but can be switched OFF with '--overscan=no'.

----------

## shiznix

 *marcos wrote:*   

> Hi averybody!
> 
> I'm having a subtitle problem. I've tried everything posted in this thread, every script, every xml file, EVERYTHING, and the subtitles just keep on fu... me  :'(. They just won't show up!
> 
> Please! HELP! Y don't know what else to do ....
> ...

 

Hey Marcos,

Do you get a successful output when spumuxing the subtitles into the final VOB, something like this ?

```
INFO: Picture had 2 colors

INFO: Converting filenames to ANSI_X3.4-1968

INFO: Picture had 2 colors

INFO: Picture had 2 colors

INFO: Constructing blank img

INFO: Autodetect 0 = 0x0-720x576

INFO: Pickbuttongroups, success with 1 groups, useimg=1

INFO: Found EOF in .sub file.

INFO: Max_sub_size=4456 WARN: Read 0, expected 4

INFO: 1 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18
```

Do they show up in xine ?

If not, then you may need to turn them on (right-click on the video & choose 'Subtitle').

The subtitles can be forced ON by including the 'force' tag in your subtitle.xml file like so:

```
<subpictures>

  <stream>

    <spu start="00:00:00.0" end="00:00:00.0"

         highlight="matrix_menu_highlight.png"

         select="matrix_menu_select.png"

         autooutline="infer"

         autoorder="rows"

         force="yes"/>

  </stream>

</subpictures>
```

Are you using the 'dvdauthor-0.6.11_subtitle_colours.diff' patch ?

If so, then you will need to provide the palette file every time you use 'dvdauthor' & adjust your dvdauthor.xml accordingly, or the subtitles will come out black (black subtitles on a black background = "WTF are my subtitles?").

----------

## marcos

shiznix

I,m not using the 'dvdauthor-0.6.11_subtitle_colours.diff' patch and all the output seens right.

For now I paste the subs in the avi file doing this:

mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -sub matrix.srt matrix.avi -o matrix_sub.avi

and then do all the rest in the howto.

I now whant to know if there is a better way of doing this. The matrix_sub.avi file looks good but the video quality is a bit worse than the original matrix.avi file. 

Is there any way to keep the quality of the original movie?.

Thanks!

----------

## shiznix

 *marcos wrote:*   

> shiznix
> 
> I'm not using the 'dvdauthor-0.6.11_subtitle_colours.diff' patch and all the output seems right.
> 
> For now I paste the subs in the avi file doing this:
> ...

 

As you probably know, what you are doing is known as hard subbing, and in (nearly?) all cases will not work for converting to DVD.

It's also not recommended as you limit DVD playback functionality, the user is locked into one subtitle without the ability to change to multiple subtitle streams, nor can the user switch the subtitles off.

For DVD, don't hard sub, remove '-sub matrix.srt' from your mencoder line.

Try passing matrix.avi through Transcode first, only then if it fails use the mencoder line shown in the howto to create a file that Transcode will be happy with.

Transcode will not work with mplayer's new mpeg4 codec, you must use 'vcodec=msmpeg4' (mplayer created their own fourcc (FMP4) for mpeg4).

At this point you'll also see that your mencoder line is missing video bitrate & high quality settings '-lavcopts vcodec=msmpeg4:vbitrate=5000:vhq' (this is why your video quality is suffering).

Don't use '-oac copy' as Transcode does not support some types of audio, always use '-oac lavc -lavcopts acodec=mp3 -srate 48000'.

Anyway, all the above is outlined in the howto.

Basic process goes like this:

* Pre-process with mencoder only if Transcode cannot correctly recognise the file

* transcode to file.m2v/file.ac3

* mplex file.m2v/file.ac3 to file.vob

* Mux file.srt subtitle(s) into file.vob using spumux

As a side note, it is possible to create DVD compliant mpeg2 video with mencoder in one pass, which at present seems to have scaling, framerate conversion & aspect issues.

Something to hope for in the future  :Wink: 

----------

## Beetle B.

Hi Beetle,

In the latest any2vob (0.26), change the ffmpeg_crop() routine to the following: 

Thanks!

----------

## zaiyon

Hi, great howto, I used it several times now. But now I tried to add subtitles, and couldn't do it, this is my spumux file:

```

<subpictures>

  <stream>

    <textsub filename="trhps.ssa" characterset="ISO8859-1"

             fontsize="18.0" font="Vera.ttf" horizontal-alignment="center"

             vertical-alignment="bottom" left-margin="60"

             right-margin="60"

             top-margin="20" bottom-margin="30"

             subtitle-fps="25"

             movie-fps="25" movie-width="720"

             movie-height="574"/>

  </stream>

</subpictures>

```

and this is what happens:

```

$ spumux -s0 subtitle.xml < trhps.mpg > trhps-sub.mpg

DVDAuthor::spumux, version 0.6.11.

Build options: gnugetopt magick iconv freetype fribidi

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=en_US.utf8

INFO: Converting filenames to UTF-8

INFO: Detected subtitle file format: ssa

INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*

INFO: Read 1192 subtitles

INFO: Unicode font: 255 glyphs.

File size limit exceeded

```

Hint: I use an UTF-8 system.

The subtitle file is (as you can see) .saa format, and works just fine, testet with mplayer.

BTW, I currently plan to add the same movie twice to the same DVD, one with subtitles and one without, so that you can turn em off. (My menu has two buttons: "play with sub" and "play without sub")

Is there by any chance a more elegant way to make use of subtitles? Let the DVD player show em or whatever? When I buy commercial DVDs, I can usually turn subtitles on and of as I wish (even during playback)

----------

## shiznix

 *zaiyon wrote:*   

> Hi, great howto, I used it several times now. But now I tried to add subtitles, and couldn't do it, this is my spumux file:
> 
> ```
> 
> <subpictures>
> ...

 

This looks like a filesystem limitation, and not a message from dvdauthor or spumux itself.

Is the final file perhaps being written to a FAT/VFAT/FAT16/FAT32 filesystem ?

 *Quote:*   

> Hint: I use an UTF-8 system.
> 
> The subtitle file is (as you can see) .ssa format, and works just fine, tested with mplayer.
> 
> BTW, I currently plan to add the same movie twice to the same DVD, one with subtitles and one without, so that you can turn em off. (My menu has two buttons: "play with sub" and "play without sub")
> ...

 

There is a better way.

There is no need to encode the movie twice, simply assign the relevant button to each subtitle stream in your dvdauthor.xml file like so:

```

  <titleset>

    <menus>

      <pgc>

        <button> subtitle = 64; jump title 1; </button>

        <button> subtitle = 65; jump title 1; </button>

        <vob file="matrix_menu_final.mpg"/>

        <post> jump cell 1; </post>

      </pgc>

    </menus>

    <titles>

      <pgc>

        <vob file="matrix_dvd.mpg" chapters="0,0:30,1:00,1:30,2:30,3:00,3:30,4:00"/>

          <post> call menu; </post>

      </pgc>

    </titles>

  </titleset>
```

Specifying subtitle values:

0-31 means the subtitle stream numbers 0-31 will be turned off.

64-95 means the subtitle stream numbers 0-31 will be turned on.

Specifying the tag 'force=yes' in your spumux.xml file for the subtitle stream will override the above values & force that subtitle stream to be displayed.

You can get a bit more of an idea of how the subtitling values work from 'man dvdauthor'.

----------

## igds

The transcode option -J modfps=clonetype=3 caused a video problem for me, which was remedied by its omission (at least to my satisfaction, with the caveat that I was just looking for the easiest working solution).

```
transcode -i matrix.avi \

          -y ffmpeg \

         --export_prof dvd-ntsc --export_asr 3 --export_fps 29.97 \

          -J modfps=clonetype=3 \

          -D0 -s2 \

          -m matrix.ac3 \

          -o matrix
```

Taken from the How-To (2005-08-22) and edited for readability.

NCSALT-DVD.mpg is a self-made video that Pinnacle Studio (v9, I think, or else v7) claims is DVD-video compliant.

```
$ ls -hl NCSALT-DVD.mpg

[...] 3.0G [...] NCSALT-DVD.mpg

$ tcprobe -i NCSALT-DVD.mpg

[tcprobe] MPEG program stream (PS)

[tcprobe] summary for NCSALT-DVD.mpg, (*) = not default, 0 = not detected

import frame size: -g 720x480 [720x576] (*)

     aspect ratio: 4:3 (*)

       frame rate: -f 23.976 [25.000] frc=1 (*)

                   PTS=0.2315, frame_time=41 ms, bitrate=8000 kbps

      audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x50 [0x2000] (*)

                   PTS=0.1982, bitrate=224 kbps

                   -D 0 --av_fine_ms 33 (frames & ms) [0] [0]
```

Of course, dvdauthor choked when fed this file directly.

So I used the transcode command above with the appropriate changes.

```
transcode -i NCSALT-DVD.mpg \

          -y ffmpeg \

         --export_prof dvd-ntsc --export_asr 2 --export_fps 29.97 \

          -J modfps=clonetype=3 \

          -D0 -s2 \

          -m ncsalt_dvd.ac3 \

          -o ncsalt_dvd
```

After mplexing the resulting files, I noticed the audio was out of sync -- but it wasn't just that.  The problem was actually with ncsalt_dvd.m2v and its speed.  I'm afraid I didn't keep the bad file around to tcprobe it, but I will describe the problem thus.

The beginning of the video shows a series of still images, so I could easily (if not accurately) measure that the video was moving slower than proper.  One image was shown for about 10 seconds, compared to the original 8; the others were shown for 5 seconds vis-a-vis 4.  (Nothing was wrong with the audio, thankfully.)

Adding the --pulldown option did nothing (nor did removing -D0 nor -s2, just to be thorough).  Removing the -J modfps=clonetype=3 option solved the problem, and I ended up with what I perceived to be a good and synced video and everything proceded smoothly from there on.  (Looking at my bash history, it seems I also omitted -D0 in the final command, so I transcribe it thus even though I don't expect it had anything to do with anything.)

```
transcode -i NCSALT-DVD.mpg \

          -y ffmpeg \

         --export_prof dvd-ntsc --export_asr 2 --export_fps 29.97 \

          -s2 \

          -m ncsalt_dvd.ac3 \

          -o ncsalt_dvd
```

The resulting ncsalt_dvd.mpg after 

```
$ mplex -f 8 -o ncsalt_dvd.mpg ncsalt_dvd.m2v ncsalt_dvd.ac3
```

 is thus:

```
$ ls -hl ncsalt_dvd.mpg

[...] 2.2G [...] ncsalt_dvd.mpg

$ tcprobe -i ncsalt_dvd.mpg

[tcprobe] MPEG program stream (PS)

[tcprobe] summary for ncsalt_dvd.mpg, (*) = not default, 0 = not detected

import frame size: -g 720x480 [720x576] (*)

     aspect ratio: 4:3 (*)

       frame rate: -f 23.976 [25.000] frc=1 (*)

                   PTS=0.1780, frame_time=41 ms, bitrate=9000 kbps

      audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x2000 [0x2000]

                   PTS=0.1780, bitrate=224 kbps

                   -D 0 --av_fine_ms 0 (frames & ms) [0] [0]
```

The DVD I burned after authoring from ncsalt_dvd.mpg at least works in my standalone DVD player; that and my PC players are the extent of my testing capabilities, so I hope it doesn't choke on other players.

I realize that this may not the most optimal of solutions so, besides giving a heads up to anyone who might also be using Pinnacle Studio, I'm curious if anyone has any suggestions or comments; in particular, I'm a bit alarmed by the reduction of the video's filesize by 0.8 GB.

As a side note, I was accessing the files in question over Ethernet from a CIFS (see: SMB) mount, the files themselves residing on a Windows XP Pro machine.  Also, the video itself is mostly just of people talking, sitting, and some dance performances.

By the way, thanks to every one for their efforts both past and present.

----------

## Mythos

Sorry but ...

Can i get a program like Nero Vision, simple as Nero Vision for linux ???

thanks [[]]

----------

## majunbu

Question

  I have just recently returned to Gentoo Linux from Windows and am familare with how and why things happen in that invironment concerning DVD creation from AVI's.  I am working through trying to create a DVD following the instructions found in this thread.  I have successfully created a DVD using the any2vob script file and following the menu and burning instructions with little problem.  But I have a problem in the finished DVD as you get futher into the it I experiance an audio sycn problem and a video juerkyness issue especially with high motion scenes.

  Right now I am sorta at a loss on how to address these issue's.  So I am going back through and doing things manually not using the script. Here is the info on the avi I am trying to encode.

624x352 mpeg4 Xvid

44 Khz 128 audio

23.976 fps 

Here is the command I am currently using.

```

transcode -i bsg_2003_part1.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o bsg2003p1 -D0 -s2 -m bsg2003p1.ac3 -J modfps=clonetype=4 --export_fps 29.970,4
```

Now my main question which could be the link to my problems is this.  When the encoding starts on the status display it shows that it is encoding frames at a rate about 32fps and then steadly drops to about 21fps give or take.  Is this normal?  even though I had specified NTSC frame rates?

Any help is greatly appreciated.  :Very Happy: 

----------

## JerryWoody

first off, I just want to join others in thanking you for offering such a great guide.  I just got into using linux to create dvds after getting frustrated with nero, and after a lot of searching I can tell you that your post is far and away the best guide to the linux toolset... very straightforward and complete.

the only suggestion i'd like to make concerns your use of mencoder to turn random videos into avis before feeding to transcode.  your method converts the audio to mp3 before converting again to ac3, which will result in some unnecessary quality loss.  if you use "-oac pcm" instead of "-oac lavc -lavcopts acodec=mp3", you can avoid this quality loss.  you will need more disk space using pcm as an intermediate format, but if you have enough for creating dvds, it shouldn't be an issue.  On a similar note, using msmpeg4 for an intermediate video format is also causing quality loss.  I tried using raw video, but transcode didn't like that, so I'd suggest using ffmpeg's mpeg4 format instead (just remove the -lavcopts line specifying the vcodec, as mpeg4 is the default).  There will still be loss of quality, but less than msmpeg4.  I saw that you noted that the new default fourcc for mpeg4 causes some problems, but you can work around that by specifying -ffourcc DX50.

in short, I suggest this command line to convert random videos to avi:

```
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 29.97 your_movie.mov
```

on a different note, I needed to combine multiple videos into one title for my dvd.  This is probably a common task, so i thought it might be useful for me to share what i learned.  There are 2 different attacks to joining the videos: before transcode or after transcode.  Before transcode is probably simplest: mencoder will accept multiple videos on the input line, so you can just do mencoder [various options .... ] part1.mov part2.mov ...

If your sources are already avis, you can just use avimerge.  Not sure if that tool requires all avis to be in the same format.

The advantage to joining after transcode is that it makes defining chapter points easier, if each video already represents a chapter.  Simply define multiple vobs within a pgc block:

```
<pgc>

    <vob file="part1.mpg" />

    <vob file="part2.mpg" />

</pgc>
```

Chapter 2 of the title will automatically go to the video in part2.mpg.  Useful when you're piecing together a home movie from many clips of various lengths.

I hope I'm not repeating stuff others have already said... I didn't wade through all 20+ pages of this thread.  Just thought some of this stuff might be useful enough to go in the main post.

----------

## lodder_

I'm having problem with ffmpeg it suddenly stops recording working termanila is looked up and i have to kill it 

if some one can help me solve this problem pls do

----------

## shiznix

 *JerryWoody wrote:*   

> first off, I just want to join others in thanking you for offering such a great guide.  I just got into using linux to create dvds after getting frustrated with nero, and after a lot of searching I can tell you that your post is far and away the best guide to the linux toolset... very straightforward and complete.

 

Thanks for the compliment.

 *Quote:*   

> The only suggestion i'd like to make concerns your use of mencoder to turn random videos into avis before feeding to transcode.  your method converts the audio to mp3 before converting again to ac3, which will result in some unnecessary quality loss.  if you use "-oac pcm" instead of "-oac lavc -lavcopts acodec=mp3", you can avoid this quality loss.  you will need more disk space using pcm as an intermediate format, but if you have enough for creating dvds, it shouldn't be an issue.  On a similar note, using msmpeg4 for an intermediate video format is also causing quality loss.  I tried using raw video, but transcode didn't like that, so I'd suggest using ffmpeg's mpeg4 format instead (just remove the -lavcopts line specifying the vcodec, as mpeg4 is the default).  There will still be loss of quality, but less than msmpeg4.  I saw that you noted that the new default fourcc for mpeg4 causes some problems, but you can work around that by specifying -ffourcc DX50.
> 
> in short, I suggest this command line to convert random videos to avi:
> 
> ```
> ...

 

This looks good. I didn't know using mpeg4 & encoding with the -fourcc option would make transcode happy & the encoding to pcm instead of mp3 is also a nice touch. I'll test & update the guide.

 *Quote:*   

> on a different note, I needed to combine multiple videos into one title for my dvd.  This is probably a common task, so i thought it might be useful for me to share what i learned.  There are 2 different attacks to joining the videos: before transcode or after transcode.  Before transcode is probably simplest: mencoder will accept multiple videos on the input line, so you can just do mencoder [various options .... ] part1.mov part2.mov ...
> 
> If your sources are already avis, you can just use avimerge.  Not sure if that tool requires all avis to be in the same format.

 

Only framerate & resolution need to be the same IIRC.

 *Quote:*   

> The advantage to joining after transcode is that it makes defining chapter points easier, if each video already represents a chapter.  Simply define multiple vobs within a pgc block:
> 
> ```
> <pgc>
> 
> ...

 

Also handy to know.

 *Quote:*   

> I hope I'm not repeating stuff others have already said... I didn't wade through all 20+ pages of this thread.  Just thought some of this stuff might be useful enough to go in the main post.

 

Not repeating at all, thanks for sharing the knowledge  :Smile: 

----------

## shiznix

 *majunbu wrote:*   

> Question
> 
>   I have just recently returned to Gentoo Linux from Windows and am familare with how and why things happen in that invironment concerning DVD creation from AVI's.  I am working through trying to create a DVD following the instructions found in this thread.  I have successfully created a DVD using the any2vob script file and following the menu and burning instructions with little problem.  But I have a problem in the finished DVD as you get futher into the it I experiance an audio sycn problem and a video juerkyness issue especially with high motion scenes.
> 
>   Right now I am sorta at a loss on how to address these issue's.  So I am going back through and doing things manually not using the script. Here is the info on the avi I am trying to encode.
> ...

 

The encoding framerate has nothing to do with the end result's playback framerate, this is just a live status report from transcode to say how fast the encoding is being done.

Regarding the jerkiness in high motion scenes, have you tried the suggestion mentioned in the howto under 'Jerky video & skipping audio' ?

My thought is that your DVD player is not coping too well with the encoded video bitrate & so needs to be re-encoded at a lower video bitrate value.

----------

## DoctorWack

I have a similar problem to kabutor's. I try to run spumux and get:

```
[razorblade root /home/doctorwack/FF7]# spumux -s0 sub.xml < FF7.mpg > FF7.mpg.temp

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: ssa

INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*

INFO: Read 600 subtitles

ERR: New_Face failed. Maybe the font path is wrong.

Please supply the text font file (luximb.ttf).

WARN: subtitle font: load_sub_face failed.

Segmentation fault

```

But I made sure to copy the Vera.ttf font from /usr/X11R6/lib/X11/fonts/TTF/ to ~/.spumux 

I've tried it with several different fonts, with no success.

Here's my sub.xml :

```

<subpictures>

  <stream>

    <textsub filename="bien-xvid-ff7.ssa" characterset="ISO8859-1"

         fontsize="18.0" font="Vera.ttf" horizontal-alignment="center"

         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="574"/>

  </stream>

</subpictures>

```

If you could help me figure this out, I'd really appreciate it.

----------

## buckminster

Hi,

I know that its not the level you´re talking on, but I got a problem with dvdauthor and I think here´s somebody who could help me.

dvdauthor always breaks with an error message  *Quote:*   

> ERR SCR moves backwards remultiplex input

 I get this with my own slideshow vobs, but also with vobs which I copied from a dvd.

In this thread I read the tip to use transcode and mplex to split and multiplex the vobs to keep or to get back the vobus. I tried that, but all I get is an error message of mplex that too many frames are dropped. What a pity.

Now my question: What else could be the trick to get dvdauthor to build my dvd without breaking with an error message, or what could be the reason for this errors.

Greetz

Frank

----------

## wickwire

I've been using any2vob (0.26, since all other versions halted with an error when reaching subtitle processing) in order to get:

- simple videodvd with subtitles, no menus, subs loaded automatically as soon as the movie is played.

Having some problems with the script when it came to setting the subtitle font size, here's what is working on my Philips DVD612S:

```
grin@GRiN /mnt/videos/dvd $ l

total 1.6G

drwxr-xr-x  2 grin    6 Sep 21 06:47 FINAL/

-rw-r--r--  1 grin  44K Sep 14 01:33 any2vob-0.26.sh

-rw-r--r--  1 grin 509K Sep 25 21:28 any2vob.log

-rw-r--r--  1 grin  323 Sep 15 17:36 dvdauthor.xml

-rw-r--r--  1 grin  380 Sep 16 03:40 subtitle.xml

-rw-r--r--  1 grin 1.2G Sep 25 21:28 teste.VOB

-rw-r--r--  1 grin  37M Sep 25 21:28 teste.VOB.temp

-rw-r-----  1 grin 350M Sep 25 20:12 teste.avi

-rw-r--r--  1 grin  48K Sep 25 20:12 teste.srt

```

```
sh any2vob-0.26.sh --log=yes -i teste.avi && spumux -s0 subtitle.xml < teste.VOB > teste.VOB.temp && mv teste.VOB.temp teste.VOB  && dvdauthor -x dvdauthor.xml && growisofs -Z /dev/hdc -dvd-video FINAL/
```

subtitle.xml

```
<subpictures>

  <stream>

    <textsub filename="teste.srt" characterset="ISO8859-1"

         fontsize="22.0" font="Vera.ttf" horizontal-alignment="center"

         vertical-alignment="bottom" left-margin="60" right-margin="60"

         top-margin="20" bottom-margin="30" subtitle-fps="25"

         movie-fps="25" movie-width="720" movie-height="574"/>

  </stream>

</subpictures>
```

dvdauthor.xml

```
<dvdauthor dest="FINAL">

    <vmgm />

    <titleset>

        <titles>

           <subpicture lang="pt" />

            <pgc>

                <pre>subtitle=64;</pre>

                <vob file="teste.VOB" chapters="0,0:15,0:30,0:45,1:00,1:15,1:30,1:45,2:00"/>

            </pgc>

        </titles>

    </titleset>

</dvdauthor>

```

Haven't tried the chapters to see if I can advance ok through the videos but the rest is working fine, processing the subs outside of the script allowed for bigger font, using the script, even though I'd set the parameter, the size wouldn't change.

Hope this helps whoever is trying to include subtitles.

Thanks shiznix!  :Smile: 

----------

## shiznix

 *wickwire wrote:*   

> I've been using any2vob (0.26, since all other versions halted with an error when reaching subtitle processing) in order to get:
> 
> - simple videodvd with subtitles, no menus, subs loaded automatically as soon as the movie is played.
> 
> Having some problems with the script when it came to setting the subtitle font size, here's what is working on my Philips DVD612S:
> ...

 

No problem, could you please post your command line & the error it throws when reaching subtitle processing.

Thanks.

----------

## jbwillia

First Off, awesome docs Shiznix!

That said, I have a question. This may have been previously addressed; if so, please forgive me for not reading all 22 pages of content. The question is: why does transcode use an mp3 export format when you use the "--export_prof dvd-ntsc" option; however, if you're not using this option b/c you want to reduce size and quality, you give it the option "-N 0x2000" which corresponds to ac3 audio? Of course, the audio output file is *.ac3, so this seems to tell me that it should be in ac3 format even though "--export_prof dvd-nts" generates it in mp3. This is rather confusing; does it matter which one it is?

```
jbwillia@heimdall ~/extra $ transcode -i movie.xvid.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97

transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source movie.xvid.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=ac3)

[transcode] V: import frame     | 704x384  1.83:1  

XXX: zoom=yes pre_clip=no

[transcode] V: zoom             | 720x480  1.50:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.217

[transcode] V: decoding fps,frc | 23.976,1

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x2000  AC3          [48000,16,2]  192 kbps

[transcode] A: export format    | 0x55    MPEG layer-3 [48000,16,2]  128 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 6408 (6406.400000)

[transcode] A: adjustment       | -1600@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32 accel mode  | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using libc for memcpy

[transcode] V: video buffer     | 10 @ 720x480

```

jbw

----------

## peabody124

I just wanted to suggest people also glance at DVDStyler for creating simple menu interfaces without dealing with gimp and creating button layers.  It doesn't have the option for animated menus, but it's nice and simple.

Great HOWTO btw.

james

----------

## jbwillia

 *peabody124 wrote:*   

> I just wanted to suggest people also glance at DVDStyler for creating simple menu interfaces without dealing with gimp and creating button layers.  It doesn't have the option for animated menus, but it's nice and simple.
> 
> Great HOWTO btw.
> 
> james

 

I agree; dvdstyler is great. All you have to do on the command line is encode your videos into dvd format (you don't even have to worry about directory structure). I'm curious to see how qdvdauthor is though. I installed it recently, but haven't had the chance to test it. It supposedly has support for animated menus. You still have to encode your videos manually though.

jbw

----------

## shiznix

 *jbwillia wrote:*   

> First Off, awesome docs Shiznix!
> 
> That said, I have a question. This may have been previously addressed; if so, please forgive me for not reading all 22 pages of content. The question is: why does transcode use an mp3 export format when you use the "--export_prof dvd-ntsc" option; however, if you're not using this option b/c you want to reduce size and quality, you give it the option "-N 0x2000" which corresponds to ac3 audio? Of course, the audio output file is *.ac3, so this seems to tell me that it should be in ac3 format even though "--export_prof dvd-nts" generates it in mp3. This is rather confusing; does it matter which one it is?
> 
> ```
> ...

 

That's a damn fine point  :Smile: 

Transcode by default encodes the audio to mp3.

By adding the '--export_prof' option you're telling Transcode to hand the audio off (export) to the DVD profile which then encodes to the proper DVD spec. for AC3.

I can only see this as unnecessary encoding.

A much better way would be to specify '-N 0x2000' with '--export_prof' to tell Transcode to encode to AC3 by default, before handing it off to the DVD profile (which would then have very little encoding to do as it's already in AC3 format).

Specifying '-N 0x2000' in conjunction with '--export_prof' confirms this, the encoding is actually slightly faster (by ~2FPS if the input file already contains an AC3 track).

Not to mention the slight loss in audio quality that encoding to MP3 then back to AC3 would produce.

Nice pickup, I'll update the guide to reflect something like this:

```
transcode -i movie.xvid.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -N 0x2000 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97
```

----------

## jbwillia

**sighs ... ok, my previous discovery came b/c I'm trying to figure out why I can get the resolution deduction to work. No matter how I play with the command if I specifiy a "-Z 352x240" instead of "-Z 720x480" I cannot play the video. So I'm able to reduce filesize by reducing the bitrate, but I can't reduce encoding time by reducing resolution. I tried this at first by burning it to a dvd and it wouldn't play anywhere (only the sound worked). Since then I've tried about every combination possible and it just will not reduce resolution. When I generate a *.mpg with transcode and mplex (reducing the resolution in the process) and then test it with xine I get an error message saying "The amount of dropped frame is too high, your system might be too slow, not properly optimized or just too loaded."  It then continues to play the video although only the sound is working. Now, I know my system is fine and plenty powerful. The *.mpg file will also play just fine with mplayer before I convert it to vobs using dvdauthor. I also know the video is good because if I specify "-Z 720x480" then it will work just fine; it just takes forever to encode.

Does anyone have any idea why this will not work?

jbw

----------

## osbourd2

I've started trying to create my own DVD today, but I can't get past the spumux stage of merging the menu highlight and select.  There a fix on page 8 or 9 of this HowTo, but it applies to dvdauthor-6.10 and the patch has been applied in dvdauthor-6.11

```
$ spumux spumux.xml < menu.mpg > menu_final.mpg

DVDAuthor::spumux, version 0.6.11.

Build options: gnugetopt magick iconv freetype

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=C

INFO: Converting filenames to ANSI_X3.4-1968

dvds: Unable to load file (menu_highlight.png).

WARN: Bad image,  skipping line -1

WARN:  Read 0, expected 4

INFO: 0 subtitles added, 1 subtitles skipped, stream: 32, offset: 0.18

Statistics:

- Processed 0 subtitles.

- The longest display line had -1 characters.

- The maximum number of displayed lines was 0.

- The normal display height of the font arial.ttf was 0.

- The bottom display height of the font arial.ttf was 0.

- The biggest subtitle box had 0 bytes.

```

I've googled for the error message, but can only find old fixes relating to stepping down to older versions of ImageMagick.

Can any one help?

Someone else has posted a similar message this evening too. https://forums.gentoo.org/viewtopic-t-385860-highlight-spumux.html

 :Smile: 

EDIT: Having just typed all that, I've tried running this as root, and it works OK - so perhaps a permissions error somewhere else.....

UPDATE:  :Very Happy: 

I found the source of my problems.  I appear to have two different versions of spumux on my machine.  One in /usr/local/bin/spumux and one in /usr/bin/spumux.  My non-root user was calling /usr/local/bin/spumux which was causing the error.  My root user was calling the /usr/bin/spumux and was working OK.  If I call the /usr/bin version as my non-root user it works fine.

I don't know where the broken version came from, and am not sure whether I can simply delete it or not.

----------

## jbwillia

 *osbourd2 wrote:*   

> 
> 
> UPDATE: 
> 
> I found the source of my problems.  I appear to have two different versions of spumux on my machine.  One in /usr/local/bin/spumux and one in /usr/bin/spumux.  My non-root user was calling /usr/local/bin/spumux which was causing the error.  My root user was calling the /usr/bin/spumux and was working OK.  If I call the /usr/bin version as my non-root user it works fine.
> ...

 

You probably ought to edit you ~/.profile to set your path such that /usr/local/bin is last in precedence. However, the fact that you have a spumux in /usr/local/bin seems to say that you've compiled a non-portage/non-ebuild copy of dvdauthor and installed it. When you emerge a package via portage it uses /usr/bin as the BINDIR whereas usually when you download source packages they set the default BINDIR to /usr/local/bin to prevent you from overwriting a system installed component. If you still have the directory around from which you installed the non-ebuild copy of dvdauthor then you could simply switch to that directory and run "make uninstall" as root. That should take care of your problems.

jbw

----------

## osbourd2

 *jbwillia wrote:*   

>  *osbourd2 wrote:*   
> 
> UPDATE: 
> 
> I found the source of my problems.  I appear to have two different versions of spumux on my machine.  One in /usr/local/bin/spumux and one in /usr/bin/spumux.  My non-root user was calling /usr/local/bin/spumux which was causing the error.  My root user was calling the /usr/bin/spumux and was working OK.  If I call the /usr/bin version as my non-root user it works fine.
> ...

 

Oops, you're quite right!  I've removed the broken custom build   :Embarassed: 

----------

## hulmeman

I'm still having problems with multimux:

```
multimux -dv 0,0,0,15,15,0 left.wav centre.wav right.wav left_surround.wav right_surround.wav lfe.wav -o out.wav

Panteltje multimux-0.2.2

found input file left.wav

found input file centre.wav

found input file right.wav

found input file left_surround.wav

found input file right_surround.wav

found input file lfe.wav

main(): wave header_size=72

input_files=6

delay[0]=0.00

delay[1]=0.00

delay[2]=0.00

delay[3]=15.00

delay[4]=15.00

delay[5]=0.00

statptr[0]=0x506610 i=0 statptr[0] -> st_size=1916972

input file left.wav size is 1916972 delay is 0.00 milli seconds

statptr[1]=0x506610 i=1 statptr[1] -> st_size=1916972

input file centre.wav size is 1916972 delay is 0.00 milli seconds

statptr[2]=0x506610 i=2 statptr[2] -> st_size=1916972

input file right.wav size is 1916972 delay is 0.00 milli seconds

statptr[3]=0x506610 i=3 statptr[3] -> st_size=1916972

input file left_surround.wav size is 1916972 delay is 15.00 milli seconds

statptr[4]=0x506610 i=4 statptr[4] -> st_size=1916972

input file right_surround.wav size is 1916972 delay is 15.00 milli seconds

statptr[5]=0x506610 i=5 statptr[5] -> st_size=1916972

input file lfe.wav size is 1916972 delay is 0.00 milli seconds

longest_input_file_length=1916972

Floating point exception
```

out.wav is created, but has 0 bytes:

```
baz1@baz1 ~/dvd $ ls -l

total 11265

-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 centre.wav

-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 left_surround.wav

-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 left.wav

-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 lfe.wav

-rw-r--r--  1 root root        0 Oct  1 14:58 out.wav

-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 right_surround.wav

-rw-r--r--  1 baz1 users 1916972 Oct  1 13:40 right.wav
```

dmesg gives me:

```
multimux[23537] trap divide error rip:4011c3 rsp:7ffffff2fe10 error:0
```

Anyone got any ideas? I've tried older versions, get the same error. If not, is there an alternative to 'transcode'?

Thanks in anticipation.

Baz

----------

## saosao9

Great Howto and awesome little piece of software in the any2vob script!

Anyways, I've been trying to use that script to archive off some shows I've been recording with my mythTV setup.  The problem I'm having is that even though I'm starting at an ntsc mpeg and going to a smaller ntsc mpeg for some reason the .vob file's audio gets out of sync.  Here is the command line I've been using:

```
 any2vob-0.28.sh --format=ntsc --compress=yes --aspect=4:3 --surround=no  -i Battlestar\ Galactica\ -*.mpg
```

Here is the output from the script:

```

Final estimated filesize:      1.02 GB

Frames/sec:     29.970

Resolution:     480x480

Aspect:         1:1

 Running: ffmpeg -y -i Battlestar\ Galactica\ -\ ep101\ -33.mpg -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/Battlestar\ Galactica\ -\ ep101\ -33.ac3 -map 0:0 -f mpeg2video -s 480x480 -padtop 18 -padleft 34 -padbottom 22 -padright 34 -hq -b 5000 -r ntsc  - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 352x240 -aspect 4:3 -r ntsc  -f mpeg2video tmp_any2vob/Battlestar\ Galactica\ -\ ep101\ -33.m2v

ffmpeg version CVS, build 3211266, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu --enable-shared-pp --enable-shared --disable-static --enable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --enable-xvid --enable-libogg --enable-vorbis --disable-theora --disable-dts --enable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts

  built on Sep 10 2005 02:47:44, gcc: 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)

Input #0, mpegvideo, from 'pipe:':

  Duration: N/A, bitrate: 104857 kb/s

  Stream #0.0: Video: mpeg2video, yuv420p, 548x520, 29.97 fps, 104857 kb/s

Output #0, mpeg2video, to 'tmp_any2vob/Battlestar Galactica - ep101 -33.m2v':

  Stream #0.0: Video: mpeg2video (hq), yuv420p, 352x240, 29.97 fps, q=2-31, 5000 kb/s

Stream mapping:

  Stream #0.0 -> #0.0

```

Do you see anything going obviously wrong here?  The original video is an 480x480 mpeg2 file encoded at 29.97fps.  When I play that in mplayer the sound is in sync and everythying is fine, however when  I play the output vob file sound is no longer in sync.

Thanks for any help!

Paul

Edit:  BTW just to follow up when I try to manually use the transcode command line directly it seems to do the correct thing and not screw up the audio sync, I think this may be a bug in the script.

----------

## shiznix

 *saosao9 wrote:*   

> Great Howto and awesome little piece of software in the any2vob script!
> 
> Anyways, I've been trying to use that script to archive off some shows I've been recording with my mythTV setup.  The problem I'm having is that even though I'm starting at an ntsc mpeg and going to a smaller ntsc mpeg for some reason the .vob file's audio gets out of sync.  Here is the command line I've been using:
> 
> ```
> ...

 

You may like to downgrade to the latest stable ffmpeg or do a more recent CVS checkout, I also had this issue using ffmpeg CVS a while back, but never with stable.

Thanks  :Smile: 

PS> One way you can test to see if it's your ffmpeg that is at fault, is to use the "Running: ffmpeg..." line on the command line by itself, then do... 

```
mplex -f8 -o test.VOB  Battlestar Galactica - ep101 -33.m2v  Battlestar Galactica - ep101 -33.ac3
```

 ...and check the audio/video sync in test.VOB

----------

## Draeven

First off, this is a great HOWTO - so far I've had no problems until now.

I've gotten all my videos converted and am working on my menu for the DVD.  I get all the images made as per the HOWTO.  The problem occurs when I try to create the menu.m2v.  Here is the code that I'm using:

```

draeven@tarvos ~/Smallville_DVD1 $ convert ~/Smallville_D1_bg.jpg ppm:- | ppmtoy4m -n50 -F30000:1001 -A10:11 -I p -r | mpeg2enc -n n -f8 -b5000 -a2 -o Smallville_D1_bg.m2v

```

When I do this I get the following output:

```

   INFO: [ppmtoy4m] Command-line Parameters:

   INFO: [ppmtoy4m]              framerate:  30000:1001

   INFO: [ppmtoy4m]     pixel aspect ratio:  10:11

   INFO: [ppmtoy4m]              interlace:  none/progressive

   INFO: [ppmtoy4m]         starting frame:  0

   INFO: [ppmtoy4m]            # of frames:  50, repeat last frame until done

   INFO: [ppmtoy4m]     chroma subsampling:  4:2:0, JPEG/MPEG-1, interstitial siting

   INFO: [ppmtoy4m] Output Stream parameters:

   INFO: [ppmtoy4m]     frame size:  720x486 pixels (524880 bytes)

   INFO: [ppmtoy4m]     frame rate:  30000/1001 fps (~29.970030)

   INFO: [ppmtoy4m]      interlace:  none/progressive

   INFO: [ppmtoy4m]   sample aspect ratio:  10:11

   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!

   INFO: [mpeg2enc] SETTING MMX for TRANSFORM!

   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!

   INFO: [mpeg2enc] Selecting DVD output profile

   INFO: [mpeg2enc] Progressive input - selecting progressive encoding.

   INFO: [mpeg2enc] Encoding MPEG-2 video to Smallville_D1_bg.m2v

   INFO: [mpeg2enc] Horizontal size: 720 pel

   INFO: [mpeg2enc] Vertical size: 486 pel

   INFO: [mpeg2enc] Aspect ratio code: 2 = 4:3 display

   INFO: [mpeg2enc] Frame rate code:   4 = 30000.0/1001.0 (NTSC VIDEO)

   INFO: [mpeg2enc] Bitrate: 5000 KBit/s

   INFO: [mpeg2enc] Quality factor: 8 (Quantisation = 9) (1=best, 31=worst)

   INFO: [mpeg2enc] Field order for input: none/progressive

   INFO: [mpeg2enc] Sequence unlimited length

   INFO: [mpeg2enc] Search radius: 16

   INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 18

   INFO: [mpeg2enc] Setting colour/gamma parameters to "NTSC"

   INFO: [mpeg2enc] Progressive format frames = 1

**ERROR: [mpeg2enc] Sample rate is greater than permitted in specified Level

```

What am I missing that is causing the sample rate to be greater than what is permitted.

Thanks in advance!

Draeven

----------

## shiznix

 *Draeven wrote:*   

> First off, this is a great HOWTO - so far I've had no problems until now.
> 
> I've gotten all my videos converted and am working on my menu for the DVD.  I get all the images made as per the HOWTO.  The problem occurs when I try to create the menu.m2v.  Here is the code that I'm using:
> 
> ```
> ...

 

Hi Draeven,

This usually happens when there is a mismatch between the .jpg's framesize & the TV format (PAL or NTSC) specified to mpeg2enc.

This is confirmed by looking at your output:

```
INFO: [ppmtoy4m]     frame size:  720x486 pixels (524880 bytes)
```

Mpeg2enc has been told to encode to NTSC (-n n), and so expects an NTSC framesize of 720x480.

A quick resize of the offending Smallville_D1_bg.jpg to 720x480 should fix things.

```
convert -resize 720x480! Smallville_D1_bg.jpg  Smallville_D1_bg-NEW.jpg
```

Then try again with your original command using the newly resized Smallville_D1_bg-NEW.jpg

----------

## Draeven

 *shiznix wrote:*   

> 
> 
> Hi Draeven,
> 
> This usually happens when there is a mismatch between the .jpg's framesize & the TV format (PAL or NTSC) specified to mpeg2enc.
> ...

 

shiznix,

Thanks I caught that myself, after pulling most of my hair out. It seems that the NTSC template in GIMP 2.2 was the culprit (well, myself as well for not double checking the dimensions!), being set for 720x486.

Draeven

----------

## nickrout

 *Quote:*   

> I just wanted to suggest people also glance at DVDStyler for creating simple menu interfaces without dealing with gimp and creating button layers. It doesn't have the option for animated menus, but it's nice and simple. 

 

I just want to challenge the statement that dvdstyler doesn't have animated menus. I assume by animated menus you mean a menu that is a video file.

The DVDStyler docs state:

 *Quote:*   

> Using a video clip on the menu background
> 
> Any menu can use either still pictures or motion video for the background of the menu. Actually, the still picture is converted to a single frame video clip when the project is rendered (burned). Technically, you are always using video on the menu.
> 
> DVDStyler V-1.31 now supports using either stills or video for the background of the menu. If applying a video clip to the menu, it must be an MPEG clip with both video and audio (elemental streams are not supported on menus)

 

----------

## jbwillia

 *shiznix wrote:*   

> 
> 
> That's a damn fine point 
> 
> Transcode by default encodes the audio to mp3.
> ...

 

Well, in that case, you may as well add '-b 224' as well. The transcode default audio bitrate output is 128; however, when it is handed off to the dvd profile it gets converted to 224. This is going to cause a slight encoding slowdown, and if someone starts off with a 224 bit audio source they are going to lose sound quality when it gets converted to 128 and then back to 224 again.

jbw

----------

## syscrash

The any2vob script links seem to have died. Does anyone have it?

Thanks in advance  :Smile: 

----------

## shiznix

 *syscrash wrote:*   

> The any2vob script links seem to have died. Does anyone have it?
> 
> Thanks in advance 

 

It's back up after being down for ~12 hours due to a bug in our modem's operating system (now fixed).

Have also updated the guide to show changes in the latest mjpegtools when creating menus (thanks to Hans for pointing out the bug).

For those interested mjpegtools' ppmtoy4m must now have it's subsample mode explicitly set to 4:2:0 Mpeg-2 (-S 420mpeg2) or mpeg2enc won't read from the yuv4mpeg pipe it creates.

Thanks  :Wink: 

----------

## shiznix

 *jbwillia wrote:*   

> Well, in that case, you may as well add '-b 224' as well. The transcode default audio bitrate output is 128; however, when it is handed off to the dvd profile it gets converted to 224. This is going to cause a slight encoding slowdown, and if someone starts off with a 224 bit audio source they are going to lose sound quality when it gets converted to 128 and then back to 224 again.
> 
> jbw

 You'll note that this change was already made at the same time as the '-N 0x2000' addition, but I did fail to mention it in my reply.

Cheers.

----------

## Zed Sesqui

I've tried to emerge the transcode 1.0.0 described in this thread without any success.    Here's what I've tried:

cat /etc/make.conf

# These settings were set by the catalyst build script that automatically built this stage

# Please consult /etc/make.conf.example for a more detailed example

# CFLAGS="-O2 -pipe -march=athlon-xp"

CFLAGS="-pipe -march=athlon-xp -O2 -falign-functions=64 -D_FILE_OFFSET_BITS=64"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j2"

SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"

GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"

USE="dvd alsa cdr sdk gnome gtk qt kde"

-- ---------

cat /etc/portage/package.keywords

media-video/transcode ~x86

media-video/ffmpeg ~x86

media-video/dvdauthor ~x86

-- ---------

ACCEPT_KEYWORDS='~x86' emerge --pretend transcode

These are the packages that I would merge, in order:

Calculating dependencies   ...done!

[ebuild   R   ] media-video/transcode-0.6.14-r2  

I'm new to gentoo and couldn't find why my emerge isn't giving the newer version.   So finally I downloaded the latest transcode from that project (1.0.1) and installed it conventionally (without emerge).

cat /home/me/src/transcode/config-me

CFLAGS="-O2 -march=athlon-xp -falign-functions=64"

export CFLAGS

./configure --enable-freetype2 --enable-avifile --enable-ogg --enable-vorbis \

--enable-libquicktime --enable-lzo --enable-a52 --enable-libmpeg3 --enable-libxml2 \

--enable-mjpegtools --enable-sdl --enable-gtk --enable-imagemagick

make

make install

This is the first issue that I haven't been able to solve with the help of these forums and the man pages.      Am I going to suffer dire consequences for this expedition?    All of the other packages mentioned in this tutorial emerged fine.

Bill

----------

## Draeven

Really quick question.  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?  I'm making a series of DVD's for someone, and I want each DVD to have the title on there when its loaded.

Thanks in advance

Draeven

--

Draeven

Life is a journey, not a destination.

----------

## shiznix

 *Zed Sesqui wrote:*   

> I've tried to emerge the transcode 1.0.0 described in this thread without any success.
> 
> I'm new to gentoo and couldn't find why my emerge isn't giving the newer version.   So finally I downloaded the latest transcode from that project (1.0.1) and installed it conventionally (without emerge).
> 
> cat /home/me/src/transcode/config-me
> ...

 

The newer versions are masked.

Mention of masked packages & how to unmask them is briefly described at the top of the guide.

For more info consult 'man emerge' section 'MASKED PACKAGES' & 'man portage'.

----------

## gkmac

 *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?

 

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...

```
growisofs -Z /dev/dvd -dvd-video -V MY_MOVIE DVD/
```

----------

## geeojr

 *Quote:*   

> Notes
> 
> Some NTSC users may experience on their television sets what seems to be a heavy cropping of the video around the edges. This is normal & is called 'overscan'. 
> 
> If you are affected by this, add '-j -18,-34,-22,-34' to your transcode lines. See here for more details -> http://www.transcoding.org/cgi-bin/transcode?NTSC

 

I am affected by this problem -- my widescreen discs are missing information from both ends (and the top/bottom too, not that it matters). But, I have been unsuccessful at getting this to work. The '-j' always pushes my resolution out of norms - my DVD player just will not deal with it... I think there is a more elegant way to fix this problem. 

When I examine any other widescreen DVD, they aren't "adjusted" in this manner - and my DVD player shows me everything. The difference between the two isn't how the source material is prepared, it is how the disc is authored, and subsequently instructed to be display by the DVD player.

Examination of the XML description at http://dvdauthor.sourceforge.net/doc/dvdauthor.html revealed something which seems to offer a much simplier solution -- adding the following line to dvdauthor.xml seems to fix this problem for me.

```
<video format="ntsc" aspect="16:9" widescreen="nopanscan" />
```

In its entirety would look like:

```

<dvdauthor dest="DVD">

  <vmgm />

  <titleset>

    <titles>

      <video format="ntsc" aspect="16:9" widescreen="nopanscan" />

      <pgc>

        <vob file="clip1.mpg" />

        <vob file="clip2.mpg" />

        <vob file="clip3.mpg" />

        <vob file="clip4.mpg" />

      </pgc>

    </titles>

  </titleset>

</dvdauthor>

```

My guess is the widescreen="nopanscan" fixes the problem... Your mileage may vary...Last edited by geeojr on Mon Oct 17, 2005 11:51 am; edited 1 time in total

----------

## shiznix

 *geeojr wrote:*   

>  *Quote:*   Notes
> 
> Some NTSC users may experience on their television sets what seems to be a heavy cropping of the video around the edges. This is normal & is called 'overscan'. 
> 
> If you are affected by this, add '-j -18,-34,-22,-34' to your transcode lines. See here for more details -> http://www.transcoding.org/cgi-bin/transcode?NTSC 
> ...

 

Can you (or anyone else) confirm for sure that this fixes the NTSC overscan problem ?

If it does, that would make authoring a little easier as no two NTSC television sets are the same & so the '-j' value is just an average for most.

Over here in the PAL world I have no way of testing NTSC TV playback, would be much appreciated.

----------

## geeojr

 *shiznix wrote:*   

>  *geeojr wrote:*   
> 
> ```
> <video format="ntsc" aspect="16:9" widescreen="nopanscan" />
> ```
> ...

 

I have confirmed it on two seperate DVD players here; but I would love to hear feedback from others.

----------

## mongre26

I am starting with following input from my Hauppage WinTV PVR250 which was created within Mythtv 0.15 (I have not gotten around to upgrading). I am trying to get the mpeg output into a VOB so I can burn it to a DVD. I am not having much luck. 

```

85 audio & 196 video codecs

Playing ../firefly.mpg.

Cache fill:  0.00% (0 bytes)    ID_VIDEO_ID=0

ID_AUDIO_ID=0

MPEG-PS file format detected.

VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  6000.0 kbps (750.0 kbyte/s)

==========================================================================

Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)

Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)

==========================================================================

ID_FILENAME=../firefly.mpg

ID_VIDEO_FORMAT=0x10000002

ID_VIDEO_BITRATE=6000000

ID_VIDEO_WIDTH=720

ID_VIDEO_HEIGHT=480

ID_VIDEO_FPS=29.970

ID_VIDEO_ASPECT=1.3333

ID_AUDIO_CODEC=mp3

ID_AUDIO_FORMAT=80

ID_AUDIO_BITRATE=384000

ID_AUDIO_RATE=48000

ID_AUDIO_NCH=2

ID_LENGTH=3597

Error opening/initializing the selected video_out (-vo) device.

Exiting... (End of file)

```

When I use any2vob-0.28.sh I end up with a VOB, if and only if I tell it not to convert the audio to 5.1 channel, as that fails completely. Even though I get a VOB though the audio is completely out of sync and if I move the video (like in xine) the audio does not sync up at all. That is mplayer and xine both get confused about the audio. I am assuming this is bad, or is that ok?

Pretty new at this.

----------

## der bastler

For those who are interested in howto obtain the BMWFilms quicktime movies (which include comments of the directors and some extra pics)...

First, we use modified URLs of BMWFilms-USA to bypass registration:

Season 1:

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=ambush&bypassreg=Y

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=chosen&bypassreg=Y

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=follow&bypassreg=Y

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=star&bypassreg=Y

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=powderkeg&bypassreg=Y

Season 2:

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=hostage&bypassreg=Y

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=ticker&bypassreg=Y

http://usa.bmwfilms.com/clap.asp?template=delivery&country=usa&film=beatthedevil&bypassreg=Y

In each of these linked pages click on the option "Download Mac" under "Enhanced Film". This will open a small window with download instructions and a file link at the bottom of the instructions page. What you get are .sit files, a Mac compression format. The URLs of the movies I got (don't know if they are dynamically created):

Season 1:

http://a177.ch1.akamai.net/7/177/8122/v003/fallon.download.akamai.com/8122/hire1/downloads/Ambush_EFE_MAC.sit

http://a177.ch1.akamai.net/7/177/8122/v003/fallon.download.akamai.com/8122/hire1/downloads/Chosen_EFE_MAC.sit

http://a177.ch1.akamai.net/7/177/8122/v001/fallon.download.akamai.com/8122/hire1/downloads/Follow_EFE_MAC.sit

http://a177.ch1.akamai.net/7/177/8122/v003/fallon.download.akamai.com/8122/hire1/downloads/Star_EFE_MAC.sit

http://a177.ch1.akamai.net/7/177/8122/v003/fallon.download.akamai.com/8122/hire1/downloads/Powder_EFE_MAC.sit

Season 2:

http://a177.ch1.akamai.net/7/177/8122/v005/fallon.download.akamai.com/8122/hire2/downloads/Hostage_EFE_MAC.sit

http://a177.ch1.akamai.net/7/177/8122/v005/fallon.download.akamai.com/8122/hire2/downloads/Ticker_EFE_MAC.sit

http://a177.ch1.akamai.net/7/177/8122/v003/fallon.download.akamai.com/8122/hire2/downloads/Devil_EFE_MAC.sit

Download these files, perhaps by putting the URLs into a text file and starting wget with the list option:

```
wget -i my_url_list_text_file
```

After downloading the movie archives you have to unpack them. I used stuffit when I created my DVD some time ago. Although it is shareware-something, for unpacking one doesn't need to be registered. On the other hand I discovered macutils today, perhaps they can unpack these sit files, too?

app-arch/stuffit

app-arch/macutil

Anyway, after using unstuff (or macunpack) you should have eight mov files which can be played/transcoded with mplayer/mencoder. Most of them are NTSC material, some are 24 fps. Have fun with transcoding them to proper DVD-NTSC/-PAL!   :Wink: 

----------

## shiznix

 *geeojr wrote:*   

>  *shiznix wrote:*    *geeojr wrote:*   
> 
> ```
> <video format="ntsc" aspect="16:9" widescreen="nopanscan" />
> ```
> ...

 Sweet, I'll include it as an alternative. Even better if it works well with PAL also as it'll be a good inclusion as a 'catch-all' for both PAL/NTSC.

Will test, many many thanks.  :Wink: 

----------

## shiznix

 *mongre26 wrote:*   

> I am starting with following input from my Hauppage WinTV PVR250 which was created within Mythtv 0.15 (I have not gotten around to upgrading). I am trying to get the mpeg output into a VOB so I can burn it to a DVD. I am not having much luck. 
> 
> ```
> 
> 85 audio & 196 video codecs
> ...

 Does the original file behave ok in mplayer ?

If it does, then run it through mencoder using the line mentioned in the guide first, then use either transcode or the any2vob script on the file mencoder produces.

If their are problems with the original file, then you should probably start at upgrading mythtv, & checking it's settings.

----------

## shiznix

 *der bastler wrote:*   

> For those who are interested in howto obtain the BMWFilms quicktime movies (which include comments of the directors and some extra pics)...
> 
> First, we use modified URLs of BMWFilms-USA to bypass registration:
> 
> Season 1:
> ...

 

Also, if you download the *.exe video files instead of the *.sit files (Download PC under Enhanced Film), you can just use 'unzip'. eg 'unzip Ambush_EFE.exe'

Get these while you can too, they go off-line on the 21st October, 2005

----------

## der bastler

 *shiznix wrote:*   

> Also, if you download the *.exe video files instead of the *.sit files (Download PC under Enhanced Film), you can just use 'unzip'. eg 'unzip Ambush_EFE.exe'
> 
> Get these while you can too, they go off-line on the 21st October, 2005

 

Back then I didn't know that one can extract self-extracting archives. Anyway, I'm securing a copy of the sit files right now.

----------

## Zed Sesqui

 *Quote:*   

> The newer versions are masked.
> 
> Mention of masked packages & how to unmask them is briefly described at the top of the guide.
> 
> For more info consult 'man emerge' section 'MASKED PACKAGES' & 'man portage'.

 

I thought that I was following the directions at the top of the guide, but after some  digging I found out that transcode was not only keyword masked, but was also masked in /usr/portage/profiles/package.mask which I didn't expect since none of the other packages that you warn are masked had that additional kind of a mask.   Once I found that package.mask entry I was able to dig around with  your documentation pointers and find how to override it.  The date on the package.mask entry is 8 July 2005.

The starter article in this thread mentions transcode-1.0.1 which I know exists, but here's what happens when I try to force it to emerge:   

```
ACCEPT_KEYWORDS='~x86' emerge -av '>transcode-1.0.0'
```

```
These are the packages that I would merge, in order:

Calculating dependencies   

emerge: there are no ebuilds to satisfy ">transcode-1.0.0".
```

(When I just 'emerge -av transcode' here, it only builds 1.0.0.)

Thanks for your help!  I look forward to making use of this guide.

Bill

----------

## mongre26

 *shiznix wrote:*   

>  *mongre26 wrote:*   I am starting with following input from my Hauppage WinTV PVR250 which was created within Mythtv 0.15 (I have not gotten around to upgrading). I am trying to get the mpeg output into a VOB so I can burn it to a DVD. I am not having much luck. 
> 
> ...
> 
> Pretty new at this. Does the original file behave ok in mplayer ?
> ...

 

The problem is that the masked ffmpeg did not work properly I think. When I ran any2vob with the latest stable things seem to have worked and I have a stable VOB. 

So I have a synced video/audo vob, I just now need to figure out what to do next. 

I do not suppose you could update the instructions to go front to back with any2vob instead of transcode.

Oh and transcode, the latest masked version also just blows up when I try to use it. From what I can tell this is likely due to 64bit issues or other potential problems. I will stick with stable where I can I think.

----------

## geeojr

 *Zed Sesqui wrote:*   

> The newer versions are masked.
> 
> ```
> These are the packages that I would merge, in order:
> 
> ...

 

Add 

```
media-video/transcode ~x86 
```

to  /etc/portage/package.keywords

and 

```
>media-video/transcode-1
```

to /etc/portage/package.unmask

Then try

```
# emerge -vp transcode
```

Shows it would install 1.0.1 for me...

----------

## mongre26

Ok so I got my first DVD made in Linux.  :Smile:  What I am wondering though is why I have black bars around the top and bottom? That is the display is no overscanning to fill in the entire screen. 

Here is the command I ran

any2vob-0.28.sh --surround=no --aspect=4:3 --overscan=yes  --format=ntsc -i UKC.mpg

However I get what looks like a black border, both in the VOB and when I run it on a standalone DVD player.

----------

## shiznix

 *mongre26 wrote:*   

> Ok so I got my first DVD made in Linux.  What I am wondering though is why I have black bars around the top and bottom? That is the display is no overscanning to fill in the entire screen. 
> 
> Here is the command I ran
> 
> any2vob-0.28.sh --surround=no --aspect=4:3 --overscan=yes  --format=ntsc -i UKC.mpg
> ...

 

The black border is added as a workaround for NTSC overscan.

You can try disabling overscan by specifying '--overscan=no', if you find the video image to be then slightly cropped around the edges you can try geeojr's idea of specifying

```
<video format="ntsc" aspect="4:3" widescreen="nopanscan" />
```

in the <titles> section of your dvdauthor.xml

----------

## geeojr

 *shiznix wrote:*   

>  if you find the video image to be then slightly cropped around the edges you can try geeojr's idea of specifying
> 
> ```
> <video format="ntsc" aspect="4:3" widescreen="nopanscan" />
> ```
> ...

 

I didn't have any problems with 4:3 material; and I think that adding the widescreen="nopanscan" to a 4:3 aspect ratio might not actually change anything since 4:3 isn't widescreen. Not sure; just a thought.

----------

## jsermer

I'm trying to multimux a bunch of *.wav files together, but when it gets to 1 byte less than 2GB (2147483647) it dies with the message "File size limit exceeded" (the infamous 2GB filesize limit).  I'm using multimux 0.2.4 which is the latest version (I just created a new ebuild in my overlay because it's not in portage) and I also noticed that in version 0.2.2 support was added for filesizes greater than 2GB (according to the CHANGELOG).  I've been able to successfully create a 2.5GB file using 'dd'.  I'm root and my ulimit for filesizes is set to "unlimited".  My configuration is Gentoo Linux with the 2.6.13-r4 kernel (gentoo sources) and the reiserfs filesystem on LVM.  Am I missing something?

Any help would be greatly appreciated.

Thanks!

--

Jeremy

----------

## mds32h

Hello,

I hope I'm not OT. I'm trying to author a DVD with one main menu, three movies and one slide show. I'm using qDVDAuthor for that. Beginning of October I succeeded and produced a DVD that was readable with a standalone DVD player, but the three movies had no sound. It was a matter of audio format, because the same DVD played well on a PC.

This week I have generated a new version of the same movies, using AC3 audio format instead of mp3 (I used Kino and mencoder, for that). Now I have the same DVD structure as I had some weeks ago, but the authoring stops at the first step. The command (generated by qDVDauthor) and the output are:

```

francesco@tworivers ~ $ jpeg2yuv -n 50 -I p -f 25 -j "/tmp/2005-federico-estate/Main Menu VMGM/background.jpg" | mpeg2enc -n p -f 8 -o "/tmp/2005-federico-estate/Main Menu VMGM/menu.m2v"

   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!

   INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!

   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!

   INFO: [jpeg2yuv] Parsing & checking input files.

   INFO: [jpeg2yuv] YUV colorspace detected.

   INFO: [jpeg2yuv] Starting decompression

   INFO: [jpeg2yuv] Image dimensions are 720x576

   INFO: [jpeg2yuv] Movie frame rate is:  25.000000 frames/second

   INFO: [jpeg2yuv] Non-interlaced/progressive frames.

   INFO: [jpeg2yuv] Frame size:  720 x 576

   INFO: [jpeg2yuv] Number of Loops 1

   INFO: [jpeg2yuv] Now generating YUV4MPEG stream.

   INFO: [jpeg2yuv] Processing non-interlaced/interleaved /tmp/2005-federico-estate/Main Menu VMGM/background.jpg, size 286670

   INFO: [mpeg2enc] Selecting DVD output profile

   INFO: [mpeg2enc] Progressive input - selecting progressive encoding.

   INFO: [mpeg2enc] Encoding MPEG-2 video to /tmp/2005-federico-estate/Main Menu VMGM/menu.m2v

   INFO: [mpeg2enc] Horizontal size: 720 pel

   INFO: [mpeg2enc] Vertical size: 576 pel

   INFO: [mpeg2enc] Aspect ratio code: 1 = 1:1 pixels

   INFO: [mpeg2enc] Frame rate code:   3 = 25.0 (PAL/SECAM VIDEO / converted FILM)

   INFO: [mpeg2enc] Bitrate: 7500 KBit/s

   INFO: [mpeg2enc] Quality factor: 8 (Quantisation = 9) (1=best, 31=worst)

   INFO: [mpeg2enc] Field order for input: none/progressive

   INFO: [mpeg2enc] Sequence unlimited length

   INFO: [mpeg2enc] Search radius: 16

   INFO: [mpeg2enc] DualPrime: no

   INFO: [mpeg2enc] Using one-pass rate controller

   INFO: [mpeg2enc] GOP SIZE RANGE 9 TO 15

   INFO: [mpeg2enc] Setting colour/gamma parameters to "PAL B/G"

   INFO: [mpeg2enc] Progressive format frames = 1

   INFO: [mpeg2enc] Using default unmodified quantization matrices

   INFO: [mpeg2enc] Buffering 33 frames

   INFO: [mpeg2enc] Signaling last frame = -1

   INFO: [mpeg2enc] SETTING MMX and MMX for QUANTIZER!

   INFO: [mpeg2enc] NEW GOP INIT length 15

Segmentation fault

```

As you can see, the process ends with a segfault. I am convinced that this is due to something that happened with my last emerge -u world, one week ago, but I have no idea what's the matter.

I have googled around and searched this forum, but the only thing I found is bug 108810, that seems to be strictly related to what I am having. In the comments I posted to that bug you can also see my emerge --info and another example of segfault backtraced in gdb.

The bug has been classified as minor, but for what I am concerned it is blocking the use of mjpegtools. Maybe re-emerging mjpegtool with all its dependencies could solve the problem? If yes, sorry to ask a maybe trivial question, how do I force emerge to do it? The emerge --deep mjpegtools command is not enough:

```

tworivers francesco # emerge --deep -p mjpegtools

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] media-video/mjpegtools-1.8.0

```

While equery g mjpegtools shows a 79 packages dependency tree!

Thank you for any answer or comment.

----------

## radagast

i know this isn't a real solution to the problem,

but dvdstyler uses mplex instead of mpeg2enc, so it might work for you.

(and thanks to shiznix for the bmw films)

----------

## mongre26

 *shiznix wrote:*   

>  *mongre26 wrote:*   Ok so I got my first DVD made in Linux.  What I am wondering though is why I have black bars around the top and bottom? That is the display is no overscanning to fill in the entire screen. 
> 
> Here is the command I ran
> 
> any2vob-0.28.sh --surround=no --aspect=4:3 --overscan=yes  --format=ntsc -i UKC.mpg
> ...

 

No effect, the black bars are there regardless of this switch. Basically the image looks shrunk from the original with extremely large black area all around it. 

here is the ffpmeg output

ffmpeg -y -i UKC.mpg -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/UKC.ac3 -map 0:0 -f mpeg2video -s 720x480 -padtop 38 -padleft 34 -padbottom 42 -padright 34 -hq -b 5000 -r ntsc  - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 720x480 -aspect 4:3 -r ntsc  -f mpeg2video tmp_any2vob/UKC.m2v

I assume the part I want to stop is the -padtop 38 -padleft 34 -padbottom 42 -padright 34 but the option has no effect in turning this off. 

Here is the output with overscan==yes

ffmpeg -y -i UKC.mpg -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/UKC.ac3 -map 0:0 -f mpeg2video -s 720x480 -padtop 38 -padleft 34 -padbottom 42 -padright 34 -hq -b 5000 -r ntsc  - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 720x480 -aspect 4:3 -r ntsc  -f mpeg2video tmp_any2vob/UKC.m2v

The end result of this feature is that the output is cropped on all sides, and that includes on my NTSC TV. 

I guess the script needs some hacking...

----------

## mongre26

I did not have the patience to go through the script and identify why the image was getting padding when I told it not to, so I just turned every instance of setting the crop values to "". Now I get the output from the scrip that I put into it, namely my fullscreen image...granted I should trim the edges a smidge as there are some residual few pixels of black on the right and left from source, but the image does not have the gratuitious black bars on all sides now that showed up in the final DVD on my NTSC standard 4:3 TV.

----------

## mds32h

 *radagast wrote:*   

> i know this isn't a real solution to the problem,
> 
> but dvdstyler uses mplex instead of mpeg2enc, so it might work for you.
> 
> 

 

Thanks for the suggestion, radagast, better a bypass for a problem than nothing, but unfortunately DVDStyler is crashing too. I cannot catch the output text (in the DVDStyler Manual there is a reference to a log file, but with version 1.4 I've found no way to specify it), I can only see that's on mpeg2enc, again. It is during the first phase of the process, therefore I guess mpeg2enc is called to generate the main menu with a background image (it is called just after ppmtoy4m).

I've no idea what to do, now: it seems my system is someway broken: I'll try to un-merge and emerge again mjpegtools (even if the author of bug 108810 did not succeed, doing so). If you have any other suggestion ...

[edit]

```
emerge -C mjpegtools-1.8.0 

emerge "<media-video/mpegtools-1.8.0"

```

has been enough (a downgrade of ImageMagick has been needed too): now it seems to work again.

[/edit]

----------

## Hamman

I'm having a problem with multiplexing audio and video. I used Avidemux to merge and encode the two .avi-files. I also used Audio -- Save Audio to save my AC3-file. Now that I try to merge them using the mplex command i the guide i get [code]**ERROR: [mplex] Can't find next AC3 frame: @ 178911488 we have 9ede - broken bit-stream=

It's happening about halfway trough the movie. Should I encode each file separetely instead?

----------

## bludger

Thanks for the above guide.  I played around with the suggestions in the

guide and eventually came up with a solution that works fairly well for me.

transcode 

	-i dvfile.dv  

	-x mplayer,mplayer 

	-y ffmpeg 

	--export_prof dvd-pal -N 0x50 

	-o outputfile 

	--encode_fields b 

	--export_asr 3 

	--import_asr 3 

	-m outputfile.mp2

mplex 

	-f 8 

	-V 

	-o outputfile.mpg 

	outputfile.m2v 

	outputfile.mp2

This produces an mpeg file that I can burn as a dvd.  After a few minutes of playing, however, there is a <i>slight</i> audio sync problem.  It is barely noticeable, but slightly disturbing.  You can only really notice it when you play a scene with voice and lips moving over and over, but when you view it without paying attention, you still get a slight sense that something is wrong. When I played the original dv file, however, everything was perfectly in sync.  

Now I recently used dvd:rip to produce an mpeg4 file with the xvid codec. The command line that dvd:rip produces is as follows (second pass only shown):

transcode -H 10 

		  -a 0 

		  -T 1,-1,1 

		  -x dvd 		 

		  -i <input directory> 

		  -w 1849 

		  -b 192,0,0 

		  --a52_drc_off 

		  -J smartyuv=threshold=10:Blend=1:diffmode=2:highq=1 

		  -f 25 

		  -Y 0,6,0,10 

		  -B 6,2,8 

		  -R 2 

		  -y xvid4

		  -o <output file>.avi

		  --print_status 20

This produces a perfectly synchronised mpeg4 file, with audio and video interleaved.  Note that there is no subsequent mplex step necessary - xvid seems to interleave the audio and video information on the fly, which is probably why there are no sync problems.  Is there a way to do the same when producing mpeg2?  Is this a deficiency with the ffmpeg codec or some inherent mpeg2 attribute?  Is there some other solution to my problem that anyone can think of?

----------

## shiznix

 *bludger wrote:*   

> Thanks for the above guide.  I played around with the suggestions in the
> 
> guide and eventually came up with a solution that works fairly well for me.
> 
> transcode 
> ...

 

Transcode really is a wonderful tool, but for encoding from a DV source, I recommend the use of mjpegtools exclusively.

Not only is it's quality far superior to anything else for DV, but it also handles interlaced PAL/NTSC conversions beautifully.

Here's a quick run down in it's most simplest form...

Create the video stream:

```
lav2yuv -P 4:3 file.dv | mpeg2enc -a2 -f8 -s -o file.m2v
```

Create the audio stream:

```
lav2wav file.dv > file_tmp.wav

ffmpeg -i file_tmp.wav -ar 48000 -ab 384 -ac 2 file.ac3
```

Then mplex:

```
mplex -f8 -o file.vob file.m2v file.ac3
```

If you require converting either aspect ratio or PAL/NTSC format, then look at the dv_avi() function in any2vob.

----------

## bludger

Thanks for this, but when I try it I get the following error

```
lav2yuv dvfile.dv

Unable to identify file (not a supported format - avi, quicktime).

**ERROR: [lav2yuv] Error opening dvfile.dv

```

The file was grabbed with:

  dvgrab -i --timestamp --format raw --size 0

----------

## mds32h

 *bludger wrote:*   

> 
> 
> The file was grabbed with:
> 
>   dvgrab -i --timestamp --format raw --size 0

 

If you can re-grab the file, just omit --format raw: dvgrab default format is DV AVI type 2, that's known by lav2yuv.

----------

## star.dancer

 *geeojr wrote:*   

>  *shiznix wrote:*    *geeojr wrote:*   
> 
> ```
> <video format="ntsc" aspect="16:9" widescreen="nopanscan" />
> ```
> ...

 

This also works for 4:3 aspect NTSC dvds.

I have overscan problems with the menus I was creating for my NTSC dvd player and I could not apply the transcode cropping fix.  It seems like transcode or ffmpeg or the interface between the two is broken on AMD64 processors  The "transcode ...  -j -18,-34,-22,-34" was segfaulting on me and I could not find an alternative program to do the cropping.

After reading your post I solved the problem in a much more elegant and faster way!  Thank you so much.  The top of my dvdauthor file now looks like this:

```
<?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> ...

```

I don't know why the widescreen="nopanscan" works for non-widescreen menus videos... but it does here. Thanks again.

----------

## bludger

 *mds32h wrote:*   

>  *bludger wrote:*   
> 
> The file was grabbed with:
> 
>   dvgrab -i --timestamp --format raw --size 0 
> ...

 

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.

I just read the raw dv file into kino and then used their default export facility.  This produced a beautifully synchronised output file.  When I looked at the actual commands being executed, I saw this:

mp2enc -v 0 -r 48000 -b 192 -o dvkino_output.mp2

mpeg2enc -v 0 -f 8 -I 1 -n p -a 3 -o dvkino_output.mpv

 - followed by mplex

(Still have to check whether this is the right interlacing parameter)

I assume that this means that the raw format is already "yuv" format and so the lav2yuv phase can be left out.

----------

## NassauBlue

I have DV footage that I recorded in widescreen mode using a Canon Optura 60.  When I hook the camcorder to my TV (4:3) aspect ratio, the TV automatically compresses the scan lines so that I have a 16:9 image with no loss of scan lines.  The same compression occurs when playing a professional widescreen DVD.  However, I have not been able to replicate this with any DVD's that I have made.  I have set the 16:9 flag in DVDauthor, as well as setting widescreen to nopanscan.  What is odd, however, is that if I change the TV type on the DVD player from 16:9 to 4:3, the DVD player will recognize the 16:9 flag, and place verticle bars at the top and bottom of the image.  But, scan lines are lost in this mode.  This leads me to believe that there is some other flag that causes the TV to compress the scan lines.  Any thoughts would be appreciated.

edit: I used the default settings in kino to generate the MPEG files.

Thanks,

Raymond

----------

## pyxel

Hello,

i have a .avi file "zidane.avi": RIFF (little-endian) data, AVI, 720 x 416, 25.00 fps, video: DivX 5, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

i'm from belgium so PAL:

```
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 25
```

after this i have two file, one sound one video, so:

```
mplex -f 8 -o zidane_dvd.mpg zidane.m2v zidane.ac3
```

after i have one file: zidane_dvd.mpg: MPEG sequence, v2, program multiplex

it works in mplayer...

i will no menu, so just:

```
<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>
```

save as zidane.xml and quit, mkdir DVD and:

```
dvdauthor -x zidane.xml
```

all seen ok, and in video_ts i have:

```
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.vob
```

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  :Sad: 

i try to play in playstation2 but no succes.

please help me if you can  :Smile: 

thanks you, and sorry for my dump english.

----------

## mirko_3

God, I have read all 24 pages... but a couple months ago... I noticed that everyone uses "-y ffmpeg", while I'm still using the "-y mpeg2enc,mp2enc" that was suggested at the beginning as giving the best quality... Can someone clear this up real quick? Which one gives better quality output?

Thanks

----------

## mds32h

 *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 
> ...

 

pyxel, 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).

Another way to generate a video DVD compatible structure is to create an iso image of your dvd directory with

```
mkisofs -dvd-video -o dvd.iso dvd/
```

After creating the iso you just have to burn it with k3b (select 'Tools/Burn DVD image' from the menu bar).

----------

## ixogn

hi, guys

im trying to add subtitles to a dvd mpg i've made, but it never works. 

whatever fontsize, font, charactset i use, i always get:

```

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.

```

i've also tried with veranda.ttf tahoma.ttf, but no result. my subtilte nowhere to be seen.

i've edit subtitle.xml like this:

```

<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>

```

and i have Vera.ttf in ~/.spumux directory. 

can anyone give me some clue how to make it works ?

TIA

PS: i've looked through the whole thread, it seems im the only one ever had this problem. why the spumux msg says subtitles added, but longest line/display hight is 0 ??

----------

## SpewDemon

Here is a script i use to convert AVI's into VOB's.

This script works great at keeping everything in sync.

It re-formats the size of the clip to 720x480 with black borders so theres no clipping of the original avi.

It will convet the frame rate to 29.97 fps with out any sync problems.

It processes audio very fast (amd 2000 cpu) up to 500fps.

problem: :Mr. Green: 

It processes the video at 10fps or slower.

That means it can take up to 4 hours just to process a 55 minute clip.

Is there anyway to improve this script so that it will process video at a faster frame rate? Even getting the video to process at 15fps would be enough .

Feel free to spread this script around the net because it does convert AVI 2 DVD very well as it is, it is just a bit slow.

#####

# avi2dvdConverter.sh

#####

```

#!/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

```

Any Help is greatly appreciated.  :Wink: 

SpewDemon   :Twisted Evil: 

----------

## pdr

I was never able to get the listed ffmpeg call to create a silent sound file (for creating the menu).

Now I'm writing a script to generate a DVD menu where one option is to use silence for the audio; after a lot of searching I ended up with the below. Requires sox though...

```
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"
```

sox doesn't directly support ac3 or mp2, so has to be converted - I'm still using ffmpeg for that.

This uses sox to read from /dev/zero and treat it as though it was a RAW input (un-headered pcm) of signed 16-bit values; since the input is zero, this makes it silent. Since its all zeros the input frequency might as well be the same as the output, saving sox from doing any kind of frequency-domain conversion, so I use $OUTPUT_AUDIO_RATE (48000) for both. Finally I tell sox to output a wav format and to only do it for [$OUTPUT_AUDIO_RATE * $BGDURATION = 48000 * 5 = 242000] samples - which makes it last for exactly the duration I want. So basically sox is generating a silent .wav that is the actual audio rate and duration I require.

The output from sox is piped into ffmpeg to convert it from .wav to ac3 using my desired (224Kb) bitrate and stored into my temp file.

----------

## MadEgg

I just found this guide and it works quite nicely for me, except for 2 things, both related to subtitles.

I've got a AVI movie in 23.976 FPS(so not 29.76 FPS), which I converted to 25 FPS using the guide, since my TV uses PAL. So far so good. I also got an .srt file for the original movie. The guide says to set subtitle-fps to the framerate of the original file, so I set it to 23.976 but then the subtitles aren't synced. I then tried 29.76 because that's also NTSC but still no good. Then I set it to 25 FPS and now the subtitles are correctly synced. So I didn't have to adjust anything. Not really a problem, just a comment.

The second one is a problem. The font is hideously ugly, it looks like some white stains with black letters carved into them. I tried using Vera.ttf and arial.ttf, and while the shape of the letters does change it doesn't improve a single bit. Any way to fix that? I haven't tried how it looks on my TV screen since I don't want to waste a DVD for these ugly fonts, but it might be better on there. Any help would be appreciated tho.

----------

## Muso

Ty for all the hard work Shiznix .... worked like a charm once I realized how much space is required for it (kept having errors w/dvdauthor step until I cleaned out tons of old files)  :Smile: 

----------

## garo

 *gkmac wrote:*   

>  *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? 
> 
> 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...
> 
> ```
> ...

 

Can you put this in the guide ? It could be usefull...

----------

## Kazaza

Hi.

Must say that without this guide I would`nt ever even have considered to try to make my own dvdmenus. But I have a problem, my menus and video is heavily cropped when played in my dvd-player, not as long as it is beeing watched in my computer. The cropping is around 30px on all ends, so the picture is not showing as it should at all... I have tried with gimp to show how the picture should be showed and how much the picture is cropped.

Picture as it should be shown

Picture as it is shown

I have been trying a lot of things to get this to work and have waisted quite a lot of dvd:s now to be able to see it on my dvd-player for my tv. But I need someone to help me out here.

This is my spumux.xml

```
<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>

```

and my dvdauthor.xml

```
<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>

```

The nopanscan part is one thing I have tried, but it does no difference whether I have it in or not. As I said, the dvd plays just fine in my computer and the same goes for the mpg:s that is used for the dvd... (without being cropped).

BTW, to use a dvd-rw is not an option as my dvd-player only errors out when I tried that...  :Sad:  so good suggestions is welcome so that I dont have to waist another 30 dvd:s

----------

## ninjabadger

```
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
```

I am running this in an attempt to get slightly smaller files (4 350 meg avis per disk instead of 3).  It doesnt seem to be working though.  Am I specifying the bitrate corectly?

Also I tried some of the motheds to keep borders mentioned here but i end up with a small picture in the middle of the screen, what is the correct way to write these files so that they are 4:3 aspect ration with borders added as required.  That way they will work on my 4:3 TV and my Widescreen TV can zoon to fit anyway.

----------

## taipan67

Apologies for not scrutinising the entire thread for previous instances of this problem...   :Embarassed: 

When trying to create menu's, i keep getting the "ERR: Cannot pick button masks" error from 'spumux'. I'm aware, thanks to a google-hit on an earlier post in the thread (page 15), that my highlight & select png's can't contain more than 4 colours including the transparent one, but i don't seem to be able to get lower than 7.

Admittedly, i'm using 'krita' for this, because the prospect of emerging the 'gimp' on an exclusively KDE system doesn't exactly make me as giddy as a schoolgirl...

...So i guess the question is:- Can the desired png's be generated with 'krita' (or any other QT-friendly app), or is the 'gimp' my only solution?

----------

## ANGEL XX

thanxxxxxxx alot

ill try it now

----------

## tocha

Hello to all!

 I would like to tanks for this great tutorial. I had authoring some dvds before and it went very well.

 But now i am trying to create a dvd for a live show i got from the net. at the beginning there is no problem, but as the time go, the result mplexed file get slowly out of sync. To explain better, at the mid of show, audio is about one second after the video. At the end of file i got about 2 seconds.

 If i could speed up the audio track by a little I think it will work well, but sox cant speed up by this little factor (its about 100.038%)

 Midentify tell me that the mplexed file is 5266 seconds long, and the ac3 file is 5268. If i use mplayer to dump the audio from the original file, i got a 5265 seconds mp3.

 The original file is a mpg with mp3 audio in pal format. As i am triyng to make a dvd in ntsc format it uses the modfps plugin. Now I wonder if the modfps is causing this error.

 Can someone tell me if i am doing something wrong? Any hint would be great.

Tank you guys

----------

## bigbob73

OK.  I have took a file (call it matrix.avi) and used transcode to encode ...

transcode -i matrix.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o matrix -D0 -b224 -N 0x2000 -s2 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 29.97 

all's well so far.  it produced matrix.m2v and matrix.ac3.  Then I used the command "mplayer -vo dummy -identify original.avi 2> /dev/null | grep "5.1 (" to see if i could extract 5.1 surround (there was no output from the command).  So then I used the guide from http://mightylegends.zapto.org/dvd/dvdauthor_howto_surround.html to create 5.1 surround sound.  using "ffmpeg -i matrix.ac3 matrix.wav" I get the following error...

 ffmpeg version CVS, build 3342336, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared-pp --enable-shared --disable-static --disable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --disable-xvid --enable-libogg --enable-vorbis --disable-theora --disable-dts --disable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts --build=i686-pc-linux-gnu

  built on Dec 22 2005 03:13:28, gcc: 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7. :Cool: 

Input #0, ac3, from 'matrix.ac3':

  Duration: N/A, bitrate: N/A

  Stream #0.0: Audio: 0x0000

Output #0, wav, to 'matrix.wav':

  Stream #0.0: Audio: pcm_s16le

Stream mapping:

  Stream #0.0 -> #0.0

Unsupported codec (id=86020) for input stream #0.0

Question is, should this command be run on the original avi maybe?

Bigbob

----------

## alexlm78

 *viperlin wrote:*   

>  *BonezTheGoon 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,
> ...

 

Yeah, me too.

----------

## sirdilznik

I love the any2vob script and I use it all the time.  There is just one thing missing from the script for my taste.  The normalize function.  It would be great if the script normalized the audio before re-combining it with the video so that if I put multiple vobs on one dvd they will all be at the same volume.  I may try to add the normalize function into the script myself at some point, but my scripting skills are quite meager at this point (I'm working on it though   :Very Happy:   ).  Otherwise the script is awesome.  Thanks for the great work!!

----------

## Beetle B.

I couldn't get subtitles to work (using the any2vob script):

```

 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 .

```

And BTW, what's a good font size for subtitles on a regular TV screen?

Update: OK - I decided not to use the script and did it by hand. Everything seemed to work fine, except the subtitles don't appear. Spumux found a bunch of them and reported success. But when I play the resulting file through mplayer or whetever player, the subtitles simply don't show.

----------

## snowsquirrel

I created an m2v file from a jpeg, which appears to be valid.  I created a set of PNG files, menu.png, menu_hl.png, and menu_sel.png.  My spumux xml file looks like this:

<subpictures>

 <stream>

   <spu

       force="yes"

       start="00:00:00.00"

       image="menu.png"

       highlight="menu_hl.png"

       select="menu_sel.png"

       autooutline="infer"

       outlinewidth="6"

       autoorder="rows">

 </spu>

 </stream>

</subpictures>

http://www.snowsquirrel.ca/downloads/spumux/menu.png

http://www.snowsquirrel.ca/downloads/spumux/menu_hl.png

http://www.snowsquirrel.ca/downloads/spumux/menu_sel.png

but spumux keeps dying like this:

[code]DVDAuthor::spumux, version 0.6.11.

Build options: gnugetopt magick iconv freetype

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=en_CA.UTF-8

INFO: Converting filenames to UTF-8

INFO: Picture menu.png had 2 colors

INFO: Picture menu_hl.png had 2 colors

INFO: Picture menu_sel.png had 2 colors

INFO: Autodetect 0 = 19x335-84x361

INFO: Autodetect 1 = 112x334-177x356

INFO: Autodetect 2 = 17x371-84x392

INFO: Autodetect 3 = 112x368-174x391

INFO: Autodetect 4 = 16x402-83x425

INFO: Autodetect 5 = 112x399-173x426

INFO: Autodetect 6 = 17x434-79x458

INFO: Autodetect 7 = 112x435-175x458

INFO: Pickbuttongroups, success with 1 groups, useimg=0

spumux: subgen-image.c:726: imgfix: Assertion `useimg' failed.

[/code]

My buttons are detected correctly, and it appears that I have the correct colors.  Can anyone shed any insight on this cryptic error message?  thanks.

~S

----------

## bigbob73

I keep getting the same error when using any2vob.  Something about and unrecognized format.

Use Ctrl+C to abort

File(s) to process: sw.avi

<<<< NEW ENCODING of sw.avi started at Mon Jan  2 13:48:08 CST 2006 >>>>

File sw.avi is of type: AVI

 Final estimated filesize:      3.97 GB

Frames/sec:     25.000

Resolution:     640x272

Aspect:         2.35294117647059:1

 Running: ffmpeg -y -i sw.avi -map 0:1 -ar 48000 -ab 384 -ac 2 tmp_any2vob/sw.ac3 -map 0:0, -f mpeg2video -s 640x272 -padtop 38 -padbottom 38 -hq -b 5000 -r pal  - 2> /dev/null | ffmpeg -y -i - -hq -b 5000 -bufsize 224 -maxrate 7000 -s 720x576 -aspect 16:9 -r pal  -f mpeg2video tmp_any2vob/sw.m2v

ffmpeg version CVS, build 3342336, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared-pp --enable-shared --disable-static --disable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --disable-xvid --enable-libogg --enable-vorbis --disable-theora --disable-dts --disable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts --build=i686-pc-linux-gnu

  built on Dec 22 2005 03:13:28, gcc: 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7. :Cool: 

pipe:: Unknown format

 Error: Video encoding failed for tmp_any2vob/sw.m2v, file not successfully encoded!

any ideas?

----------

## Linux-Spielkind

Hello everyone!

i have some problems putting my video and audio-streams togetgher with mplex.

i'm doing a 

```
# mplex -f 8 -o test.mpeg test.m2v lily_final.ac3
```

the result ist that i endup with a lot of warnings and errors exiting after a few secs

here are some of those warnings:

```

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

```

----------

## snowsquirrel

Use an mp2 audio file that worked for me.

I fixed my menu error by following direction more closely.  :Smile:   My hl and sel overlays included the background buttoon. The hl and sel png's should not duplicate any part of the bg image buttons. (hope that makes sense.)

~S

----------

## Linux-Spielkind

Hi!

i tried again with a mp2 audio-file but i still get the same error.

----------

## kermitthefrog917

I was reading this forum as well as a few others on the same topic, and i think we should combine these various scripts into some sort of software.  Maybe nothing more than a master script that provides relatively easy access to all the useful scripts for DVD creation.  Or maybe a GUI interface to the scripts.  I registered Scripts to Konvert into DVD (SkiDVD) on sourceforge.net

Anyone interested in helping out?

http://sourceforge.net/projects/skidvd

----------

## shiznix

It's taken many months, but finally have just now released any2dvd-0.30 and can be found at http://sourceforge.net/projects/any2dvd/

Once again, many thanks to Scott Smith & Wolfgang Wershofen who have both been key figures with regards to DVD authoring under Linux & also to those who have contributed with ideas & bug fixes, it's by no means complete.

I won't bore too much with details but a quick rundown follows:

 Any2Vob will now be released in the Any2DVD tarball on the sourceforge site above, howto has been updated accordingly

 This release also includes a new version of any2vob, many bugfixes, check the Changelog

 Any2DVD calls upon any2vob to encode the movies, then creates complete DVD menus with the option of either creating a DVD .iso or burning straight to DVD

 Also has the option of creating animated DVD menus, thanks go to Anterion

Happy New Year

Shiznix  :Very Happy: 

----------

## feld

hey man I just found your any2dvd software and I must say

THANK YOU SO MUCH!!!!

-Feld

----------

## kermitthefrog917

agreed... does a good job... exactly what i was looking to do... (up a few posts)  I guess i can drop the project

----------

## feld

okay, now I'm confused.

Everything was going so well -- it started to do the job, I had everything set the way I wanted,  -- I really thought this was the solution for me.

Well, it's not working. It wouldnt finish, wouldnt burn.

```

STAT: VOBU 0 at 0MB, 1 PGCS

/usr/bin/any2dvd: line 7397:  1325 Segmentation fault      dvdauthor -x "$XMLFILE"

Burning DVD...

Executing 'mkisofs -V ANY2DVD -dvd-video tmp_any2dvd/DVD/ | builtin_dd of=/dev/dvd obs=32k seek=0'

INFO:   UTF-8 character encoding detected by locale settings.

        Assuming UTF-8 encoded filenames on source filesystem,

        use -input-charset to override.

mkisofs: No such file or directory. Faild to open tmp_any2dvd/DVD//VIDEO_TS/VIDEO_TS.IFO

mkisofs: Can't open VMG info for 'tmp_any2dvd/DVD/'.

mkisofs: Unable to parse DVD-Video structures.

mkisofs: Unable to make a DVD-Video image.

:-( write failed: Input/output error

```

What happened?

-Feld

----------

## kermitthefrog917

yeah... after a few attempts... Im having problems as well

dvdauthor segfaults (may be a 64-bit problem)

the script skips the encoding for files already in DVD format, but then it fails to pass them on to the rest of the script

and a few that have finished have ended with either sound missing or being dropped halfway through...

when it works its awesome... and i guess its the first release...  lots of potential...

----------

## feld

hrm...

I'm 32bit... so I dont think dvdauthor is affected by that....

might just be a dvdauthor bug in general.

i'm using version 0.6.11 ---- maybe I should downgrade to 0.6.10?

I'll try again, if that doesnt work I'll downgrade. I'll attempt this AGAIN, and then we'll see how it fares out. Maybe 0.6.11 just isn't ready for prime time  :Wink: 

edit: Just found some alpha releases. Looks like it hasn't been worked on since March 2005. 

http://dvdauthor.sourceforge.net/alpha/

Maybe the latest one there will do the trick.

-Feld

----------

## feld

Okay now from information that I've picked up I've come to the possible conclusion that my file is NOT a really good avi file, which is why it is having problems.

It was mentioned earlier in this thread that those VOB errors occur when the conversion to mpeg didn't go so well.... and other research tells me that maybe my .avi file is actually a .wmv. I'm going to use mencoder to convert to avi, then proceed with the usual any2dvd script. Hopefully this will solve the problem.

-Feld

----------

## radagast

hello everyone

and continuing daily thanks to shiznix for building the software that i use most often (after xfce4 and all of it's dependencies)

i'll have a look at any2DVD today, but i have a sort of bug to report..

using any2vob-0.28

and ffmpeg 0.4.9_p20051216

most DV files fail like this:

```
ffmpeg: unrecognized option '-hq'

 Error: Video encoding failed for VOBoutput/perch1_11shanghai.aviTEMP.m2v, file not successfully encoded!

```

after a few busy weeks using avidemux (no commandline, no batch, no fun) i got around to downgrading ffmpeg to 0.4.9_p20050226-r5 (the last 64-bit stable version) and everything is good again.

i'll leave this post for anyone else with the same problem, and test with any2vob-0.30.

----------

## feld

I dont know what has been happening but I think I figured out what has been going on.

First, it was failing on mplex, and then dvdauthor wasn't working of course because it didnt have a finished product.

Mplex was failing because it was running out of space. OOPS, LOL.

Well, I solved that, but dvdauthor was still failing. Why? I dont know HOW, but I checked the XML file and it was referencing my ORIGINAL avi file for the vob instead of the actual vob! Replacing the path to the actual vob and running the dvdauthor command proved to be sucessful (in a way... I'm doing this over ssh right now and it appears it was having audio offset errors or something.... but then was claiming it was fixing things. I hope it is OK.)

I manually burned the DVD too. Only god knows right now, but I really hope its okay. I've been fighting with this for like 3 days.

Any clue why it was referencing the original AVI instead of the actual VOB? You'd think this would be an extremely common problem if it was a hard coded script error.

-Feld

----------

## feld

Okay, I'm sorry to inform you all that I went to the dark side to finish this project in particular. I didnt have enough time to get it done in Linux properly.

After fighting with space limitations and dvdauthor trying to make DVD structures after examining the avi file and not the actual VOB, I was having another problem.

Apparantly the encoders in Linux fail converting DIVX -> DVD successfully. The video quality was great -- the problem was that the audio was terribly, terribly off. It seemed like it was behind by about 15 seconds. The video might have been a bit slow too. I didnt want to experiment and waste time encoding again and again, so I gave up.

The funny part? Ulead DVD Creator or whatever in Windows also fails to work with DivX. I had to use a fre program... The FilmMachine.

The FilmMachine actually uses a bunch of GPL'd programs... some via cygwin.... Like DVDAuthor and MJPEG Tools. The encoders are all Windows encoders, of course.

and not mentioned but used: mkisofs

I just wish it would have worked on Linux for me as it would have been the easiest solution. (and quickest might I add... these Windows encoders are DOG SLOW.) 

-Feld

----------

## Beetle B.

 * wrote:*   

> after a few busy weeks using avidemux (no commandline, no batch, no fun) i got around to downgrading ffmpeg to 0.4.9_p20050226-r5 (the last 64-bit stable version) and everything is good again. 

 

I had this problem as well - the latest stable ffmpeg did not work, and I had to revert to this one.

All of a sudden, now my video and audio are not in synch. The files are avi (one of which is xvid with VBR mp3 audio).

I tried the mencoder command on the first post, and my resulting vob's still have them out of synch. I don't know if this is a problem with the script or the files. I'll try older scripts as well as older files that worked fine in the past.

----------

## Beetle B.

 * wrote:*   

> I had this problem as well - the latest stable ffmpeg did not work, and I had to revert to this one.
> 
> 

 

I spoke too soon. I just realized that I am using the latest stable ffmpeg - I got the same error you did using an older version of the script.

So perhaps this is why I'm having sync problems? I'll downgrade ffmpeg and see if there's a difference.

----------

## tuxicated

There is now also a convenient graphical wizard that can convert any AVI/WMV/MPEG/... into DVD compatible MPEG2-PS:

http://kde-apps.org/content/show.php?content=29587

and another wizard to put one or multiple MPEG2-PS files into a DVD ISO file, including animated menus:

http://kde-apps.org/content/show.php?content=27528

----------

## Linux-Spielkind

Hi everyone!

First of all thanks for that nice howto, keep up the good work!   :Very Happy: 

Now everything finally worked out and i got my dvd done, but there is still one little problem!

I did the menu buttons stuff according to the howto while testing the dvd-sructure with xine 

i wasn't able to hit any buttons in the menu. I have no idea what i did wrong!?

----------

## forkboy

I'm having a problem with any2dvd, I get 

```
localhost dvd4 # any2dvd -i film.avi

Any2Dvd-0.30

 Running: any2vob --workdir=tmp_any2dvd --format=pal --audio_format=ac3 --surround=yes --compress=no --aspect=16:9 --keep_dts=yes --preview=no --log=no  --skip_comm=no --mpegts_allpids=no  -i film.avi

Any2Vob-0.30

Use Ctrl+C to abort

File(s) to process: film.avi

 Total estimated DVD Disc usage:  1.77 GB

<<<< NEW ENCODING of film.avi started at Thu Jan 26 21:55:19 GMT 2006 >>>>

File film.avi is of type: AVI

Frames/sec:

Resolution:     x

Aspect:         :1

 Final estimated filesize:      1.48 GB

syntax error at -e line 1, next char )

Execution of -e aborted due to compilation errors.

syntax error at -e line 1, near "-  ) "

Execution of -e aborted due to compilation errors.

Search pattern not terminated at -e line 1.

 Running: ffmpeg -y -i film.avi -map 0:1 -ar 48000 -ab 384 -ac 2 "tmp_any2dvd/film.ac3" -map 0:0 -f mpeg2video -s x -padtop  -padbottom  -b 5000 -bufsize 224 -maxrate 7000 -r pal -s 720x576 -aspect 16:9 tmp_any2dvd/film.m2v

ffmpeg version CVS, build 3342336, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared-pp --enable-shared --disable-static --enable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --enable-xvid --enable-libogg --enable-vorbis --disable-theora --disable-dts --disable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts --build=i686-pc-linux-gnu

  built on Jan 26 2006 15:40:24, gcc: 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)

Input #0, avi, from 'film.avi':

  Duration: 00:42:25.3, start: 0.000000, bitrate: 1150 kb/s

  Stream #0.0, 25.00 fps: Video: mpeg4, yuv420p, 640x368

  Stream #0.1: Audio: mp3, 44100 Hz, stereo, 32 kb/s

Incorrect frame size

 Error: Video encoding failed for tmp_any2dvd/film.m2v, file not successfully encoded!

```

Any help please?

----------

## Linux-Spielkind

Hi forkboy!

Your source video has a strange size! You may have to resize it to 720x576 to get it working you can do this with mencoder/mplayer. if you don't know how take a look at the documentation.

 *Quote:*   

>  Stream #0.0, 25.00 fps: Video: mpeg4, yuv420p, 640x368 

 

----------

## kostavox

Dear All,

I'm working with HDV files and using the Canopus HQ codec can easily author on DVD Architect as it treats the HQ avi as a normal SD avi, but I can therefore only output at 720 X 576 [PAL] resolution.

I've looked at att the PC-based DVD authoring solutions, and none will allow you to change the settings to 1920 X 1080 unless you want to invest "stupid-money" for a Sonic Solutions [$250K].

Apple's DVD STUDIO PRO will let you do this for $700.

Is there anything out there I can use in the Wintel world?

----------

## hulmeman

Hi

I've just finished an 'emerge -Duv world' and have started getting the following error:

```
/dvd/funland/edited/Funland_S01E01_e.avi

 Total estimated DVD Disc usage:  2.00 GB

<<<< NEW ENCODING of /dvd/funland/edited/Funland_S01E01_e.avi started at Tue Jan 31 05:54:47 GMT 2006 >>>>

File /dvd/funland/edited/Funland_S01E01_e.avi is of type: AVI

Frames/sec:

Resolution:     x

Aspect:         :1

 Final estimated filesize:      1.70 GB

syntax error at -e line 1, next char )

Execution of -e aborted due to compilation errors.

syntax error at -e line 1, near "-  ) "

Execution of -e aborted due to compilation errors.

Search pattern not terminated at -e line 1.

 Running: ffmpeg -y -i /dvd/funland/edited/Funland_S01E01_e.avi -map 0:1 -ar 48000 -ab 384 -ac 2 "tmp_any2vob/Funland_S01E01_e.ac3" -map 0:0 -f mpeg2video -s x -padtop  -padbottom  -b 5000 -bufsize 224 -maxrate 7000 -r pal -s 720x576 -aspect 16:9 tmp_any2vob/Funland_S01E01_e.m2v

ffmpeg version CVS, build 3342336, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared-pp --enable-shared --disable-static --enable-mmx --disable-altivec --disable-debug --enable-mp3lame --enable-a52 --disable-a52bin --enable-audio-oss --enable-v4l --disable-dv1394 --disable-dc1394 --enable-pthreads --enable-xvid --enable-libogg --enable-vorbis --enable-theora --enable-dts --disable-network --enable-zlib --enable-ffplay --enable-faad --enable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu 

  built on Jan 28 2006 06:32:48, gcc: 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)

Input #0, avi, from '/dvd/funland/edited/Funland_S01E01_e.avi':

  Duration: 00:48:51.8, start: 0.000000, bitrate: 984 kb/s

  Stream #0.0, 25.00 fps: Video: mpeg4, yuv420p, 640x352

  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 122 kb/s

Incorrect frame size

 Error: Video encoding failed for tmp_any2vob/Funland_S01E01_e.m2v, file not successfully encoded!

```

Frame size is OK, because I have previously encoded this file successfully, prior to emerge -Duv world.

Hope someone can help.

Baz

----------

## radagast

try downgrading ffmpeg

i'm using 0.4.9_p20050226-r5, i had a lot of trouble with the newer versions.

----------

## hulmeman

 *radagast wrote:*   

> try downgrading ffmpeg
> 
> i'm using 0.4.9_p20050226-r5, i had a lot of trouble with the newer versions.

 

I've tried 0.4.9_p20050226-r5, still the same error!

----------

## forkboy

I can use the commands on the first page of this thread, but if I try to use any2vob or any2dvd I get the above errors, on every file I try.

----------

## radagast

try debugging just the command it's failing on (in the example above):

```
ffmpeg -y -i /dvd/funland/edited/Funland_S01E01_e.avi -map 0:1 -ar 48000 -ab 384 -ac 2 "tmp_any2vob/Funland_S01E01_e.ac3" -map 0:0 -f mpeg2video -s x -padtop  -padbottom  -b 5000 -bufsize 224 -maxrate 7000 -r pal -s 720x576 -aspect 16:9 tmp_any2vob/Funland_S01E01_e.m2v 
```

play with it a bit, see if you can find out what's breaking it.

unfortunately the any2vob script has become very complicated and i've never managed to fix an error once i've found it.  but if you work out what's wrong you can report it here and the next version will be Better.

i encode a lot of DV video (usually captured on a PC, edited on Premiere, then given to me to turn into a dvd), and i just about always run it through mencoder first

```
mencoder -o OUTFILE.AVI -ovc lavc -lavcopts vbitrate=10000:vhq -ffourcc DX50 -oac copy INFILE.AVI
```

i know that any2vob sometimes does this as well, but that seems to save me from most of my errors (except when the errors were from the ffmpeg version mismatch)

keep trying...

----------

## budman8

Hi,

Excellent tutorial!  I walked thru it fine.  A reference note to 4 color limit on the button select/highlight would help.  :Smile: 

I had one mess up forgetting to change the aspect ratio.  Will fix that next time. 

I did notice, the button highlights were aligned correctly in Xine, but were off by what looks to be a 1/2" on the TV.

Do I need to add padding or an offset?  or would this be due the aspect ratio was incorrect for the background.

The main question I have is about the optimizing the encoding.

I tried the both suggestions for NTSC in the tutorial.

   After encoding, I try to run it in Xine, I hear audio fine - however no video and I get the dropped frames popup.

   After trying and checking the Xine configs, I was going thru many of the posts on here.

   I saw some mentioned mplayer, so I thought I would give it a shot - it worked flawlessly.

   There are a lot of tweaks in Xine, I am wondering if I need to adjust anything to see the video.

When shrinking the video, is it better to always use the preclip?

I tried it without, it looks fine in mplayer, but some shots the heads are stretched, so I will try it again with the preclip.

I find it hard to tell what it will look like on TV from the preview on the computer. 

I notice playing DVDs on the PS/2 (haven't bothered to get a DVD player yet, mainly waiting for the blue DVD to come out, like in PS3 - didn't want to waste my money on green and red, because the blue will offer 4 layer, then I will make an investment - used to work in the media industry)  that sound for the music is often higher than the voices - so we are constantly battling with the volume,  turn the volume up to 35 when its an intimate moment, then drop it down to 14 when music or a sound effects kick in.  I guess there is no way to control it on the PS/2, I looked at the browser, but don't see anything other than stereo sound.  It definitely sounds like the DVD's have sound encoded for multi channel systems, must be a way to override it.

Thanks again for a great tutorial.

Rich

----------

## Jenden

Looks like I'm having a similar problem to a couple other people here with subtitles.

I've been trying to put together a DVD with a bunch of short video clips and a subtitle for each that acts as kind of a label.  However, I can't get the subtitles to work right.  I'm using spumux to try to merge the subtitles into the MPG files, and here's the output I get:

INFO: Locale=en_US.UTF-8

INFO: Converting filenames to UTF-8

INFO: Detected subtitle file format: subviewer

INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*

INFO: Read 1 subtitles

INFO: Unicode font: 1185 glyphs.

INFO: Found EOF in .sub file.

INFO: Subtitle inserted at: 0.333356 sd=60

WARN:  Read 0, expected 4

INFO: 1 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.23

Statistics:

- Processed 1 subtitles.

- The longest display line had 9 characters.

- The maximum number of displayed lines was 1.

- The normal display height of the font arial.ttf was 32.

- The bottom display height of the font arial.ttf was 46.

- The biggest subtitle box had 488 bytes.

It looks like everything goes ok, but when I go to play back the video to make sure it worked I don't see any subtitle streams (I've tried both mplayer as well as gxine, and both are saying no subtitle streams).  I'm making the subtitles from .srt text subtitle files, and I know those files work correctly.  Here's the xml file I'm using for spumux:

<subpictures>

<stream>

<textsub filename="beck.srt" horizontal-alignment="center" subtitle-fps="29.97" movie-fps="29.97" movie-width="352" movie-height="240"/>

</stream>

</subpictures>

Any suggestions?

----------

## DAharon

I have the same problem as above regarding subtitles.  I've never gotten it to work right.

----------

## budman8

 *Jenden wrote:*   

> 
> 
> It looks like everything goes ok, but when I go to play back the video to make sure it worked I don't see any subtitle streams (I've tried both mplayer as well as gxine, and both are saying no subtitle streams).  I'm making the subtitles from .srt text subtitle files, and I know those files work correctly.  Here's the xml file I'm using for spumux:
> 
> <subpictures>
> ...

 

I saw in the howto where it mentioned about the subtitle-fps must be in the fps in which the subtitle file was created.

I had the fps as 25 and the movie-fps 29.97, and had the height and width as the smaller size, 

which caused it put the text in the middle of the screen. 

I changed it to the original size 720x480 and it worked correctly.

<subpictures>

  <stream>

    <textsub filename="subtitle.srt"

         fontsize="18.0" font="Vera.ttf"

                 horizontal-alignment="center"

         vertical-alignment="bottom"

                 left-margin="60" right-margin="60"

         top-margin="20" bottom-margin="30"

                 subtitle-fps="25" movie-fps="29.97"

                 movie-width="720" movie-height="478"

                 />

  </stream>

</subpictures>

Also,  mplayer does not like subtitles very much - there is no option to enable it and the settings keep reverting no matter what you set.

seems like a bug.

Since xine is not cooperating with smaller resolutions, mplayer works fine, but only from cmdline:

mplayer -sid 0 movie.temp.mpg -fs

Just need to figure out how to make them look better.  :Smile: 

I tried a larger size, looks ok, but the white outline is too bold.

Rich

----------

## qwijibow

aaaghghgh panick.....

using any2dvd

```

any2dvd --surround=no --burn=yes --iso=./work/eye.iso --burn=yes --animate=yes --workdir=./work/ -i src/eye.avi

```

dureing the cration, i got a few of the following errors

"FreeType library is not available `./work//VTSM/tmp_thumbs2.png'

then at the very end, the last stage

 *Quote:*   

> Menu #4 created
> 
> Finished Titleset #1
> 
> Authoring DVD File Structure...
> ...

 

what caused this error ???

was it because i used a relative work directory  " ./work" and i should have used absolute "/tmp/work" ???

the ./work/DVD/VIDEO_TS/ folder is empty.

however, it seems that the menu piccys and mpegs were created successfully, as was the .VOB file.

i would rather not go though the whole any2dvd process again untilli  am sure what went wrong.

all porgrams are installed, and all are the correct version as indicated in post #1.

Also... would i be able to continue from where the any2DVD failed via command line ?

any tips on how far back to back-track.

Thanks

----------

## Larcen

ffmpeg continues to failing with the error: Unknown format. See 'log' below.

```

Running: ffmpeg -y -i downloads/dir/file.avi -map 0:1 -ar 48000 -ab 384 -ac 2 "/home/files/dvd/file.ac3" -map 0:0 -f mpeg2video -s 640x352 -padtop 2 -padbottom 2 -b 5000 -r ntsc - 2> /dev/null | ffmpeg -y -i - -b 5000 -bufsize 224 -maxrate 7000 -s 720x480 -aspect 16:9 -r ntsc -f mpeg2video /home/files/dvd/file.m2v

ffmpeg version 0.4.9-pre1, build 4743, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-shared-pp --enable-shared --disable-static --enable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 --disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc1394 --disable-pthreads --enable-xvid --enable-ogg --enable-vorbis --disable-dts --enable-network --enable-zlib --enable-ffplay --disable-faad --disable-faac --disable-faadbin --enable-gpl --enable-pp --disable-opts --build=i686-pc-linux-gnu 

  built on Feb 11 2006 05:20:13, gcc: 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)

pipe:: Unknown format

 Error: Video encoding failed for /home/files/dvd/file.m2v, file not successfully encoded!

```

The only thing altered is the actual name of the files.

----------

## Donkey_Breath

Hi, I have an avi which transcode failed on each time I used the command at the start of this howto. I tried piping through mplayer as suggested, and when that didn't work I re-encoded it with mplayer as if it wasn't an avi. The new file plays fine, but transcode fails when I try to convert it to mpeg.

```

$ transcode -i test.avi -y ffmpeg --export_prof dvd-pal --export_asr 3 -o test  -b224 -N 0x02000 -s2 -m test.ac3  --export_fps 25

 transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source test.avi (ok)

[transcode] V: import format    | DivX5 RIFF data, AVI (V=ffmpeg|A=avi)

[transcode] V: import frame     | 640x272  2.35:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)

[transcode] V: zoom             | 720x576  1.76:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.174

[transcode] V: decoding fps,frc | 25.000,3

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x1     PCM          [48000,16,2] 1536 kbps

[transcode] A: export format    | 0x2000  AC3          [48000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 25.000,3

[transcode] A: bytes per frame  | 7680 (7680.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

tc_memcpy: using libc for memcpy

[transcode] V: video buffer     | 10 @ 720x576

[import_avi.so] v0.4.2 (2002-05-24) (video) * | (audio) *

[import_ffmpeg.so] v0.1.11 (2004-02-29) (video)  Lavc51.0.0: MS MPEG4v1-3/MPEG4/MJPEG

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) Lavc51.0.0 | (audio) MPEG/AC3/PCM

[import_avi.so] format=0x1, rate=48000 Hz, bits=16, channels=2, bitrate=1536

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, pal video type for video

[export_ffmpeg.so]: INFO: Set interlacing to top-first

[export_ffmpeg.so]: INFO: Set frame rate to 25

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 15

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.422222

[mpeg2video @ 0x2aaaae3968f0]removing common factors from framerate

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: INFO: No audio resampling necessary, using 48000 Hz

Killed

```

I have encoded other movies with no problems, this is a bit beyond me - there's nothing there that actually looks like an error. It just all of a sudden says "Killed" with no explanation.

I just tried the exact same process with another file and it worked fine... I wonder what's wrong with that file?

----------

## Beetle B.

 * wrote:*   

> ffmpeg continues to failing with the error: Unknown format. See 'log' below.
> 
> 

 

What version of ffmpeg are you using?

What version of any2vob?

I had this problem with the latest stable ffmpeg while using any2vob 0.28. I had to downgrade ffmpeg. The latest version did seem to "work" with the latest any2vob 0.30, but then I get a horrible audio-video synch problem. Again, downgrading ffmpeg made it work. I'm sure it's something to do with the command line switches in any2vob. When I use the other program mentioned a page or two ago, it also uses ffmpeg  and there's no synch issue (the latest ffmpeg).

----------

## Larcen

I tried with latest ffmpeg and version  ffmpeg-0.4.9_p20050226-r5.ebuild, should I try one even older than that? Using any2dvd/vob version 0.30

----------

## bigbob73

at one time it worked perfectly, but now I get this error...

bob@mauller /media/avi $ transcode -i film.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o film -D0 -b224 -N 0x2000 -s2 -m film.ac3 -J modfps=clonetype=3 --export_fps 29.97

transcode v1.0.2 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

libdvdread: Using libdvdcss version 1.2.9 for DVD access

libdvdread: Can't open file VIDEO_TS.IFO.

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source film.avi (ok)

[transcode] V: import format    | MJPG RIFF data, AVI (V=ffmpeg|A=null)

[transcode] V: import frame     | 720x540  1.33:1

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 720x406 (68,0,66,0)

[transcode] V: zoom             | 720x480  1.13:1 (Lanczos3)

[transcode] V: bits/pixel       | 3421.875

[transcode] V: decoding fps,frc | 0.002,0

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import           | disabled

[transcode] A: export           | disabled

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 0 (0.000000)

[transcode] A: adjustment       | 0@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32/AMD64 accel | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using sse for memcpy

[transcode] V: video buffer     | 10 @ 720x540

[import_null.so] v0.2.0 (2002-01-19) (video) null | (audio) null

[import_ffmpeg.so] v0.1.12 (2004-05-07) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-1 :Cool:  plugin to modify framerate

[filter_modfps.so] converting from 0.0015fps to 29.9700fps

[filter_modfps.so] Error, desired output fps can not be greater

[filter_modfps.so] than twice the input fps

[transcode] warning : filter plugin 'modfps' returned error - plugin skipped

[export_null.so] v0.1.2 (2001-08-17) (video) null | (audio) null

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) FFmpeg0.4.9-pre1b4743 | (audio) MPEG/AC3/PCM

[transcode] input is mjpeg, reducing range from YUVJ420P to YUV420P

[filter.c] Filter "levels=output=16-240:pre=1" with args (levels=output=16-240:pre=1)

[filter.c] Filter "levels=output=16-240:pre=1" not loaded. Loading ...

[filter.c] Loading (levels=output=16-240:pre=1) ..

[filter_levels.so]: v1.0.0 (2004-06-09) Luminosity level scaler #0

[filter_levels.so]: scaling 0-255 gamma 1.000000 to 16-240

[filter_levels.so]: pre-processing filter

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

Segmentation fault   :Mad: 

using ffmpeg-0.4.9_p20050226-r5 and transcode-1.0.2-r2

----------

## freemymind

Hi,

Excellent tutorial! I walked thru it with no problems thank you!

----------

## Beetle B.

One suggestion to those who had it working but no longer works. If my suggestion above didn't work, did you try a revdep-rebuild?

----------

## bigbob73

 *Beetle B. wrote:*   

> One suggestion to those who had it working but no longer works. If my suggestion above didn't work, did you try a revdep-rebuild?

 

I re-installed all the apps in the tutorial.  My problem only appears when setting the aspect ratio to asr 2.  This is a new thing, so I don't know if it has to do with transcode, or the avi I'm working with.

----------

## Tomasu

I've got a slight bug report for the any2dvd component of this tut,

```
Creating Titleset 1 Chapter 1

/path/to/any2dvd: line 381: [: 2564.84: integer expression expected
```

Dies just after muxing the VOB, and (I think) while attempting to create the chapter points.

edit, I also have a question, the step it takes when given a mp4/mov file, does the video or audio get changed or reencoded in any way? I've found that mencoder and transcode support the file format, so no preprocessing really needs done as far as I can see.

----------

## mrv

Hi,

Let's assume I have to video clips encoded into right format; foo.mpg and bar.mpg. Is it possible to contruct dvdauthor.xml (the menu) so that I don't have the menu itself, but I can jump between the titles with my remote control ? If it is possible, can somebody please give me an example?

Thanks !

EDIT: Nevermind; I already found DVD Authoring Wizard (http://kde-apps.org/content/show.php?content=27528) that did the job. Great piece of software!

 -mrv-

----------

## budman8

 *budman8 wrote:*   

>  *Jenden wrote:*   
> 
> It looks like everything goes ok, but when I go to play back the video to make sure it worked I don't see any subtitle streams (I've tried both mplayer as well as gxine, and both are saying no subtitle streams).  I'm making the subtitles from .srt text subtitle files, and I know those files work correctly.  Here's the xml file I'm using for spumux:
> 
> <subpictures>
> ...

 

Trial and error shows only a few attempts and you should get it correct.

The problem is the srt files do not indicate if they are in PAL or NTSC.

I assumed PAL for the first attempt, when I saw the result with the timing of the subtitles going by at fast forward speed, 

I then tried again using 29.97.  The second time worked fine.

You don't need to make the dvd to see if the subtitles worked.  Use xine or mplayer, and load the temp_file.mpg just created after adding the subtitles.  Then do some spot checks, pick a few lines in the srt file and check the running time in the mpg file.  To see if everything is accurate.  I'm not sure how to turn on the OSD (is that name of it) to view the running time, current position - press O in mplayer, not sure in xine.

Regards,

Rich

----------

## niats

Hoping this can help those curious about making animated DVD menu's in linux.  There is a tutorial posted on gimptalk for using gimp and the gimp-gap tool to create them.  Also there is a video of an animated dvd menu created with gimp and gimp-gap here.

I know there are CLI programs out there to assist in creating animated dvd menus.  The gimp-gap tool seems to add a nice GUI addition to making these.

----------

## eleanor

I would just like to ask you guys something.

Look at this code:

```
transcode -i thx.mpg -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o thx -D0 -b224 -N 0x2000 -s2 -m thx.ac3 -J modfps=clonetype=3 --export_fps 29.97
```

That's the code that was in HOWTO at the beginning of this threat.

So I'm wondering why the hell is this taking so much time. When I do this command on my computer it takes about 8 hours to complete. Why is that so, I don't think that is normall, so I ask you how much time consuming this really is?

----------

## tld

 *Tomasu wrote:*   

> I've got a slight bug report for the any2dvd component of this tut,
> 
> ```
> Creating Titleset 1 Chapter 1
> 
> ...

 

I got the same error.  I was able to fix it with this change on that line number:

```

381c381

< if [ "`mplayer -vo dummy -identify "$1" 2>&1 | grep ID_LENGTH | cut -d= -f2`" -gt 0 ]; then   # Check if muxed audio track is longer than video stream, otherwise $prefpic will return zero causing hang

---

> if [ "`mplayer -vo dummy -identify "$1" 2>&1 | grep ID_LENGTH | cut -d= -f2 | awk -F '.' '{ print $1; exit; }'`" -gt 0 ]; then   # Check if muxed audio track is longer than video stream, otherwise $prefpic will return zero causing hang

```

I have to find time to report the bug.  mplayer's --identify is reporting the length with decimal fractions of a second and that extra awk I added trims it off.

I'm getting the same segfault in dvdauthor that qwijibow reported.  I noticed that all the mpg files that get created for the menus are zero length files.  I'm not sure what's causing that, but I think that's the problem.

Tom

----------

## niats

 *eleanor wrote:*   

> I would just like to ask you guys something.
> 
> Look at this code:
> 
> ```
> ...

 

Eleanor, I have had the same experience when transcoding a large video file.  I have a 1.8 GHz processor with 512 MB RAM, so I don't think your experience is necessarily unusual, at least not from my perspective.

----------

## neiltrodden

If anyone is interested, I have created a kommander script based on this guide to create an dvd-video iso image from an avi file.

It doesn't create a menu at all but is fully automated with progress bars updated in real-time:

http://www.kde-apps.org/content/show.php?content=36351

----------

## psutokth

 *eleanor wrote:*   

> 
> 
> So I'm wondering why the hell is this taking so much time. When I do this command on my computer it takes about 8 hours to complete. Why is that so, I don't think that is normall, so I ask you how much time consuming this really is?

 

Using the standard NTSC DVD settings and beginning with a 750MB avi that ends up as a 2.6GB DVD, the part of the process in your post takes my Athlon64 3400+ 1GB reiser4 almost 2 hours.

This file size is annoying since it is just too big to fit two on a disc, so I am trying the video bitrate options, but if i try to do that while converting the aspect ratio, such that I am using --pre_clip (after some combinations it seems that is the one that does it.) like this option:

```
transcode -i matrix.avi -y ffmpeg -F mpeg2 -Z 352x240 --export_asr 2 --encode_fields b --pre_clip=-106,0,-104,0 -o matrix -D0 -E 48000,16,2 -b 224 -N 0x2000 -s2 -m matrix.ac3 -J modfps --export_fps 25
```

(which I think should end with 29.97 since it's for NTSC) then I get:

```
[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

Segmentation fault
```

Today was my first look into DVD authoring so I really haven't any idea what I am doing beyond reading and following the guide. Without messing with the bitrate, it did work perfectly. None of the GUI tools seemed that impressive since they either have more dependencies, require you do the encoding beforehand anyway, or wouldn't even run right for me.

----------

## DAharon

I've been following this thread for quite some time.  And I have had my ups and downs with this very useful script.  

I would say that my biggest problem when encountering some error is the fact that everything is posted in this single thread.  There is no way to search for a specific problem/solution.

I would encourage anyone with a new problem to start a new thread dedicated to that specific problem, so that others might find it in a search without having to go through 26 pages of unorganized posts without any gaurantee that the subject is covered at all.

----------

## psutokth

Very true DAharon, if only the mighty Gentoo forum search that everyone commands the use of would tell you which of the 26 pages your terms were found on.

----------

## jlowe

First, thanks to shiznix for his excellent step by step tutorial.  I've been following along nicely, but I've ran into a snag when converting my dvd images to video.

Specifically, I get to this line:

convert malcolm3-1_menu_background.jpg ppm:- | ppmtoy4m -n50 -F30000:1001 -A10:11 -I p -r -S 420mpeg2 | mpeg2enc -n n -f8 -b5000 -a3 -o malcolm3-1_menu_background.m2v

When I run this line, I get this error:

```

   INFO: [ppmtoy4m] Command-line Parameters:

   INFO: [ppmtoy4m]              framerate:  30000:1001

   INFO: [ppmtoy4m]     pixel aspect ratio:  10:11

   INFO: [ppmtoy4m]          pixel packing:  RGB

   INFO: [ppmtoy4m]              interlace:  none/progressive

   INFO: [ppmtoy4m]         starting frame:  0

   INFO: [ppmtoy4m]            # of frames:  50, repeat last frame until done

   INFO: [ppmtoy4m]     chroma subsampling:  4:2:0 MPEG-2 (horiz. cositing)

   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!

   INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!

   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!

convert: no decode delegate for this image format `malcolm3-1_menu_background.png'.

**ERROR: [ppmtoy4m] Failed to read first frame.

**ERROR: [mpeg2enc] Could not read YUV4MPEG2 header: system error (failed read/write)!

```

I have imagemagick 6.2.5.5 installed.  Not sure why this is giving an error??

Any help would be appreciated.

UPDATE:

Ok.  I did not figure out why this does not work, but I did find a way around it.  When using qdvdauthor, it uses a different command to convert the images to mpg's:

```
jpeg2yuv -n 50 -I p -f 29.97 -j "~/tmp/MitM-3-1/Main Menu VMGM/background.jpg" | mpeg2enc -n n -f 8 -o "~/tmp//MitM-2-1/Main Menu VMGM/menu.m2v"
```

Perhaps this will help someone else.  I'm having another issue, but I will make a different thread about that.

----------

## r8dhex

My system specs are

Athlon 64 3000+ @2400Mhz

1GB RAM

I'm currently encoding an 98MB avi, playing time is around 30Mins (i think). I'm currently only using transcode and mplex for simplicity.

How long would this usually take?

----------

## Pumaman

Hi,

when I make a menu, it looks fine on my widescreen TV but messes up on my 4:3 TV. It seams that the buttons aren't scaled when the image is letterboxed.

To illustrate, this is what a menu might look like in widescreen, and this is what the same menu would look like letterboxed on a standard TV.

Does anyone have the same problem, and can anyone help?

My spumux xml looks like this:

```
<subpictures>

  <stream>

    <spu start="00:00:00.0" end="00:00:00.0"

         image="buttons.png"

         highlight="buttonsh.png"

         select="buttonsh.png"

         force="yes"

         autooutline="infer"

         autoorder="rows"/>

  </stream>

</subpictures>

```

and my dvdauthor xml looks like this:

```
   <menus>

      <video aspect="16:9" widescreen="nopanscan" />

      <pgc>

         <vob file="menu.mpg" pause="0" />

         <button>{jump title 1;}</button>

         <button>{jump title 2;}</button>

         <post>jump cell 1;</post>

      </pgc>

   </menus>

```

thanks

David

----------

## viperlin

hey, been trying any2dvd and with some of my avi's its perfect however on the larger ones it seems to get so far and then the audio cuts out while playing and wont play for the rest of the film, which is frankly a coaster  :Sad:  ive been making a lot of them lately all the same files, seems to be corrupted audio bits ,however the files themselves play fine or just jitter for a second, any way i can modify it to skip and carry on with the audio as normal?  :Sad: 

----------

## bigbob73

 *viperlin wrote:*   

> hey, been trying any2dvd and with some of my avi's its perfect however on the larger ones it seems to get so far and then the audio cuts out while playing and wont play for the rest of the film, which is frankly a coaster  ive been making a lot of them lately all the same files, seems to be corrupted audio bits ,however the files themselves play fine or just jitter for a second, any way i can modify it to skip and carry on with the audio as normal? 

 

don't know if this is your problem, but multimux doesn't like my files over 2 gb.  The audio never finishes encoding.  This was supposed to be fixed in .24, but i still get it.

----------

## viperlin

ah the files end up in 1GB VOB's, however i guess the first convert would be to a full movie file, it makes a sensible reason

i shall investigate futher cheers!!

----------

## skorpion.se

Hi!

Altough I have read some tutorials on the net I still not understand all of dvdauthor

My problem is that I have 1000+ mpeg's that are sorted in groups and undergroups. I would like to do a dvd out of them with the groups and undergroups. I just want the menus to be simple, just text.

So how would I create this dvd?

How do I create these menus the simpliest way? (I have everything in a mysql-db if it would help)

Example:

I have a mpeg that is called 11_22_33.mpeg

This file belongs to the group 11 and the undergroup 22

I would like my dvd to list all headgroups (like 11) If I enter the group 11, the undergroups will show (including 22 and others) If I then enter 22 the mpegs will show up (including 33) If I then enter 33 the mpeg will play.

I hope you understand.

How would a basic xml-file look like for this?

Thanks in advance

Niclas in sweden

----------

## viperlin

 *skorpion.se wrote:*   

> Hi!
> 
> Altough I have read some tutorials on the net I still not understand all of dvdauthor
> 
> My problem is that I have 1000+ mpeg's that are sorted in groups and undergroups. I would like to do a dvd out of them with the groups and undergroups. I just want the menus to be simple, just text.
> ...

 

you mean "how do i make my pr0n into DVD's keeping the same file structure" ;-D

----------

## skorpion.se

ROFLMAO

How could you guess that?  :Very Happy: 

Actually not (sorry), my mpegs are tutorials (not p0rn-tutorials, I know how to fuck  :Razz: )

They are instructions for poi and staff.

It would be more easy for me to be able to set up my laptop on the grass and switch between different tutorials with my remote at the same time I'm practising.

/niclas

----------

## viperlin

 *skorpion.se wrote:*   

> ROFLMAO
> 
> How could you guess that? 
> 
> Actually not (sorry), my mpegs are tutorials (not p0rn-tutorials, I know how to fuck )
> ...

 

dont beleive you for a second mate  :Wink: 

----------

## skorpion.se

okay

I doesnt matter if you believe me or not, do you (or someone else) know how to do what I'm asking for.

I would really appreciate it

/Niclas

----------

## Schizoid

I am trying to make a DVD out of mpeg2 files downloaded from archive.org. For example, I have downloaded Fritz Langs "M" (http://www.archive.org/details/M_) in mpeg2 format.

patrick@Kawaii64 $ file M_.mpeg 

M_.mpeg: MPEG sequence, v2, program multiplex

As far as I know this is already in the proper format for a dvd, correct? I tried to make a very simple dvdauthor.xml file:

```

<dvdauthor dest="DVD"> 

  <vmgm /> 

   <titleset> 

     <titles> 

       <pgc> 

         <vob file="M_.mpeg" chapters="0,5:00,10:00,15:00,20:00,25:00,30:00,35:00,40:00,45:00,50:00,55:00,60:00,65:00,70:00,75:00,80:00,85:00,90:00,95:00,100:00,105:00"/> 

       </pgc>

     </titles> 

   </titleset> 

 </dvdauthor>

```

This does not work:

```

patrick@BentoBox $ dvdauthor -x dvdauthor.xml

DVDAuthor::dvdauthor, version 0.6.11.

Build options: gnugetopt magick iconv freetype

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=en_US.utf8

INFO: Converting filenames to UTF-8

INFO: dvdauthor creating VTS

STAT: Picking VTS 01

STAT: Processing M_.mpeg...

WARN: Skipping sector, waiting for first VOBU...

WARN: Skipping sector, waiting for first VOBU...

WARN: Skipping sector, waiting for first VOBU...

```

That WARN line continues forever until you kill the process.

I must be missing a step here? Thank you for any help.

----------

## -=GGW=- $ol!d $n4>|e

I'm using any 2 dvd and it keeps failing on making dvd file structure

----------

## gessy

Hi 

I made one download of a movie and it he came in the following format:

VIDEO_TS/

16K     VIDEO_TS.BUP

16K     VIDEO_TS.IFO

250M    VIDEO_TS.VOB

80K     VTS_01_0.BUP

80K     VTS_01_0.IFO

748K    VTS_01_0.VOB

1,0G    VTS_01_1.VOB

1,0G    VTS_01_2.VOB

1,0G    VTS_01_3.VOB

1,0G    VTS_01_4.VOB

42M     VTS_01_5.VOB

And i would add one more subtitle and i don't know how, anyone knows?

----------

## theg33kb0y

I have a strange problem after using any2dvd.  It creates a DVD tree which is compatible with xine and plays fine in Linux.  The strange part is that it does not play in a conventional DVD player (I've tried two).  I have also tried DVD+R and DVD-R but both give "Unrecognized Disk" or similar error by the player.

My process is like so:

any2dvd --workdir="$movie".d --surround=yes  -i "$movie"

where $movie is something like foo.avi.  

To burn a DVD, I do

   growisofs -Z /dev/dvd -dvd-video DVD/ 

ffmpeg -i of the VOB's is below.  

Any ideas?  I don't even know where to start troubleshooting!  Thank you for your help!

-geek

```

# for i in VIDEO_TS/*.VOB; do /usr/local/ffmpeg/bin/ffmpeg -i $i ;done

FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr/local/ffmpeg

  libavutil version: 49.0.0

  libavcodec version: 51.9.0

  libavformat version: 50.4.0

  built on May 30 2006 23:37:42, gcc: 4.0.2 20051125 (Red Hat 4.0.2-8)

Input #0, mpeg, from 'VIDEO_TS/VIDEO_TS.VOB':

  Duration: 00:00:04.9, start: 0.184656, bitrate: 341 kb/s

  Stream #0.0[0x1e0], 25.00 fps(r): Video: mpeg2video, yuv420p, 720x576, 7500 kb/s

  Stream #0.1[0x20]: Subtitle: dvdsub

  Stream #0.2[0x80]: Audio: 0x0000, 48000 Hz, stereo, 224 kb/s

Must supply at least one output file

FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr/local/ffmpeg

  libavutil version: 49.0.0

  libavcodec version: 51.9.0

  libavformat version: 50.4.0

  built on May 30 2006 23:37:42, gcc: 4.0.2 20051125 (Red Hat 4.0.2-8)

Input #0, mpeg, from 'VIDEO_TS/VTS_01_0.VOB':

  Duration: 00:00:04.9, start: 0.184656, bitrate: 1381 kb/s

  Stream #0.0[0x1e0], 25.00 fps(r): Video: mpeg2video, yuv420p, 720x576, 7500 kb/s

  Stream #0.1[0x20]: Subtitle: dvdsub

  Stream #0.2[0x80]: Audio: 0x0000, 48000 Hz, stereo, 224 kb/s

Must supply at least one output file

FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr/local/ffmpeg

  libavutil version: 49.0.0

  libavcodec version: 51.9.0

  libavformat version: 50.4.0

  built on May 30 2006 23:37:42, gcc: 4.0.2 20051125 (Red Hat 4.0.2-8)

Input #0, mpeg, from 'VIDEO_TS/VTS_01_1.VOB':

  Duration: 00:55:32.3, start: 0.184656, bitrate: 2577 kb/s

  Stream #0.0[0x1e0], 25.00 fps(r): Video: mpeg2video, yuv420p, 720x576, 7000 kb/s

  Stream #0.1[0x80]: Audio: 0x0000, 48000 Hz, 5:1, 384 kb/s

Must supply at least one output file

FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr/local/ffmpeg

  libavutil version: 49.0.0

  libavcodec version: 51.9.0

  libavformat version: 50.4.0

  built on May 30 2006 23:37:42, gcc: 4.0.2 20051125 (Red Hat 4.0.2-8)

Input #0, mpeg, from 'VIDEO_TS/VTS_01_2.VOB':

  Duration: 00:50:16.6, start: 3332.344656, bitrate: 2847 kb/s

  Stream #0.0[0x1e0], 25.00 fps(r): Video: mpeg2video, yuv420p, 720x576, 7000 kb/s

  Stream #0.1[0x80]: Audio: 0x0000, 48000 Hz, 5:1, 384 kb/s

Must supply at least one output file

FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard

  configuration:  --prefix=/usr/local/ffmpeg

  libavutil version: 49.0.0

  libavcodec version: 51.9.0

  libavformat version: 50.4.0

  built on May 30 2006 23:37:42, gcc: 4.0.2 20051125 (Red Hat 4.0.2-8)

Input #0, mpeg, from 'VIDEO_TS/VTS_01_3.VOB':

  Duration: 00:06:14.3, start: 6349.048656, bitrate: 4938 kb/s

  Stream #0.0[0x1e0], 25.00 fps(r): Video: mpeg2video, yuv420p, 720x576, 7000 kb/s

  Stream #0.1[0x80]: Audio: 0x0000, 48000 Hz, 5:1, 384 kb/s

Must supply at least one output file

```

----------

## yabbadabbadont

Does it help any if you use this instead?

growisofs -dvd-compat -Z /dev/dvd -dvd-video DVD/

----------

## theg33kb0y

Nope.  The dvd player said "Incorrect Disc".  I can only assume it is confused about the format, but it doesn't give a very good idea of how it is confused!  What else might I try?

----------

## theg33kb0y

Does this give any hint?  This is the vlc output when playing directly from the disc.   I tried ripping the VIDEO_TS directory from one of my dvds and reburn it with growisofs, which it did.  It even played properly in the TV dvd (except that it was scrabled probably due to css) but it was definately more functional than giving "invalid disc".  So it must be something in my transcoding process or dvd authoring.  Any idea where to start to verify that my transcode is setup properly for dvd playback?

-geek

```

[eric@localhost ~]$ vlc dvd:///dev/dvd

VLC media player 0.8.4a Janus

libdvdnav: Using dvdnav version 0.1.10 from http://dvd.sf.net

libdvdread: Using libdvdcss version 1.2.9 for DVD access

libdvdnav: DVD Title: CDROM

libdvdnav: DVD Serial Number: 447E906800000000

libdvdnav: DVD Title (Alternative):

libdvdnav: Unable to find map file '/home/eric/.dvdnav/CDROM.map'

libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8

libdvdread: Attempting to retrieve all CSS keys

libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x0000011d

libdvdread: Elapsed time 0

libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x00000196

libdvdread: Elapsed time 0

libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00000202

libdvdread: Elapsed time 0

libdvdread: Found 1 VTS's

libdvdread: Elapsed time 0

[00000316] a52 decoder: A/52 channels:2 samplerate:48000 bitrate:224000

No accelerated IMDCT transform found

[00000329] freetype private error: failed to load font file /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf

[00000342] a52 decoder: A/52 channels:2 samplerate:48000 bitrate:384000

No accelerated IMDCT transform found

[00000268] main playlist: stopping playback

```

----------

## yabbadabbadont

What version of dvd+rw-tools are you using?  I've read other posts that suggest downgrading to dvd+rw-tools-5.21.4.10.8.  You might give that a try.

----------

## Schizoid

 *Schizoid wrote:*   

> I am trying to make a DVD out of mpeg2 files downloaded from archive.org. For example, I have downloaded Fritz Langs "M" (http://www.archive.org/details/M_) in mpeg2 format.
> 
> I must be missing a step here? Thank you for any help.

 

I figured out the solution to my own problem here....

```

mplayer input.mpeg -dumpstream -dumpfile /dev/stdout | tcextract -t vob -a 0 -x mpeg2 > output.video

mplayer input.mpeg -dumpaudio -dumpfile output.audio

mplex -f 8 -V -o complete.vob output.video output.audio

dvdauthor -x dvdauthor.xml

```

----------

## Pasha

Does anyone know whether it is possible to make use of the input from the remote control in the DVD menus, using dvdauthor?

Normally I convert AVIs to MPEG2, using my own script, then design the background for the DVD menu in the GIMP, finally using dvdstyler to add buttons.

Now the situation is as follows: I would like to make a button, which would lead to a screen, where a user needs to enter a code (say, 4 pre-defined numbers) using a remote control. The title only plays if the code entered is correct - does anyone have an idea how I should approach that? 

P.S. About a year ago I used DSA Roadsense DVD to prepare for the UK Driving Hazard Perception Test - I remember there being something like that.

----------

## Decibels

Great tutorial! Thanks!

Finally got a working menu that waits until I press enter or play and starts the video. Only have one Button (ie PLAY)

Everything works except the button colors, they aren't what I used.  

Breakdown:

Menu Breakdown what colors,...

1) Used a background.jpg (Blue background) converted to mpg (menu.mpg) that had Big Title and Chapter listing. 

    Also put with White letters PLAY on the background that converted to menu.mpg

    image.png (transparnent background White letters for word PLAY)

    select.png  (transparnent background Red letters for word PLAY)

    highlight.png (transparnent background Yellow letters for word PLAY )

    The PLAY button in different colors overlaid on each other in each layer so no offset.

    Don't have a box around the letters PLAY, used x0,y0,x1,y1 for location)

    Used the Gimp plugin for dvdauthor.

    The image, select and highlight were converted to index palette. Earlier I had several colors, but just used one

    this time, so one color each and the transparent background.

2) The spumux .xml file used: (this .xml doesn't show image.png cause wanted to see if creating a blank one made a diff and it didn't)

```
<subpictures>

  <stream>

    <spu

     force="yes"

     start="00:00:00.00"

     select="menu_select_bl.png"

     highlight="menu_highlight_bl.png">

      <button name="Play" x0="510" y0="352" x1="634" y1="393"/>

    </spu>

  </stream>

</subpictures>
```

3) Output looks fine (my first working menu though):

```
decibels walmart # spumux menu.xml < menu.mpg> menu_final.mpg

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: Picture menu_highlight_bl.png had 2 colors

INFO: Picture menu_select_bl.png had 2 colors

INFO: Constructing blank img

INFO: Pickbuttongroups, success with 1 groups, useimg=1

INFO: Found EOF in .sub file.

INFO: Max_sub_size=392

WARN:  Read 0, expected 4

INFO: 1 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18

Statistics:

- Processed 0 subtitles.

- The longest display line had -1 characters.

- The maximum number of displayed lines was 0.

- The normal display height of the font arial.ttf was 0.

- The bottom display height of the font arial.ttf was 0.

- The biggest subtitle box had 392 bytes.

```

Playing finished dvd

In Xine or Ogle or standalone player:

1) Works and see the title and chapter names, but the PLAY button is YELLOW. It should be WHITE. So it is showing my Highlight image button? Why???

2) When click on it or press Play, the PLAY button turns BLACK. It works and starts the movie, but the PLAY button should have turned RED. Why didn't it???

3) If Play the video_ts.vob file with gxine or ogle the PLAY button is WHITE. 

I tried putting them all back in gimp and using the difference mode, but never got a Black PLAY or don't know why the Yellow Highlight PLAY button is showing up when start the dvd. I even used spuunmux to extract it and the resulting png's are what suppose to be.

(Maybe since it is the only button, it shows the highlighted button? That still don't explain it being Black when select it).

PS. Search this entire thread and saw cayenne from 2004 asked something similar, never got an answer. Hopefully someone know something and that post just got lost in other posts.

----------

## DetectiveInspekta

Trying to put two different files on with different aspect ratios

```

<dvdauthor dest="DVD">

  <vmgm />

   <titleset>

     <titles>

       <video widescreen="nopanscan" aspect="16:9" />

          <pgc>

         <vob file="14.mpeg2" />

          </pgc>

     </titles>

   </titleset>

   <titleset>   

     <titles>

   <video widescreen="noletterbox" aspect="4:3" />

   <pgc>

    <vob file="test.mpeg2"/>

   </pgc>

     </titles>

   </titleset>

   <titleset>

     <titles>

   <video widescreen="nopanscan" aspect="16:9" />

   <pgc>

    <vob file="10.mpeg2"/>

   </pgc>

     </titles>

   </titleset>

 </dvdauthor> 

```

this goes through dvdauthor fine, I make the dvdfs and then try to play it. 

Whats wrong?

DVD vid 1

```

VDec: vo config request - 352 x 576 (preferred colorspace: Planar YV12)

VDec: using Planar YV12 as output csp (no 0)

Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.

VO: [xv] 352x576 => 1024x576 Planar YV12

```

DVD vid 2

```

VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)

VDec: using Planar YV12 as output csp (no 0)

Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.

VO: [xv] 720x576 => 768x576 Planar YV12

```

----------

## khiraly

 *gessy wrote:*   

> Hi 
> 
> I made one download of a movie and it he came in the following format:
> 
> VIDEO_TS/
> ...

 

I have exactly the same problem.

I have an *original* DVD video which I have buyed in Netherlands, and I want to add hungarian subtitle to enjoy my family.

All the tutorial what I have readed create a .mpg file and *after* create the menu and the dvd structure.

I didnt found any tutorial to add subtitle an already created dvd structure.

My DVD structure is pretty the same.

Can somebody help to gessy? :Wink: 

----------

## Decibels

Well, guess no one has an answer to my post. 

I did find out one thing. Ogle doesn't necessarily display the correct button colors. I use yellow (highlight) and red (select) this time.

Ogle showed them as yellow and black. Got tired of trying to fix it, so burnt the dvd, put it in the player and it is correct: yellow/red.

So if your trying to get your buttons working with certain colors, you can't rely on Ogle to display them correctly.

----------

## vbmaster

Package dvd+rw-tools is needed, but I can't find it in portage....  :Sad: 

Where is that? It's really important to the convertion process?

----------

## yabbadabbadont

I still see it listed in portage.

Both on the website: http://packages.gentoo.org/search/?sstring=dvd

And in my portage tree:

```
/home/bubba $ emerge -pv dvd+rw-tools 

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] app-cdr/dvd+rw-tools-6.1-r1  118 kB 

```

It isn't available for all architectures though.  Check the website link for currently supported arches and versions.

----------

## vbmaster

Altight, but till now I didn't need that package.

At this moment i'm trying to add the subtitle to the mpg file, but spumux command gives me this output:

 *Quote:*   

> 
> 
> INFO: Locale=C
> 
> INFO: Converting filenames to ANSI_X3.4-1968
> ...

 

And I have both subtitle.xml and Vera.ttf on my home directory.

EDIT: Oh, foget it... it was a problem between the chair and the keyboard...

----------

## dinsmore

Hi there,  I just bought a new computer with a dvd-rw drive, and wanted to make dvd's from my avi files...  But I'm getting a problem when transcoding the movie...  It says something about a buffer underflow and a broken pipe :S   any ideas?

Here's the output:

```

$ transcode -i Igby.Goes.Down.XviD.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o Igby_Goes_Down -D0 -b224 -N 0x2000 -s2 -m Igby_Goes_Down.ac3 -J modfps=clonetype=3 --export_fps 29.97

transcode v1.0.2 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

(dvd_reader.c) no support for DVD reading configured - exit.

[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV 0 ms | 0 ms

[transcode] auto-probing source Igby.Goes.Down.XviD.avi (ok)

[transcode] V: import format    | XviD RIFF data, AVI (V=ffmpeg|A=mp3)

[transcode] V: import frame     | 640x272  2.35:1  

XXX: zoom=yes pre_clip=yes

[transcode] V: pre clip frame   | 640x382 (-56,0,-54,0)

[transcode] V: zoom             | 720x480  2.11:1 (Lanczos3)

[transcode] V: bits/pixel       | 0.217

[transcode] V: decoding fps,frc | 23.976,1

[transcode] V: Y'CbCr           | YV12/I420

[transcode] A: import format    | 0x55    MPEG layer-3 [32000,16,2]   97 kbps

[transcode] A: export format    | 0x2000  AC3          [32000,16,2]  224 kbps

[transcode] V: encoding fps,frc | 29.970,4

[transcode] A: bytes per frame  | 4272 (4270.933333)

[transcode] A: adjustment       | -1064@1000

[transcode] A: rescale stream   | 2.000

[transcode] V: IA32/AMD64 accel | sse2 (sse2 sse mmxext mmx asm C)

tc_memcpy: using sse for memcpy

[transcode] V: video buffer     | 10 @ 720x480

[import_mp3.so] v0.1.4 (2003-08-04) (audio) MPEG

[import_ffmpeg.so] v0.1.12 (2004-05-07) (video) ffmpeg: MS MPEG4v1-3/MPEG4/MJPEG

[filter_modfps.so] v0.10 (2003-08-18) plugin to modify framerate

[filter_modfps.so] converting from 23.9760fps to 29.9700fps

[export_ffmpeg.so] v0.3.13 (2004-08-03) (video) Lavc51.0.0 | (audio) MPEG/AC3/PCM

[import_mp3.so] MP3->PCM

[import_mp3.so] tcextract -a 0 -i "Igby.Goes.Down.XviD.avi" -x mp3 -d 0 | tcdecode -x mp3 -d 0 -z 32000

tc_memcpy: using sse for memcpy

[export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video).

[export_ffmpeg.so]: INFO: Selected dvd profile, ntsc video type for video

[export_ffmpeg.so]: INFO: Set interlacing to bottom-first

[export_ffmpeg.so]: INFO: Set frame rate to 29.97

[export_ffmpeg.so]: INFO: Set video bitrate to 5000

[export_ffmpeg.so]: INFO: Set GOP size to 18

[export_ffmpeg.so] Neither './ffmpeg.cfg' nor '~/.transcode/ffmpeg.cfg'

[export_ffmpeg.so] found. Default settings will be used instead.

[export_ffmpeg.so]: INFO: Starting 1 thread(s)

[export_ffmpeg.so]: INFO: Display aspect ratio calculated as 1.777778

[export_ffmpeg.so]: INFO: Sample aspect ratio calculated as 1.185185

[export_ffmpeg.so]: INFO: Selected dvd profile for audio

[export_ffmpeg.so]: INFO: Resampling filter inactive

[export_ffmpeg.so]: INFO: Set number of audio channels to 2

[export_ffmpeg.so]: INFO: Set number of audio bits to 16

[export_ffmpeg.so]: WARNING: Set audio sample rate to 48000 Hz, input rate is 32000 Hz

[export_ffmpeg.so]: WARNING:    loading resample plugin

[filter.c] Filter "resample" with args (resample)

[filter.c] Filter "resample" not loaded. Loading ...

[filter.c] Loading (resample) ..

[filter_resample.so] v0.1.4 (2003-08-22) audio resampling filter plugin

[filter_resample.so] options=(null)

[mpeg2video @ 0xb5809ea4]rc buffer underflow

sh: line 1:  7236 Broken pipe             tcextract -a 0 -i "Igby.Goes.Down.XviD.avi" -x mp3 -d 0

      7237                       | tcdecode -x mp3 -d 0 -z 32000

Segmentation fault

```

I read something about tracking down the problem, but I don't know how :S

dinsmore

----------

## vbmaster

I would say that you don't have the ffmpeg package....

----------

## dinsmore

Ahmm, I do have the ffmpeg v. 0.4.9_p20051216 package installed, but maybe I need to emerge another package (transcode) with some ffmpeg use flag or to add support to it? :S

----------

## vbmaster

I emerged it normally and it was fine... :\

----------

## dinsmore

I tried with tovid, which doesn't use ffmpeg as default (really slower too :S), and it worked fine, so then it must be the ffmpeg...  I'll try re-emerging and see what happens...

----------

## drfresh

Sorry to ask. But I can't figure it out...

I have the tools on windows and some program should have created the DVD using these tools but didn't do it right. What I have is:

title1.m2v

title2.ac3

directory with subpictures including a subtitle.xml file.

The program generated a author.xml file that seems corrupt. It looks like:

```
<dvdauthor dest="E:\OUT\MyMovie\DVD\">

  <vmgm />

```

I have the following list of programs in the program directory, that I probably need:

dvdauthor.exe

mkisofs.exe

mplex.exe

spumux.exeand then what must be the cygwin environment.

Can someone help me please? I'm ready to be flamed with RTFM and "Use Linux" type of comments...

Thanks in advance for anyone taking this serious.

Dr. Fresh

----------

## dinsmore

Have you tried editing the xml file so that it looks similar to the one posted  in this thread?  I'm just thinking outloud anyway, but I don't think it will do no harm to try...  :P

----------

## drfresh

Nope - I need to know how to handle the subtitles. I don't quite know the steps? Can you perhaps point to where that's described? On the first post in this intire thread I can't quite find it except for handling srt subs. But I have them as .png files, with an XML that looks like this:

```
- <subpictures>

- <stream>

  <spu start="00:00:07.88" end="00:00:08.40" image="E:\OUT\MyMovie\Title_1_Subtitle_0x23_DA\1.png" transparent="FF0000" force="no" /> 

  <spu start="00:01:42.12" end="00:01:44.60" image="E:\OUT\MyMovie\Title_1_Subtitle_0x23_DA\2.png" transparent="FF0000" force="no" /> 

  <spu start="00:01:45.04" end="00:01:47.12" image="E:\OUT\MyMovie\Title_1_Subtitle_0x23_DA\3.png" transparent="FF0000" force="no" />
```

----------

## rodoval

Hello all and thanks for the guide of the first post of the thread! But... I can't change the subtitle colors using "palette" as described in dvdauthor config file. I've applied the patch but the text is always yellow (not gray) with black (or dark) border. The only change is that the program not stop with error message, but the palette.rgb file is ignored! ¿Any help with this?

Greetings to the Gentoo community!

rodoval

----------

## rodoval

[quote="rodoval"]Hello all and thanks for the guide of the first post of the thread! But... I can't change the subtitle colors using "palette" as described in dvdauthor config file. I've applied the patch but the text is always yellow (not gray) with black (or dark) border. The only change is that the program not stop with error message, but the palette.rgb file is ignored! ¿Any help with this?

[/quote]

It works fine now! I can't identify my fail, maybe related to Xine which I have using for testing.

Best regards,

rodoval

----------

## shiznix

 *dinsmore wrote:*   

> Hi there,  I just bought a new computer with a dvd-rw drive, and wanted to make dvd's from my avi files...  But I'm getting a problem when transcoding the movie...  It says something about a buffer underflow and a broken pipe :S   any ideas?
> 
> Here's the output:
> 
> ```
> ...

 

Hi Dinsmore,

           The problem lies with Transcode's filter_resample.so plugin.

'--export_prof' invokes the resample plugin automatically if the audio stream's sample rate is not equal to 48000Hz.

This is normal enough, but if the audio stream is not absolutely perfect and contains even the most minor glitch, it will segfault in this way.

Here's a workaround:

You can either run the file through Mencoder first, using the relevant line listed in the guide under the heading 'File types other than AVI or MPEG', or you can do the following ....

```
transcode -i Igby.Goes.Down.XviD.avi -y ffmpeg -F mpeg2 -Z 720x480 --export_asr 3 --pre_clip=no -j -56,0,-54,0 -o Igby_Goes_Down -D0 -b224 -N 0x2000 -s2 -m Igby_Goes_Down.ac3 -J modfps=clonetype=3 --export_fps 29.97

ffmpeg -i Igby_Goes_Down.ac3 -ab 224 -ar 48000 Igby_Goes_Down_new.ac3
```

As a side note, you are converting from 23.976fps source to 29.97fps. Might I suggest you use '--pulldown' instead of '-J modfps=clonetype=3 --export_fps 29.97' to achieve the same conversion. This will give you a much smoother video, especially noticeable in panning/zooming.

'--pulldown' will not work with '-y ffmpeg', only '-y mpeg2enc', slightly slower than ffmpeg, but result is worth it.

Like this:

```
transcode -i Igby.Goes.Down.XviD.avi -y mpeg2enc,ffmpeg -F8,-I0 --pulldown -Z 720x480 --export_asr 3 --pre_clip=no -j -56,0,-54,0 -o Igby_Goes_Down -D0 -b224 -N 0x2000 -s2 -m Igby_Goes_Down.ac3
```

Cheers,

Shiznix  :Very Happy: 

----------

## Mirrorball

Thanks for helping me make my first DVD ever. It came out great. I just think the suggested font-size for subtitles was too small. I had to squeeze my eyes to read them (but then I was not wearing glasses).

----------

## gessy

Hi,

Is there a way to use dvdauthor to create a dvd of a movie that shows two subtitles at the same time (one on top and another on bottom), once it doesn't have full support for ass subtitles?

DVDauthor man page:

 *Quote:*   

> 
> 
>        subtitle (s2, rw)
> 
>               The subtitle track, ranging from 0-31.  If you want the subtitle
> ...

 

See that Simply  selecting the track (0-31) means that only the

              forced subtitles will be displayed, whereas enabling  the  track

              (64-95)  means  that  all the subtitles will be displayed.  This

              allows you to have forced subtitles only for the  parts  of  the

              movie  where  the  actors are speaking a foreign (to the viewer)

              language, but  still  have  normal  subtitles  for  the  hearing

              impaired

But i don't understanding how it works, someone had already done it?

thanks a lot!Last edited by gessy on Mon Aug 21, 2006 9:17 pm; edited 2 times in total

----------

## gessy

 *khiraly wrote:*   

>  *gessy wrote:*   Hi 
> 
> I made one download of a movie and it he came in the following format:
> 
> VIDEO_TS/
> ...

 

Well, reading a web documentation, i found a topic called "DVD9 to DVD5 guide"http://www.linuxquestions.org/questions/showthread.php?s=&threadid=244913.

Using transcode package (mainly tcextract)  is possibles extract the streams. This how to explain verywell 

p.s. the step 4 on the How to is only necessary if you work with dvd9.

p.p.s I don't know why, but this method doesn't work for some audio format like dts.

----------

## thebiggiantmouse

this is great. this thread is about two years old and its still really relevant. this has saved me a lot of searching. is there an update to this?

----------

## tkhobbes

Hello, I followed all the steps, and I have a DVD image now. It is playing perfectly with xine.

However, when issueing the growisofs command, I get this error:

```
Executing 'mkisofs -dvd-video dvd/ | builtin_dd of=/dev/hdd obs=32k seek=0'

mkisofs: Unable to make a DVD-Video image.

:-( write failed: Input/output error

```

What could that be? I tried to burn the DVD with k3b, but it won't work in my DVD player, this way...

I am using dvd+rw-tools version 6.1-r1

EDIT: Found the problem - the dvd image apparently must not reside on a FAT32 partition. I recreated it on an ext3 disk and now it works.

thomas

----------

## vectorsigma

I'm having the exact problem as the person below but there doesn't seem to be a reply.  Anyone know how to fix it?  I've tried everything I can think of.

 *Pumaman wrote:*   

> Hi,
> 
> when I make a menu, it looks fine on my widescreen TV but messes up on my 4:3 TV. It seams that the buttons aren't scaled when the image is letterboxed.
> 
> To illustrate, this is what a menu might look like in widescreen, and this is what the same menu would look like letterboxed on a standard TV.
> ...

 

----------

## vectorsigma

I found a couple of solutions to the above problem.

The first I tried was to have 2 versions of the menu VOB, one for 16:9 and another for 4:3, both with the exact same mpeg but mplexed with different highlight and select images.  The 4:3 images were scaled down to 720x405 (make sure not to use antialiasing, it will create more than 4 colours) then the canvas size increased back to 720x576.  I then added some code to select which menu to use based on the dvd player's settings (widescreen or letterbox):

```

<pre> g7=s14; g7=g7 and 768; if (g7 eq 512) jump menu 2; </pre>

```

This works but it's a bit silly to have 2 copies of the one menu when DVD players support multiple subpicture streams in the same VOB.

The best solution is to use the latest CVS version of dvdauthor.  It has a new feature that lets you select a subpicture stream for the menu.  So you would still create 2 versions of the highlight and select images as I described above but they would all be mplexed into the one image, like so:

```

spumux -s 0 menu169.xml < menu.vob | spumux -s 1 menu43.xml > menu.vob

```

So the 16:9 subpicture stream has id 0 and 4:3 has id 1.

Then all you need to do is list the subpicture steams for the menu in the dvdauthor XML file. e.g:

```

 <menus>

   <video widescreen="nopanscan" format="pal" aspect="16:9" />

   <subpicture>

     <stream id="0" mode="widescreen" />

     <stream id="1" mode="letterbox" />

   </subpicture>

   <pgc>

etc.

```

I found the solution on the dvdauthor mailing list, more info can be seen here:

http://sourceforge.net/mailarchive/message.php?msg_id=11833372

----------

## rekonrad

I've followed the instructions on this thread with the exception of encoding.  For this I've been using Tovid.. Because I've had difficulty following the instructions regarding making menus with gimp (I think the new version of gimp must be quite different than the one in 2003 - date of this thread).

In any case I'm quite happy authoring with no menus.  I've used the sample DVD.xml without menus in this thread successfully but now suddenly my final product will only read the first track (mpg).  I have 12 separate titles but only the first is read.  I thought at first it was my standalone DVD player but xine confirms that only the track 1 will play.

Here is my xml file:

<dvdauthor dest="DVD">

<vmgm />

<titleset>

  <titles>

<video widescreen="nopanscan" />    

<pgc>

      <vob file="1.mpg"  />

    </pgc>

<pgc>

      <vob file="2.mpg"  />

    </pgc>

<pgc>

      <vob file="3.mpg"  />

    </pgc>

<pgc>

      <vob file="4.mpg"  />

    </pgc>

<pgc>

      <vob file="5.mpg"  />

    </pgc>

<pgc>

      <vob file="6.mpg"  />

    </pgc>

<pgc>

      <vob file="11.mpg"  />

    </pgc>

<pgc>

      <vob file="22.mpg"  />

    </pgc>

<pgc>

      <vob file="33.mpg"  />

    </pgc>

<pgc>

      <vob file="44.mpg"  />

    </pgc>

<pgc>

      <vob file="55.mpg"  />

    </pgc>

<pgc>

      <vob file="66.mpg"  />

    </pgc>

  </titles>

</titleset>

</dvdauthor>

During "dvdauthor -x DVD.xml" it shows all 12 tracks/titles being processed.

Any thoughts?  Thanks in advance.

Richard

----------

## gkmac

 *rekonrad wrote:*   

> I've used the sample DVD.xml without menus in this thread successfully but now suddenly my final product will only read the first track (mpg).  I have 12 separate titles but only the first is read.  I thought at first it was my standalone DVD player but xine confirms that only the track 1 will play.
> 
> Any thoughts?  Thanks in advance.

 You mean it pauses at the end of title 1? That seems to be the default behaviour after a title plays.

If you just want to let each title play one by one, you need to put a <post> command at the end of each pgc to make it jump to the next title. So the first few pgcs of your xml file go something like this; I've made the additional lines in bold...

<pgc>

<vob file="1.mpg"  />

<post>jump title 2 chapter 1;</post>

</pgc>

<pgc>

<vob file="2.mpg"  />

<post>jump title 3 chapter 1;</post>

</pgc>

<pgc>

<vob file="3.mpg"  />

<post>jump title 4 chapter 1;</post>

</pgc>

Of course, what to do after the last one? Leaving it as it is will pause it, but I prefer to make the player stop completely, which you can do like this...

<pgc>

<vob file="66.mpg" />

<post>exit;</post>

</pgc>

----------

## evoweiss

Hi all,

I'm trying to convert something from an old VHS tape (somebody else converted it into an avi file) into a DVD. The original video was 4:3 and running the film through mplayer gives me the output below. When I go through the steps of creating the DVD (including specifying the right ar in transcode), all seems to work out. However, I cannot seem to get a 4:3 version or something approaching that as the final project. Any tips?

Best,

Alex

```

AVI file format detected.

VIDEO:  [DX50]  576x304  24bpp  29.970 fps  780.0 kbps (95.2 kbyte/s)

==========================================================================

Opening audio decoder: [mp3lib] MPEG layer-2, layer-3

AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)

Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

==========================================================================

==========================================================================

Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family

Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)

==========================================================================

alsa-init: using device default

alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian

AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

Starting playback...

VDec: vo config request - 576 x 304 (preferred colorspace: Planar YV12)

VDec: using Planar YV12 as output csp (no 0)

Movie-Aspect is 1.89:1 - prescaling to correct movie aspect.

VO: [xv] 576x304 => 576x304 Planar YV12

alsa-uninit: pcm closed-0.011 ct:  0.053  56/ 56  7%  4%  2.8% 1 0

Exiting... (Quit)

```

----------

## csab

Hi,

I've used this tutorial for while but now I encountered the first problem. In the "tweakage" part, the following command line is given:

 *Quote:*   

> transcode -i matrix.avi -y ffmpeg -F mpeg2 -Z 352x240 --export_asr 2 --encode_fields b -o matrix -D0 -E 48000,16,2 -b 224 -N 0x2000 -s2 -m matrix.ac3 -J modfps --export_fps 29.97

 

I let my computer run overnight on a few AVI files with this command line, and in the morning, I was shocked to see that audio in the resulting ac3's were *not* resampled from 44100 Hz to 48000 Hz. I guess the parameter -J resample would be necessary (I tried and it worked.) So is there any reason that it is not included in the tutorial? Maybe it used to work like this?

The man page says that you need -J resample if the audio export module cannot resample. I'm pretty sure that ffmpeg is able to resample. Maybe the resampling routine is never invoked from transcode?

Also: why on Earth does each command line in the tutorial includes the "-s2" option? When I was a beginner and believed it was necessary (or at least it didn't hurt), I encoded a video once, in which the original audio was quite loud and the additional gain caused distortion. Since then, I always leave that option out and I never had a problem with too quiet material. If it's fine on your coputer, it is going to be fine on your TV, too.

----------

## Beetle B.

 *Quote:*   

> Can you (or anyone else) confirm for sure that this fixes the NTSC overscan problem ? 

 

The widescreen="nopanscan" option did not fix it for me. I export to 4:3 (I don't have a widescreen TV). NTSC, of course. 

Shiznix, it would be awesome if you could release a new version that allows me to use the -j -18,-34,-22,-34 option.

----------

## Floppie

I didn't bother to go through all 28 pages, so I don't know if someone else already posted one, but here's a shell script that will go through an entire folder of .avi files and encode them to DVD-compliant MPEGs, cleaning up the .ac3 and .m2v files along the way.  Right now it only does 4:3 aspect ratio and NTSC encoding, but I can just as easily add support for options.  Just run it inside whatever directory your .avis are in, or provide it with that directory via command line argument.

http://www.quadra-tec.net/~floppie/prog/unix/avi2dvdmpg.bashLast edited by Floppie on Sun Nov 04, 2007 2:41 pm; edited 1 time in total

----------

## Beetle B.

Thanks - but there already is a more comprehensive script. See the very first post.

----------

## makwak

Hallo Shiznix and all forum readers.

First of all thank You for this excellent HOWTO. This is really valuable, gives many good hints and reveals severity of tools available for linux.

All of the steps worked for me, but adding subtitiles.

what I did:

prompt$ cat ./sub.xml

<subpictures>

  <stream>

    <textsub filename="sub.srt" characterset="ISO8859-1"

	     fontsize="28.0" font="Vera.ttf" horizontal-alignment="left"

	     vertical-alignment="bottom" left-margin="60" right-margin="60"

	     top-margin="20" bottom-margin="30" subtitle-fps="25"

	     movie-fps="25" movie-width="720" movie-height="574"

	     />

  </stream>

</subpictures>

prompt$ ls -l ~/.spumux

total 76

-rw-r--r-- 1 user user 65932 Dec 10  2005 Vera.ttf

prompt$ cat ./sub.srt

1

00:00:02,700 --> 00:00:03,736

this is my first subtitle.

# input.mpg is 10 seconds long.

prompt$ spumux -v3 -s0 ./sub.xml < input.mpg > ../OUTPUT/with.subs.mpg

DVDAuthor::spumux, version 0.6.11.

Build options: gnugetopt iconv

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=en_US.UTF-8

INFO: Converting filenames to UTF-8

INFO: Detected subtitle file format: subviewer

INFO: Opened iconv descriptor. *UTF-8* *ISO8859-1*

INFO: Read 1 subtitles

INFO: After read_bmp(): xd=720 yd=574 x0=0 y0=0

INFO: Found EOF in .sub file.

INFO: Subtitle inserted at: 2.884656 sd=1

WARN:  Read 0, expected 4

INFO: 1 subtitles added, 0 subtitles skipped, stream: 32, offset: 0.18

Statistics:

- Processed 1 subtitles.

- The longest display line had -1 characters.       !!!!!!! Is this the problem?

- 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 1182 bytes.

$ mplayer ../OUTPUT/with.subs.mpg

I do not see my subtitle on my movie. I pressed 'v' twice while playing to assure that subtitles are enabled.

Have You got the idea what might be the reason?

Best regards and once more thank You for howto.

makwak

----------

## Beetle B.

Try Xine. I could not see them via mplayer as well.

They won't show up by default in Xine - you'll need to go into the menu and select the proper one (probably 0).

----------

## nickrout

With any2dvd is it possible to re-start a process? Mine crapped out at the spumux stage, but I have fixed spumux. Do I have to start from the beginning (which takes a long time) or is there some way to restart from where it left off?

----------

## Beetle B.

Well, you could try doing the spumux manually using the instructions on the first page.

----------

## shiznix

 *Beetle B. wrote:*   

>  *Quote:*   Can you (or anyone else) confirm for sure that this fixes the NTSC overscan problem ?  
> 
> The widescreen="nopanscan" option did not fix it for me. I export to 4:3 (I don't have a widescreen TV). NTSC, of course. 
> 
> Shiznix, it would be awesome if you could release a new version that allows me to use the -j -18,-34,-22,-34 option.

 

I'll re-add it in any2vob/dvd-0.34 + update the guide with a mention on howto work around for NTSC.

It'll probably be a percentage value specified by the user as overscan can vary greatly between different brands of television, eg. '--overscan=5' to add a 5% border pad of the TV size (720x480).

Current betas can be accessed here ->

http://mightylegends.org/downloads/any2dvd-0.34.sh

http://mightylegends.org/downloads/any2vob-0.34.sh

To those wondering about the '-s2' option specified, AC3 encoded files tend to have a much lower volume than the original source. Using '-s2' brings the newly encoded audio volume back up close to the original source's volume. On some sources that are already close to using full audio bandwidth, this means the encoded result will have some clipping and distortion, so I have removed it.

This volume problem with AC3 is (still) currently being worked on in ffmpeg, expect a fix soon.

I've done a quick update of the guide to be more in line with the latest MPlayer ouput for detecting AC3 5.1 surround + Gimp changes.

The www.cubicdesign.com website that contained the Gimp tutorial to draw simple squares and circles died a while back so have now mirrored this page + included a link to another method of drawing button boxes at http://www.gimp.org/tutorials/Borders_On_Selections/

Thanks

Shiznix   :Wink: 

----------

## Beetle B.

Thanks a bunch. You're a lifesaver.

I'll try different percentages. The default few that are on the transcode page work somewhat, but still some of it is cropped. Maybe I can squeeze more in.

One quick question (for anyone). I don't have surround sound at home, and often don't encode in it as my source files are only stereo anyway. But if I play it at someone's house who does have surround sound, will some speakers just be silent?

Thanks.

----------

## shiznix

 *Beetle B. wrote:*   

> Thanks a bunch. You're a lifesaver.
> 
> I'll try different percentages. The default few that are on the transcode page work somewhat, but still some of it is cropped. Maybe I can squeeze more in.
> 
> One quick question (for anyone). I don't have surround sound at home, and often don't encode in it as my source files are only stereo anyway. But if I play it at someone's house who does have surround sound, will some speakers just be silent?

 

Depends on the DVD player being used.

Most modern DVD players have an option in their system menus to upmix by emulating surround sound (basically duplicates the stereo channels with some bandpass filtering for the sub + centre channels) + can add some depth to the sound by adding in a slight delay on the rear speakers (also configured in the DVD player's system menus).

Some DVD players do this extremely well, some do it but with awful quality, some others don't do it at all.

For those DVD players that don't do it, yes, some speakers will be silent.

Preliminary overscan support has now been added in the beta links listed above.

To use, specify for example '--overscan=5', it will also take decimal values.

If you want to come as close as possible to the '-j -18,-34,-22,-34' option for NTSC, then start with '--overscan=3.5'.

It is not as easy as just specifying '-j -18,-34,-22,-34' as aspect ratio of the original source must be considered, so you may need to experiment with different percentage values before finally arriving at a value that suits your television.

Cheers,

Shiznix

PS> Merry Xmas to all and a Happy New Year to you and yours   :Cool: 

----------

## shazam75

 *budman8 wrote:*   

> 
> 
> I saw in the howto where it mentioned about the subtitle-fps must be in the fps in which the subtitle file was created.
> 
> I had the fps as 25 and the movie-fps 29.97, and had the height and width as the smaller size, 
> ...

 

Thankyou Budman8 for this solution - it works for me

Regards

Shelton

----------

## darkrat

The beta version of this fantastic script is giving me some trouble: 

http://mightylegends.org/downloads/any2vob-0.34.sh

when extracting the AC3 audio from the movie, it produces a file called: treacle1_surround-aid0.ac3

when transcoding is finished, it then calls audio_convert to do the re-encoding (I guess) but it fails because the file name passed to the procedure call lacks the "_surround-aid0" in the name and therefore it can't find the file and it dies.

I tried making a link to the proper file on the fly and it continued okay, at which point it proceeded to the second file that I wanted joined ( -j) together. It had the same problem which I linked to the proper name and it again proceeded. 

At this point I figured that there would be no problem, except it produced a seriously truncated joining of these two files with totally out of position audio.

I cannot find the bad call in the script and I am not 100% sure that this isn't a symptom of some kind of other problem so I am reluctant to starting messing with it deeply.

Can anyone give me any insight?

----------

## shiznix

 *darkrat wrote:*   

> The beta version of this fantastic script is giving me some trouble: 
> 
> http://mightylegends.org/downloads/any2vob-0.34.sh
> 
> when extracting the AC3 audio from the movie, it produces a file called: treacle1_surround-aid0.ac3
> ...

 

Be happy to help, but please file a bug at any2dvd's sourceforge site -> http://sourceforge.net/tracker/?group_id=143060&atid=754969

Be sure to include in your bug report the command-line used and attach your any2dvd.log file.

Thanks, Shiznix

----------

## xante

Im having an issue with creating a blank audio track for the menu.

```
xante@localhost /leepa/dvds $ ffmpeg -ab 224 -ar 48000 -ac 2 -t 5 menu_audio.ac3

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2006 Fabrice Bellard, et al.

  configuration:  --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-mmx --disable-altivec --disable-debug --disable-audio-oss --disable-v4l --disable-v4l2 --disable-dv1394 --disable-network --disable-ffplay --disable-opts --enable-mp3lame --enable-xvid --enable-vorbis --enable-libogg --enable-faad --enable-faac --enable-gpl --enable-pp --disable-strip 

  libavutil version: 49.0.1

  libavcodec version: 51.20.0

  libavformat version: 50.6.0

  built on Jan  6 2007 04:29:05, gcc: 4.1.1 (Gentoo 4.1.1-r1)

Could not find audio grab device

xante@localhost /leepa/dvds $ la

-rw-r--r-- 1 xante xante    0 Jan  9 10:43 menu_audio.ac3

xante@localhost /leepa/dvds $ mplex -f 8 -o movie_menu.mpg menu.m2v menu_audio.ac3

   INFO: [mplex] mplex version 1.8.0 (2.2.4 $Date: 2005/08/28 17:50:54 $)

**ERROR: [mplex] Unable to read from menu_audio.ac3.

```

Is anyone else perhaps having/had this problem?

----------

## Beetle B.

Hey Shiznix, you were right about the overscan dependent on the file. That really sucks...

For the file I was trying to make a DVD out of, I had to experiment with different values for the padding. 8.5 turned out to be the sweet spot. But then with some other files, 8.5 was way too much.

So: A feature request. Since you use transcode in the script, can you allow us to specify the portion to encode into VOB format using the -c option (you know, only first 5 minutes or whatever). If that's too much work, one option is just letting the user append any further opetions to the transcode command...

The point is that if I have a big file, I want to be able to just make VOBs of the first 5 minutes with different padding values to see what works well. Then I'll do the whole file. 

Also, some values of the padding create ghosts in the output.

----------

## shiznix

 *xante wrote:*   

> Im having an issue with creating a blank audio track for the menu.
> 
> ```
> xante@localhost /leepa/dvds $ ffmpeg -ab 224 -ar 48000 -ac 2 -t 5 menu_audio.ac3
> 
> ...

 

Able to reproduce this when /dev/dsp does not exist.

It is not the best option to use as even when /dev/dsp does exist, it actually records the audio stream from whichever mixer channel is flagged as 'Rec'.

It could be silent, then again it might not be as it could record sound on either 'Mic' or 'Line-in' channels.

This section needs to be fixed.

The guide had in the past used 'toolame', which is a great tool for creating silent MPEG2 (DVD Compliant) audio tracks from a null input.

Toolame was removed in an effort to try and keep the number of tools used to a minimum.

Have added Sox (http://sox.sourceforge.net) in as a required tool for creating intermediate WAV files that FFmpeg can then encode to either AC3 or MPEG2.

Use like this for AC3:

```

dd if=/dev/zero bs=4 count=99999 | sox -t raw -wsr 48000 - -t wav -r 48000 - | ffmpeg -i - -ab 224 -ar 48000 -ac 2 menu_audio.ac3
```

Use like this for MP2:

```

dd if=/dev/zero bs=4 count=99999 | sox -t raw -wsr 48000 - -t wav -r 48000 - | ffmpeg -i - -ab 224 -ar 48000 -ac 2 menu_audio.mp2
```

Thanks for pointing this out, guide updated.

----------

## gessy

Hi

I've looking for some documentation about dvdauthor variables referred to as g0 through g12 and s0 through s23.  Where can i found something about it?

Thanks a lot!

----------

## shiznix

 *Beetle B. wrote:*   

> Hey Shiznix, you were right about the overscan dependent on the file. That really sucks...
> 
> For the file I was trying to make a DVD out of, I had to experiment with different values for the padding. 8.5 turned out to be the sweet spot. But then with some other files, 8.5 was way too much.
> 
> So: A feature request. Since you use transcode in the script, can you allow us to specify the portion to encode into VOB format using the -c option (you know, only first 5 minutes or whatever). If that's too much work, one option is just letting the user append any further opetions to the transcode command...
> ...

 

The option for the user to add extra options for Transcode sounds like a good idea, have added this in.

Use it like --encode_args="-c 0-5000" (arguments must be in quotes).

Have made the calculated overscan clip values also use only even numbers, this should greatly reduce any ghosting in the images or artifacts at the edge of the screen.

Updates to the betas can be found at the same URL links, cheers  :Smile: 

----------

## shiznix

 *gessy wrote:*   

> Hi
> 
> I've looking for some documentation about dvdauthor variables referred to as g0 through g12 and s0 through s23.  Where can i found something about it?
> 
> Thanks a lot!

 

'man dvdauthor' is a fair start, look under the 'VARIABLES' section.

If you need further info or would like to contribute to the dvdauthor project, see here -> http://sourceforge.net/mail/?group_id=59028

----------

## gessy

 *shiznix wrote:*   

>  *gessy wrote:*   Hi
> 
> I've looking for some documentation about dvdauthor variables referred to as g0 through g12 and s0 through s23.  Where can i found something about it?
> 
> Thanks a lot! 
> ...

 

I read that but i don't understand so much. I make some tests but not works. 

Thanks for help, i'll see dvdauthor project

----------

## Beetle B.

 *Quote:*   

> Have made the calculated overscan clip values also use only even numbers, this should greatly reduce any ghosting in the images or artifacts at the edge of the screen. 

 

Even as in only 2, 4, 6, 8, etc - and not 1, 3, 5, 7?

Isn't that too limiting (i.e. jump between 4 and 6 being large)?

So I can't use my 8.5 any more?

Thanks for the update.

----------

## shiznix

 *Beetle B. wrote:*   

>  *Quote:*   Have made the calculated overscan clip values also use only even numbers, this should greatly reduce any ghosting in the images or artifacts at the edge of the screen.  
> 
> Even as in only 2, 4, 6, 8, etc - and not 1, 3, 5, 7?
> 
> Isn't that too limiting (i.e. jump between 4 and 6 being large)?
> ...

 

Sorry, I should have been more clear.

Yes, you can still use 8.5 or any other number for that matter, just that the final '-j' calculated clip values as used in the Transcode line are rounded to the nearest even number.

----------

## MickKi

Thanks for your HOWTO!

I extracted a dv file from my camcorder using dvgrab.  Then I used kdenlive to edit the timeline and add a couple of transitions.  Exporting the modified timeline from kdenlive into a dv or vob file appears to be lossless.  As soon as I choose mpeg, mpeg4, mov, etc., as an export format I get a poor quality output.

How can I modify your howto to utilise the dv, or vob files.  Transcode does not seem to like dv and vob seems to have produced many artifacts on the final dvd.   :Sad: 

----------

## nickrout

If you have a proper vob file that is exactly the format you need for a DVD. You don't need any of this software at all, you can use dvdauthor or dvdstyler to aurhor your dvd. Or you could simply use

```
any2dvd [any other options you want] -i yourfile.vob
```

----------

## MickKi

Thanks Nick,

I tried dvdauthor but it gave me a nasty error (couldn't understand it).  I'll try again using a different dvdauthor.xml file and see what gives.  Is it possible to use k3b for burning the DVD?  What settings are important?  I am asking this because I haven't yet managed to burn a DVD with K3b, which will then play onto a DVD player.

PS.  WOW! I made it to 1000 posts!  Who would have thought it?

----------

## nickrout

I'd use any2dvd using the .vob file as the input file, as per the last suggestion in my last post.

----------

## MickKi

Thank you Nick,

Which package has any2dvd - I can't find it in portage and it's not on my system (I have no Gnome libs on my machine).

----------

## nickrout

I am sure the program developer (whose thread this basically is) will correct me if I am wrong, but...

http://mightylegends.zapto.org/dvd/ebuilds/media-video/  for ebuilds, there are also ebuilds at bugs.gentoo.org

----------

## Vincepbell

I can't seem to get this to work.

RUnning an extremely basic command line:

any2dvd -i myvid.avi

My video is an xvid.

It seems my mplayer install can't use the -vo dummy option? The mplayer guys say that theres no such option for -vo, and I should be using -vo null.

Any tips?

Relevant log snippits:

 Running: transcode -H0 -i "lrc-natm.r5.avi" -x mplayer="-mc 0",mplayer -f 25.000 -g 608x336 -n 0x1 -e 0,16,0 -y ffmpeg -F mpeg2 -Z 720x576 --export_asr 3 --pre_clip=no -j -2,0,-2,0 -J resample, -D0 -N 0x2000 -E 48000,16,2 -b 384 -s2 -m "tmp_any2dvd/lrc-natm.r5.ac3" -o "tmp_any2dvd/lrc-natm.r5" ...

 Error: Video encoding failed for "tmp_any2dvd/lrc-natm.r5", file not successfully encoded!

transcode v1.0.2 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg

[transcode] critical: invalid pcm parameter 'rate' for option -e

----------

## RiverRat

 *shiznix wrote:*   

> 
> 
> Tweakage (optional)
> 
> ...(last code section in tweakage)...
> ...

 

Isn't the NTSC section supposed to have a frame rate of 29.97?

----------

## Gilbo

 *Vincepbell wrote:*   

> I can't seem to get this to work.
> 
> RUnning an extremely basic command line:
> 
> any2dvd -i myvid.avi
> ...

 

I have the same problem.  I'm going to try down-grading transcode to 1.0.2-r2.  My current version is 1.0.2-r3, which is stable.

Things used to work just fine for me, so I assume 'rate' has been deprecated or something... (no idea really).

----------

## Gilbo

I suppose 'rate' shouldn't be deprecated actually considering I've only moved from r2 to r3.  I assume the version number change would be more significant if there were API changes.

EDIT:

Trying to re-emerge transcode v1.0.2-r2 failed.  I get this error before the later errors:

```
ERROR: requirement failed: cannot compile ffmpeg/avcodec.h

ffmpeg/avcodec.h can be found in the following packages:

  FFmpeg  http://www.ffmpeg.org

```

When I examine the active use flags for ffmpeg I notice several are not enabled anymore.  Perhaps a profile change altered things --I have no idea.  The problem may involve use flags.  I'm going to fiddle  :Wink: ...

----------

## Gilbo

Well, I can't figure out the problem at the moment.  I doubt it's use flags.

I recompiled ffmpeg, but I still can't recompile transcode v1.0.2-r2 (not that I even know if down-grading would fix the problem.)  Following are the transcode compile errors, the ffmpeg use flag settings and the transode use flag settings.

EDIT: One thing I'm going to check is compiling without mmx/sse/sse2 which are newly active use flags for some reason.  I'm on a AMD64 system with (if I remember properly) no compatibility libraries (I don't think this would affect such things, but I'm at a loss).

EDIT 2: Didn't fix anything removing sse/mmx/sse2 us flags.

Transcode compile failure:

```

config.status: creating config.h

config.status: executing depfiles commands

----------------------------------------

Summary for transcode 1.0.2:

----------------------------------------

core options

----------------------------------------

static AV-frame buffering      yes

network (sockets) streams      no

experimental xio               no

Default xvid export            xvid4

A52 default decoder            no

libavcodec

----------------------------------------

headers                        -I/usr/include

libraries                      -L/usr/lib -lavcodec -lm -lz -lpthread

build                          

version                        

statically linked              no

hardware support

----------------------------------------

v4l/v4l2                       no

OSS                            no

bktr                           no

sunau                          no

optional package support

----------------------------------------

IBP                            no

X11                            no

libmpeg2                       yes

libpostproc                    no

freetype2                      no

avifile                        no

lame                           yes

ogg                            yes

vorbis                         yes

theora                         yes

libdvdread                     yes

pvm3                           no

libdv                          yes

libquicktime                   no

lzo                            no

a52                            yes

libmpeg3                       yes

libxml2                        yes

mjpegtools                     yes

sdl                            yes

gtk                            no

libfame                        yes

imagemagick                    yes

libjpeg                        yes

bsdav                          no

iconv                          yes

ERROR: requirement failed: cannot compile ffmpeg/avcodec.h

ffmpeg/avcodec.h can be found in the following packages:

  FFmpeg  http://www.ffmpeg.org

Please see the INSTALL file in the top directory of the

transcode sources for more information about building

transcode with this configure script.

!!! Please attach the following file when filing a report to bugs.gentoo.org:

!!! /var/tmp/portage/media-video/transcode-1.0.2-r2/work/transcode-1.0.2/config.log

!!! ERROR: media-video/transcode-1.0.2-r2 failed.

Call stack:

  ebuild.sh, line 1614:   Called dyn_compile

  ebuild.sh, line 971:   Called qa_call 'src_compile'

  environment, line 3756:   Called src_compile

  transcode-1.0.2-r2.ebuild, line 96:   Called econf '--disable-altivec' '--disable-netstream' '--disable-freetype2' '--disable-v4l' '--enable-lame' '--enable-ogg' '--enable-vorbis' '--enable-theora' '--enable-libdvdread' '--enable-libdv' '--disable-libquicktime' '--disable-lzo' '--enable-a52' '--enable-libmpeg3' '--enable-libxml2' '--enable-mjpegtools' '--enable-sdl' '--disable-gtk' '--enable-libfame' '--enable-imagemagick' '--enable-libjpeg' '--with-mod-path=/usr/lib64/transcode' '--without-x' '--with-default-xvid=xvid4' '--enable-mmx' '--disable-3dnow' '--enable-sse' '--enable-sse2' '--with-libpostproc-builddir=/usr/lib64' '--with-lzo-includes=/usr/include/lzo' '--disable-avifile'

  ebuild.sh, line 577:   Called die

!!! econf failed

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/media-video/transcode-1.0.2-r2/temp/build.log'.

```

ffmpeg:

```
 $ equery u ffmpeg

[ Searching for packages matching ffmpeg... ]

[ Colour Code : set unset ]

[ Legend        : Left column  (U) - USE flags from make.conf                    ]

[                  : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for media-video/ffmpeg-0.4.9_p20061016 ]

 U I

 + + a52      : Enables support for decoding ATSC A/52 streams used in DVD

 + + aac      : Enables support for MPEG-4 AAC Audio

 - - altivec  : Adds support for optimizations for G4 and G5/ppc970 processors

 - - amr      : Enables Adaptive Multi-Rate Audio support

 - - debug    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml .

 - - doc      : Adds extra documentation (API, Javadoc, etc)

 + + dts      : Enables libdts (DTS Coherent Acoustics decoder) support

 + + encode   : Adds support for encoding of audio or video files

 - - ieee1394 : Enable FireWire/iLink IEEE1394 support (dv, camera, ...)

 + + imlib    : Adds support for imlib, an image loading and rendering library

 + + mmx      : Adds support for optimizations for Pentium MMX and Athlon class processors

 - - network  : Enables network streaming support

 + + ogg      : Adds support for the Ogg container format (commonly used by Vorbis, Theora and flac)

 - - oss      : Adds support for OSS (Open Sound System)

 + + sdl      : Adds support for Simple Direct Layer (media library)

 - - test     : Workaround to pull in packages needed to run with FEATURES=maketest / FEATURES=test

 + + theora   : Adds support for the Theora Video Compression Codec

 - - threads  : Adds threads support for various packages. Usually pthreads

 - - truetype : Adds support for FreeType and/or FreeType2 fonts

 - - v4l      : Enables video4linux support

 + + vorbis   : Adds support for the OggVorbis audio codec

 + + x264     : Enable h264 encoding using x264

 + + xvid     : Adds support for xvid.org's open-source mpeg-4 codec

 + + zlib     : Adds support for zlib (de)compression

```

Transcode:

```
$ equery u transcode

[ Searching for packages matching transcode... ]

[ Colour Code : set unset ]

[ Legend        : Left column  (U) - USE flags from make.conf                    ]

[                  : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for media-video/transcode-1.0.2-r3 ]

 U I

 - - 3dnow        : Adds support for 3dnow multimedia processor instructions

 - - X            : Adds support for X11

 + + a52          : Enables support for decoding ATSC A/52 streams used in DVD

 - - altivec      : Adds support for optimizations for G4 and G5/ppc970 processors

 + + dv           : Enables support for a codec used by many camcorders

 + + dvdread      : Enables usage of Ogle's libdvdread for DVD playback

 + + extrafilters : Install some filters only if we ask for them

 + + fame         : Enables libfame support

 - - gtk          : Adds support for x11-libs/gtk+ (The GIMP Toolkit)

 + + imagemagick  : Enables support for Imagemagick (image converter)

 + + jpeg         : Adds JPEG image support

 - - lzo          : Enables LZO compression support

 + + mjpeg        : Enables mjpegtools support

 + - mmx          : Adds support for optimizations for Pentium MMX and Athlon class processors

 + + mp3          : Add support for reading mp3 files

 + + mpeg         : Adds libmpeg3 support to various packages.

 - - network      : Enables network streaming support

 + + ogg          : Adds support for the Ogg container format (commonly used by Vorbis, Theora and flac)

 - - quicktime    : Adds support for OpenQuickTime

 + + sdl          : Adds su$ equery u transcode

[ Searching for packages matching transcode... ]

[ Colour Code : set unset ]

[ Legend        : Left column  (U) - USE flags from make.conf                    ]

[                  : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for media-video/transcode-1.0.2-r3 ]

 U I

 - - 3dnow        : Adds support for 3dnow multimedia processor instructions

 - - X            : Adds support for X11

 + + a52          : Enables support for decoding ATSC A/52 streams used in DVD

 - - altivec      : Adds support for optimizations for G4 and G5/ppc970 processors

 + + dv           : Enables support for a codec used by many camcorders

 + + dvdread      : Enables usage of Ogle's libdvdread for DVD playback

 + + extrafilters : Install some filters only if we ask for them

 + + fame         : Enables libfame support

 - - gtk          : Adds support for x11-libs/gtk+ (The GIMP Toolkit)

 + + imagemagick  : Enables support for Imagemagick (image converter)

 + + jpeg         : Adds JPEG image support

 - - lzo          : Enables LZO compression support

 + + mjpeg        : Enables mjpegtools support

 + - mmx          : Adds support for optimizations for Pentium MMX and Athlon class processors

 + + mp3          : Add support for reading mp3 files

 + + mpeg         : Adds libmpeg3 support to various packages.

 - - network      : Enables network streaming support

 + + ogg          : Adds support for the Ogg container format (commonly used by Vorbis, Theora and flac)

 - - quicktime    : Adds support for OpenQuickTime

 + + sdl          : Adds support for Simple Direct Layer (media library)

 + - sse          : fast floating point optimization for PentiumIII+ class chips

 + - sse2         : faster floating point optimization for SSE2 capable chips

 + + theora       : Adds support for the Theora Video Compression Codec

 - - truetype     : Adds support for FreeType and/or FreeType2 fonts

 - - v4l2         : Enable video4linux2 support

 + + vorbis       : Adds support for the OggVorbis audio codec

 + + xml          : Add support for XML files

 + + xvid         : Adds support for xvid.org's open-source mpeg-4 codec

pport for Simple Direct Layer (media library)

 + - sse          : fast floating point optimization for PentiumIII+ class chips

 + - sse2         : faster floating point optimization for SSE2 capable chips

 + + theora       : Adds support for the Theora Video Compression Codec

 - - truetype     : Adds support for FreeType and/or FreeType2 fonts

 - - v4l2         : Enable video4linux2 support

 + + vorbis       : Adds support for the OggVorbis audio codec

 + + xml          : Add support for XML files

 + + xvid         : Adds support for xvid.org's open-source mpeg-4 codec

```

----------

## shiznix

There is a new version of any2dvd (0.34) available from http://any2dvd.sf.net

An ebuild can be obtained from the usual places:

Either from http://mightylegends.org/dvd/ebuilds/media-video/any2dvd/ or https://bugs.gentoo.org/show_bug.cgi?id=126994

Thank you   :Wink: 

----------

## shiznix

 *RiverRat wrote:*   

>  *shiznix wrote:*   
> 
> Tweakage (optional)
> 
> ...(last code section in tweakage)...
> ...

 

Yes it is good call, now corrected thanks  :Smile: 

----------

## shiznix

 *Vincepbell wrote:*   

> I can't seem to get this to work.
> 
> RUnning an extremely basic command line:
> 
> any2dvd -i myvid.avi
> ...

 

This is incorrect, MPlayer does indeed have a '-vo dummy' option. Try this as an example:

```
mplayer -vo dummy -identify somefile.avi
```

Now try this example using '-vo null -ao null' instead:

```
mplayer -vo null -ao null -identify somefile.avi
```

See the difference ?

The reason you are experiencing problems using the script is that MPlayer's text output has changed considerably in later versions. As such 0.32 will only work with old versions of MPlayer, while the new 0.34 version will work with both new and old versions of MPlayer.

 *Quote:*   

> Relevant log snippits:
> 
>  Running: transcode -H0 -i "lrc-natm.r5.avi" -x mplayer="-mc 0",mplayer -f 25.000 -g 608x336 -n 0x1 -e 0,16,0 -y ffmpeg -F mpeg2 -Z 720x576 --export_asr 3 --pre_clip=no -j -2,0,-2,0 -J resample, -D0 -N 0x2000 -E 48000,16,2 -b 384 -s2 -m "tmp_any2dvd/lrc-natm.r5.ac3" -o "tmp_any2dvd/lrc-natm.r5" ...
> 
>  Error: Video encoding failed for "tmp_any2dvd/lrc-natm.r5", file not successfully encoded!
> ...

 

Once again, this is because of the MPlayer version changes to it's text output. A correct '-e' option would read '-e <rate>,<bits>,<channels>' (eg. '-e 44100,16,2'). Because the script has failed to extract the correct info from MPlayer, the arguments are invalid and it fails.

This is not the case with the newer 0.34 version, but I do stress that if you are having problems with the script in future to use the bug tracker on the script's project page at http://any2dvd.sf.net , thanks  :Smile: 

----------

## FreakWent

at http://mightylegends.org/dvd/ebuilds/media-video/any2dvd/

The Manifest file is for version 3.2

I can update this myself, but maybe others can't or don't want to.  Am I looking at the wrong website?

----------

## FreakWent

It's not for 0.32 per se, but it barfs if the 0.32 ebuild file isn't there.

emerge =any2dvd-0.34 seems to fix it fine; perhaps it chose 0.32 because of ~x86 masking, I'm not sure.

Cheers!

----------

## hulmeman

I'm getting this error with any2dvd-0.32:

```
any2dvd --force=yes  -i Pilot__The_Abbey.VOB 

Any2Dvd-0.32

<<<< DVD Menu Creation started at Wed Mar 28 19:01:56 BST 2007 >>>>

 Creating Titleset 1 Thumbnail 1...2...3...4...5...Done!

 Creating silent Audio-Track for VMGM Main Menu ...Done!

 Creating silent Audio-Track for VTSM Chapter Menu ...Done!

 Overlaying VTS-Thumbnails ...Done!

 Placing buttons on Background-Picture ...Done!

 Creating VMGM Video Stream ...Done!

 Creating Titleset 1 Chapter-Thumbnails...Done!

 Creating Titleset 1 Chapter Menu(s)

 Menu #1 created

 Finished Titleset #1

 Authoring DVD File Structure...

DVDAuthor::dvdauthor, version 0.6.14.

Build options: gnugetopt magick iconv freetype fribidi

Send bugs to <dvdauthor-users@lists.sourceforge.net>

INFO: Locale=en_GB.utf8

INFO: Converting filenames to UTF-8

INFO: dvdauthor creating VTS

STAT: Picking VTS 01

STAT: Processing tmp_any2dvd/VTSM/vtsm1_1.mpg...

INFO: Video pts = 0.160 .. 0.560

INFO: Audio[0] pts = 0.160 .. 5.152

INFO: Audio[32] pts = 0.160 .. 0.160

STAT: VOBU 1 at 0MB, 1 PGCS

ERR:  widescreen conversion should not be set to either noletterbox or nopanscan for 4:3 source material.

 Creating DVD ISO file named x.iso

 Error: DVD ISO was not successfully created
```

Any ideas? I get the same error with:

```
any2dvd --force=yes  --aspect=4:3 -i Pilot__The_Abbey.VOB 
```

----------

## tekknokrat

hi, 

don't want to cross post so if someone has the same error with emerging libsoundtouch please let me know in this 

thread

regards!

----------

## hulmeman

 *shiznix wrote:*   

>  *Vincepbell wrote:*   I can't seem to get this to work.
> 
> RUnning an extremely basic command line:
> 
> any2dvd -i myvid.avi
> ...

 

I can't get this to work either, the "-vo dummy" option isn't recognised, and the command just plays audio.

```
 mplayer -vo dummy -identify Freaky_Eaters_E3_Cheese. avi

MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer TeamCPU: AMD Turion(tm) 64 X2 Mobile Technology TL-50 

(Family: 15, Model: 72, Stepping: 2) CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1

Compiled with runtime CPU detection.

mplayer: could not connect to socket

mplayer: No such file or directory

Failed to open LIRC support. You will not be able to use your remote control.

Playing Freaky_Eaters_E3_Cheese.avi.

AVI file format detected.

ID_VIDEO_ID=0

ID_AUDIO_ID=1

VIDEO:  [XVID]  608x352  12bpp  25.000 fps  1245.8 kbps (152.1 kbyte/s)

Clip info:Software: VirtualDubMod 1.5.4.1 (build 2178/release)

ID_CLIP_INFO_NAME0=Software

ID_CLIP_INFO_VALUE0=VirtualDubMod 1.5.4.1 (build 2178/release)

ID_CLIP_INFO_N=1

ID_FILENAME=Freaky_Eaters_E3_Cheese.avi

ID_DEMUXER=avi

ID_VIDEO_FORMAT=XVID

ID_VIDEO_BITRATE=1245808

ID_VIDEO_WIDTH=608

ID_VIDEO_HEIGHT=352

ID_VIDEO_FPS=25.000

ID_VIDEO_ASPECT=0.0000

ID_AUDIO_FORMAT=85

ID_AUDIO_BITRATE=115384

ID_AUDIO_RATE=0

ID_AUDIO_NCH=0

ID_LENGTH=3362.96

Error opening/initializing the selected video_out (-vo) device.

====================================================================== 

audio decoder: [mp3lib] MPEG layer-2, layer-3

AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)

ID_AUDIO_BITRATE=128000

ID_AUDIO_RATE=48000

ID_AUDIO_NCH=2

Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)

======================================================================                                                                     

AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)

ID_AUDIO_CODEC=mp3

Video: no video

Starting playback...

A:   6.3 (06.2) of 35805.0 ( 9:56:44.9)  0.8% 

```

Any ideas? Note:

Error opening/initializing the selected video_out (-vo) device

----------

## darklegion

Try this, hulmeman:

```
 mplayer -vo null -ao null -frames 0 -identify file.avi 
```

----------

## shiznix

 *hulmeman wrote:*   

>  *shiznix wrote:*    *Vincepbell wrote:*   I can't seem to get this to work.
> 
> RUnning an extremely basic command line:
> 
> any2dvd -i myvid.avi
> ...

 

This is a different issue and is due to the use of an MPlayer SVN snapshot.

In the stable/formal releases of MPlayer, using '-vo dummy' also assumes '-ao dummy', but not so for the SVN.

For the SVN version of MPlayer that you are using you would use:

```
mplayer -vo dummy -ao dummy -identify Freaky_Eaters_E3_Cheese. avi
```

to achieve the same result.

The errors you are experiencing with:

```
ERR:  widescreen conversion should not be set to either noletterbox or nopanscan for 4:3 source material.
```

are due to dvdauthor being more strict on 4:3 material in later versions (have updated the guide noting this).

You have two options here, either edit the XML file located at tmp_any2dvd/xml/any2dvd.xml and remove all instances of 

```
<video widescreen="nopanscan" />
```

 for 4:3 aspect material and re-run 

```
rm -rf tmp_any2dvd/DVD/* && dvdauthor -x tmp_any2dvd/xml/any2dvd.xml
```

OR

Downgrade dvdauthor back to 0.6.11

Cheers

----------

## hulmeman

 *shiznix wrote:*   

> 
> 
> For the SVN version of MPlayer that you are using you would use:
> 
> ```
> ...

 

Hi, sorry for the delay in responding, but I've been away for some weeks. I'm using mplayer-1.0_rc2_pre20070321-r4 ~amd64 in portage, as suggested in the guide.  Your suggestion here does not work, the said command trys to play but fails!

```
mplayer -vo dummy -ao dummy -identify Black\ Easter.avi 

MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team

CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 31, Stepping: 0)

CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1

Compiled with runtime CPU detection.

mplayer: could not connect to socket

mplayer: No such file or directory

Playing Black Easter.avi.

AVI file format detected.

ID_VIDEO_ID=0

ID_AUDIO_ID=1

AVI: ODML: Building ODML index (2 superindexchunks).

VIDEO:  [DX50]  512x384  24bpp  25.000 fps  662.7 kbps (80.9 kbyte/s)

ID_FILENAME=Black Easter.avi

ID_DEMUXER=avi

ID_VIDEO_FORMAT=DX50

ID_VIDEO_BITRATE=662664

ID_VIDEO_WIDTH=512

ID_VIDEO_HEIGHT=384

ID_VIDEO_FPS=25.000

ID_VIDEO_ASPECT=0.0000

ID_AUDIO_FORMAT=6

ID_AUDIO_BITRATE=705600

ID_AUDIO_RATE=0

ID_AUDIO_NCH=0

ID_LENGTH=5520.16

Error opening/initializing the selected video_out (-vo) device.

==========================================================================

Opening audio decoder: [alaw] aLaw/uLaw audio decoder

AUDIO: 44100 Hz, 2 ch, s16le, 705.6 kbit/50.00% (ratio: 88200->176400)

ID_AUDIO_BITRATE=705600

ID_AUDIO_RATE=44100

ID_AUDIO_NCH=2

Selected audio codec: [alaw] afm: alaw (aLaw)

==========================================================================

Could not open/initialize audio device -> no sound.

Audio: no sound

Video: no video

Exiting... (End of file)
```

mplayer-bin does work, but I'd rather not use it.

 *shiznix wrote:*   

> 
> 
> The errors you are experiencing with:
> 
> ```
> ...

 

Thanks, this one's solved!

----------

## shiznix

 *hulmeman wrote:*   

> Hi, sorry for the delay in responding, but I've been away for some weeks. I'm using mplayer-1.0_rc2_pre20070321-r4 ~amd64 in portage, as suggested in the guide.  Your suggestion here does not work, the said command trys to play but fails!
> 
> ```
> mplayer -vo dummy -ao dummy -identify Black\ Easter.avi 
> 
> ...

 

Excellent, that's exactly what it's supposed to do.

Remember that you are trying to gain info from the file by using '-identify', not play the file.   :Rolling Eyes: 

----------

## trakinas

hi!

the audio from the vob file is being played only in one side. so, I've extracted it from the vob, used sOx do generate all the 6ch and muxed it like [1]here. the final wav plays okay. but when i convert it to ac3 it still plays only in one side. any help? 

thanks!

----------

## JohnerH

Hi Guys,

Anyone know how to one can predict how much space a combination of files will take up on the DVD?

Reason for this is that I'm converting AVI's but then finding out I don't have enough space on the DVD for all the files I wanted...

Thank you in advance,

J

----------

## nickrout

any2vob --calc -i file1.avi file2.avi

----------

## andreas 1191

tnhx[post=][/post]

----------

## CrazyTerabyte

 *shiznix wrote:*   

> Creating the menus
> 
> [...]
> 
> Hide the button_highlight layer & save the background layer.
> ...

 

Just a quick tip: it is a lot easier to hide the layer by clicking on "eye" icon just at left of layer name. Maybe you should edit the first post to point this easier way of hiding layers.

----------

## FallenAngel10

I have created this block in title the logic is correct --- xml excerpt

<pgc>

<vob file="C:\MYSTUFF\MY C++ PROGRAMS\TITLEWRITER\TOOLS\dummy.vob" chapters="00:00:00" /> 

<pre>

if(g0==123) {g1=12346;g0+=0;call vmgm menu entry title;}

 g0=123;

if(g1==12346){g1=12345;jump chapter 1;}

</pre> 

<post>{g0=1;call vmgm menu entry title;}</post> 

</pgc>

in this statement  if(g1==12346){g1=12345;jump chapter 1;}

Dvdauthor is only using the first command g1=12345; the second seems to vanish (shown below)

No errors no warnings

Heres the result from PgcEdit (after dvdauthor is done)

1  if ( gprm(0) != 123 ) then { Goto line 5 } 

2  Set gprm(1) =(mov) 12346 

3  Set gprm(0) +=(add) 0 

4  (CallSS) Call the VMGM Title menu, resume cell 1 

5  Set gprm(0) =(mov) 123 

6  if ( gprm(1) == 12346 ) then { Set gprm(1) =(mov) 12345 } 

********** post commands:

1  Set gprm(0) =(mov) 1 

2  (CallSS) Call the VMGM Title menu, resume cell 1 

I cannot create a seperate dummy pgc in titles block because of the discontinuity problem

I've deleted the first set command and DvdAuthor then created the LinkPtt (but I need the g1 reset before the chapter jump

I cannot use the Jump title 1,chapter n syntax as it restarts the ttn pre 

And it won't let me create a dummy menu without content

I'm Stumped

----------

## FreakWent

A long time ago...

[quote="shiznix"][quote="hulmeman"][quote="shiznix"] *Vincepbell wrote:*   

> I can't seem to get this to work.
> 
> --SNIP--
> 
> For the SVN version of MPlayer that you are using you would use:
> ...

 

Well now that's cool, but I'd rather not mess with the any2vob  (0.34) script, because I'm lame.

gentoo x86 has installed mplayer dev-SVN-rUNKNOWN-4.1.1 (mplayer-1.0.20070321)

What's the right way to get a version of mplayer which will not play audio (indeed anything) on a -vo=dummy? Currently it takes 5 hours for a 30 minute clip, as every time any2vob wants to check something (eg lines 488 to 490, as one example) it plays the audio of the track all the way through.  Killing the mplayer process makes it start again...

I will also file a bug report against any2vob (it's the only form of service/support offered by sourceforge for the project) suggesting that they at least check for midentify to use instead.

----------

## nickrout

I am having a problem with stereo2surround.sh, referenced here http://mightylegends.zapto.org/dvd/dvdauthor_howto_surround.html and on page one of this thread.

Firstly I have found one bug when using sox > 13.0.0. soxmix has been removed and the appropriate incantation now seems to be sox -m. stereo2surround.sh will fail unless you change soxmix to sox -m.

Secondly, ffmpeg seems to fail on my system. The output is as follows:

```
sox sox: Effects chain: lowp       mono   48000Hz

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.

  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i586-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-audio-oss --disable-opts --enable-libmp3lame --enable-libvorbis --enable-libogg --enable-libtheora --enable-libogg --enable-liba52 --enable-dc1394 --enable-xvid --enable-x11grab --enable-libogg --enable-libdts --enable-x264 --enable-libfaad --enable-libfaac --enable-gpl --enable-pp --disable-strip

  libavutil version: 49.4.0

  libavcodec version: 51.40.2

  libavformat version: 51.11.0

  built on Apr 30 2007 08:40:46, gcc: 4.1.1 (Gentoo 4.1.1-r3)

Input #0, s16le, from 'test.mp2_final.wav':

  Duration: N/A, bitrate: N/A

  Stream #0.0: Audio: pcm_s16le, 48000 Hz, 5:1, 4608 kb/s

Output #0, ac3, to 'test.mp2.ac3':

  Stream #0.0: Audio: ac3, 48000 Hz, 5:1, 0 kb/s

Stream mapping:

  Stream #0.0 -> #0.0

Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

Done!
```

My version of ffmpeg is 0.4.9_p20070330-r1

If anyone can help I'd be grateful. (I am not making a dvd otherwise I would use the fine any2vob/any2dvd scripts)

Thanks.

----------

## shiznix

 *nickrout wrote:*   

> I am having a problem with stereo2surround.sh, referenced here http://mightylegends.zapto.org/dvd/dvdauthor_howto_surround.html and on page one of this thread.
> 
> Firstly I have found one bug when using sox > 13.0.0. soxmix has been removed and the appropriate incantation now seems to be sox -m. stereo2surround.sh will fail unless you change soxmix to sox -m.
> 
> Secondly, ffmpeg seems to fail on my system. The output is as follows:
> ...

 

Oops yes you're right, should be fixed now, thanks.

As for your FFmpeg error, try specifying '-ab 384k' for later versions of FFmpeg, or '-ab 384' for an early version.

----------

## nickrout

Thats OK, glad to help  :Smile: 

Yes the -ab 384k works now, I had that sorted a while ago and should have posted back the solution.

Cheers.

----------

## hulmeman

I'm trying to convert a stereo ac3 to 6 channel, I'm getting this error with ffmpeg when I try to convert the stereo ac3 track to a stereo wav:

```
 XXyyzz $ ffmpeg -i Capturing_Mary.ac3 temp.wav

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.

  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-altivec --disable-debug --disable-dv1394 --disable-opts --enable-libmp3lame --enable-libvorbis --enable-libogg --enable-libtheora --enable-libogg --enable-liba52 --enable-pthreads --enable-libxvid --enable-x11grab --enable-libogg --enable-libx264 --enable-libfaad --enable-libfaac --enable-gpl --enable-pp --enable-swscaler --disable-strip

  libavutil version: 49.4.0

  libavcodec version: 51.40.4

  libavformat version: 51.12.1

  built on Nov 14 2007 20:41:55, gcc: 4.2.2 (Gentoo 4.2.2 p1.0)

[mpeg @ 0x2b77580f6220]Could not find codec parameters (Audio: mp2, 24 kb/s)

Capturing_Mary.ac3: could not find codec parameters

```

Any ideas? The file plays fine in mplayer and I'm sure I've got all required use flags:

```
 $ emerge -pv ffmpeg

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] media-video/ffmpeg-0.4.9_p20070616-r2  USE="X a52 aac encode imlib ipv6 mmx network ogg oss sdl theora threads truetype v4l vorbis x264 xvid zlib (-altivec) -amr -debug -doc -ieee1394 -test" 0 kB
```

TIA

----------

## chris.c.hogan

I have a vob file with multiple audio tracks and multiple subtitle tracks. I'd like to burn it to DVD Video for playback on the TV. However, I have some questions that I haven't really found answers for.

I'd like to create a menu on the DVD that includes a setup menu for selecting audio track, subtitles on/off, and subtitle track. This is common on commercial DVDs.

I started with mandvd. However, the program doesn't seem to support submenus. I've also played around with qdvdauthor and dvdstyler. All of these programs seem to want me to extract the subtitles, convert them to text, and add them back to the video. I haven't figured out how to handle multiple audio tracks yet.

I did make a mkv file with chapters and subtitles using this guide: HOWTO_DVD_to_Matroska. So I do have a vobsubs.sub/.idx file, a text file containing all of the chapter information, and a separate audio file. However, none of the above programs support the vobsub format, nor do they support importing chapter information. I also haven't figured out how to create, if it's supported, the setup menu in these applications.

Is there an easy way to do what I'm looking to do? Ripping apart the vob file, converting the subtitles to text, reencoding the video, and remuxing it all back into what is essentially the same as the starting vob file seems like a lot of work just to add a menu. Nor have I figured out how to support more than one subtitle/audio track.

Thank you for any advice or help you can offer.

----------

## xathin

I'm using the latest version of all software, including any2dvd (0.34). I've used the software in the past, and had no problems with it. I just starting using Gentoo again, and decided to try it out, as I needed to convert some videos to dvd.

When converting the videos, the program seems to end prematurely, complaining that the m2v file was not created. Looking at the transcode logs, there seems to be an issue with the --progress_meter 0 argument. The latest transcode (1.0.5) does not appear to have the --progress_meter 0 argument, or my version doesn't anyway. It does, however, have the --progress_off argument. After changing the argument in the code, it still complains that the file is not completed. I've checked the tmp.log in the working directory, and there doesn't appear to be any errors coming from transcode. It seems to sit and wait for the 15 seconds, then errors out whether the program is finished running or not, as far as I can tell anyway. Has anyone else noticed this? Or am I just not doing something?

I'm trying to convert an OGM video, with this command: 'any2dvd --format=ntsc --aspect=4:3 --pulldown=yes -i /path/to/file.ogm'. I would assume that this is the correct command to use, and nothing special needs to be added.

One suggestion for the program. I've noticed that it defaults to encoding the audio at a very high bitrate (384kbps). I did not notice any option or variable to change this. I think this would be something nice to have, as you may not always want such a high bitrate for your audio, especially if your source audio is <192kbps.

[edit]Also, I can't seem to add multiple files by using wildcards, as is shown in the man pages. I'm using 'any2dvd --format=ntsc --aspect=4:3 --pulldown=yes -i /path/to/files/*', which appears the same as shown in the man page for any2dvd. It shows the following errors:

```
/usr/bin/any2dvd: eval: line 326: unexpected EOF while looking for matching ``'

/usr/bin/any2dvd: eval: line 327: syntax error: unexpected end of file
```

[/edit]

----------

## nickmarinho

Hello to all friends right here. Id created a bash script to automake my work to create all functions to create a dvd with little commands.

But now i have a problem: my xine don't recognize the menu, when i pass the mouse over the menu, the select and highlight images don't show.

Bellow i send my xml file, the other things is normally run.

Please help me.

And best regards.

```

 <dvdauthor dest="./DVD/">

  <vmgm>

   <menus>

    <video format="pal" />

    <pgc>

     <vob file="/mnt/sata-one/dvd/intro-karaoke.mpg" />

     <button>jump menu 2;</button>

    </pgc>

    <pgc entry="title">

     <pre> { if (g1 eq 0) g1=1; button=g1*1024; } </pre>

     <vob file="menu.mpg" pause="inf"/>

     <button> jump titleset 1 menu; </button>

     <button> jump titleset 2 menu; </button>

     <button> jump titleset 3 menu; </button>

     <button> jump titleset 4 menu; </button>

     <button> jump titleset 5 menu; </button>

     <post> jump titleset 1 menu; </post>

    </pgc>

   </menus>

  </vmgm>

  <titleset>

   <menus>

    <pgc entry="root">

     <pre> { if (g1 gt 0) jump title 1 chapter 1; jump vmgm menu 2;} </pre>

     <button> jump vmgm menu 2; </button>

     <button> jump titleset 2 menu; </button>

     <button> jump title 1; </button>

     <button> jump title 2; </button>

     <button> jump title 3; </button>

     <button> jump title 4; </button>

     <button> jump title 5; </button>

     <button> jump title 6; </button>

     <button> jump title 7; </button>

     <button> jump title 8; </button>

     <button> jump title 9; </button>

     <button> jump title 10; </button>

     <button> jump title 11; </button>

     <button> jump title 12; </button>

     <button> jump title 13; </button>

     <button> jump title 14; </button>

     <button> jump title 15; </button>

     <button> jump title 16; </button>

     <button> jump title 17; </button>

     <button> jump title 18; </button>

     <button> jump title 19; </button>

     <button> jump title 20; </button>

     <button> jump title 21; </button>

     <button> jump title 22; </button>

     <button> jump title 23; </button>

     <button> jump title 24; </button>

     <button> jump title 25; </button>

     <button> jump title 26; </button>

     <button> jump title 27; </button>

     <button> jump title 28; </button>

     <button> jump title 29; </button>

     <button> jump title 30; </button>

     <vob file="menu_1.mpg"/>

     <post> jump cell 1; </post>

    </pgc>

   </menus>

   <titles>

    <pgc>

     <pre> call vmgm menu 2; </pre>

     <vob file="aerosmith_-_walk-this-way.mpg" />

     <post> jump title 2; </post>

    </pgc>

    <pgc>

     <pre> jump title 1; </pre>

     <vob file="alanis-morissette_-_ironic-.mpg" />

     <post> jump title 3; </post>

    </pgc>

    <pgc>

     <pre> jump title 2; </pre>

     <vob file="alanis-morissette_-_you-oughta-know.mpg" />

     <post> jump title 4; </post>

    </pgc>

    <pgc>

     <pre> jump title 3; </pre>

     <vob file="alive_-_pearl-jam.mpg" />

     <post> jump title 5; </post>

    </pgc>

    <pgc>

     <pre> jump title 4; </pre>

     <vob file="and-she-was.mpg" />

     <post> jump title 6; </post>

    </pgc>

    <pgc>

     <pre> jump title 5; </pre>

     <vob file="angel.mpg" />

     <post> jump title 7; </post>

    </pgc>

    <pgc>

     <pre> jump title 6; </pre>

     <vob file="annie-lennox_-_no-more-i-love-you-s-.mpg" />

     <post> jump title 8; </post>

    </pgc>

    <pgc>

     <pre> jump title 7; </pre>

     <vob file="beach-boys-the_-_surfin-usa.mpg" />

     <post> jump title 9; </post>

    </pgc>

    <pgc>

     <pre> jump title 8; </pre>

     <vob file="berlin_-_take-my-breath-away.mpg" />

     <post> jump title 10; </post>

    </pgc>

    <pgc>

     <pre> jump title 9; </pre>

     <vob file="billy-idol_-_dancing-with-myself.mpg" />

     <post> jump title 11; </post>

    </pgc>

    <pgc>

     <pre> jump title 10; </pre>

     <vob file="billy-myers_-_kiss-the-rain.mpg" />

     <post> jump title 12; </post>

    </pgc>

    <pgc>

     <pre> jump title 11; </pre>

     <vob file="blink-182_-_all-the-small-things.mpg" />

     <post> jump title 13; </post>

    </pgc>

    <pgc>

     <pre> jump title 12; </pre>

     <vob file="bob-marley-and-funkstar-de-luxe_-_sun-is-shining.mpg" />

     <post> jump title 14; </post>

    </pgc>

    <pgc>

     <pre> jump title 13; </pre>

     <vob file="bob-marley_-_buffalo-soldier.mpg" />

     <post> jump title 15; </post>

    </pgc>

    <pgc>

     <pre> jump title 14; </pre>

     <vob file="bob-marley_-_could-you-be-loved.mpg" />

     <post> jump title 16; </post>

    </pgc>

    <pgc>

     <pre> jump title 15; </pre>

     <vob file="bob-marley_-_jammin.mpg" />

     <post> jump title 17; </post>

    </pgc>

    <pgc>

     <pre> jump title 16; </pre>

     <vob file="bob-marley_-_no-woman-no-cry.mpg" />

     <post> jump title 18; </post>

    </pgc>

    <pgc>

     <pre> jump title 17; </pre>

     <vob file="bob-marley_-_one-love.mpg" />

     <post> jump title 19; </post>

    </pgc>

    <pgc>

     <pre> jump title 18; </pre>

     <vob file="bon-jovi_-_always.mpg" />

     <post> jump title 20; </post>

    </pgc>

    <pgc>

     <pre> jump title 19; </pre>

     <vob file="bryan-addams_-_everything-i-do.mpg" />

     <post> jump title 21; </post>

    </pgc>

    <pgc>

     <pre> jump title 20; </pre>

     <vob file="careless-whisper.mpg" />

     <post> jump title 22; </post>

    </pgc>

    <pgc>

     <pre> jump title 21; </pre>

     <vob file="closing-time.mpg" />

     <post> jump title 23; </post>

    </pgc>

    <pgc>

     <pre> jump title 22; </pre>

     <vob file="coldplay_-_clocks.mpg" />

     <post> jump title 24; </post>

    </pgc>

    <pgc>

     <pre> jump title 23; </pre>

     <vob file="coldplay_-_god-put-a-smile-upon-your-face.mpg" />

     <post> jump title 25; </post>

    </pgc>

    <pgc>

     <pre> jump title 24; </pre>

     <vob file="coldplay_-_in-my-place.mpg" />

     <post> jump title 26; </post>

    </pgc>

    <pgc>

     <pre> jump title 25; </pre>

     <vob file="coldplay_-_the-scientist.mpg" />

     <post> jump title 27; </post>

    </pgc>

    <pgc>

     <pre> jump title 26; </pre>

     <vob file="coldplay_-_trouble.mpg" />

     <post> jump title 28; </post>

    </pgc>

    <pgc>

     <pre> jump title 27; </pre>

     <vob file="coldplay_-_yellow.mpg" />

     <post> jump title 29; </post>

    </pgc>

    <pgc>

     <pre> jump title 28; </pre>

     <vob file="cranberries_-_linger.mpg" />

     <post> jump title 30; </post>

    </pgc>

    <pgc>

     <pre> jump title 29; </pre>

     <vob file="cranberries_-_zombie.mpg" />

     <post> call vmgm menu 2; </post>

    </pgc>

   </titles>

  </titleset>

  <titleset>

   <menus>

    <pgc>

     <pre> { if (g1 gt 0) jump title 1 chapter 1; jump vmgm menu 2;} </pre>

     <button> jump titleset 1 menu; </button>

     <button> jump titleset 3 menu; </button>

     <button> jump title 1; </button>

     <button> jump title 2; </button>

     <button> jump title 3; </button>

     <button> jump title 4; </button>

     <button> jump title 5; </button>

     <button> jump title 6; </button>

     <button> jump title 7; </button>

     <button> jump title 8; </button>

     <button> jump title 9; </button>

     <button> jump title 10; </button>

     <button> jump title 11; </button>

     <button> jump title 12; </button>

     <button> jump title 13; </button>

     <button> jump title 14; </button>

     <button> jump title 15; </button>

     <button> jump title 16; </button>

     <button> jump title 17; </button>

     <button> jump title 18; </button>

     <button> jump title 19; </button>

     <button> jump title 20; </button>

     <button> jump title 21; </button>

     <button> jump title 22; </button>

     <button> jump title 23; </button>

     <button> jump title 24; </button>

     <button> jump title 25; </button>

     <button> jump title 26; </button>

     <button> jump title 27; </button>

     <button> jump title 28; </button>

     <button> jump title 29; </button>

     <button> jump title 30; </button>

     <vob file="menu_2.mpg"/>

     <post> jump cell 1; </post>

    </pgc>

   </menus>

   <titles>

    <pgc>

     <pre> call vmgm menu 2; </pre>

     <vob file="creedence-clearwater-revival_-_have-you-ever-seen-the-rain.mpg" />

     <post> jump title 2; </post>

    </pgc>

    <pgc>

     <pre> jump title 1; </pre>

     <vob file="dont-you-want-me.mpg" />

     <post> jump title 3; </post>

    </pgc>

    <pgc>

     <pre> jump title 2; </pre>

     <vob file="duran-duran_-_ordinary-world.mpg" />

     <post> jump title 4; </post>

    </pgc>

    <pgc>

     <pre> jump title 3; </pre>

     <vob file="duran-duran_-_rio.mpg" />

     <post> jump title 5; </post>

    </pgc>

    <pgc>

     <pre> jump title 4; </pre>

     <vob file="duran-duran_-_save-a-prayer.mpg" />

     <post> jump title 6; </post>

    </pgc>

    <pgc>

     <pre> jump title 5; </pre>

     <vob file="elton-john_-_don-t-let-the-sun-go-down-on-me.mpg" />

     <post> jump title 7; </post>

    </pgc>

    <pgc>

     <pre> jump title 6; </pre>

     <vob file="elton-john_-_i-m-still-standing.mpg" />

     <post> jump title 8; </post>

    </pgc>

    <pgc>

     <pre> jump title 7; </pre>

     <vob file="elton-john_-_sacrifice.mpg" />

     <post> jump title 9; </post>

    </pgc>

    <pgc>

     <pre> jump title 8; </pre>

     <vob file="elton-john_-_the-one.mpg" />

     <post> jump title 10; </post>

    </pgc>

    <pgc>

     <pre> jump title 9; </pre>

     <vob file="eric-clapton_-_i-shot-the-sheriff.mpg" />

     <post> jump title 11; </post>

    </pgc>

    <pgc>

     <pre> jump title 10; </pre>

     <vob file="eric-clapton_-_tears-in-heaven.mpg" />

     <post> jump title 12; </post>

    </pgc>

    <pgc>

     <pre> jump title 11; </pre>

     <vob file="eric-clapton_-_wonderful-tonight.mpg" />

     <post> jump title 13; </post>

    </pgc>

    <pgc>

     <pre> jump title 12; </pre>

     <vob file="foreigner_-_i-want-to-know-what-love-is.mpg" />

     <post> jump title 14; </post>

    </pgc>

    <pgc>

     <pre> jump title 13; </pre>

     <vob file="fugees_-_killing-me-softly.mpg" />

     <post> jump title 15; </post>

    </pgc>

    <pgc>

     <pre> jump title 14; </pre>

     <vob file="good-morning-vietnam_-_what-a-wonderful-world.mpg" />

     <post> jump title 16; </post>

    </pgc>

    <pgc>

     <pre> jump title 15; </pre>

     <vob file="goo-goo-dolls_-_name.mpg" />

     <post> jump title 17; </post>

    </pgc>

    <pgc>

     <pre> jump title 16; </pre>

     <vob file="guns-n-roses_-_paradise-city.mpg" />

     <post> jump title 18; </post>

    </pgc>

    <pgc>

     <pre> jump title 17; </pre>

     <vob file="guns-n-roses_-_swett-child-o-mine.mpg" />

     <post> jump title 19; </post>

    </pgc>

    <pgc>

     <pre> jump title 18; </pre>

     <vob file="guns-n-roses_-_welcome-to-the-jungle.mpg" />

     <post> jump title 20; </post>

    </pgc>

    <pgc>

     <pre> jump title 19; </pre>

     <vob file="holding-back-the-years.mpg" />

     <post> jump title 21; </post>

    </pgc>

    <pgc>

     <pre> jump title 20; </pre>

     <vob file="johnny-nash_-_i-can-see-clearly-now.mpg" />

     <post> jump title 22; </post>

    </pgc>

    <pgc>

     <pre> jump title 21; </pre>

     <vob file="john-travolta-and-olivia-newton-john_-_greased-lightning.mpg" />

     <post> jump title 23; </post>

    </pgc>

    <pgc>

     <pre> jump title 22; </pre>

     <vob file="john-travolta-and-olivia-newton-john_-_sandy.mpg" />

     <post> jump title 24; </post>

    </pgc>

    <pgc>

     <pre> jump title 23; </pre>

     <vob file="john-travolta-and-olivia-newton-john_-_summer-nights.mpg" />

     <post> jump title 25; </post>

    </pgc>

    <pgc>

     <pre> jump title 24; </pre>

     <vob file="john-travolta-and-olivia-newton-john_-_we-go-together.mpg" />

     <post> jump title 26; </post>

    </pgc>

    <pgc>

     <pre> jump title 25; </pre>

     <vob file="john-travolta-and-olivia-newton-john_-_you-re-the-one-that-i-want.mpg" />

     <post> jump title 27; </post>

    </pgc>

    <pgc>

     <pre> jump title 26; </pre>

     <vob file="kenny-loggins_-_footloose.mpg" />

     <post> jump title 28; </post>

    </pgc>

    <pgc>

     <pre> jump title 27; </pre>

     <vob file="led-zeppelin_-_stairway-to-heaven.mpg" />

     <post> jump title 29; </post>

    </pgc>

    <pgc>

     <pre> jump title 28; </pre>

     <vob file="lenny-kravitz_-_always-on-the-run.mpg" />

     <post> jump title 30; </post>

    </pgc>

    <pgc>

     <pre> jump title 29; </pre>

     <vob file="lenny-kravitz_-_american-woman.mpg" />

     <post> call vmgm menu 2; </post>

    </pgc>

   </titles>

  </titleset>

  <titleset>

   <menus>

    <pgc>

     <pre> { if (g1 gt 0) jump title 1 chapter 1; jump vmgm menu 2;} </pre>

     <button> jump titleset 2 menu; </button>

     <button> jump titleset 4 menu; </button>

     <button> jump title 1; </button>

     <button> jump title 2; </button>

     <button> jump title 3; </button>

     <button> jump title 4; </button>

     <button> jump title 5; </button>

     <button> jump title 6; </button>

     <button> jump title 7; </button>

     <button> jump title 8; </button>

     <button> jump title 9; </button>

     <button> jump title 10; </button>

     <button> jump title 11; </button>

     <button> jump title 12; </button>

     <button> jump title 13; </button>

     <button> jump title 14; </button>

     <button> jump title 15; </button>

     <button> jump title 16; </button>

     <button> jump title 17; </button>

     <button> jump title 18; </button>

     <button> jump title 19; </button>

     <button> jump title 20; </button>

     <button> jump title 21; </button>

     <button> jump title 22; </button>

     <button> jump title 23; </button>

     <button> jump title 24; </button>

     <button> jump title 25; </button>

     <button> jump title 26; </button>

     <button> jump title 27; </button>

     <button> jump title 28; </button>

     <button> jump title 29; </button>

     <button> jump title 30; </button>

     <vob file="menu_3.mpg"/>

     <post> jump cell 1; </post>

    </pgc>

   </menus>

   <titles>

    <pgc>

     <pre> call vmgm menu 2; </pre>

     <vob file="linkin-park_-_crawling.mpg" />

     <post> jump title 2; </post>

    </pgc>

    <pgc>

     <pre> jump title 1; </pre>

     <vob file="linkin-park_-_forgotten.mpg" />

     <post> jump title 3; </post>

    </pgc>

    <pgc>

     <pre> jump title 2; </pre>

     <vob file="linkin-park_-_one-step-closer.mpg" />

     <post> jump title 4; </post>

    </pgc>

    <pgc>

     <pre> jump title 3; </pre>

     <vob file="linkin-park_-_papercut.mpg" />

     <post> jump title 5; </post>

    </pgc>

    <pgc>

     <pre> jump title 4; </pre>

     <vob file="linkin-park_-_points-of-authority.mpg" />

     <post> jump title 6; </post>

    </pgc>

    <pgc>

     <pre> jump title 5; </pre>

     <vob file="linkin-park_-_pushing-me-away.mpg" />

     <post> jump title 7; </post>

    </pgc>

    <pgc>

     <pre> jump title 6; </pre>

     <vob file="linkin-park_-_runaway.mpg" />

     <post> jump title 8; </post>

    </pgc>

    <pgc>

     <pre> jump title 7; </pre>

     <vob file="michael-jackson_-_abc.mpg" />

     <post> jump title 9; </post>

    </pgc>

    <pgc>

     <pre> jump title 8; </pre>

     <vob file="michael-jackson_-_billie-jean.mpg" />

     <post> jump title 10; </post>

    </pgc>

    <pgc>

     <pre> jump title 9; </pre>

     <vob file="michael-jackson_-_i-just-can-t-stop-loving-you.mpg" />

     <post> jump title 11; </post>

    </pgc>

    <pgc>

     <pre> jump title 10; </pre>

     <vob file="michael-jackson_-_i-want-you-back.mpg" />

     <post> jump title 12; </post>

    </pgc>

    <pgc>

     <pre> jump title 11; </pre>

     <vob file="michael-jackson_-_the-way-you-make-me-feel-the.mpg" />

     <post> jump title 13; </post>

    </pgc>

    <pgc>

     <pre> jump title 12; </pre>

     <vob file="oasis_-_champagne-supernova.mpg" />

     <post> jump title 14; </post>

    </pgc>

    <pgc>

     <pre> jump title 13; </pre>

     <vob file="oasis_-_half-the-world-away.mpg" />

     <post> jump title 15; </post>

    </pgc>

    <pgc>

     <pre> jump title 14; </pre>

     <vob file="oasis_-_live-forever.mpg" />

     <post> jump title 16; </post>

    </pgc>

    <pgc>

     <pre> jump title 15; </pre>

     <vob file="oasis_-_rock-and-roll-star.mpg" />

     <post> jump title 17; </post>

    </pgc>

    <pgc>

     <pre> jump title 16; </pre>

     <vob file="oasis_-_roll-with-it.mpg" />

     <post> jump title 18; </post>

    </pgc>

    <pgc>

     <pre> jump title 17; </pre>

     <vob file="oasis_-_she-s-electric.mpg" />

     <post> jump title 19; </post>

    </pgc>

    <pgc>

     <pre> jump title 18; </pre>

     <vob file="oasis_-_some-might-say.mpg" />

     <post> jump title 20; </post>

    </pgc>

    <pgc>

     <pre> jump title 19; </pre>

     <vob file="oasis_-_whatever.mpg" />

     <post> jump title 21; </post>

    </pgc>

    <pgc>

     <pre> jump title 20; </pre>

     <vob file="oasis_-_wonderwall.mpg" />

     <post> jump title 22; </post>

    </pgc>

    <pgc>

     <pre> jump title 21; </pre>

     <vob file="patrick-swayze_-_she-s-like-the-wind.mpg" />

     <post> jump title 23; </post>

    </pgc>

    <pgc>

     <pre> jump title 22; </pre>

     <vob file="phil-collins_-_two-hearts.mpg" />

     <post> jump title 24; </post>

    </pgc>

    <pgc>

     <pre> jump title 23; </pre>

     <vob file="police_-_roxanne.mpg" />

     <post> jump title 25; </post>

    </pgc>

    <pgc>

     <pre> jump title 24; </pre>

     <vob file="pretenders_-_the-back-on-the-chain-gang.mpg" />

     <post> jump title 26; </post>

    </pgc>

    <pgc>

     <pre> jump title 25; </pre>

     <vob file="pretender-the_-_foo-fighters.mpg" />

     <post> jump title 27; </post>

    </pgc>

    <pgc>

     <pre> jump title 26; </pre>

     <vob file="pretty-woman.mpg" />

     <post> jump title 28; </post>

    </pgc>

    <pgc>

     <pre> jump title 27; </pre>

     <vob file="queen_-_7-seas-of-rye.mpg" />

     <post> jump title 29; </post>

    </pgc>

    <pgc>

     <pre> jump title 28; </pre>

     <vob file="queen_-_another-one-bites-the-dust.mpg" />

     <post> jump title 30; </post>

    </pgc>

    <pgc>

     <pre> jump title 29; </pre>

     <vob file="queen_-_bohemian-rhapsody.mpg" />

     <post> call vmgm menu 2; </post>

    </pgc>

   </titles>

  </titleset>

  <titleset>

   <menus>

    <pgc>

     <pre> { if (g1 gt 0) jump title 1 chapter 1; jump vmgm menu 2;} </pre>

     <button> jump titleset 3 menu; </button>

     <button> jump titleset 5 menu; </button>

     <button> jump title 1; </button>

     <button> jump title 2; </button>

     <button> jump title 3; </button>

     <button> jump title 4; </button>

     <button> jump title 5; </button>

     <button> jump title 6; </button>

     <button> jump title 7; </button>

     <button> jump title 8; </button>

     <button> jump title 9; </button>

     <button> jump title 10; </button>

     <button> jump title 11; </button>

     <button> jump title 12; </button>

     <button> jump title 13; </button>

     <button> jump title 14; </button>

     <button> jump title 15; </button>

     <button> jump title 16; </button>

     <button> jump title 17; </button>

     <button> jump title 18; </button>

     <button> jump title 19; </button>

     <button> jump title 20; </button>

     <button> jump title 21; </button>

     <button> jump title 22; </button>

     <button> jump title 23; </button>

     <button> jump title 24; </button>

     <button> jump title 25; </button>

     <button> jump title 26; </button>

     <button> jump title 27; </button>

     <button> jump title 28; </button>

     <button> jump title 29; </button>

     <button> jump title 30; </button>

     <vob file="menu_4.mpg"/>

     <post> jump cell 1; </post>

    </pgc>

   </menus>

   <titles>

    <pgc>

     <pre> call vmgm menu 2; </pre>

     <vob file="queen_-_breakthru.mpg" />

     <post> jump title 2; </post>

    </pgc>

    <pgc>

     <pre> jump title 1; </pre>

     <vob file="queen_-_don-t-stop-me-now.mpg" />

     <post> jump title 3; </post>

    </pgc>

    <pgc>

     <pre> jump title 2; </pre>

     <vob file="queen_-_friends-will-be-friends.mpg" />

     <post> jump title 4; </post>

    </pgc>

    <pgc>

     <pre> jump title 3; </pre>

     <vob file="queen_-_innuendo.mpg" />

     <post> jump title 5; </post>

    </pgc>

    <pgc>

     <pre> jump title 4; </pre>

     <vob file="queen_-_it-s-a-kind-of-magic.mpg" />

     <post> jump title 6; </post>

    </pgc>

    <pgc>

     <pre> jump title 5; </pre>

     <vob file="queen_-_i-want-to-break-free.mpg" />

     <post> jump title 7; </post>

    </pgc>

    <pgc>

     <pre> jump title 6; </pre>

     <vob file="queen_-_killer-queen.mpg" />

     <post> jump title 8; </post>

    </pgc>

    <pgc>

     <pre> jump title 7; </pre>

     <vob file="queen_-_radio-ga-ga.mpg" />

     <post> jump title 9; </post>

    </pgc>

    <pgc>

     <pre> jump title 8; </pre>

     <vob file="queen_-_show-must-go-on-the.mpg" />

     <post> jump title 10; </post>

    </pgc>

    <pgc>

     <pre> jump title 9; </pre>

     <vob file="queen_-_somebody-to-love.mpg" />

     <post> jump title 11; </post>

    </pgc>

    <pgc>

     <pre> jump title 10; </pre>

     <vob file="queen_-_under-pressure.mpg" />

     <post> jump title 12; </post>

    </pgc>

    <pgc>

     <pre> jump title 11; </pre>

     <vob file="queen_-_we-are-the-champions.mpg" />

     <post> jump title 13; </post>

    </pgc>

    <pgc>

     <pre> jump title 12; </pre>

     <vob file="queen_-_who-wants-to-live-forever.mpg" />

     <post> jump title 14; </post>

    </pgc>

    <pgc>

     <pre> jump title 13; </pre>

     <vob file="radiohead_-_creep.mpg" />

     <post> jump title 15; </post>

    </pgc>

    <pgc>

     <pre> jump title 14; </pre>

     <vob file="radiohead_-_karma-police.mpg" />

     <post> jump title 16; </post>

    </pgc>

    <pgc>

     <pre> jump title 15; </pre>

     <vob file="richie-valens_-_la-bamba.mpg" />

     <post> jump title 17; </post>

    </pgc>

    <pgc>

     <pre> jump title 16; </pre>

     <vob file="roxette_-_listen-to-your-heart.mpg" />

     <post> jump title 18; </post>

    </pgc>

    <pgc>

     <pre> jump title 17; </pre>

     <vob file="simply-red_-_stars.mpg" />

     <post> jump title 19; </post>

    </pgc>

    <pgc>

     <pre> jump title 18; </pre>

     <vob file="sixteen-tons.mpg" />

     <post> jump title 20; </post>

    </pgc>

    <pgc>

     <pre> jump title 19; </pre>

     <vob file="so-far-away-from-me.mpg" />

     <post> jump title 21; </post>

    </pgc>

    <pgc>

     <pre> jump title 20; </pre>

     <vob file="sound-garden_-_spoonman.mpg" />

     <post> jump title 22; </post>

    </pgc>

    <pgc>

     <pre> jump title 21; </pre>

     <vob file="soundgarden_-_superunknown.mpg" />

     <post> jump title 23; </post>

    </pgc>

    <pgc>

     <pre> jump title 22; </pre>

     <vob file="stevie-wonder_-_i-just-called-to-say-i-love-you.mpg" />

     <post> jump title 24; </post>

    </pgc>

    <pgc>

     <pre> jump title 23; </pre>

     <vob file="stone-temple-pilots_-_plush.mpg" />

     <post> jump title 25; </post>

    </pgc>

    <pgc>

     <pre> jump title 24; </pre>

     <vob file="tainted-love.mpg" />

     <post> jump title 26; </post>

    </pgc>

    <pgc>

     <pre> jump title 25; </pre>

     <vob file="take-that_-_back-for-good.mpg" />

     <post> jump title 27; </post>

    </pgc>

    <pgc>

     <pre> jump title 26; </pre>

     <vob file="take-that_-_how-deep-is-your-love.mpg" />

     <post> jump title 28; </post>

    </pgc>

    <pgc>

     <pre> jump title 27; </pre>

     <vob file="tears-for-fears_-_everybody-wants-to-rule-the-world.mpg" />

     <post> jump title 29; </post>

    </pgc>

    <pgc>

     <pre> jump title 28; </pre>

     <vob file="the-bangels_-_eternal-flame.mpg" />

     <post> jump title 30; </post>

    </pgc>

    <pgc>

     <pre> jump title 29; </pre>

     <vob file="the-calling_-_wherever-you-will-go.mpg" />

     <post> call vmgm menu 2; </post>

    </pgc>

   </titles>

  </titleset>

  <titleset>

   <menus>

    <pgc>

     <pre> { if (g1 gt 0) jump title 1 chapter 1; jump vmgm menu 2;} </pre>

     <button> jump titleset 4 menu; </button>

     <button> jump vmgm menu 2; </button>

     <button> jump title 1; </button>

     <button> jump title 2; </button>

     <button> jump title 3; </button>

     <button> jump title 4; </button>

     <button> jump title 5; </button>

     <button> jump title 6; </button>

     <button> jump title 7; </button>

     <button> jump title 8; </button>

     <button> jump title 9; </button>

     <button> jump title 10; </button>

     <button> jump title 11; </button>

     <button> jump title 12; </button>

     <button> jump title 13; </button>

     <button> jump title 14; </button>

     <button> jump title 15; </button>

     <button> jump title 16; </button>

     <button> jump title 17; </button>

     <button> jump title 18; </button>

     <button> jump title 19; </button>

     <button> jump title 20; </button>

     <button> jump title 21; </button>

     <button> jump title 22; </button>

     <button> jump title 23; </button>

     <button> jump title 24; </button>

     <button> jump title 25; </button>

     <button> jump title 26; </button>

     <button> jump title 27; </button>

     <button> jump title 28; </button>

     <vob file="menu_5.mpg"/>

     <post> jump cell 1; </post>

    </pgc>

   </menus>

   <titles>

    <pgc>

     <pre> call vmgm menu 2; </pre>

     <vob file="the-eagles_-_hotel-california.mpg" />

     <post> jump title 2; </post>

    </pgc>

    <pgc>

     <pre> jump title 1; </pre>

     <vob file="the-platters_-_only-you.mpg" />

     <post> jump title 3; </post>

    </pgc>

    <pgc>

     <pre> jump title 2; </pre>

     <vob file="time-of-my-life.mpg" />

     <post> jump title 4; </post>

    </pgc>

    <pgc>

     <pre> jump title 3; </pre>

     <vob file="tosh-peter_-_get-up-stand-up.mpg" />

     <post> jump title 5; </post>

    </pgc>

    <pgc>

     <pre> jump title 4; </pre>

     <vob file="u2_-_all-along-the-watchtower.mpg" />

     <post> jump title 6; </post>

    </pgc>

    <pgc>

     <pre> jump title 5; </pre>

     <vob file="u2_-_all-i-want-is-you.mpg" />

     <post> jump title 7; </post>

    </pgc>

    <pgc>

     <pre> jump title 6; </pre>

     <vob file="u2_-_beautiful-day.mpg" />

     <post> jump title 8; </post>

    </pgc>

    <pgc>

     <pre> jump title 7; </pre>

     <vob file="u2_-_elevation.mpg" />

     <post> jump title 9; </post>

    </pgc>

    <pgc>

     <pre> jump title 8; </pre>

     <vob file="u2_-_helter-skelter.mpg" />

     <post> jump title 10; </post>

    </pgc>

    <pgc>

     <pre> jump title 9; </pre>

     <vob file="u2_-_in-a-little-while.mpg" />

     <post> jump title 11; </post>

    </pgc>

    <pgc>

     <pre> jump title 10; </pre>

     <vob file="u2_-_in-gods-country.mpg" />

     <post> jump title 12; </post>

    </pgc>

    <pgc>

     <pre> jump title 11; </pre>

     <vob file="u2_-_i-still-haven-t-found-what-i-m-looking-for.mpg" />

     <post> jump title 13; </post>

    </pgc>

    <pgc>

     <pre> jump title 12; </pre>

     <vob file="u2_-_last-night-on-earth.mpg" />

     <post> jump title 14; </post>

    </pgc>

    <pgc>

     <pre> jump title 13; </pre>

     <vob file="u2_-_mothers-of-the-disappeared.mpg" />

     <post> jump title 15; </post>

    </pgc>

    <pgc>

     <pre> jump title 14; </pre>

     <vob file="u2_-_mysterious-ways.mpg" />

     <post> jump title 16; </post>

    </pgc>

    <pgc>

     <pre> jump title 15; </pre>

     <vob file="u2_-_new-years-day.mpg" />

     <post> jump title 17; </post>

    </pgc>

    <pgc>

     <pre> jump title 16; </pre>

     <vob file="u2_-_one.mpg" />

     <post> jump title 18; </post>

    </pgc>

    <pgc>

     <pre> jump title 17; </pre>

     <vob file="u2_-_please.mpg" />

     <post> jump title 19; </post>

    </pgc>

    <pgc>

     <pre> jump title 18; </pre>

     <vob file="u2_-_pride.mpg" />

     <post> jump title 20; </post>

    </pgc>

    <pgc>

     <pre> jump title 19; </pre>

     <vob file="u2_-_staring-at-the-sun.mpg" />

     <post> jump title 21; </post>

    </pgc>

    <pgc>

     <pre> jump title 20; </pre>

     <vob file="u2_-_stuck-in-a-moment-with-you-can-t-get-out.mpg" />

     <post> jump title 22; </post>

    </pgc>

    <pgc>

     <pre> jump title 21; </pre>

     <vob file="u2_-_who-s-gonna-ride-your-wild-horses.mpg" />

     <post> jump title 23; </post>

    </pgc>

    <pgc>

     <pre> jump title 22; </pre>

     <vob file="u2_-_wild-honey.mpg" />

     <post> jump title 24; </post>

    </pgc>

    <pgc>

     <pre> jump title 23; </pre>

     <vob file="u2_-_with-or-without-you.mpg" />

     <post> jump title 25; </post>

    </pgc>

    <pgc>

     <pre> jump title 24; </pre>

     <vob file="unchained-melody.mpg" />

     <post> jump title 26; </post>

    </pgc>

    <pgc>

     <pre> jump title 25; </pre>

     <vob file="verve_-_lucky-man.mpg" />

     <post> jump title 27; </post>

    </pgc>

    <pgc>

     <pre> jump title 26; </pre>

     <vob file="waiting-for-a-girl-like-you.mpg" />

     <post> jump title 28; </post>

    </pgc>

    <pgc>

     <pre> jump title 27; </pre>

     <vob file="you-are-so-beautiful.mpg" />

     <post> call vmgm menu 2; </post>

    </pgc>

   </titles>

  </titleset>

 </dvdauthor>

```

----------

## Jim6

Personally, I use:

media-video/devede

which makes the whole process completely simple. 

It's an all-gui affair, with minimal knowledge / experience needed.

----------

## Kate Monster

Hi.

When running the very first step I get an error:

```
#transcode -i The_Girl_Who_Leapt_Through_Time_\(2006\)_\[720p\,BluRay\,x264\]_-_THORA.mkv -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o matrix -D0 -b224 -N 0x2000 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 29.97

*snip*

[export_ffmpeg.so] No audio resampling necessary, using 48000 Hz

[transcode] PCM -> AC3

codec type or id mismatches

[transcode] warning: tc_audio_init_ffmpeg: could not open mpa codec !

[encoder.c] warning: audio export module error: init failed

[transcode] critical: failed to init encoder
```

 my ffmpeg has these use flags:

```
[ebuild   R   ] media-video/ffmpeg-0.5_p20373  USE="3dnow 3dnowext X alsa cpudetection doc encode faac* hardcoded-tables ipv6 mmx mmxext mp3 oss sdl ssse3 theora v4l v4l2 vorbis x264 xvid zlib (-altivec) -bindist -custom-cflags -debug -dirac -faad -gsm -ieee1394 -jack -jpeg2k -network -opencore-amr -pic -schroedinger -speex -test -threads -vdpau" VIDEO_CARDS="nvidia" 0 kB
```

----------

## jimmij

```

codec type or id mismatches

[transcode] warning: tc_audio_init_ffmpeg: could not open mpa codec !

[encoder.c] warning: audio export module error: init failed

[transcode] critical: failed to init encoder
```

Same problem here. Anyone knows in which package "mpa codec" can be found?

----------

## direwolf

 *Xaero wrote:*   

> Hi.
> 
> When running the very first step I get an error:
> 
> ```
> ...

 

Happening to me, too with ffmpeg-0.5_p20373 and transcode-1.1.5-r1.  I can't seem to find a way to fix this.  Anyone?

FIXED with this patch:  http://www.mail-archive.com/transcode-users@exit1.org/msg02234.html

----------

## evoweiss

Hi all,

This thread was helpful in getting me started. However, I had a question that maybe somebody can help out with.

I have a foreign language DVD, though one without subtitles. I picked up a subtitle file (.ass) and would like to essentially copy the DVD material to my HDD, add the subtitles, and then burn it to another DVD. In other words, re-master the DVDs and add subtitles. Is this possible?

Best,

Alex

----------

