TheSpaghettiDetective / OctoPrint-TheSpaghettiDetective

GNU Affero General Public License v3.0
8 stars 3 forks source link

[BUG] FFMPEG bug causes Obico not to respect RFC2396 for stream URLs causing compatible mode to run at 0.1 fps #1

Closed puterboy closed 2 years ago

puterboy commented 2 years ago

In Octoprint settings, under "Webcam & Timelapse", if you set stream url to: http://myrpi:8080/?action=stream which is a valid RFC2396 URL, the n ffmpeg will fail to recognize the URL and returns: http://myrpi:8080?action=stream: Server returned 400 Bad Request

This is actually an ffmpeg bug See the bug report: https://trac.ffmpeg.org/ticket/8466

Obico doesn't detect this bug and merrily launches ffmpeg with the faulty URL. ffmpeg fails (silently) and then Obico defaults to 0.1fps snapshots.

Suggested fix is either:

  1. Warn users if 'malformed' URL (and document to prevent users like me from wasting hours of time and having to debug the code to figure out what is going on)
  2. Or add a manual fix to stream_url in webcam_stream.py to insert a slash if missing before '?'

Of course, until ffmpeg or Obico code is adjusted, users can avoid the problem by making sure there is a "/" before the '?'. i.e., change http://myrpi:8080?action=stream to http://myrpi:8080/?action=stream

puterboy commented 2 years ago

Moved to https://github.com/TheSpaghettiDetective/OctoPrint-Obico/issues/174