Error "-b is ambiguous" using ffmpeg

1,051 views
Skip to first unread message

ToK

unread,
Jun 2, 2012, 5:25:54 AM6/2/12
to DeVeDe forum
Hi everybody

I have an mkv movie with 2 audio tracks (german, englisch). I want to
make a dvd which contains both audio tracks. So I set the preferences
to use ffmpeg instead of mencoder (is it right? using mencoder breaks
the sound...)
After start converting I get the following messages:



devede

** (process:8589): WARNING **: Trying to register gtype
'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:8589): WARNING **: Trying to register gtype
'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:8589): WARNING **: Trying to register gtype
'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
DeVeDe 3.22.0
Locale: de_DE.utf8
Using package-installed files
/home/thomas/
Cores: 2 Virtual cores: 2
Entro en fonts
Salgo de fonts
/home/thomas/
Temp Directory is: /var/tmp
home load: /home/thomas/.devede
linea: video_format:pal

linea: temp_folder:/var/tmp/

linea: multicore:1

linea: hyperthreading:0

linea: final_folder:/home/thomas

linea: sub_language:EN (ENGLISH)

linea: sub_codepage:ISO-8859-1

linea: AC3_fix:0

linea: erase_tmp_files:1

linea: use_ffmpeg:1

linea: use_ffmpeg_menu:0

linea:
Creating window /usr/share/devede/wdisk_type.ui
Creating window /usr/share/devede/wmain.ui
/usr/lib/devede/devede_other.py:734: GtkWarning: Unknown property:
GtkMenu.ubuntu-local
tree.add_from_file(filename)
Launching program: mplayer -loop 1 -identify -ao null -vo null -
frames 0 /usr/share/devede/silence.ogg
elemento: /usr/bin
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.
Longitud sonido: 32
Launching program: mplayer -loop 1 -identify -ao null -vo null -
frames 0 /usr/share/devede/silence.ogg
elemento: /usr/bin
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.
Longitud sonido: 32
Calculating size for disk :dvd
Calculating size for disk :dvd
Creating window /usr/share/devede/wfile.ui
Anado filtro
Anado filtro
entro en parte critica
paso por set_lower
Fin
File changed to /home/thomas/movie.mkv
Launching program: mplayer -loop 1 -identify -ao null -vo null -
frames 0 /home/thomas/movie.mkv
elemento: /usr/bin
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.
Launching program: mplayer -loop 1 -identify -ao null -vo null -
frames 1 /home/thomas/movie.mkv
elemento: /usr/bin
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.
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
entro en parte critica
paso por set_lower
Activo ASPECT_RATIO
dvd
Props: {'ismpeg': False, 'copy_audio': False, 'ofps': 25, 'fps': 25,
'ofps2': '25.000'}
Props: {'ismpeg': False, 'copy_audio': False, 'ofps': 25, 'fps': 25,
'ofps2': '25.000'}
Rotate: 0
Meto pista 0
Meto pista 1
Pista seleccionada: 0
Props: {'ismpeg': False, 'copy_audio': False, 'ofps': 25, 'fps': 25,
'ofps2': '25.000'}
Calculating size for disk :dvd
Threads: 1
Creating window /usr/share/devede/wprogress.ui
Creating window /usr/share/devede/wfolder_dialog.ui
Entro en RUN
Salgo de RUN
Creating window /usr/share/devede/wfolder_exists.ui
Path para borrar: /home/thomas/movie/movie
Checking /home/thomas/movie/
Free space in /home/thomas/movie/: 42462976
estatus posix.statvfs_result(f_bsize=4096, f_frsize=4096,
f_blocks=16748468, f_bfree=11751426, f_bavail=10912566,
f_files=4194304, f_ffree=3934034, f_favail=3934034, f_flag=4096,
f_namemax=255)

