pi-man-uk
Posts: 62
Joined: Tue May 08, 2012 1:41 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon Jun 23, 2014 3:28 pm

hi all - sounds very useful to use the Pi GPU to make the video.

However I also have the "stuck at preroll" problem.

Any clues?

I am trying dropping the resolution as per other posts.

pi-man-uk
Posts: 62
Joined: Tue May 08, 2012 1:41 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon Jun 23, 2014 5:52 pm

Update. Dropping the resolution to 720p worked but I do see some video glitches.

pi-man-uk
Posts: 62
Joined: Tue May 08, 2012 1:41 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Thu Jul 03, 2014 3:15 pm

Just bumping this as it's been *very* successful in general. I have a remote pi that is looking over a garden. I ssh in and program the timelapse.

workflow is.

1) timelapse with raspistill to /tmp
2) use the routine mentioned in this thread to create the timelapse film
3) upload the film to s3 with s3cmd
4) rm -f /tmp/
5) goto 1)..

in this way the pi stays clean and I get rolling coverage. I am tweaking the -t and -tl at the moment to get the best video.

Would love to bump the resolution to 1080p that would be brill.

Only thing is the pesky video glitches!

Anyone else?

adamt
Posts: 3
Joined: Sun Jul 06, 2014 3:25 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Sun Jul 06, 2014 5:48 am

Hello everyone,

Just got my first pi for a time lapse project and saw this post. I'm getting started on a time lapse program. It's written in C++, displays last capture using SDL, and writes out an xvid avi file directly. You can configure it with a simple json file. I have tested 1080p avis, and while the capture from the camera takes 2-3s, the resulting avi is fine.

I am displaying on the adafruit touchscreen, which means I have it set to use /dev/fb1. If you want to use a different framebuffer device, this is untested, but should presumably work with the "-f" option. Default settings have the framebuffer owned as root, so you will need to run as root. The only way to stop for now is ctrl-c, so I like running it in screen.

I'm just going to release a tester binary for now, hopefully this will work for others. I think the options in "-h" and config.json will be self-explanatory.

Dependencies for raspbian wheezer (hope I didn't miss any):
libboost-program-options1.50-dev
libboost-thread1.50-dev
libboost-system1.50-dev
libboost-date-time1.50-dev
libopencv-core-dev
libopencv-highgui-dev
libopencv-imgproc-dev
libjson-cpp-dev
libsdl1.2-dev
libsdl-ttf2.0-dev

Planned features:
- Configurable file rollover
- Touchscreen UI (forget last n time, take pic now, etc)
- What else would be sweet?

Above the size limit so here is a link:
https://mega.co.nz/#!GVsjyDJT!x2_pYXjJu ... CZv_zaGe2U

Feedback welcome!

pentium4Gamer
Posts: 1
Joined: Sat Aug 23, 2014 12:52 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Sat Aug 23, 2014 12:57 pm

Are render program for computer?

10dotmatrix
Posts: 1
Joined: Mon Dec 29, 2014 11:49 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon Dec 29, 2014 11:57 pm

Hi! I'm making a stop motion animation kit and really want to use gstreamer. This is my first time using gstreamer, but I'm not new to the Pi and I studied gstreamer's online documentation. Like this guide, I'm trying to stitch together an arbitrary number of jpegs into a .avi video file. I followed the installation steps in this tutorial exactly. It seems like gstreamer produces an avi file, but when I try to replay it with omxplayer with the command:

Code: Select all

omxplayer -o hdmi /home/pi/stopmotion.avi
I only see:

Code: Select all

 
Video codec omx-h264 width 1920 height 1080 profile 100 fps 24.000000
Subtitle count:0, state: off, index: 1, delay: 0
And then it freezes until I force quit. Any idea what might be going wrong? Thanks in advance!

pickfire
Posts: 43
Joined: Fri Dec 19, 2014 3:27 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Tue Dec 30, 2014 3:42 am

I use a webcam make time-lapse video too but what is the difference between fswebcam and streamer?
I hope you can make some documentation about this tutorial on elinux or somewhere else.

pickfire
Posts: 43
Joined: Fri Dec 19, 2014 3:27 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Thu Jan 01, 2015 5:12 am

After installing gstreamer1.0 the video on epiphany browser cannot be played anymore. Is this the side effect?

User avatar
Kratos
Posts: 394
Joined: Sun Apr 12, 2015 12:41 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Wed Apr 15, 2015 4:56 pm

I get it to work correctly, but it's compiled videos are extremely low resoltion. Any way to change this?
Great tutorial by the way. :ugeek:
I have posted mostly with a Pi 2 running either Ubuntu MATE, or Raspbian.

jdlunday
Posts: 2
Joined: Thu Apr 23, 2015 10:07 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Thu Apr 23, 2015 10:18 pm

I followed step by step. Got to where we take a 1 hour time laps. I changed it to 10 second time laps just to test it. The Raspberry Pi quits responding. I have used this 10 second time laps before. But now that I installed whatever software I was instructed to,
this functions hangs. Help, how do I fix this problem??
I used the windows copy/ to paste to putty. There for the instructions were followed to the letter.
raspistill -t 10000 -tl 1500 -vf -hf -o timelaps%02d.jpg this instruction worked before this software mod.
raspistill -t 10000 -tl 1500 -vf -hf -o timelaps%02d.jpg this instruction does not work any longer.

Help

Thank you for your time & effort,
jdlunday

entrari
Posts: 1
Joined: Sun Apr 26, 2015 4:52 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Sun Apr 26, 2015 4:56 pm

Mate, i've been working to make a "lomo" self camera with an adafruit lcd and some buttons to automatize timelapses.

Your tutorial have helped me a lot. I am in debt

nitschkecm
Posts: 50
Joined: Wed Dec 17, 2014 11:01 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon Jun 01, 2015 2:04 pm

Hi is there a chance to use a txt file which describes the names of the files ? I have a bit odd naming convention for my files since I would like to keep them as well for a longterm time-lapse. My files are names
YYYYMMDD_HHMMSS.jpg Many thanks for any hint!

pdanilchik
Posts: 5
Joined: Sun Aug 05, 2012 5:02 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Wed Aug 12, 2015 3:57 pm

Thanks a bunch for creating this blog post. The gem is being able to very efficiently compile images into a video as you have done.

One question / suggestion: Is there a way to generate a video file and then append new images to it as they are collected? In this way it would not be necessary to store a bunch of raw image files. As well, the process of forming this movie output would be spread across a longer period of time. It would also mean that you would have the time-lapse movie always updated and ready to view. Further more, you wouldn't have to have a range of specially named image files to then collect into a movie while ensuring that the names used correspond. For those who have similar needs to mine, that could be a win, win, win, way to do it.

As an example, say that you wanted to take a photo of a plant growing every hour using a raspberry pi that is also set up as a web server. You could have a link to the movie of it that starts from when it sprouted (the first frame of the movie) until the current time. It would always be "up to date" as the movie is continuously updated with the latest image capture!

Hopefully this is easily doable and the processing and storage time to append to the file would be fixed and proportional to adding that single frame. If it had to re-encode the whole movie and then store it all over again, each time a new frame was added, then I could see that this would be a poor solution.

Does "gstreamer" have a way to append a frame to the end of a movie?

Thanks again! Super post!!! -Paul

nitschkecm
Posts: 50
Joined: Wed Dec 17, 2014 11:01 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Wed Aug 12, 2015 4:51 pm

Hi

check out this thread. Maybe this is what you are looking for
viewtopic.php?t=70105&p=508895
Cheers

oakis
Posts: 8
Joined: Thu Aug 06, 2015 4:39 pm
Location: Goteborg, Sweden

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Thu Aug 13, 2015 4:24 am

Nice tutorial! Have to try this sometime.

Is there any way to set shutter speed or other advanced camera settings?

Cheers

pdanilchik
Posts: 5
Joined: Sun Aug 05, 2012 5:02 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Thu Aug 13, 2015 3:07 pm

If you are trying to adjust camera settings then you may want to use "v4l2-ctl". I have only used it on the RPi with mjpg-streamer but it worked for that. Some good information on that can be found here:

http://www.techytalk.info/webcam-settin ... ystem-cli/

Hopefully that works for you.

By the way, I am still after a solution on how to append a frame to a movie file as the frames are periodically captured (for the purpose of making time lapse movies). The suggestions since my post don't seem to be near the bulls-eye. And using ffmpeg to append dissimilarly encoded files (e.g. MP4 and JPG) seems to force a full re-encode of the movie each time a frame is added which totally defeats the purpose. I am after a processor efficient way of doing, basically, "incremental video encoding" into a movie file. It would be a boon to many doing time lapse projects especially on a platform with modest processor power.

nitschkecm
Posts: 50
Joined: Wed Dec 17, 2014 11:01 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Thu Aug 13, 2015 4:36 pm

Hi

for updating the movie file with each frame you take take a look at the link posted. The OpenMax Demo has a script that does exactly that. The frame is automatically appended to the video file. However I have not been able to get the jpg out for a website for example. That is why i went back to time-lapse and for the encoding I use the gstreamer. It takes on a RPI B+ less than 10 minutes to make a video out of 1200 jpg (Full HD quality). I find that rather great performance. Ffmpeg and others are very slow and do not use gpu of the RPI.

Send me a DM message and I will happily share the scripts I have set up which allow me to do all. Sample of my Videos are here https://www.youtube.com/channel/UCNZtDy ... 3uzoaNruaw

Hope you like it

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon Sep 14, 2015 9:31 am

Is it possible to pass a list of files to gst-launch?

I don't have files that are properly sequential. I have multiple folders that have files labelled with a unix timestamp, taken every 20 seconds, across 2 days in day/hour labelled folders (10pm to 7am).

I can easily generate a text file with a list of jpgs with full paths. I don't want to have to copy and rename all the files (~ 4GB worth)


Edit: Or I can symlink and rename the symlinks so they're sequential. Does gst-launch accept symlinked files?

Another edit: I'm stuck at:

Code: Select all

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
I've tried with a small set of regular files (not symlinked) and it's not getting much further. I've tried adding a dimensions argument with no change. Images are full res from the RPi Camera module.

bmarofsky
Posts: 1
Joined: Sun Jan 04, 2015 3:16 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Sat Jan 23, 2016 11:18 pm

What did I do wrong? My first image is timelapse0001.jpeg, but i get this error:

Code: Select all

[email protected]:~ $ gst-launch-1.0 multifilesrc location=timelapse%04d.jpeg index=1 caps="image/jpeg,framerate=24/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=timelapse.avi
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0: Error while reading from file "timelapse0000.jpeg".
Additional debug info:
gstmultifilesrc.c(467): gst_multi_file_src_create (): /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0:
Failed to open file 'timelapse0000.jpeg': No such file or directory
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
ls shows all my images in the folder where I am running the command.

nitschkecm
Posts: 50
Joined: Wed Dec 17, 2014 11:01 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon Jan 25, 2016 8:17 am

Your first image has to be 0000

NickMaverick
Posts: 2
Joined: Wed Oct 31, 2012 4:15 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Sun Feb 07, 2016 12:20 am

Thanks for the tutorial. I tried to create a video from images using OpenCV (2.4 and 3.1) but was not able to, neither with ffmpeg. But with your gstreamer pipeline it worked.

The problem I have is that the video is very low quality. It has very noticeable compression artifacts. I would like to have better quality video. I tried using the pipeline shown in the gsreamer multifilesrc doc:

Code: Select all

gst-launch-1.0 multifilesrc location="img.%04d.png" index=0 caps="image/png,framerate=\(fraction\)12/1" ! \
    pngdec ! videoconvert ! videorate ! theoraenc ! oggmux ! \
    filesink location="images.ogg"
This produces much higher quality videos but I'm guessing this doesn't use the GPU like omxh264enc does. I tried to use pngs to create a video with omxh264enc but failed due to my very limited knowledge of gstreamer.
I also failed to find any pipeline that improves the quality of omxh264enc that worked for me.

How can I improve the quality of the video produced by the pipeline in the OP?

Thanks a lot for your help.

Matthai
Posts: 11
Joined: Thu Jan 14, 2016 3:59 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Tue Apr 05, 2016 11:00 am

I have RPi 3, fully updated with Raspbian Jessie.

I am trying to create timelapse video. So I say:

Code: Select all

raspistill -o timelapse-%04d.jpg -t 10000 -tl 1000
And I got these files:

Code: Select all

timelapse-0001.jpg  timelapse-0004.jpg  timelapse-0007.jpg  timelapse-0010.jpg
timelapse-0002.jpg  timelapse-0005.jpg  timelapse-0008.jpg  timelapse-0011.jpg
timelapse-0003.jpg  timelapse-0006.jpg  timelapse-0009.jpg
This goes just great, but there is a small problem - filenames start with timelapse-0001.jpg, not timelapse-0000.jpg!

OK, now I run this:

Code: Select all

gst-launch-1.0 multifilesrc location=timelapse-%04d.jpg index=1 caps="image/jpeg,framerate=24/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=timelapse.avi
And got a nasty error:

Code: Select all

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0: Error while reading from file "timelapse-0000.jpg".
Additional debug info:
gstmultifilesrc.c(467): gst_multi_file_src_create (): /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0:
Failed to open file 'timelapse-0000.jpg': No such file or directory
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
The problem is of course, there is no timelapse-0000.jpg. If I try with index=0 or index=2, it is still the same. On the other side raspistill with -fs 0 does not work (images still begin with timelapse-0001.jpg).

However, I tried to "create" first image:

Code: Select all

mv timelapse-0011.jpg timelapse-0000.jpg
And now I got this:

Code: Select all

gst-launch-1.0 multifilesrc location=timelapse-%04d.jpg index=1 caps="image/jpeg,framerate=24/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=timelapse.avi

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
It is stalled here. I need to Ctrl-C it twice...


Any idea?

johutt
Posts: 6
Joined: Wed Mar 23, 2016 10:13 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Fri May 06, 2016 8:44 am

Hi, Sorry for necroing a bit, but I wanted to contribute some stuff I made in case people want to automate their time lapses :)

This is a program I made that will fork an instance of raspistill in timelapse mode, taking one picture every 5 seconds for 3 hours.
Paste this code into a C source file and compile as usual. If you want different settings, you can play around with the parameters in execlp.

Code: Select all

#include <stdio.h>
#include "stdlib.h"
#include "unistd.h"
#include "sys/stat.h"
#include "sys/wait.h"
#include "signal.h"

int pid = 0;

int main(int argc, char **argv){
	
	if((pid = fork()) == 0){
		execlp("raspistill", "raspistill", "-w", "1280", "-h", "720", "-t", "10800000", "-tl", "5000", "-n", "-o", "/home/pi/tl_%06d.jpeg", NULL);
	}
	wait(NULL);
	return 0;
}
Compile with

Code: Select all

gcc -Wall timelapse.c -o timelapse
Along with this program I made a systemd unit file to automatically start the program. It looks like this. Copy and paste the code below into a file called timelapse.service and copy it to /etc/systemd/system.

Code: Select all

[Unit]
Description=Timelapse application

[Service]
ExecStart=/home/pi/timelapse

[Install]
WantedBy=multi-user.target
Once done, enable the service by typing

Code: Select all

sudo systemctl timelapse enable
.

Note: this only works with Raspbian Jessie due to previous versions not using systemd.

veletron
Posts: 1
Joined: Mon May 23, 2016 10:46 am

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon May 23, 2016 11:07 am

Hi

I wonder if you can assist me in using the above, but muxing in audio (mp3) at the same time? I have been using mencoder for several years to automatically generate a daily timelapse for a webcam I operate. I upgraded to a Pi3, and Raspian Jessie, which does not include mencoder so started looking for a replacement.

I can render the AVI as per your tutorial just fine, but have tried many things to get the audio muxed in at the same time (like with mencoder), and all I get is pipeline errors!

Additionally, I was trying to get this working using mp4mux rather than avimux, there appears to be issues using omxh264enc with a mp4mux - I just get an invalid video. If I switch to using x264enc instead with mp4mux then I get a valid video, but obviously loose the GPU speedup! The reason for wanting to use the mp4mux is that the resulting video just plays in chrome directly.

Any assistance on either muxing in the audio or using the mp4mux greatly apprciated, my gstreamer command line is:

gst-launch-1.0 multifilesrc location=%04d.jpg index=1 caps="image/jpeg,framerate=25/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=video.avi

Currently, I am back to using mencoder, I just compiled it from source for jessie, but its very slow compared to your gsteamer example.

My full Timelapse_MakeVid script is below:

#!/bin/bash
#Script to process images into a timelapse. Called by TimeLapse_GetPic shortly after sunset when days images all collected
#Chooses and sizes a randomn backing track based on no of images and 25fps, fades this in/out, muxes with video

#randomly chooses one of the audio tracks, sizes it for the video (length
#in seconds for video are passed in), fades audio in/out for 5 seconds
#stores path to resulting file in $backingtrack so that caller can use in
#video
SelectBackingTrack ()
{
mp3_path=(/home/pi/cron_jobs/TimeLapse/BackingTracks)

found_mp3=$(find $mp3_path -maxdepth 1 -name '*.mp3')

#calculate total number of mp3 available
total_mp3_found=$(echo $found_mp3 | wc -w )

RANDOM=$$
random=0
while [ "$random" -le 0 ]
do
random=$(($RANDOM%($total_mp3_found)))
done

backingtrack=/home/pi/cron_jobs/TimeLapse/backingtrack.mp3
rm $backingtrack
sox ${mp3_path}/${random}.mp3 ${backingtrack} trim 0:0.0 $1 fade h 0:5 0 0:5
}

#if its daylight then this method returns 1 otherwise 0
#Need to find a better way to do this - almanac etc
isDaylight ()
{
date=`date +%d`
month=`date +%m`
hour=`date +%H`
min=`date +%M`

srh=`curl -s file:///home/pi/cron_jobs/TimeLapse/daytime.txt|grep sunrise|cut -c14-15`
ssh=`curl -s file:///home/pi/cron_jobs/TimeLapse/daytime.txt|grep sunset|cut -c13-14`
srm=`curl -s file:///home/pi/cron_jobs/TimeLapse/daytime.txt|grep sunrise|cut -c17-18`
ssm=`curl -s file:///home/pi/cron_jobs/TimeLapse/daytime.txt|grep sunset|cut -c16-17`

if [ $hour -eq $srh -a $min -ge $srm ] ; then
return 0 # special case of sunrise hour
fi
if [ $hour -gt $srh -a $hour -lt $ssh ] ; then
return 0 # easy: after sunrise, before sunset
fi
if [ $hour -eq $ssh -a $min -le $ssm ] ; then
return 0 # special case: sunset hour
fi

return 1
}

IMGCOUNTFILE=/home/pi/cron_jobs/TimeLapse/count.txt

#Check if daylight and if not then process the images we have (if any exist)
if isDaylight ; then
exit 0
fi

#not daylight so we can process the photos

numfiles=(/home/pi/public_html/WebcamPicsForTimeLapse/*.jpg)
numfiles=${#numfiles[@]}

#Dont bother with timelapse if something went wrong grabbing images, we need 1000 for decent length video
if [ $numfiles -lt 1000 ] ; then
rm -f /home/pi/public_html/WebcamPicsForTimeLapse/*.jpg
rm -f /home/pi/public_html/WebcamPicsForTimeLapse/count.txt
exit 0
fi

outputfile="/home/pi/public_html/WebcamPicsForTimeLapse/TimeLapse_$(date "+%d-%m-%y").mp4"

#backing track is selected randomly and path stored in $backingtrack
SelectBackingTrack $(($numfiles/25))

echo Processing $numfiles image files
currentpath=$(pwd)
cd /home/pi/public_html/WebcamPicsForTimeLapse
gst-launch-1.0 multifilesrc location=%04d.jpg index=1 caps="image/jpeg,framerate=25/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=video.avi

#This is the previous mencoder command line - some of the supporting stuff that generated stills.txt removed as no longer required for gstreamer
#mencoder -oac copy -audiofile $backingtrack -ovc lavc -lavcopts #vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1280:720 -o $outputfile -mf #type=jpeg:fps=25 mf://@stills.txt

rm $backingtrack
rm -f *.jpg
rm -f $IMGCOUNTFILE

cd $currentpath
exit 0

Pangu
Posts: 78
Joined: Tue Dec 18, 2012 5:30 pm

Re: [Tutorial] Making time-lapse video with Raspberry Pi

Mon Jul 11, 2016 7:58 pm

Hi all,

I installed raspbian onto my RPi Model B 512MB with RPi Cam, installed rpi-update and refreshed it, then apt-get update && apt-get upgrade && apt-get dist-upgrade so my RPi is up-to-date and fully functional with the RPi cam (tested). Then I installed everything as explained here:
phamthanhnam wrote:

Code: Select all

sudo sh -c 'echo deb http://vontaene.de/raspbian-updates/ . main >> /etc/apt/sources.list'

sudo apt-get update

sudo apt-get install libgstreamer1.0-0 liborc-0.4-0 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gstreamer1.0-alsa gstreamer1.0-omx gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-x libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0

Code: Select all

gst-inspect-1.0 | grep omx
returned:
omx: omxmpeg2videodec: OpenMAX MPEG2 Video Decoder
omx: omxmpeg4videodec: OpenMAX MPEG4 Video Decoder
omx: omxh263dec: OpenMAX H.263 Video Decoder
omx: omxh264dec: OpenMAX H.264 Video Decoder
omx: omxtheoradec: OpenMAX Theora Video Decoder
omx: omxvp8dec: OpenMAX VP8 Video Decoder
omx: omxmjpegdec: OpenMAX MJPEG Video Decoder
omx: omxvc1dec: OpenMAX WMV Video Decoder
omx: omxh264enc: OpenMAX H.264 Video Encoder
omx: omxanalogaudiosink: OpenMAX Analog Audio Sink
omx: omxhdmiaudiosink: OpenMAX HDMI Audio Sink
Then I did run..

Code: Select all

raspistill -o timelapse%04d.jpeg -tl 1000 -t 10000
which does produce a still image each second for 10 seconds duration. That command produced files beginning from timelapse0001.jpeg to timelapse0061.jpeg

Next, when I try to start the conversion with...

Code: Select all

gst-launch-1.0 multifilesrc location=timelapse%04d.jpeg index=1 caps="image/jpeg,framerate=24/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=timelapse.avi
I get the error (in german):
Leitung wird auf PAUSIERT gesetzt ...
Leitung läuft vor …
FEHLER: Von Element /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0: Error while reading from file "timelapse0000.jpeg".
Zusätzliche Fehlerdiagnoseinformation:
gstmultifilesrc.c(467): gst_multi_file_src_create (): /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0:
Datei »timelapse0000.jpeg« konnte nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden
FEHLER: Leitung läuft nicht vor.
Leitung wird auf NULL gesetzt ...
Leitung wird geleert ...
That means that "timelapse0000.jpeg" tried to be accessed but not found. Yes, this file is NOT there. Even when I tried the command

Code: Select all

gst-launch-1.0 multifilesrc location=timelapse%04d.jpeg index=0 caps="image/jpeg,framerate=24/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=timelapse.avi
it didn't work!

So I tried to mitigate that by the command:

Code: Select all

cp timelapse0001.jpeg timelapse0000.jpeg
By that command I just copied the first still image so there is a file timelapse0000.jpeg in the folder as needed by the conversion command shown above.

Then I retry the command:

Code: Select all

[code]gst-launch-1.0 multifilesrc location=timelapse%04d.jpeg index=1 caps="image/jpeg,framerate=24/1" ! jpegdec ! omxh264enc ! avimux ! filesink location=timelapse.avi
the conversion tries to start but unexpectedly fails with this error messages (in german:
Leitung wird auf PAUSIERT gesetzt ...
Leitung läuft vor …
FEHLER: Von Element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: GStreamer-Fehler: Verhandlungsproblem.
Zusätzliche Fehlerdiagnoseinformation:
gstvideoencoder.c(1463): gst_video_encoder_chain (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:
encoder not initialized
FEHLER: Leitung läuft nicht vor.
Leitung wird auf NULL gesetzt ...
Leitung wird geleert ...
I have no clue why it doesn't work. Any help appreciated. Thanks in advance

Return to “Graphics, sound and multimedia”