[Asterisk-video] Cannot make h324m_gw and mp4save to work (properly)

Stefano Lucetti s.lucetti at netserv.iet.unipi.it
Mon Jun 4 04:09:58 MST 2007


Hello list,
I have read a few month of list archive, but with no luck.
As with the subject, I have some problems with making h324m_gw and
mp4save working properly. Sorry for lengthy mail, but I'm including
most info as possible...
My setup is (all built from sources, gcc-4.1):
* pwlib 1.10.3
* libh324m from svn (check out revision 107)
  (commenting out TIFF_bitreverse)
* ffmpeg from svn (check out revision 9154)
* mpeg4ip 1.5.0.1
* Asterisk 1.4.4
* app_mp4 & app_h324m (+ fixed ast_senddigit in app_h324m)

ISDN card is misdn compatible, fully working in other configurations.

I'm trying to record (using mp4save) 3g video calls from a Nokia 6680.
Things are (almost) working, but saved mp4 files are messed up...

Relevant part of extensions.conf:

[in]
exten => _X.,1,h324m_gw(record at mp4video)

[mp4video]
exten => record,1,Answer
exten => record,2,mp4save(/tmp/test.mp4)

Calling asterisk is fine: call is routed to h324m_gw, and then saved
to /tmp/test.mp4
Call is recognized as AMR audio and H.263+ video (added some printf()
in mp4_save).
Up to here, the successful story. The problem is that the test.mp4
video is not recorded properly. Indeed, video is accelerated, and
audio is present but not recognized by player (e.g. vlc)

mp4info gives:

test.mp4:
Track   Type    Info
1       audio   AMR, 22.500 secs, 12 kbps, 8000 Hz
2       hint    Payload AMR for track 1
3       video   H.263, 7.455 secs, 114 kbps, 176x144 @ 23.071764 fps
4       hint    Payload H263-1998 for track 3

Call duration was actually around 23 seconds, so timing of video is
definitely wrong. Indeed,  playout of video is speeded up...

To me, it seems to be some problem during encapsulation of mp4 file,
since it is possible to correctly recover both audio and video from
the raw data received (and dumped in /tmp by  ..? )
As far as video is concerned, if I recode the raw h.263 track
available in /tmp/media_xxxx.raw using mp4creator -timescale=90000,
the resulting video is playable with the correct duration.
The amr audio available in the other raw file in /tmp seems correct
(amr-nb , IF2 mode) and can be decoded using command line decoder by
3gpp.

Any help is greatly appreciated.
Ciao
Stefano


More information about the asterisk-video mailing list