CHIP HANG On ffmpeg, liveimage fswebcam


I am trying to setup a USB webcam with liveimage @ github I am using lighthttpd as a webserver.
I tried with 2 USB cameras. Cam Sync HD VF0770 and USB2.0 PC CAMERA (1908:2311)
The board hangs after 100…2000 snapshots no-matter the time-lapse interval on liveimage.

Then I thought is the liveimage app, and I tried ffmpeg. I stopped the lighthttp daemon and used
the ffmpeg with RTP streaming. The board hangs again in about a min…3 minutes or so.

Also hangs with fswebcam if I run in in a loop, no-mmater the delay between shots in about 2 3 minutes.

Tried on 2 power supplies 2 Amps and 4 Amps @ 5V. Tried on 2 C H I P boards.

Hang snapshot


I’ve been running fswebcam for over 24 hours now, one photo every 60 seconds (cron job via bash script)
So that is over 1440 images… closer to 48 hours now.

As with anything along these lines, you will need to look at log files, temperatures, voltage level, space/storage, cpu ticks and more to determine the cause.

Does the board hang after a set amount of time? you said it doesnt matter how many pics.


I found the crap issue. I was powering the board trough the


… though the amperage did not exceed .4A …
I used that on R-PI and NanoPI-Neo with the same app (liveimage). I took it out and also changed the USB cable. I am streaming (liveimage) is up at 30ms frame interval for more than an hour.
I was checking trough the web here and there, and meanwhile the hostapd and dhcpd on wlan1 is up and down. It saves 30 images/second, and still ongoing.

chip@chip:~/liveimage$ ls /data/snaps -1 | wc -l

I am poking it since (and hour or so). It did not hung on me. Definitely was the USB power meter crap.



… hmm still happening once in a while…

I have a week doing stuff CHIP, (2 of them).
What I encounter are once in a while a hangup. The LED’s go off and requires re-power.
My power supply is 5V 4.5A and is very good.
When is happening:

  • sometime as explained above out of the blue non related to anything.
  • during file transfer using scp or filezilla from another computer.
    (re-powering and restart the sftp transfer works for hours then…)
  • during cmake or make.
  • during editing a file using nano over ssh

if I am using it 3 to 4 hours poking it ssh/make/scp it happens at least once. It damages nano app, and the file being edited. If I am browsing when happen the file in cause ‘index.php’ gets corrupted too. This happen with both CHIP I have.

Just another one:


Which OS image are you using? I have seen comments on the fact that chip can regulate the current draw, and they have two flashable images - one with limit, and one without such a strict limit.

Also, a lot depends on how you power other things too (like all your USB things)…See


Thank you for the links. Is exactly that.
chip@chip:~$ uname -a
Linux chip 4.4.13-ntc-mlc #1 SMP Thu Sep 8 19:54:49 UTC 2016 armv7l GNU/Linux

I executed the power management commands from
to get 900 ma as long I have a webcam on the USB
Now I am getting files corrupted here and there, without the board hanging up.
Here is my main.cpp after saving it with nano.
make failed with errors, then next attempt to edit…waz @@@@@-ized.

The service /etc/init.d/webcam for my webcam service, the script /usr/sbin/
and the hostapd service /etc/init.d/hostapd which I start were all @@@@@@ ized…

I tested the services running them direct, then started, then I rebooted the board.
I did not see my services started, then I checked the files, and all 4 of them were @@@@ -ized.

I have same setup on R-PI and Nano PI neo, with external wifi dongles (2 wifies, 1BTLE)and never
happen these .

and the service


I kind of nailed down the problem after I read here and there.
The corruption looks was related to powering down the CHIP.
After I am powering it down properly, trough a web hack using
the a web browser link the files stopped being corrupted.

I use “sudo telinit 0”.
I have a start-up service which sets up to .09A power tough usb

— service-startup-excerpt —

pushd /home/chip/liveimage
i2cset -y -f 0 0x34 0x30 0x60
su chip -c /home/chip/liveimage/ &
/home/chip/.shutdown &
/usr/sbin/ &

where the shut-down dirty hack is:

while [[ 1 ]];do
        sleep 1
        [[ -f /tmp/shutdown ]] && telinit 0

and a php page which on click touch("/tmp/shutdown")

I guess the problem was solved.


