Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137530 - mjpegtools-1.8.0-r1 lav2mpeg fails to process cli switches
Summary: mjpegtools-1.8.0-r1 lav2mpeg fails to process cli switches
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-21 17:39 UTC by Robert Tseu
Modified: 2009-07-22 23:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Tseu 2006-06-21 17:39:29 UTC
mjpegtools-1.8.0-r1 installed

Having problems using the lav2mpeg script from mjpegtools-1.8.0-r1 to convert dv quicktime files captured from a dv camera to vcd compliant mpeg files whenever i use a command line switch like -m to set the encoding mode. I get the following error:

bobert@it7 /tmp/lav $ lav2mpeg -m vcd_high dvgrab-001.mov
/usr/bin/lav2mpeg: line 256: shift: 3-1: numeric argument required
08:03:09 -  mode=vcd_high -
**ERROR: [lavinfo] Error opening -m: No such file or directory
08:03:09 - 'lavinfo -m vcd_high dvgrab-001.mov' died! exiting
08:03:09 -  maybe you don't have lavinfo. or your input flags were wrong
08:03:09 -  input files must be the last input on the command line

Workaround change line 256 in /usr/bin/lav2mpeg from

shift `expr $MOPTIND-1`

to 

shift $(($MOPTIND-1))

Hope this helps.




emerge info:-
Portage 2.1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r3, 2.6.16-gentoo-                                              r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer -funroll-loops"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shu                                              tdown /usr/lib/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer -funroll-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mymirror.asiaosc.org/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress                                               --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/d                                              istfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 7zip X a52 aac alsa apache2 apm asf audiofile avi berkdb bitmap-fonts b                                              zip2 cairo cdparanoia cdr cli crypt cups curl divx dri dv dvd dvdr dvdread embos                                              s encode exif expat fam fame ffmpeg foomaticdb fortran gdbm gif glut gphoto2 gpm                                               gstreamer gtk gtk2 idn ieee1394 imagemagick imlib ipv6 isdnlog jack java jpeg l                                              cms libg++ libwww live mad matroska mikmod mmx mng motif mp3 mpeg ncurses networ                                              k nls npltonly nptl nvidia offensive ogg oggvorbis opengl oss pam pcre pdflib pe                                              rl plugin png pppd python qt quicktime rar readline real reflection sdl session                                               spell spl sse sse2 ssl subtitles svg tcltk tcpd theora tiff truetype truetype-fo                                              nts type1-fonts udev unicode usb v4l v4l2 vcd vorbis win32codecs x264 xine xml x                                              ml2 xmms xorg xv xvid zlib elibc_glibc kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTA                                              GE_RSYNC_EXTRA_OPTS
Comment 1 Matthias Schwarzott gentoo-dev 2006-08-28 14:23:28 UTC
The problem here seems to be that lav2mpeg starts lavinfo and just uses bash's eval on the returned info. 
# eval $($LAVINFO $@ | grep "=")

But lavinfo returnes lines like this:
video_inter=***BOGUS/UNKNOWN*** interlacing

That means that at least all spaces in the output must be quoted like this:
# eval $($LAVINFO $@ | grep "=" | sed -e 's: :\\ :g')

But the problem continues than as that value is compared against "1" later on:
# if [ $video_inter -eq 1 ]; then

Perhaps changing to
# if [[ ${video_inter/interlacing} != ${video_inter} ]]; then
helps.
Comment 2 Matthias Schwarzott gentoo-dev 2006-11-19 09:24:58 UTC
Applied changes to mjpegtools-1.8.0-r2, hopefully it works that way now.
Comment 3 Matthias Schwarzott gentoo-dev 2007-02-26 17:37:24 UTC
I also consider this bug not resolved.
Comment 4 Steve Dibb (RETIRED) gentoo-dev 2009-01-10 12:12:19 UTC
zzam, whats the status on this one?
Comment 5 Matthias Schwarzott gentoo-dev 2009-01-10 14:15:31 UTC
beandog, I have not used this after last time touching this, so I have no idea about the status.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2009-07-22 23:25:36 UTC
obsolete bug. 1.9.0 is stable on all arch's. no up to date information provided, closing as TEST-REQUEST.