LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-16-2013, 01:48 PM   #1
mjolnir
Member
 
Registered: Apr 2003
Posts: 815

Rep: Reputation: 99
VLC Time lapse from the cli.


I've been playing around using VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b) on Ubuntu 13.04 to extract video frames from my webcam feed to make small time lapse videos. I use this command in a terminal to do the extraction:
Code:
vlc --video-filter=scene --vout=dummy --aout=dummy --intf=dummy --scene-format=jpeg --scene-ratio=100 --scene-prefix=$(date +"%b-%d-%y")_ --scene-path=/home/carl/Pictures/Temp v4l2:// vlc://quit --run-time=60
Following result:
Code:
carl@Wizard:~/Pictures/Temp$ vlc --video-filter=scene --vout=dummy --aout=dummy --intf=dummy --scene-format=jpeg --scene-ratio=100 --scene-prefix=$(date +"%b-%d-%y")_ --scene-path=/home/carl/Pictures/Temp v4l2:// vlc://quit --run-time=60 
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x93ef7c0] dummy interface: using the dummy interface module...
[0xb5000958] idummy demux: command `quit'
carl@Wizard:~/Pictures/Temp$ ls
Aug-16-13_00001.jpeg  Aug-16-13_00601.jpeg  Aug-16-13_01201.jpeg
Aug-16-13_00101.jpeg  Aug-16-13_00701.jpeg  Aug-16-13_01301.jpeg
Aug-16-13_00201.jpeg  Aug-16-13_00801.jpeg  Aug-16-13_01401.jpeg
Aug-16-13_00301.jpeg  Aug-16-13_00901.jpeg  Aug-16-13_01501.jpeg
Aug-16-13_00401.jpeg  Aug-16-13_01001.jpeg  Aug-16-13_01601.jpeg
Aug-16-13_00501.jpeg  Aug-16-13_01101.jpeg  Aug-16-13_01701.jpeg
I've tried various iterations but I haven't been able to add %H, %M, and %S to the file name. Anybody have any ideas? Thanks.

Last edited by mjolnir; 08-16-2013 at 01:52 PM.
 
Old 08-17-2013, 08:05 AM   #2
mjolnir
Member
 
Registered: Apr 2003
Posts: 815

Original Poster
Rep: Reputation: 99
Not quite sure what I was doing wrong yesterday, probably stared at a computer screen for to long, but I simply added %T to the string and got the result I wanted:
Code:
carl@Wizard:~/Pictures/Temp$ vlc --video-filter=scene --vout=dummy --aout=dummy --intf=dummy --scene-format=jpeg --scene-ratio=100 --scene-prefix=$(date +"%b-%d-%y-%T")_ --scene-path=/home/carl/Pictures/Temp v4l2:// vlc://quit --run-time=120 
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x891f758] dummy interface: using the dummy interface module...
[0xb5000958] idummy demux: command `quit'
carl@Wizard:~/Pictures/Temp$ ls
Aug-17-13-08:55:46_00001.jpeg  Aug-17-13-08:55:46_01001.jpeg
Aug-17-13-08:55:46_00101.jpeg  Aug-17-13-08:55:46_01101.jpeg
Aug-17-13-08:55:46_00201.jpeg  Aug-17-13-08:55:46_01201.jpeg
Aug-17-13-08:55:46_00301.jpeg  Aug-17-13-08:55:46_01301.jpeg
Aug-17-13-08:55:46_00401.jpeg  Aug-17-13-08:55:46_01401.jpeg
Aug-17-13-08:55:46_00501.jpeg  Aug-17-13-08:55:46_01501.jpeg
Aug-17-13-08:55:46_00601.jpeg  Aug-17-13-08:55:46_01601.jpeg
Aug-17-13-08:55:46_00701.jpeg  Aug-17-13-08:55:46_01701.jpeg
Aug-17-13-08:55:46_00801.jpeg  Aug-17-13-08:55:46_01801.jpeg
Aug-17-13-08:55:46_00901.jpeg
carl@Wizard:~/Pictures/Temp$ vlc --video-filter=scene --vout=dummy --aout=dummy --intf=dummy --scene-format=jpeg --scene-ratio=100 --scene-prefix=$(date +"%b-%d-%y-%T")_ --scene-path=/home/carl/Pictures/Temp v4l2:// vlc://quit --run-time=120 
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x924c7a8] dummy interface: using the dummy interface module...
^Ccarl@Wizard:~/Pictures/Temp$ ls
Aug-17-13-08:55:46_00001.jpeg  Aug-17-13-08:55:46_01301.jpeg
Aug-17-13-08:55:46_00101.jpeg  Aug-17-13-08:55:46_01401.jpeg
Aug-17-13-08:55:46_00201.jpeg  Aug-17-13-08:55:46_01501.jpeg
Aug-17-13-08:55:46_00301.jpeg  Aug-17-13-08:55:46_01601.jpeg
Aug-17-13-08:55:46_00401.jpeg  Aug-17-13-08:55:46_01701.jpeg
Aug-17-13-08:55:46_00501.jpeg  Aug-17-13-08:55:46_01801.jpeg
Aug-17-13-08:55:46_00601.jpeg  Aug-17-13-08:58:40_00001.jpeg
Aug-17-13-08:55:46_00701.jpeg  Aug-17-13-08:58:40_00101.jpeg
Aug-17-13-08:55:46_00801.jpeg  Aug-17-13-08:58:40_00201.jpeg
Aug-17-13-08:55:46_00901.jpeg  Aug-17-13-08:58:40_00301.jpeg
Aug-17-13-08:55:46_01001.jpeg  Aug-17-13-08:58:40_00401.jpeg
Aug-17-13-08:55:46_01101.jpeg  Aug-17-13-08:58:40_00501.jpeg
Aug-17-13-08:55:46_01201.jpeg
carl@Wizard:~/Pictures/Temp$
Followed by:
Code:
ls -1tr > frames.txt
and then:
Code:
mencoder -nosound -ovc lavc -lavcopts \
vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 \
-vf scale=1920:1080 -mf type=jpeg:fps=20 \
mf://@frames.txt -o time-lapse.avi
Most of this came straight from the web. I would attribute and give links but I got lost in the weeds. :-)

Last edited by mjolnir; 08-17-2013 at 10:56 AM. Reason: Completeness
 
  


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
LXer: Time-Lapse Photography with your Inexpensive Canon Camera (CHDK p. 3) LXer Syndicated Linux News 0 07-21-2010 01:11 AM
Trying to launch VLC in CLI install upon start n1wil Ubuntu 1 07-29-2009 06:48 AM
Time lapse video project BrucePennypacker Linux - General 1 04-05-2009 03:21 PM
LXer: Time-lapse photography with dvd-slideshow LXer Syndicated Linux News 0 02-22-2008 09:30 PM
Tutorial time lapse khermans LQ Suggestions & Feedback 1 04-13-2005 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:16 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