0

UPDATED with info from -report


I'm new to ffmpeg.

I am trying to loop a video to a linux v4l2 device.

ffmpeg -stream_loop -1 -re -f lavfi  -i "movie=snail.mp4" -f v4l2 /dev/video4 -report

It plays the video once and then exits with the message "Invalid

[Parsed_movie_0 @ 0x56289dec9a00] EOF timestamp not reliable=N/A speed=   1x    
Error while filtering: Invalid argument
frame=  391 fps= 25 q=-0.0 Lsize=N/A time=00:00:15.64 bitrate=N/A speed=0.999x    
video:43988kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Which argument is invalid and why?

The output of the report file generated by ffmpeg is available here: https://gist.github.com/ahoffer/7217aa0572061e7c255cf08914be53e2

3
  • Add -report and rerun. Share report.
    – Gyan
    Jul 28 '20 at 5:07
  • I added -report, but it provided no additional information. ffmpeg -stream_loop -1 -re -f lavfi -i "movie=snail.mp4" -f v4l2 /dev/video4 -report
    – ahoffer
    Jul 28 '20 at 16:04
  • 1
    It will have generated a report file in pwd. Share that.
    – Gyan
    Jul 28 '20 at 16:21
0

-stream_loop is buggy in versions older than 4.1, so upgrade.

Also, stream_loop won't work with movies opened via movie filter. Use it as a direct input.

ffmpeg -stream_loop -1 -re -i "snail.mp4" -f v4l2 /dev/video4 -report
3
  • ffmpeg is already the newest version (7:3.4.8-0ubuntu0.2)
    – ahoffer
    Jul 30 '20 at 0:05
  • That command sort of works. However, the framerate slowly drops from 24 FPS to about 8 FPS. Then it picks back up. It repeats the pattern indefinitely. I looking in the report file. Some kind of recursive problem? A warning of over 1000 duplicated frames? I don't know.
    – ahoffer
    Jul 30 '20 at 0:13
  • 2
    Distro packages are very out of date. Latest ver is 4.3; you're using 3.4.8. Get a static binary - see ffmpeg.org/download.html
    – Gyan
    Jul 30 '20 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.