Page 1 of 1

RTSP streaming from active Named pipe

Posted: 16 Apr 2020 11:17
by Besseth
Hi there,

I am experiencing some issues with VLC streaming, and so far I've not yet found an explanation on my issue, nor if what I want is actually feasible or not.
Hopefully I might have some help in here.

Main goal
The main idea for me is to create a RTSP video feed that can be accessed on the network, from an "unending" stream of JPEG files.
Basically, I have a camera that will generate JPEG files every second for example ; and I would like to be able to stream those JPEG files somehow in a RTSP (or any appropriate streaming protocol).

Current status
I created a Named Pipe in my application, into which I am pushing regularly my JPEG buffers.
To begin with, I've stored any data from this Named Pipe over 15s into a file, that I used to create my stream.

Thanks to the documentation and posts from this forum, I've managed as of now to stream the content of this file in a RTSP feed, using the following command line :

Code: Select all

.\vlc.exe -vvv --sout "#transcode{vcodec=h264,vb=800,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:rtp{sdp=rtsp://127.0.0.1:8554/}" --no-sout-all --sout-keep file:///D:/Images.bin
I am now trying to switch the actual file input to a "stream" input, where I would expect VLC to open the named pipe, retrieve over time the JPEG that are being sent in there, encode and feed those to the stream.
As I am no expert on video feed generation, I am not even sure such a thing is possible, since VLC will not know all of the images before starting the stream.

I have tried the following commands, but to no avail :

Code: Select all

.\vlc.exe -vvv --sout "#transcode{vcodec=h264,vb=800,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:rtp{sdp=rtsp://127.0.0.1:8554/}" --no-sout-all --sout-keep stream://\\\.\pipe\MyRtspPipe .\vlc.exe -vvv --sout "#transcode{vcodec=h264,vb=800,acodec=mpga,ab=128,channels=2,samplerate=44100,scodec=none}:rtp{sdp=rtsp://127.0.0.1:8554/}" --no-sout-all --sout-keep file:///\\.\pipe\MyRtspPipe
Using those, VLC do not generate an error message, therefore I would assume it understands there is a pipe, and manages to open it. However I can see in the VLC GUI the progress bar in the bottom initializes, but stops immediately after.
If I log on file verbose level 3 I have the following output :
main debug: no stream_filter modules matched
main debug: looking for stream_directory module matching "any": 1 candidates
main debug: no stream_directory modules matched
main debug: attachment of directory-extractor failed for stream://\\\.\pipe\MyRtspPipe
main debug: looking for stream_filter module matching "record": 24 candidates
main debug: using stream_filter module "record"
main debug: creating demux: access='stream' demux='any' location='\\\.\pipe\MyRtspPipe' file='\\.\pipe\MyRtspPipe'
main debug: looking for demux module matching "any": 55 candidates
main debug: looking for xml reader module matching "any": 1 candidates
main debug: using xml reader module "xml"
webvtt debug: subtitle demux discarded
image debug: Detected image: JPEG
image error: Failed to load the image
main debug: selecting program id=0
main debug: using demux module "image"
main debug: looking for packetizer module matching "any": 25 candidates
main debug: using packetizer module "copy"
main debug: starting in async mode
main debug: looking for meta reader module matching "any": 2 candidates
lua debug: Trying Lua scripts in C:\Users\\AppData\Roaming\vlc\lua\meta\reader
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\reader
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\reader\filename.luac
main debug: no meta reader modules matched
main debug: `stream://\\\.\pipe\MyRtspPipe' successfully opened
main debug: EOF reached
main debug: killing decoder fourcc `jpeg'
main debug: removing module "copy"
main debug: removing module "image"
main debug: removing module "record"
main debug: removing module "prefetch"
prefetch debug: end of stream
main debug: removing module "filesystem"
main debug: Program doesn't contain anymore ES
main debug: dead input
qt debug: IM: Deleting the input
main debug: changing item without a request (current 0/1)
main debug: nothing to play
main debug: exiting


Therefore, I would have 2 questions :
  • Is it possible to have an opened named pipe as an input, and the images coming from it being added to the stream upon arrival ?
  • That being the case, what would be the syntax or the options that I must set for it to work ?

Would love any feedbacks :)
Thanks