Go to advanced search

by Ratsima
Sun Nov 17, 2019 3:33 am
Forum: Troubleshooting
Topic: Random USB Camera Disconnects
Replies: 1
Views: 41

Re: Random USB Camera Disconnects

Well, here's what I'm trying. I hate seeing all those sudos in the script, but I can't figure out a different way. If the camera fails to capture an image, I run the following from within the webcam script: sleep 5 echo $'\n'"`date`" >> $log lsusb >> $log sudo sh -c "echo 0 > /sys/devices/platform/s...
by Ratsima
Sat Nov 16, 2019 10:43 pm
Forum: Troubleshooting
Topic: Random USB Camera Disconnects
Replies: 1
Views: 41

Random USB Camera Disconnects

Raspberry Pi Model B Plus Rev 1.2 Running Buster 10.1 Generic USB 1080p Webcam w/ IR LEDs Oker Powered USB 3.0 hub I'm using fswbcam to grab JPEGs from this camera. Most of the time it works OK, but now and then I get: --- Opening /dev/video0... mstat: No such file or directory Sometimes the camera ...
by Ratsima
Sat Oct 26, 2019 4:49 am
Forum: Graphics, sound and multimedia
Topic: Time Lapse Video with Pi B or B+
Replies: 0
Views: 356

Time Lapse Video with Pi B or B+

I have a couple of webcams running on old Pies. I have had to turn the time-lapse encoding over to a Mac because ffmpeg grinds these old machines to a halt and Gstreamer produces videos playable only on VLC: Video encoded with ffmpeg on a Mac: https://www.mgnewman.com/koratmovie.html Video encoded w...
by Ratsima
Thu Oct 24, 2019 10:10 pm
Forum: Graphics, sound and multimedia
Topic: fswebcam returns zero even on error
Replies: 1
Views: 403

Re: fswebcam returns zero even on error

Although this error has been fixed, the fix is not yet in the release version. If you want an fswebcam that returns a non-zero value on failure you'll need to download the source and compile it. Source and instructions are here: https://github.com/fsphil/fswebcam I had to install libgd-dev to get it...
by Ratsima
Wed Oct 23, 2019 11:40 pm
Forum: Graphics, sound and multimedia
Topic: fswebcam returns zero even on error
Replies: 1
Views: 403

fswebcam returns zero even on error

[email protected]:~/webcam $ fswebcam --version fswebcam 20140113 [email protected]:~/webcam $ fswebcam -d /dev/video4 test.jpg --- Opening /dev/video4... stat: No such file or directory [email protected]:~/webcam $ echo $? 0 Makes it kinda hard to trap camera errors. This is a closed issue on GitHub: https://github.com/fsph...
by Ratsima
Wed Oct 23, 2019 1:40 am
Forum: Beginners
Topic: watchdog file change
Replies: 3
Views: 135

Re: watchdog file change

For anyone doing something similar, deleting the file didn't work out so well: Oct 23 08:22:25 rasp2 watchdog[430]: cannot stat /home/pi/webcam/webcam.jpg (errno = 2 = 'No such file or directory') Oct 23 08:22:25 rasp2 watchdog[430]: Retry timed-out at 61 seconds for /home/pi/webcam/webcam.jpg Oct 2...
by Ratsima
Wed Oct 23, 2019 12:11 am
Forum: Beginners
Topic: watchdog file change
Replies: 3
Views: 135

Re: watchdog file change

Thank you. Perfectly clear.

I had no idea what the repair-binary variable was for. Now I do.

I appreciate the help.
by Ratsima
Tue Oct 22, 2019 10:41 pm
Forum: Beginners
Topic: watchdog file change
Replies: 3
Views: 135

watchdog file change

I have an old Pi running a webcam. It captures an image from a USB camera every four minutes. Sometimes the camera becomes unresponsive so the Pi needs to be rebooted. I am using watchdog to watch the JPEG file of the image capture. If this file does not get update after a certain amount of time, wa...
by Ratsima
Fri Oct 18, 2019 11:26 pm
Forum: General discussion
Topic: Watchdog - Can't get it to work
Replies: 8
Views: 569

Re: Watchdog - Can't get it to work

