Ipcam stream or snapshot

Gasour

n3wb
Joined
Jun 12, 2020
Messages
3
Reaction score
0
Location
cz
Hi Im looking for solution for online streaming from Dahua to website.

I find guide to setup youtube stream but it doesnt work. is there another free solution for this?

And next question is can you change name of file your snapshot, its making directory like this 2020-06-11 and name of file like 16.00.36[R][0@0][0].jpg. Its from FTP storage.

IPC-HFW2431T-ZS
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,595
Reaction score
2,903
I can’t answer your streaming question but I can tell you that you can’t change your snapshot name. I ended up writing a script that runs that pulls them out the snapshot from the snapshot folder and moves them to a new folder and renames them.
 

Gasour

n3wb
Joined
Jun 12, 2020
Messages
3
Reaction score
0
Location
cz
Its possible to share script with me?

I was trying to configure RTMP with Youtube by this guide
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,595
Reaction score
2,903
Here you go. Its a good starting point that you can modify from. My script renames and copies all snapshots that happen overnight (~7 hours of snapshots) to another folder that is shared out via Samba so I can view them from my LAN on any Windows/Linux computer.

Bash:
#!/bin/bash

# Steps through raw cam snapshot folders and renames all .jpgs to creation time + random digits
# Only looks back at the last 430 minutes from the moment the command is run. Crontab kicks
# this off at 5am.  Snapshots start at 10pm. That is 7 hours or 420 minutes worth of snapshots
# Add another 10 minutes to make it 430 minutes for good measure

# Front cam folder
find /mnt/rawsnaps/camera_serial_number/ -depth -mmin -430 -name "*.jpg" -exec sh -c 'mv -f "$1" "$(dirname "$1")/$(date -r "$1" +%Y-%m-%d_%H-%M-%S-%N).jpg"' _ {} \;

# Rear cam folder
find /mnt/rawsnaps/camera_serial_number/ -depth -mmin -430 -name "*.jpg" -exec sh -c 'mv -f "$1" "$(dirname "$1")/$(date -r "$1" +%Y-%m-%d_%H-%M-%S-%N).jpg"' _ {} \;

# Now we need to copy all the renamed snapshots we did in the first step to the samba share.
# Bit of a hack, but we step back though directory structure limited to 430 minutes again.
# All of those files are copied to the Samba share. Would be better to simply copy the files in the
# above step to a new location after renaming to begin with instead of this two step process...

# Front cam folder
find /mnt/rawsnaps/camera_serial_number/ -depth -mmin -430 -name \*.jpg | rsync -av --files-from - --no-relative / /mnt/camsnaps/$(date -d '-1 day' '+%Y-%m-%d')

# Rear cam folder
find /mnt/rawsnaps/camera_serial_number/ -depth -mmin -430 -name \*.jpg | rsync -av --files-from - --no-relative / /mnt/camsnaps/$(date -d '-1 day' '+%Y-%m-%d')
 
Last edited:

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
15,650
Reaction score
22,921
Location
Evansville, In. USA
Hi Im looking for solution for online streaming from Dahua to website.

I find guide to setup youtube stream but it doesnt work. is there another free solution for this?

And next question is can you change name of file your snapshot, its making directory like this 2020-06-11 and name of file like 16.00.36[R][0@0][0].jpg. Its from FTP storage.

IPC-HFW2431T-ZS
Be sure to enable audio in the camera or it won't work. You can turn it all the way down, but it needs to be enabled.
 

jon2

Pulling my weight
Joined
Sep 9, 2018
Messages
232
Reaction score
238
Location
uk
Hi Im looking for solution for online streaming from Dahua to website.

I find guide to setup youtube stream but it doesnt work. is there another free solution for this?

And next question is can you change name of file your snapshot, its making directory like this 2020-06-11 and name of file like 16.00.36[R][0@0][0].jpg. Its from FTP storage.

IPC-HFW2431T-ZS
Hi
it needs the rtmp feature to work on youtube it looks like your camera does mot have this feature,
 
Top