Streaming via VLM

This forum is about all development around libVLC.
Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Streaming via VLM

Postby Moriquendi » 31 May 2011 16:40

Hello there,

I'm working on a project where it requires streaming from one device to another. I have a working code , but what i want to know is if there is a way to resize(change the resolution of the video). Here's my sample code:

Code: Select all

char *vlcOptions[] = {""}; vlcInstance = libvlc_new(1, vlcOptions); libvlc_vlm_add_broadcast(vlcInstance, "test", "C:\\Program Files\\VideoLAN\\VLC\\WOW_Intro_LK_800.avi", "#duplicate{dst=rtp{dst=192.168.128.154,port=5004,mux=ts},dst=display}", 0, NULL, TRUE, 0); libvlc_vlm_play_media(vlcInstance, "test");
I've tried using "libvlc_vlm_show_media" to see the codec details but for now it doesn't seem like working for me, apparently there is a bug that always returns NULL. Any ideas would be appreciated.

P.S: I've tried streaming media using "libvlc_media" libraries, but i couldnt find a way to stream data for a specific IP address. If there is a way to do so, that'd be great.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: Streaming via VLM

Postby Sébastien Escudier » 31 May 2011 16:41

you can resize on the receiving side.
If you want to resize on your server, then you need to transcode.

Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Re: Streaming via VLM

Postby Moriquendi » 31 May 2011 18:25

Thanks a lot for such a quick reply. As you said, I needed to resize on server side and transcoding worked just fine. If anyone is interested in, here's how the code looks like now:

Code: Select all

char *vlcOptions[] = {""}; vlcInstance = libvlc_new(1, vlcOptions); libvlc_vlm_add_broadcast(vlcInstance, "test", "C:\\Program Files\\VideoLAN\\VLC\\WOW_Intro_LK_800.avi", "#transcode{vcodec=h264,vb=800,scale=1,vfilter=canvas{width=640,height=480,aspect=4:3},acodec=mp4a,ab=128,channels=2,samplerate=44100}:duplicate{dst=rtp{dst=192.168.128.154,port=5004,mux=ts},dst=display} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep", 0, NULL, TRUE, 0); libvlc_vlm_play_media(vlcInstance, "test");

Moriquendi
Blank Cone
Blank Cone
Posts: 74
Joined: 31 May 2011 16:22

Re: Streaming via VLM

Postby Moriquendi » 01 Jun 2011 08:07

1 more problem just popped up. Apparently I need to rescale the resolution ONLY WHEN the stream exceeds 640 x 480. So, somehow I need the codec information so that i can decide sending stream with or without transcoding. Any ideas are welcome.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: Streaming via VLM

Postby Sébastien Escudier » 01 Jun 2011 08:36

You would need to parse the stream first
maybe libvlc_media_parse can do the job, but I never did this.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests