Problem with clockrates in rtp stream

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

Problem with clockrates in rtp stream

morrisford
I am trying to stream an mp4v / mp4a rtp stream. The pipeline is at the moment:

./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false endx=640 endy=640 startx=100 starty=100 ! video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 ! ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96 ! rtpmux name=muxer name=pay0 pt=96  audiotestsrc is-live=true ! audio/x-raw-int,rate=(int)90000 ! faac ! audio/mpegversion=4 ! queue ! rtpmp4apay name=pay1 pt=97 ! muxer. muxer. )"

The problem I am having is that the audio part is missing. If I remove the caps after the faac plugin, the audio is in the stream. When I look at the startup log I see a clock-rate of 44100 for the mp4a stream and a clock rate of 90000 for the mp4v stream. I am pretty sure this is what is wrong. If I stream with the caps for mpegversion=4 removed I see audio and video clockrates both = 90000.

How do I get the clockrates to match up?

I tried to increase the audio rate to 90000 but it increased to 88200. I tried to reduce the video clock rate but I could not get it to change.

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

_______________________________________________
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 clockrates in rtp stream

Wim Taymans
On Wed, 2010-05-05 at 09:28 -0400, Morris Ford wrote:

> I am trying to stream an mp4v / mp4a rtp stream. The pipeline is at
> the moment:
>
> ./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false
> endx=640 endy=640 startx=100 starty=100 !
> video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 !
> ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 !
> ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96 ! rtpmux name=muxer
> name=pay0 pt=96  audiotestsrc is-live=true !
> audio/x-raw-int,rate=(int)90000 ! faac ! audio/mpegversion=4 ! queue !
> rtpmp4apay name=pay1 pt=97 ! muxer. muxer. )"
>

Don't use rtpmux here, it's not needed and it confuses the server
because it expects elements with names pay%d to be unlinked elements.

Wim

> The problem I am having is that the audio part is missing. If I remove
> the caps after the faac plugin, the audio is in the stream. When I
> look at the startup log I see a clock-rate of 44100 for the mp4a
> stream and a clock rate of 90000 for the mp4v stream. I am pretty sure
> this is what is wrong. If I stream with the caps for mpegversion=4
> removed I see audio and video clockrates both = 90000.
>
> How do I get the clockrates to match up?
>
> I tried to increase the audio rate to 90000 but it increased to 88200.
> I tried to reduce the video clock rate but I could not get it to
> change.
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
_______________________________________________
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 clockrates in rtp stream

morrisford
I changed the pipeline to

./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false endx=640 endy=640 startx=100 starty=100 ! video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 ! ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96  audiotestsrc is-live=true ! audio/x-raw-int ! faac ! audio/mpeg,mpegversion=4 ! queue ! rtpmp4apay name=pay1 pt=97 )"

There is no audio in the stream. I am using Quicktime on the client side so I can easily examine the stream type and it shows no audio stream.

On Wed, May 5, 2010 at 9:44 AM, Wim Taymans <[hidden email]> wrote:
On Wed, 2010-05-05 at 09:28 -0400, Morris Ford wrote:
> I am trying to stream an mp4v / mp4a rtp stream. The pipeline is at
> the moment:
>
> ./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false
> endx=640 endy=640 startx=100 starty=100 !
> video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 !
> ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 !
> ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96 ! rtpmux name=muxer
> name=pay0 pt=96  audiotestsrc is-live=true !
> audio/x-raw-int,rate=(int)90000 ! faac ! audio/mpegversion=4 ! queue !
> rtpmp4apay name=pay1 pt=97 ! muxer. muxer. )"
>

Don't use rtpmux here, it's not needed and it confuses the server
because it expects elements with names pay%d to be unlinked elements.

Wim

> The problem I am having is that the audio part is missing. If I remove
> the caps after the faac plugin, the audio is in the stream. When I
> look at the startup log I see a clock-rate of 44100 for the mp4a
> stream and a clock rate of 90000 for the mp4v stream. I am pretty sure
> this is what is wrong. If I stream with the caps for mpegversion=4
> removed I see audio and video clockrates both = 90000.
>
> How do I get the clockrates to match up?
>
> I tried to increase the audio rate to 90000 but it increased to 88200.
> I tried to reduce the video clock rate but I could not get it to
> change.
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


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

_______________________________________________
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 clockrates in rtp stream

morrisford
bump

On Wed, May 5, 2010 at 10:18 AM, Morris Ford <[hidden email]> wrote:
I changed the pipeline to

./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false endx=640 endy=640 startx=100 starty=100 ! video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 ! ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96  audiotestsrc is-live=true ! audio/x-raw-int ! faac ! audio/mpeg,mpegversion=4 ! queue ! rtpmp4apay name=pay1 pt=97 )"

There is no audio in the stream. I am using Quicktime on the client side so I can easily examine the stream type and it shows no audio stream.


On Wed, May 5, 2010 at 9:44 AM, Wim Taymans <[hidden email]> wrote:
On Wed, 2010-05-05 at 09:28 -0400, Morris Ford wrote:
> I am trying to stream an mp4v / mp4a rtp stream. The pipeline is at
> the moment:
>
> ./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false
> endx=640 endy=640 startx=100 starty=100 !
> video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 !
> ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 !
> ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96 ! rtpmux name=muxer
> name=pay0 pt=96  audiotestsrc is-live=true !
> audio/x-raw-int,rate=(int)90000 ! faac ! audio/mpegversion=4 ! queue !
> rtpmp4apay name=pay1 pt=97 ! muxer. muxer. )"
>

Don't use rtpmux here, it's not needed and it confuses the server
because it expects elements with names pay%d to be unlinked elements.

Wim

> The problem I am having is that the audio part is missing. If I remove
> the caps after the faac plugin, the audio is in the stream. When I
> look at the startup log I see a clock-rate of 44100 for the mp4a
> stream and a clock rate of 90000 for the mp4v stream. I am pretty sure
> this is what is wrong. If I stream with the caps for mpegversion=4
> removed I see audio and video clockrates both = 90000.
>
> How do I get the clockrates to match up?
>
> I tried to increase the audio rate to 90000 but it increased to 88200.
> I tried to reduce the video clock rate but I could not get it to
> change.
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



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

_______________________________________________
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 clockrates in rtp stream

morrisford
I got this resolved by changing the audio to aac. Here is the pipeline with audi and video desktop capture. This streams successfully to my android phone.

./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false endx=640 endy=640 startx=100 starty=100 ! video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 ! ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96  pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! audioconvert ! ffenc_aac ! queue ! rtpmp4apay name=pay1 pt=97 )"

Thanks for the help.
Morris


On Wed, May 5, 2010 at 2:27 PM, Morris Ford <[hidden email]> wrote:
bump


On Wed, May 5, 2010 at 10:18 AM, Morris Ford <[hidden email]> wrote:
I changed the pipeline to

./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false endx=640 endy=640 startx=100 starty=100 ! video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 ! ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96  audiotestsrc is-live=true ! audio/x-raw-int ! faac ! audio/mpeg,mpegversion=4 ! queue ! rtpmp4apay name=pay1 pt=97 )"

There is no audio in the stream. I am using Quicktime on the client side so I can easily examine the stream type and it shows no audio stream.


On Wed, May 5, 2010 at 9:44 AM, Wim Taymans <[hidden email]> wrote:
On Wed, 2010-05-05 at 09:28 -0400, Morris Ford wrote:
> I am trying to stream an mp4v / mp4a rtp stream. The pipeline is at
> the moment:
>
> ./test-launch --gst-debug-level=0 "( ximagesrc use-damage=false
> endx=640 endy=640 startx=100 starty=100 !
> video/x-raw-rgb,framerate=10/1 ! queue max-size-buffers=5 !
> ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=640,height=640 !
> ffenc_mpeg4 ! queue ! rtpmp4vpay name=pay0 pt=96 ! rtpmux name=muxer
> name=pay0 pt=96  audiotestsrc is-live=true !
> audio/x-raw-int,rate=(int)90000 ! faac ! audio/mpegversion=4 ! queue !
> rtpmp4apay name=pay1 pt=97 ! muxer. muxer. )"
>

Don't use rtpmux here, it's not needed and it confuses the server
because it expects elements with names pay%d to be unlinked elements.

Wim

> The problem I am having is that the audio part is missing. If I remove
> the caps after the faac plugin, the audio is in the stream. When I
> look at the startup log I see a clock-rate of 44100 for the mp4a
> stream and a clock rate of 90000 for the mp4v stream. I am pretty sure
> this is what is wrong. If I stream with the caps for mpegversion=4
> removed I see audio and video clockrates both = 90000.
>
> How do I get the clockrates to match up?
>
> I tried to increase the audio rate to 90000 but it increased to 88200.
> I tried to reduce the video clock rate but I could not get it to
> change.
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




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

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel