Page 1 of 1

Streaming frame by frame from memory of a SEM

Posted: 09 Nov 2016 09:37
by Colloc
Hello,

I try to stream video from a SEM (Scanning Electron Microscope) which delivers its frame directly in RAM.

But I can't find any MRL for this kind of data. I've found for screen//, dvd//, etc... not for frame coming from RAM.

How could I do that ?

Today, I send frame by TCP without any compression but the framerate is limited by the bandwidth. That's the reason why I try to use VLC to compress data. The frame size is from 512*384 to 3072*2304, 8bits/pixel.

I wrote my program in C/C++.

Re: Streaming frame by frame from memory of a SEM

Posted: 09 Nov 2016 17:35
by Rémi Denis-Courmont
Frankly, your description means noting. You can't just deliver frames into RAM. There has to be some API involved.

So then presumably, you need to write a VLC plugin that calls the API.

Re: Streaming frame by frame from memory of a SEM

Posted: 14 Nov 2016 11:30
by Colloc
I use the SEM API which delivers image data into memory. So I want to stream this data in a VLC stream. I can't find any way to do this.


I would do this :

Server side :
An image is available in RAM (with a frequency I can choose) => put this in a stream

Client side :
Use VLC to view the stream (it's easy with libvlc).

Re: Streaming frame by frame from memory of a SEM

Posted: 14 Nov 2016 16:57
by Rémi Denis-Courmont
Then whatever the "SEM API" is, you would need a VLC plugin that uses that API.

Re: Streaming frame by frame from memory of a SEM

Posted: 15 Nov 2016 11:29
by Colloc
I just want to know if it is possible to stream image from ram data with libvlc, I don't want a plugin but perhaps I need to write a specific module like "Memory Input" in access module ?

As :

Code: Select all

libvlc_vlm_add_broadcast(inst, "mybroad", "screen://", "#transcode{vcodec=h264, venc=x264,vb=0,scale=0, acodec=mpga,ab=128,channels=2, samplerate=44100}:http{mux=ffmpeg{mux=flv}, dst=:7777/}", 0, NULL, 1, 0);
I would use something as :

Code: Select all

libvlc_vlm_add_broadcast(inst, "mybroad", "RAM://", "#transcode{vcodec=h264, venc=x264,vb=0,scale=0, acodec=mpga,ab=128,channels=2, samplerate=44100}:http{mux=ffmpeg{mux=flv}, dst=:7777/}", 0, NULL, 1, 0);
and a callback function which put data in RAM. (I know that RAM:// doesn't exist...)

I'm just searching the way to add a different source of broadcast from RAM.

Re: Streaming frame by frame from memory of a SEM

Posted: 15 Nov 2016 17:03
by Rémi Denis-Courmont
Sorry but you are not making sense. I have already tried to explain twice. I can't say more.

Re: Streaming frame by frame from memory of a SEM

Posted: 16 Nov 2016 15:54
by Colloc
Ok, ok !

Could I have some explanation to develop a plugin to have a new stream input for libVLC ?

Re: Streaming frame by frame from memory of a SEM

Posted: 07 Dec 2016 00:44
by Jean-Baptiste Kempf
Use the imem API