<div dir="ltr">Thanks for the fix.<br>I tried it and now ffmpeg seems to detect the stream correctly.<br><br>I get this error message though:<br>--------------------------------------<br>root@debian:~# <b>ffmpeg -i test.mp4 -f mpeg -acodec mp2 -ar 32000 test.mpeg</b><br>
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard<br> configuration: --enable-gpl --enable-pp --enable-pthreads --enable-vorbis --enable-libogg --enable-a52 --enable-dts --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr<br>
libavutil version: 0d.49.0.0<br> libavcodec version: 0d.51.11.0<br> libavformat version: 0d.50.5.0<br> built on Mar 26 2007 15:50:40, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)<br><br>Seems that stream 2 comes from film source: 1000.00 (90000/90) -> 10.00 (10/1)<br>
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':<br> Duration: 00:00:06.7, start: 0.000000, bitrate: 122 kb/s<br> Stream #0.0(eng): Audio: pcm_mulaw, 8000 Hz, mono, 64 kb/s<br> Stream #0.1(eng): Data: rtp / 0x20707472<br>
Stream #0.2(eng): Video: h263, yuv420p, 176x144, 10.00 fps(r)<br> Stream #0.3(eng): Data: rtp / 0x20707472<br>File 'test.mpeg' already exists. Overwrite ? [y/N] y<br>Output #0, mpeg, to 'test.mpeg':<br>
Stream #0.0: Video: mpeg1video, yuv420p, 176x144, q=2-31, 200 kb/s, 10.00 fps(c)<br> Stream #0.1: Audio: mp2, 32000 Hz, mono, 64 kb/s<br>Stream mapping:<br> Stream #0.2 -> #0.0<br> Stream #0.0 -> #0.1<br>[mpeg1video @ 0xb7e55f08]MPEG1/2 does not support 10/1 fps<br>
<b>Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height</b><br>--------------------------------------<br>
<br>Even though the sound was too fast before, I used to get no error messages.<br>What can I try now?<br>Thanks, Best Regards,<br>Silvio Sisto<br><br><div class="gmail_quote">On Tue, Oct 14, 2008 at 9:49 AM, Borja SIXTO <span dir="ltr"><<a href="mailto:borja.sixto@i6net.com">borja.sixto@i6net.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Sergio,<br>
<br>
I have found a partial work around by adding some track information (for<br>
the alaw is the same) :<br>
<br>
/* Create audio track */<br>
audio = MP4AddAudioTrack(mp4, 8000, 0,<br>
MP4_ULAW_AUDIO_TYPE);<br>
MP4SetTrackIntegerProperty(mp4, audio,<br>
"mdia.minf.stbl.stsd.mp4a.channels", 1);<br>
MP4SetTrackIntegerProperty(mp4, audio,<br>
"mdia.minf.stbl.stsd.mp4a.sampleSize", 8);<br>
/* Create audio hint track */<br>
hintAudio = MP4AddHintTrack(mp4, audio);<br>
/* Set payload type for hint track */<br>
type = 0;<br>
audio_payload = 0;<br>
MP4SetHintTrackRtpPayload(mp4, hintAudio, "PCMU",<br>
&type, 0, NULL, 1, 0);<br>
<br>
But you need to set -acodec pcm_mulaw before the -i ffmpeg option.<br>
<br>
Just an other pending modification.<br>
We can add some informations in the recorded file like that (I am adding<br>
this modification) :<br>
#ifndef i6net<br>
MP4SetMetadataTool(mp4, "app_mp4");<br>
MP4SetMetadataWriter(mp4,"Called service");<br>
MP4SetMetadataArtist(mp4,"Caller");<br>
MP4SetMetadataAlbum(mp4,"Album");<br>
MP4SetMetadataName(mp4,"13/10 13h40");<br>
MP4SetMetadataYear(mp4,"2008");<br>
#endif<br>
<br>
Regards,<br>
<br>
<br>
Borja<br>
<br>
<br>
Sergio Garcia Murillo a écrit :<br>
<div class="Ih2E3d">> That's the problem:<br>
><br>
> Stream #0.0(eng): Audio: pcm_mulaw, 8000 Hz, *_stereo, 128 kb/s_*<br>
><br>
> I'll check if we set it wrong to stereo or it's ffmpeg the one that's<br>
> it's decoding it worng.<br>
><br>
> BR<br>
> Sergio<br>
><br>
> Silvio Sisto escribió:<br>
>> I was able to stream some video from x-lite to asterisk and save it<br>
>> using the mp4save application. Codecs used were g711 and h263.<br>
>> When I tried to convert the file to other formats using ffmpeg, the<br>
>> audio track had it's length reduced to a half. Sounds kinda like<br>
>> squirrels talking :)<br>
>> It seems that ffmpeg thinks the original file's audio track has 128<br>
>> kbps instead of 64 (as mp4info correctly recognizes it). I'm guessing<br>
>> ffmpeg doesn't support g711. Upon further investigation it seems that<br>
>> none of x-lite's codecs are supported by ffmpeg.<br>
>> Is there a way to make asterisk convert the audio stream to anther<br>
>> codec before mp4_save records it?<br>
>> Thanks,<br>
>> Silvio Sisto<br>
>><br>
>> This is the content of the original (mp4save) file according to mp4info:<br>
>> ----------------------------------------------------------<br>
</div>>> mp4info version <a href="http://1.5.0.1" target="_blank">1.5.0.1</a> <<a href="http://1.5.0.1" target="_blank">http://1.5.0.1</a>><br>
<div><div></div><div class="Wj3C7c">>> test2.mp4:<br>
>> Track Type Info<br>
>> 1 audio G.711 uLaw, 11.120 secs, 64 kbps, 8000 Hz<br>
>> 2 hint Payload PCMU for track 1<br>
>> 3 video Unknown, 10.856 secs, 0 kbps, 0x0 @ 11.33 fps<br>
>> 4 hint Payload H263 for track 3<br>
>> mp4info: symbol lookup error: mp4info: undefined symbol:<br>
>> MP4GetMetadataGrouping<br>
>> ----------------------------------------------------------<br>
>><br>
>> # ffmpeg -i test2.mp4 -f flv video2.flv<br>
>> OUTPUT:<br>
>> ----------------------------------------------------------<br>
>> FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard<br>
>> configuration: --enable-gpl --enable-pp --enable-mp3lame<br>
>> --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb<br>
>> --enable-shared<br>
>> libavutil version: 49.0.0<br>
>> libavcodec version: 51.11.0<br>
>> libavformat version: 50.5.0<br>
>> built on Oct 10 2008 16:54:46, gcc: 4.1.2 20061115 (prerelease)<br>
>> (Debian 4.1.1-21)<br>
>><br>
>> Seems that stream 2 comes from film source: 1000.00 (90000/90) -><br>
>> 19.00 (19/1)<br>
>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test2.mp4':<br>
>> Duration: 00:00:11.1, start: 0.000000, bitrate: 92 kb/s<br>
>> Stream #0.0(eng): Audio: pcm_mulaw, 8000 Hz, stereo, 128 kb/s<br>
>> Stream #0.1(eng): Data: rtp / 0x20707472<br>
>> Stream #0.2(eng): Video: h263, yuv420p, 176x144, 19.00 fps(r)<br>
>> Stream #0.3(eng): Data: rtp / 0x20707472<br>
>> Output #0, flv, to 'video2.flv':<br>
>> Stream #0.0: Video: flv, yuv420p, 176x144, q=2-31, 200 kb/s, 19.00<br>
>> fps(c)<br>
>> Stream #0.1: Audio: mp3, 8000 Hz, stereo, 64 kb/s<br>
>> Stream mapping:<br>
>> Stream #0.2 -> #0.0<br>
>> Stream #0.0 -> #0.1<br>
>> Press [q] to stop encoding<br>
>> [h263 @ 0xb7e00468]warning: first frame is no keyframe<br>
>> [mp3 @ 0xb7e00468]lame: output buffer too small (buffer index: 321,<br>
>> free bytes: 1983)<br>
>> frame= 206 q=2.0 Lsize= 87kB time=5.4 bitrate= 131.4kbits/s<br>
>> video:30kB audio:42kB global headers:0kB muxing overhead 20.380929%<br>
>> ----------------------------------------------------------<br>
>><br>
>> ------------------------------------------------------------------------<br>
>><br>
>> _______________________________________________<br>
>> --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
>><br>
>> asterisk-video mailing list<br>
>> To UNSUBSCRIBE or update options visit:<br>
>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-video" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-video</a><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="Wj3C7c">><br>
> _______________________________________________<br>
> --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
><br>
> asterisk-video mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-video" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-video</a><br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-video mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-video" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-video</a><br>
</div></div></blockquote></div><br></div>