# create a directory with images all the exact same size # # MANUAL: ls *.jpg > files.txt # mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi -mf type=jpeg:fps=5 mf://@files.txt mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o traffic.avi -mf type=jpeg:fps=2 mf://@files.txt # # ffmpeg -i /var/motion/elp/data/webcam.avi -b 800k -s 640×480 -r 10 -y /var/motion/elp/data/webcam.flv # # SCRIPT: --> cat mktl ls *.jpg > files.txt mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o traffic.avi -mf type=jpeg:fps=1 mf://@files.txt --> sh ./mktl MEncoder -4.8 (C) 2000-2014 MPlayer Team success: format: 16 data: 0x0 - 0x0 MF file format detected. [mf] number of files: 188 VIDEO: [IJPG] 0x0 24bpp 1.000 fps 0.0 kbps ( 0.0 kbyte/s) [V] filefmt:16 fourcc:0x47504A49 size:0x0 fps:1.000 ftime:=1.0000 libavcodec version 55.69.100 (internal) Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG) ========================================================================== Movie-Aspect is 0.43:1 - prescaling to correct movie aspect. videocodec: libavcodec (442x1024 fourcc=34504d46 [FMP4]) Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Pos: 187.0s 187f (100%) 47.31fps Trem: 0min 2mb A-V:0.000 [95:0] Movie-Aspect is 0.43:1 - prescaling to correct movie aspect. New video file has different resolution or colorspace than the previous one. FATAL: Cannot initialize video driver. Movie-Aspect is 0.43:1 - prescaling to correct movie aspect. New video file has different resolution or colorspace than the previous one. FATAL: Cannot initialize video driver. Exiting... ------------------------------------------------
scripts to build time lapse video and ALL.html
mkavi
#!/bin/bash # john meister 14nov2013 # DIRNAME=`pwd | awk -F / '{print $4}'` #### /x/x/x/x/Time_Lapse/2015_04_07 (7th field) DIRNAME=`pwd | awk -F / '{print $7}'` chmod 644 *.jpg ls *.jpg > $DIRNAME.files.txt mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o $DIRNAME.avi -mf type=jpeg:fps=5 mf://@$DIRNAME.files.txt /x/x/x/mkpg "Time Lapse $DIRNAME" cp $DIRNAME.avi .. cd
mkpg
#!/bin/bash # 28 oct 2013 - john http://johnmeister.com/linux # mkpg - creates a page to display all images in a directory # update 23apr2014 to to create a better header # update 20 may 2014 to add variety of images and create a local README.html # updated 26 jul 2014 to add updated README content ############################################## # define variables - use variables vs. hard coding paths ############################################## CAT=/bin/cat CP=/bin/cp DATE=`date | cut -c 5-11` ; export DATE # echo $DATE FDATE=`/bin/date +%d%b%y-%H%M` ; export FDATE # echo $FDATE GREP=/bin/grep LS=/bin/ls MKDIR=/bin/mkdir MV=/bin/mv PERL=/usr/bin/perl SORT=/usr/bin/sort TITLE="`echo "$1"`" ; export TITLE ; echo $TITLE UNIQU="/usr/bin/uniq -u" VI=/usr/bin/vi WCL="/usr/bin/wc -l" ############################################## # create backup copies of ALL, Header, Readme and footer files ############################################## $MKDIR z $MV ALL.html z/ALL.html-`/bin/date +%Y-%b-%d-%H%M"hrs"` $MV README.html z/README-`/bin/date +%Y-%b-%d-%H%M"hrs"` $MV HEADER.html z/HEADER-`/bin/date +%Y-%b-%d-%H%M"hrs"` $MV FOOTER.html z/FOOTER-`/bin/date +%Y-%b-%d-%H%M"hrs"` ############################################## # # create a README page to get wall paper and basic navigation # # echo "$TITLE - john meister © 2015 " > README.html # # $CAT /x/x/x/x/A >> README.html # # echo "" >> README.html # # $CAT /x/x/x/x/B >> README.html ############################################## $CP /x/x/x/x/README.html README.html $CP /x/x/x/x/HEADER.html HEADER.html $LS z ############################################## # create new ALL.html file - TOP ############################################## echo " $TITLE
" >> README.html # # echo "$TITLE - john meister © 2015 " > ALL.html $CAT /x/x/x/x/A >> ALL.html ############################################## # createtag for page - take from mkpg cmd ############################################## echo "" >> ALL.html echo "
" >> ALL.html $CAT /x/x/x/x/B >> ALL.html echo " the numbers on the left should match: " $MV IMGs z ; $WCL z/IMGs $MV IMG.html z ; $WCL z/IMG.html echo " end of ALL.html creation, backup files in z " ############################################## $TITLE
" >> ALL.html ############################################## # image tags and place D600, D7100, canon files ############################################## $LS *.jpg > IMGs $LS *.JPG >> IMGs $CAT IMGs | $GREP JM6 > IMG.html $CAT IMGs | $GREP JM7 >> IMG.html $CAT IMGs | $GREP JEM >> IMG.html $CAT IMGs | $GREP IMG >> IMG.html $LS *.jpg *.JPG | $GREP -v JM6 | $GREP -v JM7 | $GREP -v JEM | $GREP -v IMG >> IMG.html $PERL -pi -e 's/(.*)/
$1
/g' IMG.html $PERL -pi -e 's/
//g' IMG.html ############################################## $CAT IMG.html >> ALL.html ############################################## # close out content section, add Footer ############################################## echo "
building the timelapse and the ALL.html with one command
--> mkavi MEncoder -4.8 (C) 2000-2014 MPlayer Team success: format: 16 data: 0x0 - 0x0 MF file format detected. [mf] number of files: 466 VIDEO: [IJPG] 0x0 24bpp 5.000 fps 0.0 kbps ( 0.0 kbyte/s) [V] filefmt:16 fourcc:0x47504A49 size:0x0 fps:5.000 ftime:=0.2000 libavcodec version 55.69.100 (internal) Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1 ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG) ========================================================================== [mjpeg @ 0x7f6c2da51ac0]ignoring invalid SAR: 0/0 Movie-Aspect is undefined - no prescaling applied. videocodec: libavcodec (640x480 fourcc=34504d46 [FMP4]) Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Pos: 0.2s 1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] [mjpeg @ 0x7f6c2da51ac0]ignoring invalid SAR: 0/0 Pos: 0.4s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] [mjpeg @ 0x7f6c2da51ac0]ignoring invalid SAR: 0/0 Pos: 0.6s 3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0] .... [mjpeg @ 0x7f6c2da51ac0]ignoring invalid SAR: 0/0 Pos: 92.6s 463f (99%) 114.83fps Trem: 0min 8mb A-V:0.000 [786:0] [mjpeg @ 0x7f6c2da51ac0]ignoring invalid SAR: 0/0 Pos: 92.8s 464f (99%) 114.94fps Trem: 0min 8mb A-V:0.000 [785:0] [mjpeg @ 0x7f6c2da51ac0]ignoring invalid SAR: 0/0 Pos: 93.0s 465f (100%) 115.07fps Trem: 0min 8mb A-V:0.000 [784:0] [mjpeg @ 0x7f6c2da51ac0]ignoring invalid SAR: 0/0 Pos: 93.2s 466f (100%) 115.23fps Trem: 0min 8mb A-V:0.000 [782:0] Skipping frame! Pos: 93.2s 467f (100%) 115.48fps Trem: 0min 8mb A-V:0.000 [782:0] Flushing video frames. Writing index... Writing header... ODML: Aspect information not (yet?) available or unspecified, not writing vprp header. Video stream: 782.974 kbit/s (97871 B/s) size: 9121649 bytes 93.200 secs 467 frames Time Lapse 2015_04_07 /bin/mv: cannot stat ‘ALL.html’: No such file or directory /bin/mv: cannot stat ‘README.html’: No such file or directory /bin/mv: cannot stat ‘HEADER.html’: No such file or directory /bin/mv: cannot stat ‘FOOTER.html’: No such file or directory /bin/ls: cannot access *.JPG: No such file or directory /bin/ls: cannot access *.JPG: No such file or directory the numbers on the left should match: 466 z/IMGs 466 z/IMG.html end of ALL.html creation, backup files in z ------------------------------------------------ ....Time_Lapse/2015_04_07] ------------------------------------------------ http://johnmeister.com/Time_Lapse/2015_04_07.avi http://johnmeister.com/Time_Lapse/2015_04_07/ALL.html http://johnmeister.com/Time_Lapse/2015_04_07/2015_04_07.avi
-> which mencoder which: no mencoder in ... ------------------------------------------------ --> which ffmpeg which: no ffmpeg in ... # #This will encode all the files listed in files.txt into a movie called test.avi using the mpeg4 encoder with no sound and a framerate of 2 frames per second. #Messing with the fps gives very different results. See “Encoding from multiple input image files” in the mencoder documentation for more info. # #Here’s an example video made using this method: # # I used this to create my timelapse videos and thought I’d post my finished (and working) product. The first line finds all files older than 720 minutes and #puts them in a list as you described. The second line encodes it. The third converts it from an .avi to a .flv format. I hope this will hope someone! # # find /var/motion/elp/data/archive -maxdepth 1 -cmin -720 -type f -name *.jpg -exec ls -1tr {} > /var/motion/elp/data/archive/webcam.txt \; # # mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o /var/motion/elp/data/webcam.avi -mf type=jpeg:fps=10 mf://@/var/motion/elp/data/archive/webcam.txt # ffmpeg -i /var/motion/elp/data/webcam.avi -b 800k -s 640×480 -r 10 -y /var/motion/elp/data/webcam.flv ffmpeg not installed, so... --> sudo zypper install ffmpeg Loading repository data... Reading installed packages... Resolving package dependencies... Problem: ffmpeg-2.3.3-2.4.x86_64 requires libavutil52 = 2.3.3, but this requirement cannot be provided uninstallable providers: libavutil52-2.3.3-2.4.i586[packman] libavutil52-2.3.3-2.4.x86_64[packman] Solution 1: install libavutil52-2.3.3-2.4.x86_64 (with vendor change) openSUSE --> http://packman.links2linux.de Solution 2: do not install ffmpeg-2.3.3-2.4.x86_64 Solution 3: do not install ffmpeg-2.3.3-2.4.x86_64 Solution 4: break ffmpeg-2.3.3-2.4.x86_64 by ignoring some of its dependencies Choose from above solutions by number or cancel [1/2/3/4/c] (c): 1 Resolving dependencies... Resolving package dependencies... Problem: ffmpeg-2.3.3-2.4.x86_64 requires libavcodec.so.55()(64bit), but this requirement cannot be provided uninstallable providers: libavcodec55-2.3.3-2.4.x86_64[packman] Solution 1: install libvpx1-1.3.0-51.1.x86_64 (with vendor change) openSUSE --> http://packman.links2linux.de Solution 2: do not install ffmpeg-2.3.3-2.4.x86_64 Solution 3: do not install ffmpeg-2.3.3-2.4.x86_64 Solution 4: break ffmpeg-2.3.3-2.4.x86_64 by ignoring some of its dependencies Choose from above solutions by number or cancel [1/2/3/4/c] (c): c # however, decided not to continue this process on this system... will setup on a different system...
SEARCH and Navigation TOOLFor the best synthetic lubricants, filters, and other automotive products use the free AMSOIL product guide, simply click and enter your year, make and model. visit AMSOIL's site, or call 1-800-956-5695, please use customer #283461 |
Computers: Diesel Engines Grand Wagoneer parts
|
books by john:
Everett weather -- traffic --- News -- Middle East NASB/KJV-- South East Asian Missions -- BibleTech -- Voice of the Martyrs |
|