Page 1 of 1

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

Posted: 09 Mar 2012 13:10
by amitvideolan
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,

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

Posted: 09 Mar 2012 15:10
by RĂ©mi Denis-Courmont
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.

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

Posted: 09 Mar 2012 15:12
by Arkaid
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.

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

Posted: 09 Mar 2012 21:01
by amitvideolan
@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,

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

Posted: 09 Mar 2012 22:33
by amitvideolan
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