LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-24-2016, 05:23 AM   #1
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Rep: Reputation: 46
timelapse to video fail due to power outage


Ladies & Gents,

As always, much thanks and gratitude to those who provide guidance helping us that don't quite get it yet.

That said; I have a some 6000 photos that were captured from a usb camera using motion, but something happened with the power to the laptop and so the output video was never created as in my tests. So now I need to turn these into a video for import to kdenlive as part of a larger construction experiment.

I have ffmpeg installed and I tried from the director where the files are stored
Code:
ffmpeg -y -i *.jpg imagestovideo.mpg
but clearly something is not right with that command as I get this error
Code:
ffmpeg version 2.8.5 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Debian 5.3.1-6) 20160114
  configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libbs2b --enable-libilbc --enable-libopenh264 --enable-libkvazaar --enable-libiec61883 --enable-vaapi --enable-opencl --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[mjpeg @ 0x21a48e0] Changeing bps to 8
Input #0, image2, from '01-20160122091158-05.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 3480 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 352x288 [SAR 1:1 DAR 11:9], 25 tbr, 25 tbn, 25 tbc
[AVFilterGraph @ 0xa269f20] Error initializing threading.
[AVFilterGraph @ 0xa269f20] Error creating filter 'null'
Error opening filters!
The examples at http://photo.stackexchange.com/quest...raphs-in-linux and http://hamelot.co.uk/visualization/u...-into-a-video/ and others show using %d in the command line but when I try that the video files are not found. I assumed that *.jpg would use all the files in the directory ffmpeg was run from, it seams I was wrong.

In the one example they have pic%04d.png which is for padding zeros to the file name , in their case all the files start with pic followed by a number string. In my case each files starts with a number string and zero padding is not needed as far as I can tell. The file names go as
Code:
 01-20160122091158-05.jpg
01-20160122091158-15.jpg
01-20160122091158-25.jpg
01-20160122091159-05.jpg
01-20160122091159-15.jpg
.....some 6280 files later
43-20160122122155-23.jpg
43-20160122122156-03.jpg
43-20160122122156-13.jpg
I don't know what causes the name to change from 01 to 02 and so on to 43. The rest of the file name I gather is a time/date stamp. Looking at those assumed time/date stamp names makes me think that I may need to rename the files by actual creation time. Although the photos were taken from the command line with
Code:
ueser@host:~/path/to/folder$ motion
so I assumed that the files were named in sequence correctly. But that is not really an issue at this point because ffmpeg is not generating the video for me.

Any pointers?

Do I need to set a framerate or image size for ffmpeg? Some websites indicate that is not needed.

Thanks
 
Old 01-24-2016, 05:33 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Quote:
ffmpeg -y -i *.jpg imagestovideo.mpg
Hi, this is not how I'd do this...
Install OpenShot. It seems that the names are a sequence that can be logically (read: by a program) followed. I ammaking videos as well, and I use OpenShot for that. As I import pictures that have a sequential name (pic001.jpg, pic002.jpg ect) OpenShot asks me to import the rest as part of a sequence...from there on, the rest should be a snap...
Good luck...
Melissa
 
Old 01-24-2016, 06:03 AM   #3
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Thanks Thor_2.0

Openshot = epic fail on importing 6280 odd photos

103 cpu usage

FYI: I am on Debian Testing

Last edited by rbees; 01-24-2016 at 06:04 AM.
 
Old 01-24-2016, 07:22 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,543

Rep: Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497Reputation: 2497
I used the commands below to create a video of .jpg images from zoneminder, video surveillance software. Imagemagick and ffmpeg are needed. If you try it, I would suggest you test it with a smaller number of images in a separate directory first. I don't use these programs often so I don't really know what the various options do and must admit that I was surprised when it actually created a usable video. I believe I found the commands on Stack Exchange, and did have to make a modification to the original ffmpeg command based on a message from the output. Good luck.

mogrify -resize 200x200 *.jpg
# Create the morph images
convert *.jpg -delay 10 -morph 5 05d.jpg
# Stitch them together into a video
ffmpeg -r 50 -i %05d.jpg -q:a 2 output.mp4

Last edited by yancek; 01-24-2016 at 07:23 AM.
 
Old 01-24-2016, 07:28 AM   #5
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 921

Original Poster
Rep: Reputation: 46
Thanks yancek

I did get it with the examples here http://www.cenolan.com/2009/05/simpl...ideo-in-linux/

using mencoder

I think zoneminder uses motion to do its captures. I have tried to setup zoneminder on a different box but the current Debian Testing version fails to install because of a mysql thing, wrong user name or password, something like that anyway. To many other things to do to try to get that figured out at the moment.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Outage ... Now I have a problem.. orbit Slackware 6 08-15-2010 11:36 AM
power outage blackmamba11 Linux - Server 1 12-03-2007 11:51 AM
RAID 5 after Power outage RabidSquirrel Linux - Hardware 3 08-02-2005 06:46 PM
power outage jbzy3000 Linux - General 2 02-24-2005 09:11 PM
Power Outage notslim General 30 08-28-2003 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration