2

I'm a beginner with raspbian, and trying to do some time lapse.

My camera upload with ftp directly to the Raspberry pi, in file format like this:

192.168.1.140_01_20160118205122254_TIMING.jpg
192.168.1.140_01_20160118205222260_TIMING.jpg
192.168.1.140_01_20160118205322262_TIMING.jpg

This is every minute upload from my ip camera.

I'm using gstreamer to do the time lapse, but I don't know how I can specify the files?

gst-launch-1.0 -e multifilesrc location="192.168.1.140???.jpg" ! image/jpeg, framerate=12/1 ! \
decodebin ! video/x-raw, width=1296, height=976 ! progressreport name=progress ! \
omxh264enc target-bitrate=15000000 control-rate=variable ! video/x-h264, profile=high ! \
h264parse ! mp4mux ! filesink location=test.mp4

Would it be possible to keep the original output from camera, and what should the suffix be? 192.168.1.140_01_???.jpg?

Would it be better, to rename the output, to something else like timelapse0000.jpg timelapse0001.jpg and so on? Then I could use timelapse_%04d.jpg

In this case how can I do this?

I'm pretty much lost here, so I hope to get some hints.

Thanks

plexdk
  • 21
  • 2

2 Answers2

4

Select multiple files in a folder. For this press and hold down the CTRL key while you are clicking files. After you select the files, press F2. Type the new name, and then press ENTER.

  • Hi Fred... Sorry if I'm unclear - it's something I want to execute from a ssh promt directly, later add to a script and setup a cronjob to do it daily – plexdk Jan 19 '16 at 09:55
0

Yes, it would be best to rename the output to sequentially numbered files so that you can easily input them to gstreamer. You can use a bash script to do this as shown here - Renaming files in a folder to sequential numbers

Community
  • 1
  • 1
jfoytik
  • 910
  • 7
  • 3
  • Hello jfoytik... Thanks for leading me in the right direction! This one worked perfect: ls *.jpg| awk 'BEGIN{ a=0 }{ printf "mv %s timelapse%04d.jpg\n", $0, a++ }' | bash – plexdk Jan 22 '16 at 16:06