Trouble converting RTSP video streams to OGV/WEBM (MP4 seems to work)

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

Trouble converting RTSP video streams to OGV/WEBM (MP4 seems to work)

debruyn
This post was updated on .

Think the problem lies betwwn the MUX and the Sinks

So i seem to have a problem when decoding RTSP streams to OGV/WEBM format. When converting to MP4 it stores a media file fine. After checking the pipelines it seems the fualt lies between the oggmux/webmmux and the filesink. Appreciate it if someone could explain why this seems to work on MP4 but not on OGG/WEBM. Below is the piplines being used

All help Would be appreciated

RTSP to MP4

Works fine

GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=~/Documents/graphs/ gst-launch-1.0 -e rtspsrc location=rtsp://10.15.1.216/h264/ch1/main/av_stream user-id=admin user-pw=admin123 latency=0 ! decodebin ! x264enc ! mp4mux ! filesink location=~/Documents/test/ip_test.mp4

RTSP to OGV

Doesn't even want to start the pipe

GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=~/Documents/graphs/ gst-launch-1.0 -e rtspsrc location=rtsp://10.15.1.216/h264/ch1/main/av_stream user-id=admin user-pw=admin123 latency=0 ! rtph264depay ! decodebin ! theoraenc ! oggmux ! filesink location=~/Documents/test/ip_test.ogv

RTSP to WEBM

Starts the pipeline but only records for two seconds the goes blank

GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=~/Documents/graphs/ gst-launch-1.0 rtspsrc location=rtsp://10.15.1.216/h264/ch1/main/av_stream user-id=admin user-pw=admin123 latency=0 ! decodebin ! vp8enc ! webmmux streamable=true ! filesink location=~/Documents/test/ip_test.webm

Reply | Threaded
Open this post in threaded view
|

Re: Trouble converting RTSP video streams to OGV/WEBM (MP4 seems to work)

debruyn

Fixed some issues but need some explanation and advice

The whole issue was solved by removing the Decodebin element and building my own custom decode/depay structure. Pipe looks as follows :

GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=~/Documents/graphs/ gst-launch-1.0 rtspsrc location=rtsp://192.168.0.216/video.h264 user-id=admin user-pw=admin123 name=source ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! theoraenc ! oggmux ! filesink location=~/Documents/test/ip_test.ogg

Can someone plz explain why decodebin didn't allow for flawless conversion?

Also i changed the sink to output the (soundless) video to an Icecast server. Pipeline as follows:

GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=~/Documents/graphs/ gst-launch-1.0 rtspsrc location=rtsp://10.15.1.216/video.h264 user-id=admin user-pw=admin123 name=source ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! theoraenc ! oggmux ! shout2send ip=192.168.0.182 port=8000 password=password mount=/test.ogg

Now when loading the video into HTML tags i get the following annoyance. Chrome gives a delayed response between 5 seconds and 16 Seconds. Firefox buffers the video extremely so that it becomes impossible to watch the stream. Is there a way to improve this?

Lastly is there any suggestions of what is the best method to stream mp4 files to the web? Icecast doesn't support the container. Any help or suggestions would be appreciated

Regards Debruyn

Reply | Threaded
Open this post in threaded view
|

Re: Trouble converting RTSP video streams to OGV/WEBM (MP4 seems to work)

Sebastian Dröge-3
On Mo, 2016-02-08 at 22:53 -0800, debruyn wrote:

> Fixed some issues but need some explanation and advice
> The whole issue was solved by removing the Decodebin element and
> building my own custom decode/depay structure. Pipe looks as follows
> : 
>
> GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=~/Documents/graphs/ gst-launch-1.0
> rtspsrc location=rtsp://192.168.0.216/video.h264 user-id=admin user-
> pw=admin123 name=source ! rtpjitterbuffer ! rtph264depay ! avdec_h264
> ! theoraenc ! oggmux ! filesink
> location=~/Documents/test/ip_test.ogg 
>
> Can someone plz explain why decodebin didn't allow for flawless
> conversion? 
Differences here are that you don't use "latency=0" anymore. Also you
don't need an rtpjitterbuffer after rtspsrc in general.

It would also make sense to add some queues into your pipeline, e.g.
before the encoder, and also add a videoconvert there.

> Also i changed the sink to output the (soundless) video to an Icecast
> server. Pipeline as follows: 
>
> GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=~/Documents/graphs/ gst-launch-1.0
> rtspsrc location=rtsp://10.15.1.216/video.h264 user-id=admin user-
> pw=admin123 name=source ! rtpjitterbuffer ! rtph264depay ! avdec_h264
> ! theoraenc ! oggmux ! shout2send ip=192.168.0.182 port=8000
> password=password mount=/test.ogg 
>
> Now when loading the video into HTML tags i get the following
> annoyance. Chrome gives a delayed response between 5 seconds and 16
> Seconds. Firefox buffers the video extremely so that it becomes
> impossible to watch the stream. Is there a way to improve this? 
You don't really have much control over the buffering that browsers are
doing for video streams unfortunately. Using a streaming protocol and
things like MSE would improve on this.

> Lastly is there any suggestions of what is the best method to stream
> mp4 files to the web? Icecast doesn't support the container. Any help
> or suggestions would be appreciated 

Using the DASH protocol. MP4 is not a streamable container by itself.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Trouble converting RTSP video streams to OGV/WEBM (MP4 seems to work)

Rakesh Sharma
In reply to this post by debruyn
I am also facing the same issue.
I have tested with all the component which is used by decodebin.
If I remove h264parse then pipeline works fine but it only show 2 second
video on browser.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel