Streaming h264 video

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Recording Audio from a Network

roope.jarvinen
 
Hi Zelalem,
 
You can use rtppcmapay/depay and rtppcmupay/depay elements with alaw and ulaw.
 
Correct type for alaw is audio/x-alaw and not audio/x-alaw-int.
 
--Roope
 


From: ext Zelalem Sintayehu [mailto:[hidden email]]
Sent: 11 June, 2009 11:08
To: [hidden email]
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

Hi Roope, you are right, it allows alaw,mulaw,ac3,mpeg and raw. But alaw and mulaw don't have payloader and depayloader. Anyway, I tried to recieve without depayloader but it still produced the same error. The following is what  tried. Please help me.

gst-launch-0.10 -v udpsrc port=5002 caps="audio/x-rtp,rate=1000,channels=1,depth=8" ! queue ! audio/x-alaw-int,rate=1000,channels=1,depth=8 ! avimux ! filesink location=audio.avi sync=false .   I also changed the caps for udpsrc with "audio/x-alaw-int,rate=1000,channels=1,depth=8" but didn't work.

Thank you.

- Zelalem S.


From: [hidden email]
To: [hidden email]
Date: Thu, 11 Jun 2009 09:35:58 +0200
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

 
 
Hi,
 
You cannot mux gsm-encoded audio into AVI container. Check avimux description for allowed formats.
 
--Roope
 




Hi Jyoti, thank you for your prompt response. I added the following caps statement, but it is still the same. The following is the modified receiver side code.

gst-launch-0.10 -v udpsrc port=5002 caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)GSM,encoding-params=(string)1,octet-align=(string)1" ! queue ! rtpgsmdepay ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! avimux ! filesink location=audio.avi sync=false

The error is the same: "WARNING: erroneous pipeline: could not link rtpgsmdepay0 to avimux0"

Thank you.

- Zelalem S.
-----------------------------------
From: [hidden email]
To: [hidden email]
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

You should set caps property on udpsrc element at receiver side.

On Wed, Jun 10, 2009 at 7:26 PM, Zelalem Sintayehu <[hidden email]> wrote:
Hi all, I was trying to record audio and video over the network. I wanted to check that separately and succeeded with the video recording, but i couldn't record the audio part. BTW, I want to record into avi file and I used h263p for the video and wanted to use either amr or gsm for the audio. I hope this is possible. The following is my code both from teh sender and reciever side.

Sender:
gst-launch-0.10 -v alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! audioconvert ! gsmenc ! rtpgsmpay ! queue ! udpsink port=5002

Receiver:

gst-launch-0.10 -v udpsrc port=5002 ! queue ! rtpgsmdepay ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! avimux ! filesink location=audio.avi sync=false

and I got the following error and it terminates.  "WARNING: erroneous pipeline: could not link rtpgsmdepay0 to avimux0. By the way, when i store both the video later, should i still put "sync=false" (the last statement in the reciever code)?


Please help me.






check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. More than messages

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Streaming h264 video

Thabelo Mmbengeni-2
In reply to this post by Jyoti-2
Hey thanks a lot.

I checked gst-inspect oggdemux and it appears as you said it always has the sink but source is not always there. Sample linker [ demuxer (src) -> rtppay (sink), works very well ]

But why does it have to have to be dynamic because we know that ogg has audio and video isn't one sink and two sources enough.

On Thu, Jun 11, 2009 at 5:59 AM, Jyoti <[hidden email]> wrote:
the demuxer cannot be directly linked. it should be linked dynamically through the "pad-added" signal.



On Wed, Jun 10, 2009 at 6:29 PM, Thabelo Mmbengeni <[hidden email]> wrote:
Hi

I tried running this command and it worked flawlessly

gst-launch -v filesrc location=video.ogg ! oggdemux ! rtptheorapay ! udpsink port=5000 host=127.0.0.1


but my code is erronous

      source = gst_element_factory_make ("filesrc", "file-source");
      demuxer = gst_element_factory_make ("oggdemux", "dv-parser");
      rtppay = gst_element_factory_make ("rtptheorapay", "video-rtp-pay-converter");
      udpsink = gst_element_factory_make ("udpsink", "video-output");
      rtpbin = gst_element_factory_make("gstrtpbin", "rtp-bin");

      /* put all elements in a bin linkage*/
   
      gst_bin_add_many (GST_BIN (pipeline), source, demuxer, rtppay, udpsink, NULL);
      gst_element_link_many (source, demuxer, rtppay, udpsink, NULL);
   
the error I get is

Setting to PLAYING
Running
Error: Internal data stream error.
Returned, stopping playback
Deleting pipeline


Please help