If you’re using that device to monitor current, have you checked the accuracy? I have a similar device and for currents under 1A, it is very inaccurate. Off by 50-80% as I recall. It seems okay for voltage.


The CHIP worked all night on host apd, with snapshots taken every ten seconds.
The df after a night of snapshots was 34% usage 76% free
Wanted to install gstreamer & friends, and all was OK.
The df after gstreamer was used about 45%% space used.

When I started gstreamer over the ssh I got:
unable to open /home/chip/movies/movvie1.avi Read-only file system
Upon reboot

[    6.740000] [<c0eb14c0>] (prepare_namespace) from [<c0eb0e94>] (kernel_init_freeable+0x1e8/0x1f8)
[    6.740000] [<c0eb0e94>] (kernel_init_freeable) from [<c0a60f8c>] (kernel_init+0x8/0xe8)
[    6.740000] [<c0a60f8c>] (kernel_init) from [<c0211768>] (ret_from_fork+0x14/0x2c)
[    6.740000] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Switching to next one I have. Coming with more info. Could be a bad board this one…


I am using a second board I have for 2 days now and no file corrupted, no hangs.
The board is not powered trough the USB power meter

… Old post removed later on …

Later on 21:45 EAST I was checking my snapshots progress on the time-lapse.
I realised that the flash is about 36% full. I shelled out some commands, and

‘I got read only file system’

I shelled more commands all accompanied by (cannot write /var/lib/***/ts/chip )
I tried to remount rw the partition, but no success. Finally I reboot the board.
Upon reboot my second board died.

    6.495000] 1f00            4096 mtdblock0  (driver?)
[    6.505000] 1f01            4096 mtdblock1  (driver?)
[    6.510000] 1f02            4096 mtdblock2  (driver?)
[    6.520000] 1f03            4096 mtdblock3  (driver?)
[    6.530000] 1f04         4177920 mtdblock4  (driver?)
[    6.535000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    6.535000] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.13-ntc-mlc #1
[    6.535000] Hardware name: Allwinner sun4i/sun5i Families
[    6.535000] [<c02195b8>] (unwind_backtrace) from [<c0214bac>] (show_stack+0x10/0x14)
[    6.535000] [<c0214bac>] (show_stack) from [<c04ce2b0>] (dump_stack+0x90/0xa4)
[    6.535000] [<c04ce2b0>] (dump_stack) from [<c02dcd98>] (panic+0x9c/0x228)
[    6.535000] [<c02dcd98>] (panic) from [<c0f042f8>] (mount_block_root+0x194/0x230)
[    6.535000] [<c0f042f8>] (mount_block_root) from [<c0f04560>] (prepare_namespace+0xa8/0x1a0)
[    6.535000] [<c0f04560>] (prepare_namespace) from [<c0f03f34>] (kernel_init_freeable+0x26c/0x27c)
[    6.535000] [<c0f03f34>] (kernel_init_freeable) from [<c0aa7624>] (kernel_init+0x8/0xe8)
[    6.535000] [<c0aa7624>] (kernel_init) from [<c0211768>] (ret_from_fork+0x14/0x2c)
[    6.535000] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I really had enough with C H I P now I have ran on 2 of them on the same problem.

The above procedure is working fine on R-PI with 2 WIFI dongles, and on NANO -PI-Neo with one
WIFI dongle (only HOSTAPD). I preferred CHIP due the facto has 2 WIFIi-s, but too sad.
The CHIP is unreliable.


I could not sit with he idea I have 2 dead boards, so I re-flashed both CHIP’s

with non X distro I think I
choose debian headless,
Linux chip 4.4.13-ntc-mlc SMP Tue Dec 6 21:38:00 UTC 2016

I reinstalled all ffmpeg (to produce movies from images), liveimege lighttpd dnsmasq and isc-dhcpd.
Is up now for 4 days time-lapsing in a circular queue of files as much the the partition allows.
I encounter only 2 times the index.php file being corrupted though, all content being replaced
with @@@@@@@@. Anything else seems OK for now.


It is good that you flashed because the kernel has been modified with support for many things added:


Four days and still rolling.

(Front house liveimage/motion monitoring)


Is August 12 2017, and C H I P Still monitoring the house. with github/liveimage.
Only change I did, I run a separate power wire from the power cable to the camera
disconnecting the camera from the usb power pin.