Floating point exception when transcoding

*nix specific usage questions
vlc_fan55
New Cone
New Cone
Posts: 8
Joined: 15 Mar 2009 15:51

Floating point exception when transcoding

Postby vlc_fan55 » 09 Oct 2009 10:38

There is probably a simple explanation for this, but I can't figure it out.

I have just compiled a recent vlc 1.1.0 on a Debian i386 machine along with latest versions of ffmpeg, x264, live555 etc.

No problems with the compile, but the resulting binary can't do transcoding.

Playing streams and using sout without transcoding works fine.

As soon as I add a transcode{} to the sout I get a floating point exception.

nonroot@dir:/root/videotools/vlc$ ./vlc --version
VLC media player 1.1.0-git Yellow Bastard
VLC version 1.1.0-git Yellow Bastard (exported)
Compiled by root@localhost.
Compiler: gcc version 4.3.3 (Debian 4.3.3-3) This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License; see the file named COPYING for details.
Written by the VideoLAN team; see the AUTHORS file.

nonroot@dir:/root/videotools/vlc$ ./vlc -vvv -I dummy mms://a.b.c.d/xxx --sout '#std{access=http,mux=asf,dst=0.0.0.0:8080}'

Everything works like it should without the transcode.

Then I try:

nonroot@dir:/root/videotools/vlc$ ./vlc -vvv -I dummy mms://a.b.c.d/xxx --sout '#transcode{ab=42,samplerate=44100,channels=1,acodec=mp4a,vcodec=mp4v,width=320,height=180,fps=12,vb=200}:std{access=http,mux=ts,dst=0.0.0.0:8080}'