Calculating size for disk :dvd
Free: 42462976
Needed: 3522637.0
/home/thomas/movie/movie.cue not found
/home/thomas/movie/movie.bin not found
/home/thomas/movie/movie/ not found
/home/thomas/movie/movie.iso not found
delete menu temp
delete menu
Deleting movie_??_??.mpg
Trying to delete /home/thomas/movie/movie_01_01.mpg
Deleting movie.log
/home/thomas/movie/movie.log not found
/home/thomas/movie/movie.xml not found
Borro principal
Menu PAL: True
Elementos por menu: 11
Menu1 0 0
Uso /usr/share/devede/backgrounds/default_bg.png
0.35
Paint_bg 0 title text:
0.35
Paint_bg 1 title text:
0.35
Paint_bg 3 title text:
Creating menus
Lanzo ['mencoder', '-srate', '48000', '-af', 'lavcresample=48000', '-
oac', 'lavc', '-ovc', 'lavc', '-of', 'mpeg', '-mpegopts',
'format=dvd:tsaf', '-ofps', '25', '-vf', 'scale=720:576,harddup', '-
lavcopts',
'threads=2:vcodec=mpeg2video:sc_threshold=1000000000:cgop:trell:mbd=2:vstrict=0:vrc_maxrate=4000:vrc_buf_size=1835:vbitrate=2500:keyint=12:acodec=ac3:abitrate=192:aspect=4/3',
'-o', '/home/thomas/movie/movie_menu_0.mpg', '-audiofile', '/usr/share/
devede/silence.ogg', '-mf', 'type=png:fps=1/32', 'mf:///home/thomas/
movie/movie_menu0_bg.png']
Launching program: mencoder -srate 48000 -af lavcresample=48000 -oac
lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -ofps 25 -vf
scale=720:576,harddup -lavcopts
threads=2:vcodec=mpeg2video:sc_threshold=1000000000:cgop:trell:mbd=2:vstrict=0:vrc_maxrate=4000:vrc_buf_size=1835:vbitrate=2500:keyint=12:acodec=ac3:abitrate=192:aspect=4/3
-o /home/thomas/movie/movie_menu_0.mpg -audiofile /usr/share/devede/
silence.ogg -mf type=png:fps=1/32 mf:///home/thomas/movie/movie_menu0_bg.png
elemento: /usr/bin
BUG! Invalid demuxer type in new_demuxer(), big troubles ahead.[ac3 @
0xe78980]c MEncoder SVN-r34799-4.6.3 (C) 2000-2012 MPlayer Team
183 audio & 398 video codecs
success: format: 16 data: 0x0 - 0x0
MF file format detected.
[mf] search expr: /home/thomas/movie/movie_menu0_bg.png*
[mf] number of files: 1 (8)
VIDEO: [MPNG] 0x0 24bpp 0.031 fps 0.0 kbps ( 0.0 kbyte/s)
libavformat version 54.2.100 (internal)
libavformat file format detected.
[lavf] stream 0: audio (vorbis), -aid 0
[V] filefmt:65536 fourcc:0x474E504D size:0x0 fps:0.031
ftime:=32.0000
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 54.8.100 (internal)
AUDIO: 48000 Hz, 2 ch, s16le, 64.0 kbit/4.17% (ratio: 8000->192000)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [scale w=720 h=576]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffpng] vfm: ffmpeg (FFmpeg PNG)
==========================================================================
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0xf293a0]BICUBIC scaler, from rgb24 to yuv420p using MMX2
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
[VE_LAVC] High quality encoding selected (non-realtime)!
Writing header...
INITV: 0.200, 0.160, fps: 25.000
Pos: 0.0s 1f ( 0%) 0.19fps Trem: 0min 0mb A-V:0.000 [0:0]
Writing index...

Overhead: 6.993% (185534 / 2652994)
Writing header...

Video stream: 473.833 kbit/s (59229 B/s) size: 1892962 bytes
31.960 secs 1 frames

Audio stream: 192.000 kbit/s (24000 B/s) size: 777216 bytes 32.384
secs
Launch: spumux "/home/thomas/movie/movie_menu_0.xml"
Launching shell program: spumux "/home/thomas/movie/movie_menu_0.xml"
< "/home/thomas/movie/movie_menu_0.mpg" > "/home/thomas/movie/
movie_menu2_0.mpg"

