Streaming HLS from image in watch folder

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Streaming HLS from image in watch folder

Michael Davis
Hello,

I want to create a live HLS stream that displays a single image. However, the image is updated by an external program on average about every 3 minutes.  The filename remains the same, but it's contents are always different.  I am able to create a live HLS stream using the image as input.  But ffmpeg does not check the input file for changes and so outputs continuously the first rendition of the image that it loads.  Also, I am using a live audio stream coming from icecast as the audio portion of this HLS stream.

Can ffmpeg be instructed to check file modification and load new, or to load new based on time interval?


Thanks,
Mike
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Streaming HLS from image in watch folder

DopeLabs
use -loop 1 -i image.jpg....

and remember to update the file atomically or ffmpeg may partially read the file, or even fail.

you can achieve this by not overwriting the new image in the normal sense, but instead save the new image to a temp file, then mv temp.jpg image.jpg

you may also wish to specify the input frame rate before the image as well =]


cheers,

DL

> On Aug 2, 2017, at 12:56 42PM, Michael Davis <[hidden email]> wrote:
>
> Hello,
>
> I want to create a live HLS stream that displays a single image. However, the image is updated by an external program on average about every 3 minutes.  The filename remains the same, but it's contents are always different.  I am able to create a live HLS stream using the image as input.  But ffmpeg does not check the input file for changes and so outputs continuously the first rendition of the image that it loads.  Also, I am using a live audio stream coming from icecast as the audio portion of this HLS stream.
>
> Can ffmpeg be instructed to check file modification and load new, or to load new based on time interval?
>
>
> Thanks,
> Mike
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Loading...