to Encode or Not to Encode ! custom RGB vid src & IMEM stuff

About encoding, codec settings, muxers and filter usage
amitvideolan
New Cone
New Cone
Posts: 3
Joined: 09 Mar 2012 10:01

to Encode or Not to Encode ! custom RGB vid src & IMEM stuff

Postby amitvideolan » 09 Mar 2012 13:10

I would like to stream certain live video generated from an application. Now what the app generates is RGB buffer frames.
"imem" is what i would be using for the same as 'access plugin' would make me write the whole app in a plugin, so 'imem'.

The stream i want to encode in 'x264' format for better bandwidth utilization.

1) Apart from integrating a 'imem' in my app using "libvlc_new()" ... do i have to encode it before passing each frame or can that be done in actual vlc streamer, which would be using this 'imem' as input source.
2) Can we have two 'imem' source on same pc? (I have yet started to implement the above).
3) How can audio be integrated with the video above?
4) Would be using windows 7/XP based platform (hope that 'imem' is not linux only).
5) anything you can help the above with, like code snippet, links to do stuff :)

regards,

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: to Encode or Not to Encode ! custom RGB vid src & IMEM s

Postby Rémi Denis-Courmont » 09 Mar 2012 15:10

1) (Lib)VLC can encode if you pass the appropriate stream output chain string.
2) You can have as many imem media as you want so long as memory and CPU permits.
3) It probably cannot. I think a proper VLC access_demux plugin is required for that.
4) In principles, yes.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Arkaid
New Cone
New Cone
Posts: 5
Joined: 02 Sep 2011 03:47

Re: to Encode or Not to Encode ! custom RGB vid src & IMEM s

Postby Arkaid » 09 Mar 2012 15:12

If it's just encoding that you want to do, May I suggest piping your output to an ffmpeg instance. ffmpeg even supports various standard streaming protocols, such as rtp, so it also solves that problem for you. I would only use vlc to decode and play video, not to encode it. But that's just me.

amitvideolan
New Cone
New Cone
Posts: 3
Joined: 09 Mar 2012 10:01

Re: to Encode or Not to Encode ! custom RGB vid src & IMEM s

Postby amitvideolan » 09 Mar 2012 21:01

@denis Thanks,
There are few doubt here,
1) (Lib)VLC can encode if you pass the appropriate stream output chain string.
just to confirm, vlc can encode directly RGB frames also, right!
4) In principles, yes.
I didn't get it, so windows XP and windows 7 support imem out of the box, right!

Also thanks for rest of the reply, It helped me.

regards,

amitvideolan
New Cone
New Cone
Posts: 3
Joined: 09 Mar 2012 10:01

Re: to Encode or Not to Encode ! custom RGB vid src & IMEM s

Postby amitvideolan » 09 Mar 2012 22:33

If it's just encoding that you want to do, May I suggest piping your output to an ffmpeg instance. ffmpeg even supports various standard streaming protocols, such as rtp, so it also solves that problem for you. I would only use vlc to decode and play video, not to encode it. But that's just me.
I think its a good idea, as there is no callback to feed in the frame, but you write when the frame is available. ( Can we do this in (Lib)VLC ? )

I have used ffmpeg to encode and am comfortable with that, but that for only encoding, and I have not used it for streaming. Its bit difficult to get good help, or may be i am searching wrongly,
I have found "http://ffmpeg.org/doxygen/0.6/output-ex ... ource.html" and it seems to be what i want except it writing to a file rather than broadcasting. I think i have to set "AVFormatContext" to rtp or something (please suggest best streaming format, video is mostly still) and use "url_fopen(ByteIOContext *s, "rtp://localhost:9292", int flags);" for streaming.
All this is just a guess and am hoping to get some affirmation if you have experience in the same.

regards and thanks


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 18 guests