Page 1 of 1

Stream/transcode a video file over HTTP and serve it as an image

Posted: 19 Dec 2017 15:23
by hhervoche
Hello,

I want to know if it is possible to read a video file and stream it over HTTP as an image. I know that I can use the MJPEG alternative (it is working like a charm), but I need to have access to an image (indeed IE11 does not support MJPEG...).

The MJPEG is working perfectly.

Code: Select all

vlc imputFile.mp4 --sout='#transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=localhost:8180/output.mjpg}'
I tried to modify the http-mime type to serve an image and I tried several muxer without any success.

Code: Select all

vlc imputFile.mp4 --sout='#transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}:standard{access=http{image/jpeg},mux=mpjpeg,dst=localhost:8180/output.jpg}'
Is it possible to achieve that ?
My version is VLC media player 2.1.6 Rincewind

Thank you for your help

Note : I found this post https://forum.videolan.org/viewtopic.php?f=4&t=125659 afterwards, is there any change ?

Re: Stream/transcode a video file over HTTP and serve it as an image

Posted: 19 Dec 2017 19:20
by Rémi Denis-Courmont
That does not make much sense, TBH. Also VLC 2.1.6 is way out of date.

Re: Stream/transcode a video file over HTTP and serve it as an image

Posted: 20 Dec 2017 12:04
by hhervoche
VLC would basically behave like an HTTP image server, delivering the last image from the video file it is reading. Like it is capable of streaming MJPEG, I was wondering if it could serve a JPG image file.

Re: Stream/transcode a video file over HTTP and serve it as an image

Posted: 20 Dec 2017 18:13
by Rémi Denis-Courmont
You want a single still frame? No.