[Asterisk-video] MP4Play async Audio / Video

Sergio Garcia Murillo sergio.garcia at fontventa.com
Mon Sep 24 17:05:22 CDT 2007


Hi Thomas, Thomas and Ratmin.. :)

Back to work form a long abroad weekend (nice Belgium!)

As Ratmin has stated the Skew indication would help to indicate the handset the delay between audio and video.
It's usually used to correct fixed delays introduced by internal jitter buffers and thinks alike. The problem that Thomas
Z. is suffering seems to be produced by using ffmpeg for video encoding (as Thomas without Z points :)
The problem is the following, ffmpeg is a great VBR (variable bit rate) encoder, but I've not been able to behave like a 
CBR (constant bit rate) encoder. The problem is that it's prepared for movies, not for streaming, and defenitevilly not
at this low bitrates.
The inner loop of the encoder always tries to encode ALL macroblocks in a frame, so in I frames and at a very low
bitrate it simply just can't get a small amount of data for that frame and when it's enqued into h324m it takes more
than one frame time to send (sometimes even more than a second), the following frames are small and sent after
that until the queue is empty, which causes a fast-forward effect on some handsets. As you can imagine adjustime
audio to that scenary is jus impossible (even with the Skew Indication the result would be horrible!!)

The good solution: use a CBR encoder :)
The not so good solution: drop packets when the queue is filled, but you'll end up dropping all the frames between
each I frame.. but in that case it would be much better to lower the video fps...

BR
Sergio
  ----- Original Message ----- 
  From: Ramtin Amin 
  To: Development discussion of video media support in Asterisk 
  Sent: Monday, September 24, 2007 2:01 PM
  Subject: Re: [Asterisk-video] MP4Play async Audio / Video





  RTSP has timestamp... so you can usually know how to sync the audio/video
  But the problem would be more that we'll need to add a Skew Indication concept inside asterisk's core so it could make the message go throught the different channel/application, as it is currently done for VideoFastUpdatePicutre... Which means that currently, if a SIP channel receives a VideoFastUpdatePicture, it is capable of resending it to an other channel...

   

