[Asterisk-video] How to convert mp4save saved video
Silvio Sisto
sisto.silvio at gmail.com
Mon Oct 13 13:35:25 CDT 2008
I was able to stream some video from x-lite to asterisk and save it using
the mp4save application. Codecs used were g711 and h263.
When I tried to convert the file to other formats using ffmpeg, the audio
track had it's length reduced to a half. Sounds kinda like squirrels talking
:)
It seems that ffmpeg thinks the original file's audio track has 128 kbps
instead of 64 (as mp4info correctly recognizes it). I'm guessing ffmpeg
doesn't support g711. Upon further investigation it seems that none of
x-lite's codecs are supported by ffmpeg.
Is there a way to make asterisk convert the audio stream to anther codec
before mp4_save records it?
Thanks,
Silvio Sisto
This is the content of the original (mp4save) file according to mp4info:
----------------------------------------------------------
mp4info version 1.5.0.1
test2.mp4:
Track Type Info
1 audio G.711 uLaw, 11.120 secs, 64 kbps, 8000 Hz
2 hint Payload PCMU for track 1
3 video Unknown, 10.856 secs, 0 kbps, 0x0 @ 11.33 fps
4 hint Payload H263 for track 3
mp4info: symbol lookup error: mp4info: undefined symbol:
MP4GetMetadataGrouping
----------------------------------------------------------
# ffmpeg -i test2.mp4 -f flv video2.flv
OUTPUT:
----------------------------------------------------------
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-gpl --enable-pp --enable-mp3lame --enable-faac
--enable-faad --enable-amr_nb --enable-amr_wb --enable-shared
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Oct 10 2008 16:54:46, gcc: 4.1.2 20061115 (prerelease) (Debian
4.1.1-21)
Seems that stream 2 comes from film source: 1000.00 (90000/90) -> 19.00
(19/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test2.mp4':
Duration: 00:00:11.1, start: 0.000000, bitrate: 92 kb/s
Stream #0.0(eng): Audio: pcm_mulaw, 8000 Hz, stereo, 128 kb/s
Stream #0.1(eng): Data: rtp / 0x20707472
Stream #0.2(eng): Video: h263, yuv420p, 176x144, 19.00 fps(r)
Stream #0.3(eng): Data: rtp / 0x20707472
Output #0, flv, to 'video2.flv':
Stream #0.0: Video: flv, yuv420p, 176x144, q=2-31, 200 kb/s, 19.00 fps(c)
Stream #0.1: Audio: mp3, 8000 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.2 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
[h263 @ 0xb7e00468]warning: first frame is no keyframe
[mp3 @ 0xb7e00468]lame: output buffer too small (buffer index: 321, free
bytes: 1983)
frame= 206 q=2.0 Lsize= 87kB time=5.4 bitrate= 131.4kbits/s
video:30kB audio:42kB global headers:0kB muxing overhead 20.380929%
----------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-video/attachments/20081013/4c6ba5ae/attachment.htm
More information about the asterisk-video
mailing list