On Wed, Jun 10, 2009 at 1:55 PM, Thabelo Mmbengeni <[hidden email]> wrote:
Ok thanks, I kind of have an Idea now.

On Wed, Jun 10, 2009 at 1:17 PM, Jyoti <[hidden email]> wrote:
Yeah. Run the server pipeline in verbose mode i.e., with -v option. And copy the caps(full caps) of udpsink on the udpsrc.



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Recording Audio from a Network

zelalem
In reply to this post by roope.jarvinen
Hi Roope and Jyoti, thank you very much for your advice. It is now working. I copied the caps from the output of the sender for the caps (that was a very good advice). Anyway, I used the x-rtp for the udp caps and x-alaw in between the depayloader and the avimuxer. The following is the command:

gst-launch-0.10 -v udpsrc port=5002 caps="application/x-rtp,media=(string)audio,payload=(int)96, rate=(int)8000, encoding-name=(string)PCMA" ! queue ! rtppcmadepay ! 'audio/x-alaw, rate=(int)8000, channels=(int)1' ! queue ! alawdec ! audioconvert ! alsasink

I hope, i will not face any problem with mixing the video and audio.

Thank you again.

- Zelalem S.



From: [hidden email]
To: [hidden email]
Date: Thu, 11 Jun 2009 10:15:37 +0200
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

 
Hi Zelalem,
 
You can use rtppcmapay/depay and rtppcmupay/depay elements with alaw and ulaw.
 
Correct type for alaw is audio/x-alaw and not audio/x-alaw-int.
 
--Roope
 


From: ext Zelalem Sintayehu [mailto:[hidden email]]
Sent: 11 June, 2009 11:08
To: [hidden email]
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

Hi Roope, you are right, it allows alaw,mulaw,ac3,mpeg and raw. But alaw and mulaw don't have payloader and depayloader. Anyway, I tried to recieve without depayloader but it still produced the same error. The following is what  tried. Please help me.

gst-launch-0.10 -v udpsrc port=5002 caps="audio/x-rtp,rate=1000,channels=1,depth=8" ! queue ! audio/x-alaw-int,rate=1000,channels=1,depth=8 ! avimux ! filesink location=audio.avi sync=false .   I also changed the caps for udpsrc with "audio/x-alaw-int,rate=1000,channels=1,depth=8" but didn't work.

Thank you.

- Zelalem S.


From: [hidden email]
To: [hidden email]
Date: Thu, 11 Jun 2009 09:35:58 +0200
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

 
 
Hi,
 
You cannot mux gsm-encoded audio into AVI container. Check avimux description for allowed formats.
 
--Roope
 




Hi Jyoti, thank you for your prompt response. I added the following caps statement, but it is still the same. The following is the modified receiver side code.

gst-launch-0.10 -v udpsrc port=5002 caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)GSM,encoding-params=(string)1,octet-align=(string)1" ! queue ! rtpgsmdepay ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! avimux ! filesink location=audio.avi sync=false

The error is the same: "WARNING: erroneous pipeline: could not link rtpgsmdepay0 to avimux0"

Thank you.

- Zelalem S.
-----------------------------------
From: [hidden email]
To: [hidden email]
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

You should set caps property on udpsrc element at receiver side.




What can you do with the new Windows Live? Find out
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Recording Audio from a Network

zelalem
The command I put in the last e-mail was wrong. The correct one is the following. I am thinking that it may be a reference for others. That is why i wanted to send the correct one.

gst-launch-0.10 -v udpsrc port=5002 caps="application/x-rtp,media=(string)audio,payload=(int)96, rate=(int)8000, encoding-name=(string)PCMA" ! queue ! rtppcmadepay ! 'audio/x-alaw, rate=(int)8000, channels=(int)1' ! queue ! avimux ! filesink location=audio.avi sync=false

Thank you again.

- Zelalem S.


From: [hidden email]
To: [hidden email]
Date: Thu, 11 Jun 2009 13:03:49 +0300
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

Hi Roope and Jyoti, thank you very much for your advice. It is now working. I copied the caps from the output of the sender for the caps (that was a very good advice). Anyway, I used the x-rtp for the udp caps and x-alaw in between the depayloader and the avimuxer. The following is the command:

gst-launch-0.10 -v udpsrc port=5002 caps="application/x-rtp,media=(string)audio,payload=(int)96, rate=(int)8000, encoding-name=(string)PCMA" ! queue ! rtppcmadepay ! 'audio/x-alaw, rate=(int)8000, channels=(int)1' ! queue ! alawdec ! audioconvert ! alsasink

I hope, i will not face any problem with mixing the video and audio.

Thank you again.

- Zelalem S.



