Bug#718805: /usr/bin/avconv: avconv cannot grab video4linux2 device

Nikolay Shaplov dhyan at nataraj.su
Sun Jan 19 07:08:30 UTC 2014


> Sorry for taking so long to get back to this bug.
Please do not keep us waiting again, it is really does not work, and as I can understand 
it does not work on wide range of devices, because it failed with two web cam I have both 
on Debian Stable and Testing.

> > Package: libav-tools
> > Version: 6:0.8.6-1~bpo60+1
> > Severity: important
> > File: /usr/bin/avconv
> > 
> > avconv -f video4linux2 -i /dev/video1
> > get this error :
> > avconv version 0.8.6-6:0.8.6-1~bpo60+1, Copyright (c) 2000-2013 the Libav
> > developers> > 
> >   built on Jul 23 2013 15:28:31 with gcc 4.4.5
> > 
> > avconv: /build/libav-_lRc_4/libav-0.8.6/libavutil/mathematics.c:79:
> > av_rescale_rnd: Assertion `c > 0' failed. Abort
> 
> I am unable to reproduce this issue with Libav version 0.8.9, and
> therefore need to see a full backtrace. Please see
> https://wiki.debian.org/HowToGetABacktrace for more details.

(gdb) r avconv -f video4linux2 -i /dev/video1
Starting program: /usr/bin/avconv avconv -f video4linux2 -i /dev/video1
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1".
avconv version 9.10-6:9.10-2, Copyright (c) 2000-2013 the Libav developers
  built on Jan  4 2014 15:41:46 with gcc 4.8 (Debian 4.8.2-10)
avconv: /build/libav-ToBmxA/libav-9.10/libavutil/mathematics.c:61: av_rescale_rnd: Assertion `c > 0' failed.

Program received signal SIGABRT, Aborted.
0xb7fde424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fde424 in __kernel_vsyscall ()
#1  0xb701381f in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2  0xb7016cd3 in __GI_abort () at abort.c:90
#3  0xb700c717 in __assert_fail_base (fmt=0xb714f914 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion at entry=0xb7211f37 "c > 0", 
    file=file at entry=0xb7211f00 "/build/libav-ToBmxA/libav-9.10/libavutil/mathematics.c", line=line at entry=61, function=function at entry=0xb7211f60 <__PRETTY_FUNCTION__.2410> "av_rescale_rnd")
    at assert.c:92
#4  0xb700c7c7 in __GI___assert_fail (assertion=assertion at entry=0xb7211f37 "c > 0", file=file at entry=0xb7211f00 "/build/libav-ToBmxA/libav-9.10/libavutil/mathematics.c", line=line at entry=61, 
    function=function at entry=0xb7211f60 <__PRETTY_FUNCTION__.2410> "av_rescale_rnd") at assert.c:101
#5  0xb7204d19 in av_rescale_rnd (a=1, b=0, c=0, rnd=rnd at entry=AV_ROUND_NEAR_INF) at /build/libav-ToBmxA/libav-9.10/libavutil/mathematics.c:61
#6  0xb7204e8f in av_rescale_q_rnd (rnd=AV_ROUND_NEAR_INF, cq=..., bq=..., a=1) at /build/libav-ToBmxA/libav-9.10/libavutil/mathematics.c:120
#7  av_rescale_q (a=1, bq=..., cq=...) at /build/libav-ToBmxA/libav-9.10/libavutil/mathematics.c:125
#8  0xb7fa8c10 in v4l2_set_parameters (s1=0x8099b40) at /build/libav-ToBmxA/libav-9.10/libavdevice/v4l2.c:641
#9  v4l2_read_header (s1=0x8099b40) at /build/libav-ToBmxA/libav-9.10/libavdevice/v4l2.c:768
#10 0xb7f13d6b in avformat_open_input (ps=ps at entry=0xbfffee30, filename=filename at entry=0xbffff4d9 "/dev/video1", fmt=fmt at entry=0xb7fb0540 <ff_v4l2_demuxer>, options=0x808ba9c)
    at /build/libav-ToBmxA/libav-9.10/libavformat/utils.c:530
#11 0x0804fab1 in open_input_file (o=o at entry=0xbfffef4c, filename=<optimized out>) at /build/libav-ToBmxA/libav-9.10/avconv_opt.c:612
#12 0x08052edb in open_files (inout=0x80615d0 "input", open_file=0x804f910 <open_input_file>, l=<optimized out>, l=<optimized out>) at /build/libav-ToBmxA/libav-9.10/avconv_opt.c:1885
#13 avconv_parse_options (argc=argc at entry=6, argv=argv at entry=0xbffff2f4) at /build/libav-ToBmxA/libav-9.10/avconv_opt.c:1922
#14 0x0804bd71 in main (argc=6, argv=0xbffff2f4) at /build/libav-ToBmxA/libav-9.10/avconv.c:2369


This backtrace from current debian testing, but I think it will be almost the
same in stable distro.

> My current hypothesis is that there is something misconfigured with
> your system (bad driver, or something) but libav should clearly give a
> better error message than failing on some assertion in rounding code.

As you can see from backtrace, everything is inside libav files. 
Moreover, VLC works out of box with all these web cams

// If you like, I can leave this cam plugged into my development computer for 
couple of weeks and give shell access to you, but inform me quick if you need 
this otherwise I will try to build older versions of avconv, there to make 
that damn thing work.



More information about the pkg-multimedia-maintainers mailing list