Technology
 

Common tovid problems

From Tovid Wiki

This page lists error messages and other problems that may occur when using programs in the tovid suite, along with any known solutions.

Contents

[edit] Command-line errors

[edit] ERROR: charset conversion failed

This is a problem that crops up with some versions of 'vcdxbuild'. If it happens to you, try using:

vcdxbuild --filename-encoding=iso8859-1 my_disc.xml

[edit] unable to open64("/dev/dvd",O_RDONLY): Permission denied

If you get this error with makedvd, it probably means you don't have permission to burn DVDs, and must burn them as the root user. To burn as root, run

   su -c "makedvd -burn MyDisc.xml"

[edit] mkfifo: cannot create fifo 'stream.yuv': Operation not permitted

This may occur if you are using Windows filesystems like vfat, NTFS, or another filesystem that doesn't support FIFOs. To remedy this, run tovid from a Linux filesystem (like ext3 or reiserfs), or edit your ~/.tovid/preferences file and set:

WORKING_DIR=/home/eric/tmp

giving a directory on a FIFO-capable filesystem.

[edit] Syntax error: Bad substitution

See /bin/sh doesn't point to bash


[edit] GUI errors

[edit] No module named wxPython.wx

or

[edit] Error -3 while decompressing data: invalid window size

wxPython problems have been reported with Mandriva and other Mandrake Linux distributions. One possible solution is to upgrade wxPythonGTK using the latest source RPM from Cooker.

[edit] AttributeError: 'module' object has no attribute 'SimpleHelpProvider'

You probably need to install wxPython version 2.6 (and ensure that if you also have wxPython 2.4 installed, your 2.6 libs are used by default).

[edit] ImportError: No module named libtovid.gui.frames

(or similar) This means libtovid is installed where Python can't find it. On some distributions (Gentoo, Slackware, Arch, and Fedora Core 4 reported), Python does not include /usr/local in its module search path--meaning, if libtovid is there, it won't work. One way to fix this is to run:

./configure --prefix=/usr

when installing tovid. Another solution is to create a symbolic link (as root):

ln -s /usr/lib/python2.4/site-packages \
      /usr/local/lib/python2.4/site-packages

In case you are running openSUSE 10.1 x64_64, you should create a symbolic link (as root) with the following command:

ln -s /usr/lib/python2.4/site-packages/libtovid/ \
      /usr/lib64/python2.4/site-packages/libtovid

This problem can also occur if your default version of python is different to the one expect by tovid. For example, on my machine it is 2.4 :

ls -l `which python`
lrwxrwxrwx 1 root root 9 2007-01-04 18:50 /usr/bin/python -> python2.4

but the latest packaged version of tovid uses python2.5.

My naive, short sighted solution was to use an older version of tovid, which uses python2.4.

[edit] ImportError: No module named wx

First, make sure you have wxGTK installed. If so, you may be dealing with a distribution-specific "standard" python version mismatch. For exmple on debian/etch, the default python version is 2.3, and so the wx packages are installed in /usr/lib/python2.3/site-packages. But tovidgui uses python 2.4 (and it looks for wx in /usr/lib/python2.4/site-packages). Linking the python2.3 wx packages to the python2.4 site-packages directory is a fix. For example (as root):

ln -s /usr/lib/python2.3/site-packages/wx.pth \
      /usr/lib/python2.4/site-packages/wx.pth
 ln -s /usr/lib/python2.3/site-packages/wx-2.6-gtk2-unicode \
       /usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode

[edit] ImportError: No module named wxversion

