Thanks to all for great suggestions.
Quote:
Originally Posted by BW-userx
[code]
Code:
#!/bin/bash
working_dir=/media/data/testMovies
move_to=/media/data/rdThumbNailed
script_dir=/home/userx/scripts
for file in "$working_dir"/* ;
do
if [[ -f "$file" ]]; then
source=${file%.*}
move_to=${source/$working_dir/$move_to}
mkdir -pv "$move_to"
mv "$file" "$move_to"
ffmpeg -i "$move_to"/"${file##*/}" -y -f image2 -c:v mjpeg
"$move_to"/"${file##*/}"-%03d.jpg
fi
done
|
I pasted the foregoing code at command prompt.
This created the first 9870 JPGs from the first video,
stopping way early near 10,000th frame .. hmmm.
Below is edited terminal output -- two errors highlighted, as follows ..
1] "Output file #0 does not contain any stream." -- AND --
2] "[adp @ 0xfb8400] Format adp detected only with low score of 25,
misdetection possible!"
I changed -%03d.jpg to -%05d.jpg, for more JPG names. Didn't help.
Any suggestions why it's stopping after 9870th frame much appreciated !!
Thanks in advance.
[ *** BEGIN TERMINAL OUTPUT *** ]
9790 fps= 37 q=24.8 size=N/A time=00:02:43.32 bitrate=N/A dup=2 drop=0 frame= 9810 fps= 37 q=24.8 size=N/A
[...SNIP...]
frame= 9870 fps= 37 q=24.8 Lsize=N/A time=00:02:44.66 bitrate=N/A dup=2 drop=0
video:535625kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[...SNIP...]
[ *** ERROR MESSAGE *** ]
Output file #0 does not contain any stream
mkdir: created directory '/media/data/rdThumbNailed/MVI_0001/MVI_0004/MVI_0008-j'
ffmpeg version 2.8.14-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
[...SNIP...]
--enable-libass --enable-libbluray --enable-libbs2b
[...SNIP...]
-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared
[...SNIP...]
enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
libavutil 54. 31.100 / 54. 31.100
[...SNIP...]
libpostproc 53. 3.100 / 53. 3.100
[ *** ERROR MESSAGE *** ]
[adp @ 0xfb8400] Format adp detected only with low score of 25, misdetection possible!
Input #0, adp, from '/media/data/rdThumbNailed/MVI_0001/MVI_0004/MVI_0008-j/MVI_0008-j.MP4':
Duration: 02:40:42.12, start: 0.000000, bitrate: 438 kb/s
Stream #0:0: Audio: adpcm_dtk, 48000 Hz, stereo, s16p
Output #0, image2, to '/media/data/rdThumbNailed/MVI_0001/MVI_0004/MVI_0008-j/MVI_0008-j.MP4-%05d.jpg':
[ *** ERROR MESSAGE *** ]
Output file #0 does not contain any stream
eric-HP-Compaq-dc7900-Small-Form-Factor eric # for file in "$working_dir"/* ; do if [[ -f "$file" ]]; then source=${file%.*} ; move_to=${source/$working_dir/$move_to}; mkdir -pv "$move_to"; mv "$file" "$move_to"; ffmpeg -i "$move_to"/"${file##*/}" -y -f image2 -c:v mjpeg "$move_to"/"${file##*/}"-%05d.jpg; fi; done