I am trying to set up the ffmpeg camera with an input from a local video file.
The entity shows up in lovelace with a thumbnail of the video but will not play the video. When i check the logs I see “Error demuxing stream: No dts in packet”
I’ll tried this out myself. I used a GoPro clip mp4. Plays fine with QuickTime and Windows Media Player including audio. The HA entity I created is camera.test_video_file.
(Skipping lovelace) I went to the developers tools->state->camera.test_video_file and clicked on the upper left box where one should get a pop up.
If the path/file isn’t configured correctly, the popup just spins, no logs.
When the path/file is configured correctly, video is played in my case (but no audio), AND I also get the same log error as you,
The complaint about “Error demuxing stream: No dts in packet”, would suggest ffmpeg is expecting the encoded video/audio stream to be in a particular format and the file does not meet that format. I ran an ffmpeg analysis on my go pro file, and it had what looks like a minor issue with with the timestamp mid-stream…to where it could analyze the video but it couldn’t analyze the audio.
So to answer your question, ffmpeg can play a local file, it may be the case that it has to be in the right format.
I ended up using vlc to create a rtsp stream from the video file and that worked great with the ffmpeg platform and played just fine in lovelace. Below is my solution.
Create a vlc config named vlc_vod_config:
new Bedroom vod enabled
setup Bedroom input "file:///mnt/blink_video/blink_bedroom.mp4"
new Kitchen vod enabled
setup Kitchen input "file:///mnt/blink_video/blink_kitchen.mp4"
new LivingRoom vod enabled
setup LivingRoom input "file:///mnt/blink_video/blink_livingroom.mp4"
run vlc in command line (change password from videolan)
Be advised that if anyone is using FireFox to display MP4 videos in LoveLace using this method, that it will only display a small portion of the video. There is a video length header bug fix for this that will be in version .110. Chrome works just fine and plays the video to completion.