(Followed by explanation) tovidgui 0.26 has a new dependency: wxversion. On many distributions, this is a separate package from the main wx package (for example, in debian, it's called python-wxversion). Please find it for your system and install it.


[edit] Missing Interface

The GUI seems to be missing part of its interface (buttons, text, etc.); I can't choose a disc or TV format or I can't choose a font; I just see empty boxes.

Try switching to a different GTK theme (especially if you use a custom theme in Gnome). Certain themes have been known to cause problems with the tovid GUI widgets. One that has been reported to work is GrandCanyon. If you don't use GNOME, you can use gtk-theme-switch to change your GTK theme.

I was using KDE 3.3.5 on openSUSE 10.2. I had to install gtk2-themes in YaST2 and then select the Mist theme in Control Centre (Configure Desktop), Appearance & Themes, GTK Styles and Fonts.

In another GTK related issue in Ubuntu 7.04, the error 'tovidgui requires wxPython 2.6; please install or upgrade wxPython.' may be shown. Installing the packages python-wxgtk2.8 and python-wxversion seemed to do the trick.

To install them in Ubuntu use:

 sudo apt-get install python-wxversion python-wxgtk2.8

Alternatively, locate them manually in synaptic package manager and install from there.

[edit] Other problems

[edit] Missing output file

If tovid says "Copying the existing audio stream ...", and you end up with no .mpg file at the end, chances are that multiplexing failed (though tovid may say otherwise). Try using the -force option. This will force the audio stream to be re-encoded, and multiplexing should work.

If you continue to experience problems, use the -keepfiles option to save the streams, in case multiplexing fails--then you may be able to manually multiplex them.

If even that fails, as it did for me on a couple of avi's, try using something from the command line like:

 $ mencoder INFILE -ofps 25 -ovc lavc -oac lavc \
       -vf scale=352,harddup \
       -srate 48000 -af lavcresample=48000 \
       -lavcopts codec=mp2:abitrate=224:vcodec=mpeg1video:vrc_buf_size=327:vrc_minrate=1152:vrc_maxrate=1152:vbitrate=1152:keyint=15:aspect=4/3 \
       -of mpeg -o OUTFILE

Then run your usual tovid on the resulting OUTFILE. This worked for me, although it added a step. I was trying to create dvd-vcd files (hence the 48000 sample rate), and I couldn't figure out the video flags to send to end up with correct video. This cleans up the file to a point and I didn't have any problems with them afterwards.

[edit] /bin/sh link doesn't point to bash (Ubuntu)

(Only necessary in Ubuntu Edgy Eft, not required for any version prior to Edgy Eft, and only affects tovid version 0.28)

Apparently Ubuntu has recently moved to using /bin/dash as its default shell which causes problems as many tovid scripts use #!/bin/sh and depend on certain bash features.

This problem will probably manifest itself as syntax errors such as:

...tovid-init: 299: Syntax error: Bad substitution

For now an easy work-around is to edit the scripts manually and replace #!/bin/sh shebang (1st line of each script) with:

#!/usr/bin/env bash

or if you don't care to have dash as your /bin/sh symlink, change it to point to bash. On Ubuntu you can achieve this by:

sudo dpkg-reconfigure bash

On other systems you can do (as root):

cd /bin && ln -sf bash sh

In the future tovid scripts will move to using "#!/usr/bin/env bash" as the shebang, so the problem will hopefully go away.

[edit] todisc stalls when transcode seeks in files

I noticed this problem after a recent transcode upgrade. It appears to be a subtle transcode bug, and for me occurs about 1 time out of 10 when using the same commands and same files.

In 0.30 there is a check_stall() function that sends a HUP to transcode if things appear not to be moving forward. This work-a-round seems to work well, inelegant as it may be. If you get a pause while transcoding followed by a line with "HUP" in it, that is what is being invoked. Just be patient and let it run, things should be OK.

[edit] No sound when encoding Matroska (.mkv) files

Matroska files present a few rather esoteric problems; one that seems to happen more regularly than most is the audio track is silent, even when -force is used. In such cases, the simplest fix seems to be to use mencoder to create an avi with pcm sound, then encode that avi.

 mencoder -oac pcm -ovc copy -o FILENAME.avi INFILE

will create a file that encodes with no problem.

[edit] Subtitles too close to bottom of screen to read

This problem occurs more on older CRT-based televisions, but it's not unheard of on LCDs either. The problem lies in the fact that some televisions have a percentage of the screen outside the visible area, so subtitles are there, but are often partially or totally obscured.

The solution to this is to use tovid's safe area, but it's important to let mencoder know not to use the subsequent border for the subtitles. The optimum solution (for my television, at any rate) is to use a border of 10% of the screen size.

First, modify ~/.tovid/tovid.config to include the line

 -safe 90%

and then add to ~/.mplayer/mencoder.conf the line

 subwidth=90

This will allow the full subtitle to be read.

[edit] Sox error

If you are on a debian based distro like Ubuntu (or debian !), and you get an error similar to:

sox soxio: Failed reading `/tmp/todisc-work.1/intro.wav': unknown file type `auto'
mv: cannot stat `/tmp/todisc-work.1/intro-processed.wav': No such file or directory

it is caused by the fact that the sox package was recently split into many sub packages. The problem is solved by:

 apt-get install libsox-fmt-all

[edit] New SoX version

Newer SoX versions (14.1.0 for sure) have changed the command line options for sample size. What used to be

-b|-w|-l for byte, word and long

has become

-1|-2|-3|-4|-8 for sample size in bytes.

So the line in todisc that is currently (in .31)

   cat /dev/zero 2>/dev/null | nice -n 0 sox -t raw -c 2 -r 48000 -w \
   -s - $WORK_DIR/intro.wav  trim 0 $MENU_ATIME

must be changed to

   cat /dev/zero 2>/dev/null | nice -n 0 sox -t raw -c 2 -r 48000 -2 \
   -s - $WORK_DIR/intro.wav  trim 0 $MENU_ATIME