delete menu temp
Segundos 0
Addbars True resx_o 1280 resy_o 720
resx_i 720 resy_i 576
Launching program: ffmpeg -i /home/thomas/movie.mkv -vf
scale=720:576,fifo,pad=720:576:0:0:0x000000 -y -target pal-dvd -sn -g
12 -bf 2 -strict 1 -ac 2 -s 720x576 -threads 2 -trellis 1 -mbd 2 -b
5001000 -ab 224000 -aspect 16:9 /home/thomas/movie/movie_01_01.mpg -
newaudio
elemento: /usr/bin
ffmpeg version 0.10.3 Copyright (c) 2000-2012 the FFmpeg developers
built on May 9 2012 17:51:07 with gcc 4.7.0 20120505 (prerelease)
configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis
--enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --
enable-libgsm --enable-libspeex --enable-postproc --enable-shared --
enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --
enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-
libpulse --enable-gpl --enable-version3 --enable-runtime-cpudetect --
disable-debug --disable-static
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, matroska,webm, from '/home/thomas/movie.mkv':
Metadata:
title :
Sherlock.S02E01.Ein.Skandal.in.Belgravia.GERMAN.DL.720p.BluRay.x264-
TVP
Duration: 01:29:37.04, start: 0.000000, bitrate: 3700 kb/s
Chapter #0.0: start 0.000000, end 259.200000
Metadata:
title : 00:00:00.000
Chapter #0.1: start 259.200000, end 626.440000
Metadata:
title : 00:04:19.200
Chapter #0.2: start 626.440000, end 1276.920000
Metadata:
title : 00:10:26.440
Chapter #0.3: start 1276.920000, end 2163.400000
Metadata:
title : 00:21:16.920
Chapter #0.4: start 2163.400000, end 2950.920000
Metadata:
title : 00:36:03.400
Chapter #0.5: start 2950.920000, end 3788.840000
Metadata:
title : 00:49:10.920
Chapter #0.6: start 3788.840000, end 4953.520000
Metadata:
title : 01:03:08.840
Chapter #0.7: start 4953.520000, end 5377.040000
Metadata:
title : 01:22:33.520
Stream #0:0(ger): Video: h264 (High), yuv420p, 1280x720 [SAR 1:1
DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default) (forced)
Metadata:
title : tvp-sherlock-s02e01-br-720p
Stream #0:1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536
kb/s (default) (forced)
Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
Please use -b:a or -b:v, -b is ambiguous
Missing argument for option 'newaudio'
Creating window /usr/share/devede/werror_dialog.ui


I use:

devede 3.22.0

ffmpeg version 0.10.3
built on May 9 2012 17:51:07 with gcc 4.7.0 20120505 (prerelease)
configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --
enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --
enable-libgsm --enable-libspeex --enable-postproc --enable-shared --
enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --
enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-
libpulse --enable-gpl --enable-version3 --enable-runtime-cpudetect --
disable-debug --disable-static
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

on an up to date archlinux system

Any suggestions?

Kind regards

ToK

Gunther Furtado

unread,
Jun 2, 2012, 3:53:16 PM6/2/12
to devede...@googlegroups.com
Em Sáb, 2012-06-02 às 02:25 -0700, ToK escreveu:
> Hi everybody
>
> I have an mkv movie with 2 audio tracks (german, englisch). I want to
> make a dvd which contains both audio tracks. So I set the preferences
> to use ffmpeg instead of mencoder (is it right? using mencoder breaks
> the sound...)
> After start converting I get the following messages:
>

if you are using debian sid, it could be the ffmpeg=>avconv transition's
fault. it should spell -b:v for video e -b:a for audio.

cheers,

Sergio Costas

unread,
Jun 2, 2012, 4:56:23 PM6/2/12
to devede...@googlegroups.com
Hi:

The solution is simple: change to Ubuntu.