[output removed}
[0x94d3b04] main stream output debug: adding a new sout input (sout_input:0x95122e8) [0x94d426c] stream_out_transcode stream out debug: creating video transcoding from fcc=`WMV3' to fcc=`mp4v'
[0x94d51ac] main decoder debug: looking for decoder module: 31 candidates [0x94d51ac] avcodec decoder debug: libavcodec initialized (interface 0x342400) [0x94d51ac] avcodec decoder debug: using direct rendering [0x94d51ac] avcodec decoder debug: ffmpeg codec (Windows Media Video 9) started [0x94d51ac] main decoder debug: using decoder module "avcodec"
[0x94d51ac] main decoder debug: TIMER module_need() : 7.004 ms - Total 7.004 ms / 1 intvls (Avg 7.004 ms) [0x95193f4] main encoder debug: looking for encoder module: 10 candidates [0x95193f4] avcodec encoder debug: libavcodec already initialized
[0x95193f4] avcodec encoder debug: found encoder MPEG-4 Video
[0x95193f4] main encoder debug: using encoder module "avcodec"
[0x95193f4] main encoder debug: TIMER module_need() : 4.476 ms - Total 4.476 ms / 1 intvls (Avg 4.476 ms)
[0x95193f4] main encoder debug: removing module "avcodec"
[0x94ce7ac] main input debug: Buffering 1% [0x94ce7ac] main input debug: Buffering 1%
[0x94ce7ac] main input debug: Buffering 2% [0x94ce7ac] main input debug: Buffering 3%
[0x94ce7ac] main input debug: Buffering 4% [0x94ce7ac] main input debug: Buffering 5%
[0x94ce7ac] main input debug: Buffering -18%
[0x94d3b04] main stream output debug: adding a new sout input (sout_input:0x951bce0)
[0x94d426c] stream_out_transcode stream out debug: creating audio transcoding from fcc=`WMA2' to fcc=`mp4a'
[0x95532f4] main decoder debug: looking for decoder module: 31 candidates
[0x95532f4] avcodec decoder debug: libavcodec already initialized
[0x95532f4] avcodec decoder debug: ffmpeg codec (Windows Media Audio 2) started
[0x95532f4] avcodec decoder debug: Using 192000 bytes output buffer
[0x95532f4] main decoder debug: using decoder module "avcodec"
[0x95532f4] main decoder debug: TIMER module_need() : 5.602 ms - Total 5.602 ms / 1 intvls (Avg 5.602 ms)
[0x95550cc] main encoder debug: looking for encoder module: 10 candidates [0x95550cc] avcodec encoder debug: libavcodec already initialized
[0x95550cc] avcodec encoder debug: found encoder MPEG AAC Audio [0x95550cc] main encoder debug: using encoder module "avcodec"
[0x95550cc] main encoder debug: TIMER module_need() : 4.964 ms - Total 4.964 ms / 1 intvls (Avg 4.964 ms)
[0x94d426c] stream_out_transcode stream out debug: Looking for filter (s16l->s16l, channels 2->1, rate 32000->44100)
[0x95d51d4] main filter debug: looking for audio filter2 module: 18 candidates
[0x95d51d4] audio_format filter debug: s16l->fl32, bits per sample: 16->32
[0x95d51d4] main filter debug: using audio filter2 module "audio_format"
[0x95d51d4] main filter debug: TIMER module_need() : 0.092 ms - Total 0.092 ms / 1 intvls (Avg 0.092 ms)
[0x94d426c] main stream out debug: Filter 'audio_format' (0x95d51d4) appended to chain
[0x96510c4] main filter debug: looking for audio filter2 module: 18 candidates
[0x96510c4] bandlimited_resampler filter debug: fl32/32000KHz/2->fl32/44100KHz/2
[0x96510c4] main filter debug: using audio filter2 module "bandlimited_resampler"
[0x96510c4] main filter debug: TIMER module_need() : 0.178 ms - Total 0.178 ms / 1 intvls (Avg 0.178 ms)
[0x94d426c] main stream out debug: Filter 'bandlimited_resampler' (0x96510c4) appended to chain
[0x96519fc] main filter debug: looking for audio filter2 module: 18 candidates
[0x96519fc] main filter debug: using audio filter2 module "simple_channel_mixer"
[0x96519fc] main filter debug: TIMER module_need() : 0.075 ms - Total 0.075 ms / 1 intvls (Avg 0.075 ms)
[0x94d426c] main stream out debug: Filter 'simple_channel_mixer' (0x96519fc) appended to chain
[0x9652334] main filter debug: looking for audio filter2 module: 18 candidates
[0x9652334] audio_format filter debug: fl32->s16l, bits per sample: 32->16
[0x9652334] main filter debug: using audio filter2 module "audio_format"
[0x9652334] main filter debug: TIMER module_need() : 0.081 ms - Total 0.081 ms / 1 intvls (Avg 0.081 ms)
[0x94d426c] main stream out debug: Filter 'audio_format' (0x9652334) appended to chain
[0x94d426c] stream_out_transcode stream out debug: Got complete audio filter chain
[0x94d8884] main mux debug: adding a new input
[0x94d8884] mux_ts mux debug: adding input codec=mp4a pid=68
[0x94d8884] mux_ts mux debug: new PCR PID is 68
[0x94ce7ac] main input debug: Buffering -15%
[0x94ce7ac] main input debug: Buffering -10%
[0x94ce7ac] main input debug: Buffering -7%
[0x94ce7ac] main input debug: Buffering -3%
[0x94ce7ac] main input debug: Buffering 0%
[0x94ce7ac] main input debug: Buffering 1%
[0x94ce7ac] main input debug: Buffering 5%
[0x94ce7ac] main input debug: Buffering 9%
[0x94ce7ac] main input debug: Buffering 12%
[0x94ce7ac] main input debug: Buffering 16%
[0x94ce7ac] main input debug: Buffering 19%
[0x94ce7ac] main input debug: Buffering 23%
[0x94ce7ac] main input debug: Buffering 26%
[0x94ce7ac] main input debug: Buffering 29%
[0x94ce7ac] main input debug: Buffering 32%
[0x94ce7ac] main input debug: Buffering 36%
[0x94ce7ac] main input debug: Buffering 40%
[0x94ce7ac] main input debug: Buffering 43
[0x94ce7ac] main input debug: Buffering 46%
[0x94ce7ac] main input debug: Buffering 51%
[0x94ce7ac] main input debug: Buffering 54%
[0x94ce7ac] main input debug: Buffering 57%
[0x94ce7ac] main input debug: Buffering 61%
[0x94ce7ac] main input debug: Buffering 63%
[0x94ce7ac] main input debug: Buffering 67%
[0x94ce7ac] main input debug: Buffering 71
[0x94ce7ac] main input debug: Buffering 73%
[0x94ce7ac] main input debug: Buffering 77%
[0x94ce7ac] main input debug: Buffering 80%
[0x94ce7ac] main input debug: Buffering 83%
[0x94ce7ac] main input debug: Buffering 86
[0x94ce7ac] main input debug: Buffering 90%
[0x94ce7ac] main input debug: Buffering 93%
[0x94ce7ac] main input debug: Buffering 96%
[0x94ce7ac] main input debug: Stream buffering done (5720 ms in 6760 ms)
[0x94ce7ac] main input debug: Decoder buffering done in 0 ms
[0x95532f4] avcodec decoder warning: Physical channel configuration not set : guessing
[0x94d426c] stream_out_transcode stream out debug: drift is too high, resetting master sync
Floating point exception

