Failing to execute OS Command
Hi, I'm trying to convert recorded conversations from wav to mp3. I'm using ffmpeg for this purpose and i'm aiming to do this wthin Javascript. Yet, I'm encountering a problem. The conversion fails with the error message copied below. I must note that the same command works perfectly when executed from the command line. Any idea? Thanks, Klaus. ============ERROR MESSAGE============== 2008-08-12 15:29:03 [NOTICE] mod_dptools.c:1169 system_session_function() Failed to execute command: ffmpeg -i /usr/local/freeswitch/recordings/test.wav -ab 32kb /usr/local/freeswitch/recordings/test.mp3 2008-08-12 15:29:03 [NOTICE] switch_core_session.c:807 switch_core_session_thread() Session 16 (sofia/external/4165465381@64.34.181.47) Ended 2008-08-12 15:29:03 [NOTICE] switch_core_session.c:809 switch_core_session_thread() Close Channel sofia/external/4165465381@64.34.181.47 [CS_HANGUP] ==============ERROR MESSAGE========== -- Psssst! Schon das coole Video vom GMX MultiMessenger gesehen? Der Eine für Alle: http://www.gmx.net/de/go/messenger03
Press F8 and try again so we see the entire debug log. /b On Aug 12, 2008, at 2:41 PM, Klaus Teller wrote:
Hi,
I'm trying to convert recorded conversations from wav to mp3. I'm using ffmpeg for this purpose and i'm aiming to do this wthin Javascript.
Yet, I'm encountering a problem. The conversion fails with the error message copied below. I must note that the same command works perfectly when executed from the command line.
Any idea?
Thanks, Klaus.
============ERROR MESSAGE============== 2008-08-12 15:29:03 [NOTICE] mod_dptools.c:1169 system_session_function() Failed to execute command: ffmpeg -i /usr/ local/freeswitch/recordings/test.wav -ab 32kb /usr/local/freeswitch/ recordings/test.mp3 2008-08-12 15:29:03 [NOTICE] switch_core_session.c:807 switch_core_session_thread() Session 16 (sofia/external/4165465381@64.34.181.47 ) Ended 2008-08-12 15:29:03 [NOTICE] switch_core_session.c:809 switch_core_session_thread() Close Channel sofia/external/4165465381@64.34.181.47 [CS_HANGUP] ==============ERROR MESSAGE========== -- Psssst! Schon das coole Video vom GMX MultiMessenger gesehen? Der Eine für Alle: http://www.gmx.net/de/go/messenger03
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Brian West sip:brian@freeswitch.org
It seems there is really not much more. The ffmpeg command is invoked in the script after the caller hangup. So, most of the "cancel" in the following logs are normal. The ffmpeg logs seem also eto be normal except the size of the output would be different is the conversion worked. I initially thought the problem might be due to the fact that when ffmpeg was called freeswitch still had the lock on the generated wav file. This seems not to be the case. In another experiment, i copied the file to a temp file and tried to convert this temp file instead. The result was the same failed conversion. run() sofia/external/16472324455 Running State Change CS_HANGUP 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:393 switch_core_session_run() (sofia/external/16472324455) State HANGUP 2008-08-12 16:06:43 [DEBUG] mod_sofia.c:230 sofia_on_hangup() sofia/external/16472324455 Overriding SIP cause 487 with 200 from the other leg 2008-08-12 16:06:43 [DEBUG] mod_sofia.c:264 sofia_on_hangup() Channel sofia/external/16472324455 hanging up, cause: ORIGINATOR_CANCEL 2008-08-12 16:06:43 [DEBUG] mod_sofia.c:325 sofia_on_hangup() Sending CANCEL to sofia/external/16472324455 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:46 switch_core_standard_on_hangup() Standard HANGUP sofia/external/16472324455, cause: ORIGINATOR_CANCEL 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:393 switch_core_session_run() (sofia/external/16472324455) State HANGUP going to sleep 2008-08-12 16:06:43 [DEBUG] switch_core_session.c:789 switch_core_session_thread() Session 25 (sofia/external/16472324455) Locked, Waiting on external entities 2008-08-12 16:06:43 [NOTICE] switch_core_session.c:807 switch_core_session_thread() Session 25 (sofia/external/16472324455) Ended 2008-08-12 16:06:43 [NOTICE] switch_core_session.c:809 switch_core_session_thread() Close Channel sofia/external/16472324455 [CS_HANGUP] FFmpeg version SVN-r14706, Copyright (c) 2000-2008 Fabrice Bellard, et al. configuration: --enable-shared --enable-libfaac --enable-gpl --enable-libmp3lame --enable-libfaad --prefix=/usr libavutil version: 49.8.0 libavcodec version: 51.64.0 libavformat version: 52.20.0 libavdevice version: 52.1.0 built on Aug 12 2008 01:03:05, gcc: 4.1.2 20071124 (Red Hat 4.1.2-42) Input #0, wav, from '/usr/local/freeswitch/recordings/test.wav': Duration: 00:00:09.22, bitrate: 128 kb/s Stream #0.0: Audio: pcm_s16le, 8000 Hz, mono, s16, 128 kb/s Output #0, mp3, to '/usr/local/freeswitch/recordings/test.mp3': Stream #0.0: Audio: libmp3lame, 8000 Hz, mono, s16, 32 kb/s Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding size= 1kB time=0.22 bitrate= 33.2kbits/s video:0kB audio:1kB global headers:0kB muxing overhead 3.703704% 2008-08-12 16:06:43 [NOTICE] mod_dptools.c:1167 system_session_function() Executing command: ffmpeg -i /usr/local/freeswitch/recordings/test.wav -ab 32kb /usr/local/freeswitch/recordings/test.mp3 2008-08-12 16:06:43 [NOTICE] mod_dptools.c:1169 system_session_function() Failed to execute command: ffmpeg -i /usr/local/freeswitch/recordings/test.wav -ab 32kb /usr/local/freeswitch/recordings/test.mp3 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:430 switch_core_session_run() (sofia/external/4165765588@64.34.181.47) State EXECUTE going to sleep 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:365 switch_core_session_run() sofia/external/4165765588@64.34.181.47 Running State Change CS_HANGUP 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:393 switch_core_session_run() (sofia/external/4165765588@64.34.181.47) State HANGUP 2008-08-12 16:06:43 [DEBUG] mod_sofia.c:264 sofia_on_hangup() Channel sofia/external/4165765588@64.34.181.47 hanging up, cause: NORMAL_CLEARING 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:46 switch_core_standard_on_hangup() Standard HANGUP sofia/external/4165765588@64.34.181.47, cause: NORMAL_CLEARING 2008-08-12 16:06:43 [DEBUG] switch_core_state_machine.c:393 switch_core_session_run() (sofia/external/4165765588@64.34.181.47) State HANGUP going to sleep 2008-08-12 16:06:43 [DEBUG] switch_core_media_bug.c:284 switch_core_media_bug_remove_all() Removing BUG from sofia/external/4165765588@64.34.181.47 2008-08-12 16:06:43 [DEBUG] switch_core_session.c:789 switch_core_session_thread() Session 24 (sofia/external/4165765588@64.34.181.47) Locked, Waiting on external entities 2008-08-12 16:06:43 [NOTICE] switch_core_session.c:807 switch_core_session_thread() Session 24 (sofia/external/4165765588@64.34.181.47) Ended 2008-08-12 16:06:43 [NOTICE] switch_core_session.c:809 switch_core_session_thread() Close Channel sofia/external/4165765588@64.34.181.47 [CS_HANGUP] 2008-08-12 16:06:43 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_r_invite] status [487][Request Terminated] session: n/a 2008-08-12 16:06:43 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_i_state] status [487][Request Terminated] session: n/a -- GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion! http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/616919...
how are you calling ffmpeg? full path? or what? On Aug 12, 2008, at 3:19 PM, Klaus Teller wrote:
It seems there is really not much more. The ffmpeg command is invoked in the script after the caller hangup. So, most of the "cancel" in the following logs are normal. The ffmpeg logs seem also eto be normal except the size of the output would be different is the conversion worked.
I initially thought the problem might be due to the fact that when ffmpeg was called freeswitch still had the lock on the generated wav file. This seems not to be the case. In another experiment, i copied the file to a temp file and tried to convert this temp file instead. The result was the same failed conversion.
Brian West sip:brian@freeswitch.org
Here is the command: session.execute("system", "ffmpeg -i "+file+".wav"+" -ab 32kb "+file+".mp3"); I just tried with the full path and had the same result: session.execute("system", "/usr/bin/ffmpeg -i "+file+".wav"+" -ab 32kb "+file+".mp3"); Klaus. -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx
participants (2)
-
Brian West
-
Klaus Teller