1

I am looking into streaming video and audio from my .NET WPF application. After some research I have decided VLC looks it might be the best option (but I am open to suggestions). So far I have been able to stream a static image file (How to stream your images/files with VLC?). However when the file gets updated (with the next frame), the stream does not update. Is there any command I can pass into VLC to tell it to continuously read from the file (at a specific rate) so I can just overwrite the file with the next frame.

My video is not coming directly from a camera input, I am processing the frames first, which is why I haven't just specified a video file or device input.

Any help much appreciated.

Community
  • 1
  • 1
Marc
  • 1,541
  • 2
  • 19
  • 29
  • might be useful http://stackoverflow.com/questions/2738228/how-to-stream-your-images-files-with-vlc – Adrian Jan 26 '12 at 15:49
  • Thanks Adrian - am I missing something obvious, that's the same link I posted? Have I misunderstood it? Thanks again – Marc Jan 26 '12 at 16:49
  • 1
    I'm an idiot. Links are barely coloured in my current browser and didn't see it. – Adrian Jan 26 '12 at 17:24

2 Answers2

0

ffmpeg will stream one image, and allow changes to the file while its streaming, still trying to work out details. i think it may end up something like

ffmpeg -i image -f outputformat - | vlc -I - --sout:....

using piping

Druid
  • 6,423
  • 4
  • 41
  • 56
mike
  • 1
  • 1
    Did you know? It is possible to edit your previous post, that way you can reduce the number of answer for a question. It gives you the chance to correct mistakes that could have slipped in your post. :) – ForceMagic Oct 11 '12 at 04:31
0

Here it is, notice that i had to put sudo before vlc and I replaced geteuid with getppid in /usr/bin/vlc to do that. Then:

ffmpeg -loop 1 -i image.bmp -vcodec libx264 -f mpegts - | sudo vlc - vlc://quit -- sout='#transcode{width=500,height=318,fps=1,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=true,numsegs=3,index=/var/www/streaming/mystream.m3u8,index-url=http://xxx.xxx.xxx.xxx/streaming/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}'

Austin Henley
  • 4,625
  • 13
  • 45
  • 80
mike
  • 1