Thank you for that. I think I understand. Here's my situation. The Pi 4 in question runs a webcam and also a few shell scripts to see if the network is still up, to establish a reverse SSH tunnel and to make sure it stays logged in to a captive portal. I will deploy the Pi in a location that I visit...
by Ratsima
Fri Oct 18, 2019 3:06 am
Forum: Graphics, sound and multimedia
Topic: Gstreamer Pipeline Works On Pi B Rev 1 But Not Pi 4
Replies: 3
Views: 658

Re: Gstreamer Pipeline Works On Pi B Rev 1 But Not Pi 4

This is a shame, really. Gstreamer seems like it has such possibilities. I have three webcams running on Raspberry Pies. On the two older Pies I've had to offload the time-lapse video encoding to a Mac running ffmpeg. The old Pies choke on ffmpeg. The Gstreamer hardware encoder (omxh264enc) sort of ...
by Ratsima
Fri Oct 18, 2019 1:38 am
Forum: General discussion
Topic: Watchdog - Can't get it to work
Replies: 8
Views: 569

Re: Watchdog - Can't get it to work

As a regular user the system will know doubt be limiting the damage your fork bomb can do. The out of memory killer will be killing of new processes as memory gets low. There is probably limits on how many processes a normal user can run anyway. Quite likely the kernel and the watchdog think everyt...
by Ratsima
Thu Oct 17, 2019 10:47 pm
Forum: General discussion
Topic: Watchdog - Can't get it to work
Replies: 8
Views: 569

Re: Watchdog - Can't get it to work

Did you also enable the watchdog in config.txt as mentioned in the thread ? Of course the answer was made for Pi3 and nor Pi4 which has a different SoC I believe. Your "dmesg" output do indicate that it probably should work. Turns out I did not need to enable watchdog in config.txt. But, for reason...
by Ratsima
Thu Oct 17, 2019 12:24 pm
Forum: General discussion
Topic: Watchdog - Can't get it to work
Replies: 8
Views: 569

Re: Watchdog - Can't get it to work

topguy wrote:
Thu Oct 17, 2019 11:58 am
The Pi never rebooted.
Did it freeze or in other ways stop to function properly ?
It froze. The ssh connection I was using failed and I was unable to ping it. I had to cycle the power to get it to boot up.
by Ratsima
Thu Oct 17, 2019 6:50 am
Forum: Graphics, sound and multimedia
Topic: Gstreamer Pipeline Works On Pi B Rev 1 But Not Pi 4
Replies: 3
Views: 658

Re: Gstreamer Pipeline Works On Pi B Rev 1 But Not Pi 4

I may have narrowed it down. If I use: ! x264enc Instead of: ! omxh264enc target-bitrate=1500000 control-rate=variable It works fine on the Pi4. ===== I should note that there is a problem running the hardware encoder on the Pi 1. For some reason, the last (?) key frame always gets moved into the fi...
by Ratsima
Thu Oct 17, 2019 5:34 am
Forum: Graphics, sound and multimedia
Topic: Gstreamer Pipeline Works On Pi B Rev 1 But Not Pi 4
Replies: 3
Views: 658

Gstreamer Pipeline Works On Pi B Rev 1 But Not Pi 4

Here's the pipeline that works on a Pi B Rev 1 (Jessie) but not a Pi 4 (Buster): gst-launch-1.0 \ -e multifilesrc location=/home/pi/webcam/arch/test/image_%03d.jpg \ caps="image/jpeg,framerate=\(fraction\)10/1"\ ! jpegdec ! queue ! videoscale \ ! video/x-raw, width=640, height=480 \ ! queue \ ! omxh...
by Ratsima
Wed Oct 16, 2019 10:45 pm
Forum: General discussion
Topic: Watchdog - Can't get it to work
Replies: 8
Views: 569

Watchdog - Can't get it to work

This on a Pi 4 running Buster. I enabled Watchdog using the instructions in this thread: https://raspberrypi.stackexchange.com/questions/99584/cut-power-on-a-remote-raspberry-pi-3-via-another-raspi/99625#99625 - Answer #5 near the top. It seems to be correctly enabled: [email protected]:~ $ grep Watchdog...
by Ratsima
Thu Oct 10, 2019 1:44 am
Forum: Graphics, sound and multimedia
Topic: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?
Replies: 9
Views: 790

Re: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?

OK. Here's another clue. If I run my Gstreamer pipeline on less than 60 JPEGs it encodes a video which seems to play fine with every player I've tried. And, the first frame of the video is the first JPEG. However, if I run it on 61 or more JPEGs, it inserts the 61st JEPG (image_060.jpg) in the first...
by Ratsima
Wed Oct 09, 2019 10:45 pm
Forum: Graphics, sound and multimedia
Topic: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?
Replies: 9
Views: 790

Re: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?

I've had a friend test this as well. He reports: VLC plays it fine on my Linux Mint desktop, Media player will not.. and the Firefox will not play it using the OpenH264 Video Codec.. And, based on the lack of response here and elsewhere, it appears that Gstreamer cannot encode an h264 video in an MP...
by Ratsima
Tue Oct 08, 2019 9:46 pm
Forum: Graphics, sound and multimedia
Topic: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?
Replies: 9
Views: 790

Re: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?

So it plays in VLC & chromium-browser & Kodi & omxplayer on a Raspberry Pi running Raspbian Buster ?? It plays in VLC on a Pi running Buster. It does not play in the Chromium browser on a Pi running Buster. I haven't tested anything else. The workaround I'm using now is to offload the encoding job ...
by Ratsima
Tue Oct 08, 2019 12:59 pm
Forum: Graphics, sound and multimedia
Topic: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?
Replies: 9
Views: 790

Re: Can Gstreamer Encode an MP4 Video Compatible With Quicktime Player?

I'm sorry. I assumed that since I posted this on a Raspberry Pi form it would be obvious that the video was encoded on a Pi. I should have made that more clear.
by Ratsima
Tue Oct 08, 2019 7:19 am
Forum: Graphics, sound and multimedia
Topic: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?
Replies: 9
Views: 790

Re: Can Gstreamer Encode an MP4 Video Compatible With Quicktime Player?

Sorry. Forgot this. The file is here:

http://www.mgnewman.com/fileh264.mp4

When I try it, Safari, Chrome and Firefox all fail. VLC works fine.

What have I done wrong?
by Ratsima
Tue Oct 08, 2019 6:37 am
Forum: Graphics, sound and multimedia
Topic: Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?
Replies: 9
Views: 790

Can Gstreamer on a Pi Encode an MP4 Video Compatible With Quicktime Player?

I'm using this: gst-launch-1.0 multifilesrc location="$mfslocation" caps="image/jpeg,framerate=10/1" ! jpegdec ! omxh264enc ! video/x-h264,stream-format=byte-stream,profile=high ! h264parse ! mp4mux ! filesink location="$testlocation" Where mfslocation is: image_%03d.jpg and testlocation is: fileh26...
by Ratsima
Thu Oct 03, 2019 10:38 am
Forum: Troubleshooting
Topic: Webcam Woes
Replies: 0
Views: 75

Webcam Woes

I've been running a webcam for a while with an old Logitech camera. I decided to upgrade and bought a generic USB 1080p outdoor security camera. Plugged it in and it worked great - for a short while. It takes a still every four minutes. It did that perfectly from 12:24 PM until 02:04 PM when it abru...
by Ratsima
Mon Aug 19, 2019 10:24 am
Forum: Beginners
Topic: sane: could not open USB device
Replies: 8
Views: 1161

Re: sane: could not open USB device

Try rebooting then plug the scanner in. See what udev does on a new device event. Make sure you've got the right device ID strings. Thank you. That worked. All I had to do was unplug and replug the scanner. I wish one of the articles I read had mentioned that. Now I see what udev actually does. The...
by Ratsima
Mon Aug 19, 2019 8:47 am
Forum: Beginners
Topic: sane: could not open USB device
Replies: 8
Views: 1161

Re: sane: could not open USB device

https://raspberrypi.stackexchange.com/questions/101322/scanner-only-works-if-used-as-root/101324?noredirect=1#comment167822_101324 I tried following these instructions, but couldn't make it work. I created the dev rule. I reloaded the rules. I added pi to the scanner group and removed pi from the r...

Go to advanced search