Any ideas????

(Previous versions of vlc that I have compiled have worked perfectly, so I think I know what I am doing.)

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Floating point exception when transcoding

Postby xtophe » 09 Oct 2009 11:45

Add --enable-debug in your configure line if not already present and get a bactrace with gdb
Xtophe

vlc_fan55
New Cone
New Cone
Posts: 8
Joined: 15 Mar 2009 15:51

Re: Floating point exception when transcoding

Postby vlc_fan55 » 09 Oct 2009 13:47

OK good idea.

When I run vlc with my command line inside gdb, it goes into a seemingly endless [new thread created] loop. Thus I never reach the seg fault.

Its been a while since I used gdb, so is there something I can do to avoid this loop?

Thanks again.

xtophe
Big Cone-huna
Big Cone-huna
Posts: 1209
Joined: 24 Nov 2003 10:12
Location: Bristol, England

Re: Floating point exception when transcoding

Postby xtophe » 09 Oct 2009 17:20

Hmmm i 'm no gdb expert.

I would send sigkill and then do a backtrace of all threads (thread apply all bt (Ithink))
The infinite loop is surely a bug maybe the dsame as the floating point

You can also try to run in valgrind and see if you can get a backtrace
Xtophe

vlc_fan55
New Cone
New Cone
Posts: 8
Joined: 15 Mar 2009 15:51

Re: Floating point exception when transcoding

Postby vlc_fan55 » 12 Oct 2009 14:57

OK, here is the backtrace from gdb:

[New Thread -1306498160 (LWP 20182)]
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 [New Thread -1325573232 (LWP 20183)]
x264 [info]: profile Main, level 5.1
[Thread -1325573232 (LWP 20183) exited]
[Thread -1309672560 (LWP 20153) exited]

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread -1311814768 (LWP 20181)]
0xb433f758 in Resample (p_filter=0x96b591c, p_in_buf=0xb1f22ee0) at bandlimited.c:327

327 if( p_out_buf->i_buffer/p_filter->fmt_in.audio.i_bytes_per_frame

(gdb) bt
#0 0xb433f758 in Resample (p_filter=0x96b591c, p_in_buf=0xb1f22ee0) at bandlimited.c:327
#1 0xb7f14bf7 in filter_chain_AudioFilter (p_chain=0x96be588, p_block=0x0) at misc/filter_chain.c:241
#2 0xb6d11242 in Send (p_stream=0xb1f0b2ec, id=0x9573730, p_buffer=0x9844de0) at transcode.c:1320
#3 0xb7f1fb89 in sout_InputSendBuffer (p_input=0x9651270, p_buffer=0x9844de0) at stream_output/stream_output.c:279
#4 0xb7ea323f in DecoderProcess (p_dec=0x96bb5ec, p_block=<value optimized out>) at input/decoder.c:1645
#5 0xb7ea3dc5 in DecoderThread (p_this=0x96bb5ec) at input/decoder.c:881
#6 0xb7f01388 in thread_entry (data=0x9573e38) at misc/threads.c:58
#7 0xb7df94e5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8 0xb7d4a10e in clone () from /lib/i686/cmov/libc.so.6

I hope this helps to pinpoint the reason.

vlc_fan55
New Cone
New Cone
Posts: 8
Joined: 15 Mar 2009 15:51

Re: Floating point exception when transcoding

Postby vlc_fan55 » 13 Oct 2009 10:58

Just one more detail to add:

The audio transcoding will run OK if I don't touch the samplerate.

As soon as I add a samplerate=xyz to the transcode, vlc will crash with a floating point exception in bandlimited.c

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Floating point exception when transcoding

Postby Jean-Baptiste Kempf » 14 Oct 2009 10:38

Looks like a bug. Can you tell it on vlc-devel?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests