Page 1 of 1

RTP MJPEG streaming

Posted: 10 Mar 2012 14:56
by davorin
I'm trying to stream form a FreeBSD 9 box a movie as MJPEG via RTSP...

But when launching vlc it says me that the mjpg codec is unsupported...

Code: Select all

[0x8306f5d70] stream_out_rtp stream out error: cannot add this stream (unsupported codec: MJPG) [0x8306f5f70] stream_out_transcode stream out error: cannot add this stream
How can I transcode and stream a mjpeg movie which IP phones understand only?

This is my command line argument using vlc-1.1.13 (latest in FreeBSD 9):

Code: Select all

sudo vlc-wrapper -I dummy -vvv hoermal.mov --no-audio --sout "#transcode{vcodec=mjpg,vb=256,width=320,height=240}:rtp{dst=10.0.10.3,video-port=5000,sdp=rtsp://10.0.10.3:554/test.sav}"

Re: RTP MJPEG streaming

Posted: 10 Mar 2012 16:27
by Rémi Denis-Courmont
VLC does not currently support packetization of MJPEG over RTP, sorry and patch welcome.

Re: RTP MJPEG streaming

Posted: 14 Jul 2012 11:42
by hackeron
I can confirm this issue too:

I'm trying to re-stream an RTSP steam I get from an IP camera. Here is my vlm.conf:

Code: Select all

new cam1 broadcast enabled setup cam1 input rtsp://admin:admin@192.168.0.164/0 setup cam1 output #rtp{mux="ts",sdp="rtsp://localhost:1234/cam1"} control cam1 play
With the above, I can stream MJPG just fine, but "mux=ts" doesn't support G726 and I get:

Code: Select all

[0x10027b070] main mux error: cannot add this stream [0x10027f260] stream_out_rtp stream out error: cannot add this stream to the muxer [0x105866ef0] [Media: cam1] main decoder error: cannot create packetizer output (g726)
If I remove the "mux=ts" from the above I get:

Code: Select all

➜ vlc --vlm-conf vlm.conf VLC media player 2.0.2 Twoflower (revision 2.0.2-9-gd1b4a63) [0x10020a650] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface. [0x10027f260] stream_out_rtp stream out: Consider passing --rtsp-host=IP on the command line instead. [0x10027f260] stream_out_rtp stream out error: cannot add this stream (unsupported codec: MJPG) [0x103023cf0] [Media: cam1] main decoder error: cannot create packetizer output (MJPG)
Any workaround to be able to stream MJPG+G726 over RTP/RTSP?

Re: RTP MJPEG streaming

Posted: 14 Jul 2012 17:46
by Rémi Denis-Courmont
No. Someone needs to write the code. It won't spawn spontaneously.

Re: RTP MJPEG streaming

Posted: 12 Dec 2014 19:36
by Kubink
Is there actually a possibility to see which files causes this error "stream_out_rtp stream out error: cannot add this stream (unsupported codec: MJPG)" ?

I need to stream MJPG and i think i'm able to write the code, but i have no clue how to start.

Re: RTP MJPEG streaming

Posted: 13 Dec 2014 13:07
by Rémi Denis-Courmont
modules/stream_out/rtp*.c