Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Zyzel NSA310/NSA325 NAS Box recording a Foscam IP Stream

Options
2»

Comments

  • Closed Accounts Posts: 8,016 ✭✭✭CreepingDeath


    iPhone. wrote: »
    Tried it and it works alright but doesn't survive a reboot.

    Okay, I've a partial solution.

    Create a file called /ffp/etc/fun_plug.local

    It's run by FFP after a reboot.
    The simple contents of this shell script will be
    cp /usr/local/zoneinfo/Europe/Dublin /etc/MyZone
    

    That works on a reboot.

    However that will be undone if you go into the NSA325 Administration pages, to the "Date/Time" page, and click on the "Synchronize Now" button beside the time server, then it will overwrite your setting again.


  • Registered Users Posts: 1,104 ✭✭✭iPhone.


    Fair play, mad how difficult such a standard requirement is to implement though isn't it?


  • Registered Users Posts: 28 hochnie


    iPhone. wrote: »
    Thanks for the detailed response, really appreciate the time it has taken you to do that!

    I'm still stuck at 'command not found' stage on the command line

    I can't for the life of me find the profile file or whatever the equivalent on the NSA310 is that stores the paths to see if I can add it there.

    Hi,
    I have been trying to get this running too. I have all the packages outlined by creeping death installed but I am getting "-vcodec: command not found"
    when I run

    ffmpeg -r 10 -f mjpeg -i hxxp://xxx.xx.x.x:xx/videostream.asf?user=admin&pwd=admin&resolution=320*240 -vcodec mpeg4 -qscale 0 -aspect 4:3 -y /i-data/dfa80fa7/IPCAM/video

    It appears to run ffmpeg but hangs in putty with no script until I stop it.
    the camera is eyecam.
    The ffmpeg package is the 2.1.3 compiled by barmalej, any ideas on this?
    thanks


  • Closed Accounts Posts: 8,016 ✭✭✭CreepingDeath


    Try putting quotes around the webcam URL


    ffmpeg -r 10 -f mjpeg -i "hxxp://xxx.xx.x.x:xx/videostream.asf?user=admin&pwd=admin&resolution=320*240" -vcodec mpeg4 -qscale 0 -aspect 4:3 -y /i-data/dfa80fa7/IPCAM/video


  • Registered Users Posts: 28 hochnie


    Thanks for the reply.
    It needed the quotes alright but it also needed .avi otherwise I get an output error.
    I have had a problem getting your rectimelapse script to work where it does not like the ${NOW} or $DESTDIR arguments. If I remove these it seems to run fine but I would like to have time/date information on the files.
    any help is appreciated.
    thanks


  • Advertisement
  • Closed Accounts Posts: 8,016 ✭✭✭CreepingDeath


    hochnie wrote: »
    I have had a problem getting your rectimelapse script to work where it does not like the ${NOW} or $DESTDIR arguments.

    Going by the values you've posted here, I'd expect your recordTimeLapse.sh script to be something like this
    export PATH=/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin
    NOW=$(date +"%Y-%m-%d-%H%M")
    
    # Change the directory below to the directory you want to record to on your NAS
    
    DESTDIR=/i-data/dfa80fa7/IPCAM/video
    
    echo "Capturing $1 : $DESTDIR/test_${NOW}.avi"
    
    nohup ffmpeg -r 10 -f mjpeg -i "hxxp://xxx.xx.x.x:xx/videostream.asf?user=admin&pwd=admin&resolution=320*240" -vcodec mpeg4 -qscale 0 -aspect 4:3 -y $DESTDIR/test_${NOW}.avi > /dev/null 2> /dev/null < /dev/null &
    

    Both $NOW and ${NOW} work for me, even if I directly execute them in a simple telnet session eg.
    [root@mylinuxbox ~]# NOW=$(date +"%Y-%m-%d-%H%M")
    
    [root@mylinuxbox ~]# echo $NOW
    2014-06-03-1050
    
    [root@mylinuxbox ~]# echo ${NOW}
    2014-06-03-1050
    

    Can you confirm that you can perform the last 3 simple shell commands and it correctly output the date?


  • Registered Users Posts: 28 hochnie


    yep those commands work in telnet but cause the .avi ext to disappear in the destination folder which in turn means it wont encode when I try to watch it on my samsung tv. To be honest I have kind of cheated by using {$(date +"%Y-%m-%d-%H%M")}.avi in the script file but it works.
    I probably need to learn how to write code before I commit to these things...
    Ideally I would like it to record in 24hour segments and auto delete files after a week/month of recording. I will have to a bit of research methinks..
    Is there any reason the recordtimelapse file would be removed from the bin folder whenever I restart the NSA?


  • Closed Accounts Posts: 8,016 ✭✭✭CreepingDeath


    hochnie wrote: »
    yep those commands work in telnet but cause the .avi ext to disappear in the destination folder which in turn means it wont encode when I try to watch it on my samsung tv.
    To be honest I have kind of cheated by using {$(date +"%Y-%m-%d-%H%M")}.avi in the script file but it works.

    When you say the .avi extension disappears... do you mean in Linux or when you view it via a Windows machine ( which may hide the file extensions of "known types" ) ?
    hochnie wrote: »
    Ideally I would like it to record in 24hour segments and auto delete files after a week/month of recording. I will have to a bit of research methinks..

    Definitely, as the size requirements of recording 24 hours, even at crude VGA ( 640x480 ) resolution are considerable.
    I see 320x240 in your URL, but that's next to useless for any security application.
    I used a frame rate of 1 frame per second at 640x480 and I think I was ending up with roughly 1GB video files for 12 hours, so you'd have 2Gb for 24 hours.
    So you can multiple 2Gb per day by the number of frames per second you record, eg. 10 frames per second = 20Gb per day.
    hochnie wrote: »
    Is there any reason the recordtimelapse file would be removed from the bin folder whenever I restart the NSA?

    See another posters previous question on where to store the recordTimeLapse.sh. I definitely wouldn't store it in /bin, maybe /usr/bin instead.
    Although I have mine stored in a directory called FOSCAM off the root directory of one of my hard drives in the nas, but on the nas internal storage itself.


  • Registered Users Posts: 28 hochnie


    Hi
    I am checking it from a linux machine and viewing also on my samsung tv with no problems though so happy enough with the result.
    The resolution will be set to 680*480 after I am finished testing although I am considering a Megapixel ip camera from ebay for a better image. The substream might also be useful for an intercom I will be putting in.

    eb*y.c*.*k/itm/POE-960P-1-3-MP-HD-onvif-25fps-24-IR-Outdoor-Security-CCTV-Network-IP-Camera-3-6-/281304883552?pt=UK_CCTV&hash=item417f13e160

    I guess all I would have to change would be the output format and resolution?

    I also added the line below to the start of the file to remove files older than 30 days.

    find /i-data/dfa80fa7/video/ipcam -mtime +30 –delete

    I have set the time in the script to record for sixty minutes and have created a cron task to run every hour.Hopefully all this will take care of all the older files.
    thanks for the help


  • Registered Users Posts: 1 oscyp


    Hi all,
    I hope you could help.

    as soon as I type this line:
    ffmpeg -r 1 -i "h t t p ://192.168.1.197:6667/videostream.cgi?user=XXX&pwd=XXX" -t "0:01:00" -vcodec mpeg4 -an -y test.avi -an

    I have such message:

    ffmpeg version 2.1.8-compiled_by_barmalej2_for_ffp0.7arm Copyright (c) 2000-2015 the FFmpeg developers
    built on Jun 12 2015 20:36:16 with gcc 4.9.2 (GCC)
    configuration: --prefix=/ffp --enable-shared --disable-static --disable-armv6 --disable-armv6t2 --disable-vfp --disable-neon --disable-debug --disable-stripping --disable-ffplay --disable-ffserver --disable-indev=alsa --disable-outdev=alsa --enable-avresample --enable-gpl --enable-version3 --enable-libx264 --enable-libshine --enable-libmp3lame --enable-libtwolame --enable-libopus --enable-librtmp --enable-libass --enable-fontconfig --enable-libfreetype --disable-doc --disable-htmlpages --disable-podpages --disable-txtpages --extra-cflags=-Wno-deprecated-declarations --extra-version=compiled_by_barmalej2_for_ffp0.7arm
    libavutil 52. 48.101 / 52. 48.101
    libavcodec 55. 39.101 / 55. 39.101
    libavformat 55. 19.104 / 55. 19.104
    libavdevice 55. 5.100 / 55. 5.100
    libavfilter 3. 90.100 / 3. 90.100
    libavresample 1. 1. 0 / 1. 1. 0
    libswscale 2. 5.101 / 2. 5.101
    libswresample 0. 17.104 / 0. 17.104
    libpostproc 52. 3.100 / 52. 3.100
    Trailing options were found on the commandline.
    [mp3 @ 0x4ed90] Format mp3 detected only with low score of 1, misdetection possible!
    [mp3 @ 0x51f20] Header missing
    Last message repeated 163 times
    [mp3 @ 0x4ed90] Stream #0: not enough frames to estimate rate; consider increasing probesize
    [mp3 @ 0x4ed90] decoding for stream 0 failed
    [mp3 @ 0x4ed90] Could not find codec parameters for stream 0 (Audio: mp1, 0 channels, s16p): unspecified frame size
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    h t t p ://192.168.1.197:6667/videostream.cgi?user=XXX&pwd=XXX: could not find codec parameters



    I have used -an as my camera doesn't catch the audio. Anyway, how can I solve this issue?


  • Advertisement
Advertisement