• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Asterisk-video] app_mp4

 
   AsteriskGuru Archives Forum Index -> Asterisk-Video
View previous topic :: View next topic  
Author Message
Sergio.Garcia at ydilo.co
Guest





PostPosted: Wed May 24, 2006 6:59 am    Post subject: [Asterisk-video] app_mp4

Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: app_mp4.c
Type: application/octet-stream
Size: 13069 bytes
Desc: app_mp4.c
Url : http://lists.digium.com/pipermail/asterisk-video/attachments/20060524/c30f9f1c/app_mp4.obj
Back to top
oej at edvina.net (Olle E
Guest





PostPosted: Wed May 24, 2006 7:18 am    Post subject: [Asterisk-video] app_mp4

24 maj 2006 kl. 17.59 skrev Sergio Garc?a Murillo:

Quote:
Hi all

I have been doing some work for recording & playback of audio and
video in a mp4 file format.
It's neither complete nor perfect but...
I have been testing it with eyebeam software and pcmu & h263-1996
and I still have problems synchronizing audio and video and
detecting delays and mutes so if any one could help me explaining
the frames structure it would be very helpful.

Cool!


Before I take a look at this, can you please add it to the bug
tracker, make sure you have a disclaimer
and I'll try to merge it into Asterisk after testing.

Thank you!

/O

---
* Olle E Johansson - oej@edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden
Back to top
duane at counterpath.com
Guest





PostPosted: Wed May 24, 2006 7:25 am    Post subject: [Asterisk-video] app_mp4

I can probably help you with the audio/video sync. It's a bit tricky when
there's VAD/DTX, but not impossible.

Duane

On 5/24/06, Olle E Johansson <oej@edvina.net> wrote:
Quote:


24 maj 2006 kl. 17.59 skrev Sergio Garc?a Murillo:

> Hi all
>
> I have been doing some work for recording & playback of audio and
> video in a mp4 file format.
> It's neither complete nor perfect but...
> I have been testing it with eyebeam software and pcmu & h263-1996
> and I still have problems synchronizing audio and video and
> detecting delays and mutes so if any one could help me explaining
> the frames structure it would be very helpful.
>
Cool!

Before I take a look at this, can you please add it to the bug
tracker, make sure you have a disclaimer
and I'll try to merge it into Asterisk after testing.

Thank you!

/O

---
* Olle E Johansson - oej@edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden



_______________________________________________
--Bandwidth and Colocation provided by Easynews.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/20060524/6af9a55b/attachment-0001.htm
Back to top
keytwho at hotmail.com (R
Guest





PostPosted: Wed May 24, 2006 7:29 am    Post subject: [Asterisk-video] app_mp4

Wouldn't it be possible to use VLC for transcoding the video ? Everything is already done actually, we could in the vlm just tell vlc to listen on a specific RTP port from where the h.263/h.264 stream comes, transcode it into whatever, and resend it.
Is there any probleme using this method ?

thx

--
Amin Ramtin




Date: Wed, 24 May 2006 09:25:25 -0700From: duane@counterpath.comTo: asterisk-video@lists.digium.comSubject: Re: [Asterisk-video] app_mp4I can probably help you with the audio/video sync. It's a bit tricky when there's VAD/DTX, but not impossible.Duane
On 5/24/06, Olle E Johansson <oej@edvina.net> wrote:
24 maj 2006 kl. 17.59 skrev Sergio Garc?a Murillo:> Hi all>> I have been doing some work for recording & playback of audio and> video in a mp4 file format.> It's neither complete nor perfect but... > I have been testing it with eyebeam software and pcmu & h263-1996> and I still have problems synchronizing audio and video and> detecting delays and mutes so if any one could help me explaining> the frames structure it would be very helpful.>Cool!Before I take a look at this, can you please add it to the bugtracker, make sure you have a disclaimerand I'll try to merge it into Asterisk after testing. Thank you!/O---* Olle E Johansson - oej@edvina.net* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden_______________________________________________ --Bandwidth and Colocation provided by Easynews.com --asterisk-video mailing listTo UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-video
_________________________________________________________________
Une chance par jour de gagner un voyage au soleil avec Magic Search !
http://www.magicsearch.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-video/attachments/20060524/56d00cf7/attachment.htm
Back to top
jeff at ocjtech.us (Jeffr
Guest





PostPosted: Wed May 24, 2006 7:35 am    Post subject: [Asterisk-video] app_mp4

On Wed, 2006-05-24 at 17:59 +0200, Sergio Garc?a Murillo wrote:
Quote:

I have been doing some work for recording & playback of audio and
video in a mp4 file format.

Quote:
app_mp4.so : app_mp4.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lmp4 -lmp4v2

Sergio,

What library is providing the mp4 and mp4v2 libraries? What's the
licensing and patent status of those libraries?

Jeff


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-video/attachments/20060524/c7d25c43/attachment.pgp
Back to top
oej at edvina.net (Olle E
Guest





PostPosted: Wed May 24, 2006 8:08 am    Post subject: [Asterisk-video] app_mp4

24 maj 2006 kl. 18.29 skrev Ramtin Amin:

Quote:
Wouldn't it be possible to use VLC for transcoding the video ?
Everything is already done actually, we could in the vlm just tell
vlc to listen on a specific RTP port from where the h.263/h.264
stream comes, transcode it into whatever, and resend it.

Is there any probleme using this method ?
Amin,

That's an idea I've also been discussing. If you have some time,
please dive into this and
find out if it's possible, what the licensing is and what kind of API
we could use for it.

If we could have VLC on a separate machine doing transcoding, that
would propably
be a solution.

Maybe a generic way to signal that we need RTP with transcoding
support to an
external device would be a way forward? We still need to be in the
audio path for
DTMF - so how would we handle RTCP synching in such a scenario?

/O
Back to top
keytwho at hotmail.com (R
Guest





PostPosted: Wed May 24, 2006 8:18 am    Post subject: [Asterisk-video] app_mp4

I've already tryed with vlc to stream to my eyebeam. or wengophone (www.openwengo.fr download the classical one)
I basically look with ethereal what's the RTP port in the SDP and send the stream and it works, It would also be possible with vlc to say that the audio channel has to be asterisk and open a port with asterisk for listening the RTP for DTMF ( trying to get the DTMF from the media stream is so old that I doubt that any video SIP phone still uses that...)
Btw, I've made two patched for the SIP and RTP for asterisk since this one has a bug sending it's own IP for the RTP in the SDP instead of the IP it's listening to...

Would be cool to have a comment on it and eventually to co...

--- rtp.c 2006-05-24 15:14:42.000000000 +0200+++ rtp_patched.c 2006-05-24 15:28:50.000000000 +0200@@ -66,6 +66,15 @@ static int rtpend = 0; static int rtpdebug = 0; /* Are we debugging? */ static struct sockaddr_in rtpdebugaddr; /* Debug packets to/from this host */+++/* *** PATCHED *** */+static struct in_addr rtp_bindaddr;+/* ************** */++++ #ifdef SO_NO_CHECK static int nochecksums = 0; #endif@@ -958,7 +967,11 @@ for (;;) { /* Must be an even port number by RTP spec */ rtp->us.sin_port = htons(x);- rtp->us.sin_addr = addr;+++ //PATCHED ->>> rtp->us.sin_addr = addr;+ rtp->us.sin_addr = (rtp_bindaddr.s_addr != 0 ? rtp_bindaddr : addr);+ /* If there's rtcp, initialize it as well. */ if (rtp->rtcp) rtp->rtcp->us.sin_port = htons(x + 1);@@ -1825,6 +1838,12 @@ struct ast_config *cfg; char *s;
+// PATCHED+ struct ast_hostent ahp;+ struct hostent *hp;+++ rtpstart = 5000; rtpend = 31000; dtmftimeout = DEFAULT_DTMF_TIMEOUT;@@ -1844,7 +1863,21 @@ if (rtpend > 65535) rtpend = 65535; }- if ((s = ast_variable_retrieve(cfg, "general", "rtpchecksums"))) {+++ /* *** PATCHED *** */+ if ((s = ast_variable_retrieve(cfg, "general", "rtp_bindaddr"))) {+ if (!(hp = ast_gethostbyname(s, &ahp))) {+ ast_log(LOG_WARNING, "Invalid address: %s\n", s);+ } else {+ memcpy(&rtp_bindaddr, hp->h_addr, sizeof(rtp_bindaddr));+ }+ }+ /* ************** */++++ if ((s = ast_variable_retrieve(cfg, "general", "rtpchecksums"))) { #ifdef SO_NO_CHECK if (ast_false(s)) nochecksums = 1;





And for the chan_sip.c



--- chan_sip.c 2006-05-24 15:02:43.000000000 +0200+++ chan_sip_patched.c 2006-05-24 15:05:02.000000000 +0200@@ -4441,14 +4441,16 @@ if (p->redircodecs) capability = p->redircodecs; } else {- dest.sin_addr = p->ourip;+ //PATCHED HERE ->>> dest.sin_addr = p->ourip;+ dest.sin_addr = sin.sin_addr.s_addr !=0 ? sin.sin_addr:p->ourip; dest.sin_port = sin.sin_port; }
/* Determine video destination */ if (p->vrtp) { if (p->vredirip.sin_addr.s_addr) {- vdest.sin_port = p->vredirip.sin_port;+ //PATCHED HERE ->>> vdest.sin_port = p->vredirip.sin_port;+ vdest.sin_addr = vsin.sin_addr.s_addr != 0 ? vsin.sin_addr:p->ourip; vdest.sin_addr = p->vredirip.sin_addr; } else { vdest.sin_addr = p->ourip;









Quote:
From: oej@edvina.net> Subject: Re: [Asterisk-video] app_mp4> Date: Wed, 24 May 2006 19:07:53 +0200> To: asterisk-video@lists.digium.com> > > 24 maj 2006 kl. 18.29 skrev Ramtin Amin:> > > Wouldn't it be possible to use VLC for transcoding the video ? > > Everything is already done actually, we could in the vlm just tell > > vlc to listen on a specific RTP port from where the h.263/h.264 > > stream comes, transcode it into whatever, and resend it.> >> > Is there any probleme using this method ?> Amin,> That's an idea I've also been discussing. If you have some time, > please dive into this and> find out if it's possible, what the licensing is and what kind of API > we could use for it.> > If we could have VLC on a separate machine doing transcoding, that > would propably> be a solution.> > Maybe a generic way to signal that we need RTP with transcoding > support to an> external device would be a way forward? We still need to be in the > audio path for> DTMF - so how would we handle RTCP synching in such a scenario?> > /O> _______________________________________________> --Bandwidth and Colocation provided by Easynews.com --> > asterisk-video mailing list> To UNSUBSCRIBE or update options visit:> http://lists.digium.com/mailman/listinfo/asterisk-video
_________________________________________________________________

Une chance par jour de gagner un voyage au soleil avec Magic Search !
http://www.magicsearch.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-video/attachments/20060524/cb3f3460/attachment-0001.htm
Back to top
Sergio.Garcia at ydilo.co
Guest





PostPosted: Wed May 24, 2006 9:10 pm    Post subject: [Asterisk-video] app_mp4

Jeffrey C. Ollie wrote:
Quote:
On Wed, 2006-05-24 at 17:59 +0200, Sergio Garc?a Murillo wrote:
>
> I have been doing some work for recording & playback of audio and
> video in a mp4 file format.

> app_mp4.so : app_mp4.o
> $(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lmp4
> -lmp4v2

Sergio,

What library is providing the mp4 and mp4v2 libraries? What's the
licensing and patent status of those libraries?

Jeff

They are the mpeg4ip libraries and they use a Mozilla PublicLicense 1.1 (http://mpeg4ip.sourceforge.net)

Sergio
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
Back to top
Sergio.Garcia at ydilo.co
Guest





PostPosted: Wed May 24, 2006 9:26 pm    Post subject: [Asterisk-video] app_mp4

Quote:
I can probably help you with the audio/video sync. It's a bit tricky when there's VAD/DTX, but not impossible.

Hi, Duane

My main problem is that I don't know how to extract exact timing from the frame structure. If I have the timestamp value from the rtp I could just handle the vad and the silence suppression just fine. I'm using the samples value but it seems that when it's some silence suppression I get a 0 in it.
The other problem I have found is that my eyebeam doesn't start sending video immediately, so I'll have to make some extra timing to be able to measure this delay.

Greetings
Sergio
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
Back to top
Sergio.Garcia at ydilo.co
Guest





PostPosted: Wed May 24, 2006 9:38 pm    Post subject: [Asterisk-video] app_mp4

Olle E Johansson wrote:
Quote:
24 maj 2006 kl. 17.59 skrev Sergio Garc?a Murillo:

> Hi all
>
> I have been doing some work for recording & playback of audio and
> video in a mp4 file format. It's neither complete nor perfect but...
> I have been testing it with eyebeam software and pcmu & h263-1996 and
> I still have problems synchronizing audio and video and detecting
> delays and mutes so if any one could help me explaining the frames
> structure it would be very helpful.
>
Cool!

Before I take a look at this, can you please add it to the bug
tracker, make sure you have a disclaimer and I'll try to merge it
into Asterisk after testing.

Hi Olle!

Could you explain me a bit more what do you need in order to include it?
By the way, my main idea about this was to use it to help me develop the H324M gateway, so I could get a good channel with h263 and gsm amr encodings. But I have found that if I want to send the gsm amr I'll have to include some extra code so Asterisk can negotiate it.
Wouldn't it be a good idea to avoid all that hardcoded codecs or at least add some kind of AST_AUDIO_PASSTRHOUGH/AST_AUDIO_DYNAMYC and add some info so it can dynamically negotiate the codec for the sdp (I know it's mostly for SIP, but that's what I have more knowledge about :)


Greetings
Sergio
--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed. No confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. Opinions, conclusions and
other information in this message that do not relate to the official business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given nor endorsed by it.
--------------------------------------------------------------------------------------
Back to top
duane at counterpath.com
Guest





PostPosted: Wed May 24, 2006 10:25 pm    Post subject: [Asterisk-video] app_mp4

Hi Sergio,

I'm not sure I understand what you mean. The RTP timestamp should increase
at 8000 or 16000 every second for audio, and for video it should increase at
90000 per second. If you're seeing the occasional timestamp of 0, then
that's a bug.

If you're trying to record video and sync it with audio, there's a
relatively simple way. If you always keep the last decoded frame in memory,
then you can either play it twice or skip it periodically to keep it in sync
with the audio. I.e. if you're writing 30 fps into the file, and you've
played out 16000 samples of audio, but you've only written 28 frames, then
you can repeat the last frame two times to resync it (since you've written
one second worth of audio, and you also need one second worth of video).

Duane

On 5/24/06, Sergio Garc?a Murillo <Sergio.Garcia@ydilo.com> wrote:
Quote:


> I can probably help you with the audio/video sync. It's a bit tricky
when there's VAD/DTX, but not impossible.

Hi, Duane

My main problem is that I don't know how to extract exact timing from the
frame structure. If I have the timestamp value from the rtp I could just
handle the vad and the silence suppression just fine. I'm using the samples
value but it seems that when it's some silence suppression I get a 0 in it.
The other problem I have found is that my eyebeam doesn't start sending
video immediately, so I'll have to make some extra timing to be able to
measure this delay.

Greetings
Sergio

--------------------------------------------------------------------------------------
This message and any files transmitted with it are confidential and
intended solely
for the use of the individual or entity to whom they are addressed. No
confidentiality
or privilege is waived or lost by any wrong transmission.
If you have received this message in error, please immediately destroy it
and kindly
notify the sender by reply email.
You must not, directly or indirectly, use, disclose, distribute, print, or
copy any
part of this message if you are not the intended recipient. Opinions,
conclusions and
other information in this message that do not relate to the official
business of
Ydilo Advanced Voice Solutions, S.A. shall be understood as neither given
nor endorsed by it.

--------------------------------------------------------------------------------------
_______________________________________________
--Bandwidth and Colocation provided by Easynews.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/20060525/5221cb28/attachment.htm
Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-Video All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™