Just kidding :) The problem seems to be that new versions of ffmpeg uses
a new command line format. In fact, in ubuntu even the name changed, and
now the "official" converter is "avconv" (ffmpeg returns a message
explaining that it's deprecated).

The big question is: do archlinux include "avconv" itself, or it has
been renamed to ffmpeg?



El 02/06/12 11:25, ToK escribi�:
--
Nos leemos
RASTER (Linux user #228804)
ras...@rastersoft.com http://www.rastersoft.com

ToK

unread,
Jun 3, 2012, 2:35:09 AM6/3/12
to DeVeDe forum
OK, that's interesting.

No - archlinux doesn't have avconv. Installing avconvert instead and
set a symlink from ffmpeg to avconvrt gives me an system warning
(change name of the script) and devede doesn't do anything. Is there a
method to write a wrapper?

Thanks for your help.

PS: I don't like ubuntus philosophy of sudo and it's to "proprietary".
> ...
>
> Erfahren Sie mehr »

ToK

unread,
Jun 3, 2012, 3:09:26 AM6/3/12
to DeVeDe forum
So I installed libav - in archlinux it's dropin-replacement of ffmpeg
(libav.org) it contains avconf. As I installed it ffmpeg is removed
and is replaced by avconv. There is still a file /usb/bin/ffmpeg which
shows the same output (as I type ffmpeg -h) as avconv does (avconv -h)
- so I guess ffmpeg is replaced by avconv.

As I start a preview now I get the following

Path para borrar: /var/tmp/previewfile
Segundos 60.0
Addbars True resx_o 1280 resy_o 720
resx_i 720 resy_i 576
Launching program: ffmpeg -i /home/thomas/movie.mkv -vf
scale=720:576,fifo,pad=720:576:0:0:0x000000 -y -target pal-dvd -sn -g
12 -bf 2 -strict 1 -t 60.0 -ac 2 -s 720x576 -threads 2 -trellis 1 -mbd
2 -b 5001000 -ab 224000 -aspect 16:9 /var/tmp/previewfile_01_01.mpg -
newaudio
elemento: /usr/bin
ffmpeg version 0.8.2, Copyright (c) 2000-2011 the Libav developers
built on Jun 3 2012 08:50:15 with gcc 4.7.0 20120505 (prerelease)
This program is not developed anymore and is only provided for
compatibility. Use avconv instead (see Changelog for the list of
incompatible changes).
[matroska,webm @ 0x1652760] Estimating duration from bitrate, this may
be inaccurate
Input #0, matroska,webm, from '/home/thomas/movie.mkv':
Metadata:
title :
Sherlock.S02E01.Ein.Skandal.in.Belgravia.GERMAN.DL.720p.BluRay.x264-
TVP
Duration: 01:29:37.04, start: 0.000000, bitrate: 1920 kb/s
Chapter #0.0: start 0.000000, end 259.200000
Metadata:
title : 00:00:00.000
Chapter #0.1: start 259.200000, end 626.440000
Metadata:
title : 00:04:19.200
Chapter #0.2: start 626.440000, end 1276.920000
Metadata:
title : 00:10:26.440
Chapter #0.3: start 1276.920000, end 2163.400000
Metadata:
title : 00:21:16.920
Chapter #0.4: start 2163.400000, end 2950.920000
Metadata:
title : 00:36:03.400
Chapter #0.5: start 2950.920000, end 3788.840000
Metadata:
title : 00:49:10.920
Chapter #0.6: start 3788.840000, end 4953.520000
Metadata:
title : 01:03:08.840
Chapter #0.7: start 4953.520000, end 5377.040000
Metadata:
title : 01:22:33.520
Stream #0.0(ger): Video: h264 (High), yuv420p, 1280x720 [PAR 1:1
DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default) (forced)
Metadata:
title : tvp-sherlock-s02e01-br-720p
Stream #0.1(ger): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s
(default) (forced)
Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
[buffer @ 0x171ebc0] w:1280 h:720 pixfmt:yuv420p
[fifo @ 0x16be3e0]
[scale @ 0x18180c0] w:1280 h:720 fmt:yuv420p -> w:720 h:576
fmt:yuv420p flags:0x4
[scale @ 0x17b6c80] w:720 h:576 fmt:yuv420p -> w:720 h:576 fmt:yuv420p
flags:0x4
[pad @ 0x1663a20] w:720 h:576 -> w:720 h:576 x:0 y:0 color:
0x108080FF[yuva]
Incompatible sample format 's16' for codec 'ac3', auto-selecting
format 'flt'
[ac3 @ 0x16d8480] channel_layout not specified
[ac3 @ 0x16d8480] No channel layout specified. The encoder will guess
the layout, but it might be incorrect.
[mp2 @ 0x1755160] encoding 6 channel(s) is not allowed in mp2
Output #0, dvd, to '/var/tmp/previewfile_01_01.mpg':
Stream #0.0(ger): Video: mpeg2video (hq), yuv420p, 720x576 [PAR
64:45 DAR 16:9], q=2-31, 5001 kb/s, 90k tbn, 25 tbc (default) (forced)
Metadata:
title : tvp-sherlock-s02e01-br-720p
Stream #0.1(ger): Audio: ac3, 48000 Hz, stereo, flt, 224 kb/s
(default) (forced)
Stream #0.2(eng): Audio: mp2, 48000 Hz, 5.1, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Stream #0.2 -> #0.2
Error while opening encoder for output stream #0.2 - maybe incorrect
parameters such as bit_rate, rate, width or height
Creating window /usr/share/devede/werror_dialog.ui