From: [hidden email]
To: [hidden email]
Date: Thu, 11 Jun 2009 10:15:37 +0200
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

 
Hi Zelalem,
 
You can use rtppcmapay/depay and rtppcmupay/depay elements with alaw and ulaw.
 
Correct type for alaw is audio/x-alaw and not audio/x-alaw-int.
 
--Roope
 


From: ext Zelalem Sintayehu [mailto:[hidden email]]
Sent: 11 June, 2009 11:08
To: [hidden email]
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

Hi Roope, you are right, it allows alaw,mulaw,ac3,mpeg and raw. But alaw and mulaw don't have payloader and depayloader. Anyway, I tried to recieve without depayloader but it still produced the same error. The following is what  tried. Please help me.

gst-launch-0.10 -v udpsrc port=5002 caps="audio/x-rtp,rate=1000,channels=1,depth=8" ! queue ! audio/x-alaw-int,rate=1000,channels=1,depth=8 ! avimux ! filesink location=audio.avi sync=false .   I also changed the caps for udpsrc with "audio/x-alaw-int,rate=1000,channels=1,depth=8" but didn't work.

Thank you.

- Zelalem S.


From: [hidden email]
To: [hidden email]
Date: Thu, 11 Jun 2009 09:35:58 +0200
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

 
 
Hi,
 
You cannot mux gsm-encoded audio into AVI container. Check avimux description for allowed formats.
 
--Roope
 




Hi Jyoti, thank you for your prompt response. I added the following caps statement, but it is still the same. The following is the modified receiver side code.

gst-launch-0.10 -v udpsrc port=5002 caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)GSM,encoding-params=(string)1,octet-align=(string)1" ! queue ! rtpgsmdepay ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! avimux ! filesink location=audio.avi sync=false

The error is the same: "WARNING: erroneous pipeline: could not link rtpgsmdepay0 to avimux0"

Thank you.

- Zelalem S.
-----------------------------------
From: [hidden email]
To: [hidden email]
Subject: Re: [gst-devel] Problem with Recording Audio from a Network

You should set caps property on udpsrc element at receiver side.




What can you do with the new Windows Live? Find out

See all the ways you can stay connected to friends and family
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Streaming h264 video

michael smith-6-3
In reply to this post by Thabelo Mmbengeni-2
On Thu, Jun 11, 2009 at 1:18 AM, Thabelo Mmbengeni<[hidden email]> wrote:
> Hey thanks a lot.
>
> I checked gst-inspect oggdemux and it appears as you said it always has the
> sink but source is not always there. Sample linker [ demuxer (src) -> rtppay
> (sink), works very well ]
>
> But why does it have to have to be dynamic because we know that ogg has
> audio and video isn't one sink and two sources enough.
>

Because ogg (like other container format) doesn't have "audio and
video". It has an arbitrary number of streams, of various possible
types. For example, some files may have only a single audio stream,
and no video streams. Others might have several audio streams, some
subtitle streams, and a video stream. etc.

Mike

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Video and Audio Synchronization Problem.

zelalem
In reply to this post by zelalem
Hi all, I have been trying to write a program to record video and audio over a network. Independently (I mean creating the video and audio files alone) they are working very nicely, but when I mix them and tried to to save them in one file, I got a very unsynchronized file. The audio finishes almost 3 second ahead of the video (un synchronized by 3 seconds). I even used the sync=true option for the filesink element, but the result is the same. Please give me your ideas on what I should do to get a synchronized video file. Do you think the result will be different if I use a different file container (like mp4) instead of avi? The following is the source and destination commands:

Source commands:
for the audio channel
gst-launch-0.10 -v alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 ! audioconvert ! alawenc !  rtppcmapay ! queue ! udpsink port=5002
for the video channel;
gst-launch v4l2src ! video/x-raw-rgb,width=320,height=240 ! queue ! videorate ! video/x-raw-rgb,rate=15/1 ! ffmpegcolorspace! ffenc_h263p ! rtph263ppay ! udpsink port=5000

Output command
gst-launch-0.10 -v avimux name=mux ! filesink location=videoandaudio.avi sync=true {udpsrc port=5000 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998" num-buffers=5000 ! queue ! rtph263pdepay ! 'video/x-h263,width=320,height=240,framerate=(fraction)25/1' ! queue} ! mux.video_0 {udpsrc port=5002 caps="application/x-rtp,media=(string)audio,payload=(int)96, rate=(int)8000, encoding-name=(string)PCMA" ! queue ! rtppcmadepay ! 'audio/x-alaw, rate=(int)8000, channels=(int)1' ! queue} ! mux.audio_0;

Thank you.

- Zelalem S.






Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it!
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
12