markszabo / tapo-c200-timelapse

This is my setup to take time-lapse videos from my balcony with a Raspberry Pi using a TP-Link Tapo C200 IP-Camera
91 stars 17 forks source link

capture.py #2

Open cappadocia5050 opened 3 years ago

cappadocia5050 commented 3 years ago

When i click "python3 capture.py" i get a lot of errors such below

how i can solve this?

waiting for VLC Created new TCP socket 12 for connection [b0d8e188] mmal_codec decoder: VCSM init succeeded: Legacy [b0d8e188] main decoder error: buffer deadlock prevented [b0d8e188] mmal_codec decoder: VCSM init succeeded: Legacy [b0d8e188] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 9000000) [b0d8e188] main decoder error: Could not convert timestamp 1609381827600952 for MMAL decoder [b0d8e188] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 9000000) [b0d8e188] main decoder error: Could not convert timestamp 1609381827738531 for MMAL decoder [b0d8e188] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 9000000) [b0d8e188] main decoder error: Could not convert timestamp 1609381827808508 for MMAL decoder [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828307600 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828346600 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828374350 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828403600 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828438600 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828466600 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828500600 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828530600 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828563350 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828595475 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828629100 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828659350 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828700475 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828724350 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828754975 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828790475 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828820100 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828851225 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828886475 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828917350 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828947475 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 100000, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828980100 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828944735 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381828980860 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829009610 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829040985 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829074360 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829103110 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829135735 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829168860 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829201860 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829232485 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829267735 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829296985 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829330360 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829358860 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829398110 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829431985 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829455110 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829491360 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829519735 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829551985 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829585218 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829618843 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829650218 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829687968 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829720343 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829750843 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829782682 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829812932 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829844932 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829879557 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829909432 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829940182 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381829973932 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830001248 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830034873 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830066373 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830106373 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830132373 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830161748 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830196998 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830239299 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830271049 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830302424 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830335924 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830367924 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830400174 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830430299 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830465299 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830480531 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830519406 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830547031 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830575531 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830610281 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830641281 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830672906 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830706193 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830741068 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830770943 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830804318 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830836693 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830872068 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830893904 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830927904 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830962154 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381830993279 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831023654 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831054654 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831089029 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831122214 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831159964 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831185339 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831223339 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831253214 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831283339 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831317964 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831360657 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831394407 for g711 [b0dbf338] main decoder error: Timestamp conversion failed (delay 1000000, buffe ring 0, bound 3000000) [b0dbf338] main decoder error: Could not convert timestamp 1609381831425532 for g711 ^CTraceback (most recent call last): File "capture.py", line 20, in time.sleep(10) KeyboardInterrupt

markszabo commented 3 years ago

Hi @cappadocia5050

This seems like an issue with VLC: https://www.raspberrypi.org/forums/viewtopic.php?t=277903 and https://www.raspberrypi.org/forums/viewtopic.php?t=272977

Could you make sure to have the latest VLC installed?

sudo apt update
sudo apt full-upgrade
sudo apt --reinstall install vlc libvlc-dev
sudo pip3 install python-vlc

Then remove the vlc cache

rm -r /home/pi/.cache/vlc
rm -r /home/pi/.config/vlc

Then do a reboot and try again.

cappadocia5050 commented 3 years ago

i installed last rasbian and update today , i followed your order ,still get the same mistakes,

btw i use this codes on "raspberry pi zero w " and "no usb hard drive"

i got this mistakes

image

markszabo commented 3 years ago

Hm. Could you open VLC itself and try to play the network stream there? http://www.messoa.com/faq_detail.php

jameshp commented 3 years ago

I have a similar problem. I can use VLC on my raspberry pi3 but using the vlc lib i see this errors. As workaround (or better solution?) I have now found another way to capture images through ffmpeg changing the protocol to tcp as explained here Stackoverflow link Then you should not get any corrupted images (but i did not test this deeply yet...) e.g. ffmpeg -y -rtsp_transport tcp -i rtsp://username:password@192.168.xxx.xxx/stream1 -vframes 1 test.png

You can also use test.jpg and you'd get a jpg file.

Shendrach commented 3 years ago

Hi,

I have exactly the same problem with the main decoder error: Could not convert timestamp when starting python3 capture.py

Is there any workaround for that? Thanks in advance.

markszabo commented 3 years ago

Hi @Shendrach

Have you tried the steps discussed in this thread? Other than those, I don't know about any workaround.