Since devede is written in python (right?) is there a way to correct
the program?

ToK

On 2 Jun., 22:56, Sergio Costas <rasters...@gmail.com> wrote:
> ...
>
> Erfahren Sie mehr »

ToK

unread,
Jun 3, 2012, 4:22:08 AM6/3/12
to DeVeDe forum
In /usr/lib/devede/devede_ffmpeg_convert.py near line 231 I can switch
from ffmpeg to avconv by removing the # in front of the line:
changing
#command_var=["ffmpeg"]
command_var=["avconv"]

to
command_var=["ffmpeg"]
#command_var=["avconv"]

brings the following result (only the last view lines) after setting
to "movie already contains ac3" (or something like that - translating
from german) and "create 5.1 sound"
Stream #0.0(ger): Video: h264 (High), yuv420p, 1280x720 [PAR 1:1
DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default) (forced)
Metadata:
title : tvp-sherlock-s02e01-br-720p
Stream #0.1(ger): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s
(default) (forced)
Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
[buffer @ 0x1505a00] w:1280 h:720 pixfmt:yuv420p
[fifo @ 0x13a9c00]
[scale @ 0x13993e0] w:1280 h:720 fmt:yuv420p -> w:720 h:576
fmt:yuv420p flags:0x4
[scale @ 0x133ea20] w:720 h:576 fmt:yuv420p -> w:720 h:576 fmt:yuv420p
flags:0x4
[pad @ 0x132e5a0] w:720 h:576 -> w:720 h:576 x:0 y:0 color:
0x108080FF[yuva]
[mp2 @ 0x1430160] encoding 6 channel(s) is not allowed in mp2
Output #0, dvd, to '/var/tmp/previewfile_01_01.mpg':
Stream #0.0(ger): Video: mpeg2video (hq), yuv420p, 720x576 [PAR
64:45 DAR 16:9], q=2-31, 5001 kb/s, 90k tbn, 25 tbc (default) (forced)
Metadata:
title : tvp-sherlock-s02e01-br-720p
Stream #0.1(ger): Audio: [0][0][0][0] / 0x0000, 48000 Hz, 5.1,
1536 kb/s (default) (forced)
Stream #0.2(eng): Audio: mp2, 48000 Hz, 5.1, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Stream #0.2 -> #0.2
Error while opening encoder for output stream #0.2 - maybe incorrect
parameters such as bit_rate, rate, width or height




> ...
>
> Erfahren Sie mehr »

ToK

unread,
Jun 3, 2012, 2:10:41 PM6/3/12
to DeVeDe forum
Ubuntu shows the same problem:

Output #0, dvd, to '/var/tmp/previewfile_01_01.mpg':
Stream #0.0(ger): Video: mpeg2video (hq), yuv420p, 720x576 [PAR
64:45 DAR 16:9], q=2-31, 5001 kb/s, 90k tbn, 25 tbc (default) (forced)
Metadata:
title : tvp-sherlock-s02e01-br-720p
Stream #0.1(ger): Audio: ac3, 48000 Hz, stereo, flt, 224 kb/s
(default) (forced)
Stream #0.2(eng): Audio: mp2, 48000 Hz, 5.1, s16, 128 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Stream #0.2 -> #0.2
Error while opening encoder for output stream #0.2 - maybe incorrect
parameters such as bit_rate, rate, width or height

So the second audio stream (english) makes a problem...
> ...
>
> Erfahren Sie mehr »

Sergio Costas

unread,
Jun 3, 2012, 5:09:15 PM6/3/12
to devede...@googlegroups.com
Yes, but the problem is the file itself: if has an AC3 audio stream in
stereo (which is fine), but a MP2 5.1 audio stream (which is wrong: mp2,
AFAIK, can have only two channels).

El 03/06/12 20:10, ToK escribi�:
>> Erfahren Sie mehr �
Reply all
Reply to author
Forward
0 new messages