home.social

#cheapo — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #cheapo, aggregated by home.social.

  1. Turns out that gstreamer chokes itself to death after about 14 hours consuming the absolute drivel from these cheap webcams (ffmpeg did similar but more quickly.)

    Simple solution: restart it every 8 hours.

    Couldn’t find an equivalent to ffmpeg -t hh:mm:ss though; just stuck timeout 28800 in front and wrapped it in a comforting while true loop.

    #gstreamer #webcam #cheapo

  2. Turns out that gstreamer chokes itself to death after about 14 hours consuming the absolute drivel from these cheap webcams (ffmpeg did similar but more quickly.)

    Simple solution: restart it every 8 hours.

    Couldn’t find an equivalent to ffmpeg -t hh:mm:ss though; just stuck timeout 28800 in front and wrapped it in a comforting while true loop.

    #gstreamer #webcam #cheapo

  3. Turns out that gstreamer chokes itself to death after about 14 hours consuming the absolute drivel from these cheap webcams (ffmpeg did similar but more quickly.)

    Simple solution: restart it every 8 hours.

    Couldn’t find an equivalent to ffmpeg -t hh:mm:ss though; just stuck timeout 28800 in front and wrapped it in a comforting while true loop.

    #gstreamer #webcam #cheapo

  4. Turns out that gstreamer chokes itself to death after about 14 hours consuming the absolute drivel from these cheap webcams (ffmpeg did similar but more quickly.)

    Simple solution: restart it every 8 hours.

    Couldn’t find an equivalent to ffmpeg -t hh:mm:ss though; just stuck timeout 28800 in front and wrapped it in a comforting while true loop.

    #gstreamer #webcam #cheapo

  5. Turns out that gstreamer chokes itself to death after about 14 hours consuming the absolute drivel from these cheap webcams (ffmpeg did similar but more quickly.)

    Simple solution: restart it every 8 hours.

    Couldn’t find an equivalent to ffmpeg -t hh:mm:ss though; just stuck timeout 28800 in front and wrapped it in a comforting while true loop.

    #gstreamer #webcam #cheapo

  6. Figured out why the cheap webcams cause mediamtx to rotate its save files every [short period of time] - they have wacky timestamps [PTS/DTS/something] which triggers a “this is more than 5 seconds from what we think it is” condition check in mediamtx. I changed that to 15 seconds in my local copy but they still drifted too far. Turns out you need to use ffmpeg to reset the timestamps; sadly means you can’t just pass through the video, you need to re-encode it.

    Something like: ffmpeg -loglevel quiet -re -i rtsp://host/path -r 15 -c h264 -an -vf setpts=N/FRAME_RATE/TB -f rtsp rtsp://mediamtx:8554/path

    PTS altering cargo-culted from https://stackoverflow.com/questions/44425611/how-to-reset-pts-for-stream (but it seems to work - no drift reset in 10 minutes compared to within 90 seconds earlier.)

    #ffmpeg #RTSP #Webcam #Cheapo

  7. Figured out why the cheap webcams cause mediamtx to rotate its save files every [short period of time] - they have wacky timestamps [PTS/DTS/something] which triggers a “this is more than 5 seconds from what we think it is” condition check in mediamtx. I changed that to 15 seconds in my local copy but they still drifted too far. Turns out you need to use ffmpeg to reset the timestamps; sadly means you can’t just pass through the video, you need to re-encode it.

    Something like: ffmpeg -loglevel quiet -re -i rtsp://host/path -r 15 -c h264 -an -vf setpts=N/FRAME_RATE/TB -f rtsp rtsp://mediamtx:8554/path

    PTS altering cargo-culted from https://stackoverflow.com/questions/44425611/how-to-reset-pts-for-stream (but it seems to work - no drift reset in 10 minutes compared to within 90 seconds earlier.)

    #ffmpeg #RTSP #Webcam #Cheapo

  8. Figured out why the cheap webcams cause mediamtx to rotate its save files every [short period of time] - they have wacky timestamps [PTS/DTS/something] which triggers a “this is more than 5 seconds from what we think it is” condition check in mediamtx. I changed that to 15 seconds in my local copy but they still drifted too far. Turns out you need to use ffmpeg to reset the timestamps; sadly means you can’t just pass through the video, you need to re-encode it.

    Something like: ffmpeg -loglevel quiet -re -i rtsp://host/path -r 15 -c h264 -an -vf setpts=N/FRAME_RATE/TB -f rtsp rtsp://mediamtx:8554/path

    PTS altering cargo-culted from https://stackoverflow.com/questions/44425611/how-to-reset-pts-for-stream (but it seems to work - no drift reset in 10 minutes compared to within 90 seconds earlier.)

    #ffmpeg #RTSP #Webcam #Cheapo

  9. Figured out why the cheap webcams cause mediamtx to rotate its save files every [short period of time] - they have wacky timestamps [PTS/DTS/something] which triggers a “this is more than 5 seconds from what we think it is” condition check in mediamtx. I changed that to 15 seconds in my local copy but they still drifted too far. Turns out you need to use ffmpeg to reset the timestamps; sadly means you can’t just pass through the video, you need to re-encode it.

    Something like: ffmpeg -loglevel quiet -re -i rtsp://host/path -r 15 -c h264 -an -vf setpts=N/FRAME_RATE/TB -f rtsp rtsp://mediamtx:8554/path

    PTS altering cargo-culted from https://stackoverflow.com/questions/44425611/how-to-reset-pts-for-stream (but it seems to work - no drift reset in 10 minutes compared to within 90 seconds earlier.)

    #ffmpeg #RTSP #Webcam #Cheapo