------------------------------------------------------------------------------

  > Date: Mon, 24 Sep 2007 13:48:54 +0200
  > From: mobilemail at gmx-topmail.de
  > To: asterisk-video at lists.digium.com
  > Subject: Re: [Asterisk-video] MP4Play async Audio / Video
  > 
  > Hello Ramin,
  > hello Thomas.
  > 
  > I think both ways are possible. But I don't know if it easy to implement.
  > Sergio, what do you think about it?
  > 
  > Is this also a problem if we stream the audi/video via rtsp?
  > 
  > Regrads
  > Thomas
  > 
  > 
  > Ramtin Amin schrieb:
  > > hello
  > > 
  > > The way I solved this problem was by sending a H223SkewIndication
  > > message to the other terminal
  > > Acutally, You will have to ask Sergio to add a H245 indication message
  > > of type h223SkewIndication and when playing the video with mp4play, he
  > > will have to see the difference of timing between Video and Audio and
  > > then send this value to the remote terminal so the lip sync would work...
  > > 
  > > 
  > > 
  > > **
  > >
  > > *2.3 Multipoint Lip Synchronization*
  > >
  > > In a multipoint VC, each terminal may transmit different
  > >
  > > //
  > >
  > > /H223SkewIndication /message for associated video and
  > >
  > > audio channels in H.223 protocol. To enable lip
  > >
  > > synchronization at receiving terminals, MCUs will
  > >
  > > transmit accurate /H223SkewIndication /messages. MCUs
  > >
  > > may accomplish this by adding delay to equalize the
  > >
  > > audio/video skew for all transmitting terminals. When
  > >
  > > switching between broadcasting terminals, H.223 may
  > >
  > > transmit a new /H223SkewIndication /message reflecting the
  > >
  > > audio/video skew of the current broadcaster.
  > > 
  > >
  > > -- 
  > > Ramtin Amin
  > >
  > >
  > >
  > > 
  > > ------------------------------------------------------------------------
  > >
  > > > From: thomas.frieling at viif.de
  > > > To: asterisk-video at lists.digium.com
  > > > Date: Mon, 24 Sep 2007 11:48:12 +0200
  > > > Subject: Re: [Asterisk-video] MP4Play async Audio / Video
  > > >
  > > > Hi Thomas Z!
  > > >
  > > > I think this problem is due to the bitrate restriction on 3G calls. The
  > > > audio stream is always sent immediately while the video stream has to
  > > > use what is left of the bandwidth. This is why videos become synchrous
  > > > again when the video bitrate is pretty low for a while in the video...
  > > >
  > > > Take a look at this discussion:
  > > >
  > > http://lists.digium.com/pipermail/asterisk-video/2007-September/001257.html
  > > >
  > > > One solution is to reencode every video with a low bitrate and use a
  > > > fixed bitrate encoder (ffmpeg is dynamic bitrate for example). I had the
  > > > impression though that this still doesn't always work, especially when
  > > > the UMTS connection is not too good...
  > > >
  > > > My idea is that we check each time before sending a keyframe if there is
  > > > already a new keyframe in the queue. If this is the case, we jump to the
  > > > most recent keyframe and just drop the data before that.
  > > >
  > > > What do you think about this? How hard to implement?
  > > >
  > > > Regards,
  > > > Thomas F
  > > >
  > > >
  > > >
  > > > Am Montag, den 24.09.2007, 11:15 +0200 schrieb Thomas Z.:
  > > > > Hello,
  > > > >
  > > > > We have the problem, that a converted mp4 file is asynchronous via 3g
  > > > > network.
  > > > > If we play the file on a pc, everything is synchron.
  > > > > We tried already to reduce the quality and framerate of the video. But
  > > > > nothing helps.
  > > > >
  > > > > Is it a problem with mp4play or with the video?
  > > > >
  > > > > What can we do to get the audio and video synchronized via 3g network?
  > > > >
  > > > > Thank you,
  > > > > best regards
  > > > > Thomas
  > > > >
  > > > >
  > > > >
  > > > > _______________________________________________
  > > > > --Bandwidth and Colocation Provided by http://www.api-digital.com--
  > > > >
  > > > > asterisk-video mailing list
  > > > > To UNSUBSCRIBE or update options visit:
  > > > > http://lists.digium.com/mailman/listinfo/asterisk-video
  > > > --
  > > > www.ViiF.de - your Mobile Video Community
  > > >
  > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  > > >
  > > > Thomas Frieling - IT Development
  > > > ViiF Mobile Video GmbH, Poststr. 21-22, 10178 Berlin
  > > > Cell: +49 (0) 173 63 62 62 3
  > > >
  > > > mailto:thomas at ViiF.de
  > > >
  > > > Sitz: Berlin, Amtgericht Berlin-Charlottenburg, HRB: 108350B
  > > >
  > > > Geschäftsführer: Daniel Höpfner, Steffen Brünn
  > > >
  > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  > > >
  > > > _______________________________________________
  > > > --Bandwidth and Colocation Provided by http://www.api-digital.com--
  > > >
  > > > asterisk-video mailing list
  > > > To UNSUBSCRIBE or update options visit:
  > > > http://lists.digium.com/mailman/listinfo/asterisk-video
  > >
  > >
  > > ------------------------------------------------------------------------
  > > Besoin d'un e-mail ? Créez gratuitement un compte Windows Live Hotmail
  > > et bénéficiez d'un filtre antivirus gratuit ! Windows Live Hotmail
  > > <http://www.windowslive.fr/hotmail/default.asp>
  > > ------------------------------------------------------------------------
  > >
  > > _______________________________________________
  > > --Bandwidth and Colocation Provided by http://www.api-digital.com--
  > >
  > > asterisk-video mailing list
  > > To UNSUBSCRIBE or update options visit:
  > > http://lists.digium.com/mailman/listinfo/asterisk-video
  > 
  > 
  > _______________________________________________
  > --Bandwidth and Colocation Provided by http://www.api-digital.com--
  > 
  > asterisk-video mailing list
  > To UNSUBSCRIBE or update options visit:
  > http://lists.digium.com/mailman/listinfo/asterisk-video



------------------------------------------------------------------------------
  Besoin d'un e-mail ? Créez gratuitement un compte Windows Live Hotmail, plus sûr, plus simple et plus complet ! Windows Live Hotmail 


------------------------------------------------------------------------------


  _______________________________________________
  --Bandwidth and Colocation Provided by http://www.api-digital.com--

  asterisk-video mailing list
  To UNSUBSCRIBE or update options visit:
     http://lists.digium.com/mailman/listinfo/asterisk-video
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-video/attachments/20070925/b0f8ce45/attachment.htm 


More information about the asterisk-video mailing list