Fast tool to generate thumbnail video galleries for command line
Clash Royale CLAN TAG#URR8PPP
I use gframecatcher to generate thumbnail video galleries, i.e. something like this:
However this is a GUI tool and I want to create recursively a gallery for every video in a directory structure, so I am looking for a fast command line tool to do this.
command-line video
add a comment |
I use gframecatcher to generate thumbnail video galleries, i.e. something like this:
However this is a GUI tool and I want to create recursively a gallery for every video in a directory structure, so I am looking for a fast command line tool to do this.
command-line video
add a comment |
I use gframecatcher to generate thumbnail video galleries, i.e. something like this:
However this is a GUI tool and I want to create recursively a gallery for every video in a directory structure, so I am looking for a fast command line tool to do this.
command-line video
I use gframecatcher to generate thumbnail video galleries, i.e. something like this:
However this is a GUI tool and I want to create recursively a gallery for every video in a directory structure, so I am looking for a fast command line tool to do this.
command-line video
command-line video
edited May 21 '16 at 11:52
Community♦
1
1
asked Feb 5 '13 at 10:10
studentstudent
7,1501764125
7,1501764125
add a comment |
add a comment |
8 Answers
8
active
oldest
votes
Pull out the image captures (these are 100 pixels tall, and keep aspect ratio), the rate (-r
) is per-second (this yields one frame every ~5 minutes), this also adds time stamp to output image.
ffmpeg -i MOVIE.mp4 -r 0.0033 -vf scale=-1:120 -vcodec png capture-%002d.png
Then use ImageMagick
to build your gallery image:
montage -title "Movie NamenSubtitle" -geometry +4+4 capture*.png output.png
5
You can use fractions for the rate (-r
). This makes it easier and more accurate to specify times. 5min = 300 secondsffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png
.
– DutGRIFF
May 13 '14 at 18:28
avconv
works in the same way, in case you don't haveffmpeg
available (some Ubuntu releases).
– Ken Sharp
Mar 8 '16 at 3:25
1
This works, but requires plumbing through the entire video file. superuser.com/questions/538112/… provides some examples which attempt to find meaningful thumbnails, as well as avoid having to sit and process the entire video to get a few frames.
– Skrylar
May 21 '16 at 12:01
This does not add the timestamp to the image.
– felwithe
Aug 2 '17 at 23:08
How would you do this in batch for a bunch of videos in a directory?
– Paul Jones
Feb 7 at 21:02
add a comment |
I like using an easy to use unix command line bash script called VCS - Video Contact Sheet. Their official page: http://p.outlyer.net/vcs/
Its a lot easier to use even easier than a GUI
''It is a bash script meant to create video contact sheets (previews) aka thumbnails or previews of videos. Any video supported by mplayer and ffmpeg can be used by this script. ''
You will need to have either ffmpeg
or mplayer
installed on your system.
Usage:
vcs input-filename -U0 -i 1m -c 3 -H 200 -a 300/200 -o save-filename.jpg
How the command works
Edit input-filname to the name of your video file!
-U0
(no name in footer - or else it displays the host name - note this is zero not the letterO
)-i 1m
(sets the capture time interval in mins - in this case it's every minute - you could also use-n
instead which sets the number of captures for example-n 21
will create 21 images, but don't use both)-c
sets number of columns (here it's 3 columns)-H 200 -a 300/200
(sets size and aspect so file is not too big - seems you have to do both)-o filename.jpg
(use.jpg
as the default as.png
is too big - and change the filename to one of your choice !)
add a comment |
This one seems to fit the bill, it's free and open source and even works on Windows :)
It even has advanced stuff, like instead of blindly picking any frame at the particular interval, it can pick ones that are close enough but don't look too blurry, so instead of doing this:
You can pass it a parameter (-D6
) so it does this:
Plus I really like no borders, so that the images can be slightly bigger.
add a comment |
There is a solution from ffmpeg forum.
To make multiple screenshots and place them into a single image file (creating tiles), you can use FFmpeg's tile video filter, like this:
ffmpeg -ss 00:00:10 -i movie.avi -vf 'select=not(mod(n,1000)),scale=320:240,tile=2x3' out.png
That will seek 10 seconds into the movie, select every 1000th frame, scale it to 320x240 pixels and create 2x3 tiles in the output image out.png.
Original post here - http://ffmpeg.gusari.org/viewtopic.php?f=25&t=597
Also, ffmpeg seems to support "crop" with the same syntax.
– some ideas
Sep 11 '15 at 16:23
add a comment |
This is how I process a simple contact sheet using AWS EC2, from my mac.
Step #1: Create an EC2 Instance at Amazon Web Services
I used:
Amazon Linux AMI 2015.03.1 (HVM), SSD Volume Type - ami-0d4cfd66
t2.medium
Step #2: Configure the instance
This is all run from my mac for convenience, but you could also run just the commands "sudu su..." from the EC2 command line.
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; curl -O http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; gunzip ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; tar -xf ffmpeg.static.64bit.latest.tar"
Replacing 11.22.33.44 with your EC2 IP.
Step #3: Process a video
Send the video:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem pem' /Users/mdouma/Desktop/myVideo.mov ec2-user@11.22.33.44:/home/ec2-user/
Process it into a contact sheet:
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "rm -f out.png ; ./ffmpeg -ss 00:00:00 -i myVideo.mov -vf 'select=not(mod(n,1)),scale=113:111,crop=111:111,tile=18x36' out.png"
Change /Users/mdouma to your local root
Change the ",1" to some other number, e.g., ",7", if you only want every 7th frame.
Change 111 to whatever size you want
Copy it back to my mac:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem' ec2-user@11.22.33.44:/home/ec2-user/out.png /Users/mdouma/Desktop/out.png
open /Users/mdouma/Desktop/out.png
This is a great tip. Note though thatsudo su
is aimless.
– Ken Sharp
Mar 8 '16 at 3:26
1
Why are you sending this to ec2? Why not just run it on your mac locally? the video files could be GBs large...
– haventchecked
Nov 28 '17 at 2:50
add a comment |
The 'imagemagick' package has utilities for stuff like this.
http://www.imagemagick.org/Usage/thumbnails/
There are API libraries using imagemajick for a bunch of languages too.
What would be the corresponding command?
– student
Feb 5 '13 at 11:50
convert
is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to.
– goldilocks
Feb 5 '13 at 14:20
add a comment |
Totem - the default video player for 14.04 and some earlier versions of Ubuntu - has menu option with simple options (under Edit menu, "Create Screenshot Gallery..."). There's also a command-line equivalent(ish) called "totem-video-thumbnailer" which has a man page that tells you how to use it; I wrote a simple bash script that used output from the find command (taking care to not separate files with spaces in names) to auto-generate a thumbnail screenshot gallery (or contact-sheet as also referred to above) for any files above a certain size in a directory that didn't already have one.
I could upload it to my github under ~jgbreezer if anyone fancied hunting for it.
Though solutions using ffmpeg and other things may be more flexible and reliable; I seem to get error outputs from the totem command about not finding certain frames but it seems to work anyway most of the time.
add a comment |
I wanted the same thing and googling ended up using ffmpeg and imagemagick. NOT 'fast' IMHO. Then found a bash script named SlickSlice (last updated 2008 but worked perfectly as of yesterday). Installed it and customized it to my liking using the configuration file and the script itself. The script uses ImageMagick and MPlayer by the way.
I made a detail how-to and customization after I successfully used it.
Once installed successfully, you can generate video timeline thumbnail with as simple as command: slickslice -x "InputFile.mp4"
(default 4 column x 15 rows) or slickslice -x "InputFile.mp4" -S 6x10
(for 6 column x 10 rows).
It outputs as SLICKSLICED_InputFile.mp4.jpeg
and I customized it to produce InputFile.mp4-screen.jpeg
by editing the bash script itself.
Hope this helps.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f63769%2ffast-tool-to-generate-thumbnail-video-galleries-for-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
Pull out the image captures (these are 100 pixels tall, and keep aspect ratio), the rate (-r
) is per-second (this yields one frame every ~5 minutes), this also adds time stamp to output image.
ffmpeg -i MOVIE.mp4 -r 0.0033 -vf scale=-1:120 -vcodec png capture-%002d.png
Then use ImageMagick
to build your gallery image:
montage -title "Movie NamenSubtitle" -geometry +4+4 capture*.png output.png
5
You can use fractions for the rate (-r
). This makes it easier and more accurate to specify times. 5min = 300 secondsffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png
.
– DutGRIFF
May 13 '14 at 18:28
avconv
works in the same way, in case you don't haveffmpeg
available (some Ubuntu releases).
– Ken Sharp
Mar 8 '16 at 3:25
1
This works, but requires plumbing through the entire video file. superuser.com/questions/538112/… provides some examples which attempt to find meaningful thumbnails, as well as avoid having to sit and process the entire video to get a few frames.
– Skrylar
May 21 '16 at 12:01
This does not add the timestamp to the image.
– felwithe
Aug 2 '17 at 23:08
How would you do this in batch for a bunch of videos in a directory?
– Paul Jones
Feb 7 at 21:02
add a comment |
Pull out the image captures (these are 100 pixels tall, and keep aspect ratio), the rate (-r
) is per-second (this yields one frame every ~5 minutes), this also adds time stamp to output image.
ffmpeg -i MOVIE.mp4 -r 0.0033 -vf scale=-1:120 -vcodec png capture-%002d.png
Then use ImageMagick
to build your gallery image:
montage -title "Movie NamenSubtitle" -geometry +4+4 capture*.png output.png
5
You can use fractions for the rate (-r
). This makes it easier and more accurate to specify times. 5min = 300 secondsffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png
.
– DutGRIFF
May 13 '14 at 18:28
avconv
works in the same way, in case you don't haveffmpeg
available (some Ubuntu releases).
– Ken Sharp
Mar 8 '16 at 3:25
1
This works, but requires plumbing through the entire video file. superuser.com/questions/538112/… provides some examples which attempt to find meaningful thumbnails, as well as avoid having to sit and process the entire video to get a few frames.
– Skrylar
May 21 '16 at 12:01
This does not add the timestamp to the image.
– felwithe
Aug 2 '17 at 23:08
How would you do this in batch for a bunch of videos in a directory?
– Paul Jones
Feb 7 at 21:02
add a comment |
Pull out the image captures (these are 100 pixels tall, and keep aspect ratio), the rate (-r
) is per-second (this yields one frame every ~5 minutes), this also adds time stamp to output image.
ffmpeg -i MOVIE.mp4 -r 0.0033 -vf scale=-1:120 -vcodec png capture-%002d.png
Then use ImageMagick
to build your gallery image:
montage -title "Movie NamenSubtitle" -geometry +4+4 capture*.png output.png
Pull out the image captures (these are 100 pixels tall, and keep aspect ratio), the rate (-r
) is per-second (this yields one frame every ~5 minutes), this also adds time stamp to output image.
ffmpeg -i MOVIE.mp4 -r 0.0033 -vf scale=-1:120 -vcodec png capture-%002d.png
Then use ImageMagick
to build your gallery image:
montage -title "Movie NamenSubtitle" -geometry +4+4 capture*.png output.png
answered Feb 5 '13 at 16:53
utopiaboundutopiabound
2,6811518
2,6811518
5
You can use fractions for the rate (-r
). This makes it easier and more accurate to specify times. 5min = 300 secondsffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png
.
– DutGRIFF
May 13 '14 at 18:28
avconv
works in the same way, in case you don't haveffmpeg
available (some Ubuntu releases).
– Ken Sharp
Mar 8 '16 at 3:25
1
This works, but requires plumbing through the entire video file. superuser.com/questions/538112/… provides some examples which attempt to find meaningful thumbnails, as well as avoid having to sit and process the entire video to get a few frames.
– Skrylar
May 21 '16 at 12:01
This does not add the timestamp to the image.
– felwithe
Aug 2 '17 at 23:08
How would you do this in batch for a bunch of videos in a directory?
– Paul Jones
Feb 7 at 21:02
add a comment |
5
You can use fractions for the rate (-r
). This makes it easier and more accurate to specify times. 5min = 300 secondsffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png
.
– DutGRIFF
May 13 '14 at 18:28
avconv
works in the same way, in case you don't haveffmpeg
available (some Ubuntu releases).
– Ken Sharp
Mar 8 '16 at 3:25
1
This works, but requires plumbing through the entire video file. superuser.com/questions/538112/… provides some examples which attempt to find meaningful thumbnails, as well as avoid having to sit and process the entire video to get a few frames.
– Skrylar
May 21 '16 at 12:01
This does not add the timestamp to the image.
– felwithe
Aug 2 '17 at 23:08
How would you do this in batch for a bunch of videos in a directory?
– Paul Jones
Feb 7 at 21:02
5
5
You can use fractions for the rate (
-r
). This makes it easier and more accurate to specify times. 5min = 300 seconds ffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png
.– DutGRIFF
May 13 '14 at 18:28
You can use fractions for the rate (
-r
). This makes it easier and more accurate to specify times. 5min = 300 seconds ffmpeg -i MOVIE.mp4 -r 1/300 -vf scale=-1:120 -vcodec png capture-%02d.png
.– DutGRIFF
May 13 '14 at 18:28
avconv
works in the same way, in case you don't have ffmpeg
available (some Ubuntu releases).– Ken Sharp
Mar 8 '16 at 3:25
avconv
works in the same way, in case you don't have ffmpeg
available (some Ubuntu releases).– Ken Sharp
Mar 8 '16 at 3:25
1
1
This works, but requires plumbing through the entire video file. superuser.com/questions/538112/… provides some examples which attempt to find meaningful thumbnails, as well as avoid having to sit and process the entire video to get a few frames.
– Skrylar
May 21 '16 at 12:01
This works, but requires plumbing through the entire video file. superuser.com/questions/538112/… provides some examples which attempt to find meaningful thumbnails, as well as avoid having to sit and process the entire video to get a few frames.
– Skrylar
May 21 '16 at 12:01
This does not add the timestamp to the image.
– felwithe
Aug 2 '17 at 23:08
This does not add the timestamp to the image.
– felwithe
Aug 2 '17 at 23:08
How would you do this in batch for a bunch of videos in a directory?
– Paul Jones
Feb 7 at 21:02
How would you do this in batch for a bunch of videos in a directory?
– Paul Jones
Feb 7 at 21:02
add a comment |
I like using an easy to use unix command line bash script called VCS - Video Contact Sheet. Their official page: http://p.outlyer.net/vcs/
Its a lot easier to use even easier than a GUI
''It is a bash script meant to create video contact sheets (previews) aka thumbnails or previews of videos. Any video supported by mplayer and ffmpeg can be used by this script. ''
You will need to have either ffmpeg
or mplayer
installed on your system.
Usage:
vcs input-filename -U0 -i 1m -c 3 -H 200 -a 300/200 -o save-filename.jpg
How the command works
Edit input-filname to the name of your video file!
-U0
(no name in footer - or else it displays the host name - note this is zero not the letterO
)-i 1m
(sets the capture time interval in mins - in this case it's every minute - you could also use-n
instead which sets the number of captures for example-n 21
will create 21 images, but don't use both)-c
sets number of columns (here it's 3 columns)-H 200 -a 300/200
(sets size and aspect so file is not too big - seems you have to do both)-o filename.jpg
(use.jpg
as the default as.png
is too big - and change the filename to one of your choice !)
add a comment |
I like using an easy to use unix command line bash script called VCS - Video Contact Sheet. Their official page: http://p.outlyer.net/vcs/
Its a lot easier to use even easier than a GUI
''It is a bash script meant to create video contact sheets (previews) aka thumbnails or previews of videos. Any video supported by mplayer and ffmpeg can be used by this script. ''
You will need to have either ffmpeg
or mplayer
installed on your system.
Usage:
vcs input-filename -U0 -i 1m -c 3 -H 200 -a 300/200 -o save-filename.jpg
How the command works
Edit input-filname to the name of your video file!
-U0
(no name in footer - or else it displays the host name - note this is zero not the letterO
)-i 1m
(sets the capture time interval in mins - in this case it's every minute - you could also use-n
instead which sets the number of captures for example-n 21
will create 21 images, but don't use both)-c
sets number of columns (here it's 3 columns)-H 200 -a 300/200
(sets size and aspect so file is not too big - seems you have to do both)-o filename.jpg
(use.jpg
as the default as.png
is too big - and change the filename to one of your choice !)
add a comment |
I like using an easy to use unix command line bash script called VCS - Video Contact Sheet. Their official page: http://p.outlyer.net/vcs/
Its a lot easier to use even easier than a GUI
''It is a bash script meant to create video contact sheets (previews) aka thumbnails or previews of videos. Any video supported by mplayer and ffmpeg can be used by this script. ''
You will need to have either ffmpeg
or mplayer
installed on your system.
Usage:
vcs input-filename -U0 -i 1m -c 3 -H 200 -a 300/200 -o save-filename.jpg
How the command works
Edit input-filname to the name of your video file!
-U0
(no name in footer - or else it displays the host name - note this is zero not the letterO
)-i 1m
(sets the capture time interval in mins - in this case it's every minute - you could also use-n
instead which sets the number of captures for example-n 21
will create 21 images, but don't use both)-c
sets number of columns (here it's 3 columns)-H 200 -a 300/200
(sets size and aspect so file is not too big - seems you have to do both)-o filename.jpg
(use.jpg
as the default as.png
is too big - and change the filename to one of your choice !)
I like using an easy to use unix command line bash script called VCS - Video Contact Sheet. Their official page: http://p.outlyer.net/vcs/
Its a lot easier to use even easier than a GUI
''It is a bash script meant to create video contact sheets (previews) aka thumbnails or previews of videos. Any video supported by mplayer and ffmpeg can be used by this script. ''
You will need to have either ffmpeg
or mplayer
installed on your system.
Usage:
vcs input-filename -U0 -i 1m -c 3 -H 200 -a 300/200 -o save-filename.jpg
How the command works
Edit input-filname to the name of your video file!
-U0
(no name in footer - or else it displays the host name - note this is zero not the letterO
)-i 1m
(sets the capture time interval in mins - in this case it's every minute - you could also use-n
instead which sets the number of captures for example-n 21
will create 21 images, but don't use both)-c
sets number of columns (here it's 3 columns)-H 200 -a 300/200
(sets size and aspect so file is not too big - seems you have to do both)-o filename.jpg
(use.jpg
as the default as.png
is too big - and change the filename to one of your choice !)
edited Dec 16 '14 at 23:59
jasonwryan
50.1k14134189
50.1k14134189
answered Dec 16 '14 at 23:42
Code FalasiCode Falasi
9111
9111
add a comment |
add a comment |
This one seems to fit the bill, it's free and open source and even works on Windows :)
It even has advanced stuff, like instead of blindly picking any frame at the particular interval, it can pick ones that are close enough but don't look too blurry, so instead of doing this:
You can pass it a parameter (-D6
) so it does this:
Plus I really like no borders, so that the images can be slightly bigger.
add a comment |
This one seems to fit the bill, it's free and open source and even works on Windows :)
It even has advanced stuff, like instead of blindly picking any frame at the particular interval, it can pick ones that are close enough but don't look too blurry, so instead of doing this:
You can pass it a parameter (-D6
) so it does this:
Plus I really like no borders, so that the images can be slightly bigger.
add a comment |
This one seems to fit the bill, it's free and open source and even works on Windows :)
It even has advanced stuff, like instead of blindly picking any frame at the particular interval, it can pick ones that are close enough but don't look too blurry, so instead of doing this:
You can pass it a parameter (-D6
) so it does this:
Plus I really like no borders, so that the images can be slightly bigger.
This one seems to fit the bill, it's free and open source and even works on Windows :)
It even has advanced stuff, like instead of blindly picking any frame at the particular interval, it can pick ones that are close enough but don't look too blurry, so instead of doing this:
You can pass it a parameter (-D6
) so it does this:
Plus I really like no borders, so that the images can be slightly bigger.
edited Oct 13 '14 at 9:27
answered Oct 13 '14 at 9:21
Camilo MartinCamilo Martin
39649
39649
add a comment |
add a comment |
There is a solution from ffmpeg forum.
To make multiple screenshots and place them into a single image file (creating tiles), you can use FFmpeg's tile video filter, like this:
ffmpeg -ss 00:00:10 -i movie.avi -vf 'select=not(mod(n,1000)),scale=320:240,tile=2x3' out.png
That will seek 10 seconds into the movie, select every 1000th frame, scale it to 320x240 pixels and create 2x3 tiles in the output image out.png.
Original post here - http://ffmpeg.gusari.org/viewtopic.php?f=25&t=597
Also, ffmpeg seems to support "crop" with the same syntax.
– some ideas
Sep 11 '15 at 16:23
add a comment |
There is a solution from ffmpeg forum.
To make multiple screenshots and place them into a single image file (creating tiles), you can use FFmpeg's tile video filter, like this:
ffmpeg -ss 00:00:10 -i movie.avi -vf 'select=not(mod(n,1000)),scale=320:240,tile=2x3' out.png
That will seek 10 seconds into the movie, select every 1000th frame, scale it to 320x240 pixels and create 2x3 tiles in the output image out.png.
Original post here - http://ffmpeg.gusari.org/viewtopic.php?f=25&t=597
Also, ffmpeg seems to support "crop" with the same syntax.
– some ideas
Sep 11 '15 at 16:23
add a comment |
There is a solution from ffmpeg forum.
To make multiple screenshots and place them into a single image file (creating tiles), you can use FFmpeg's tile video filter, like this:
ffmpeg -ss 00:00:10 -i movie.avi -vf 'select=not(mod(n,1000)),scale=320:240,tile=2x3' out.png
That will seek 10 seconds into the movie, select every 1000th frame, scale it to 320x240 pixels and create 2x3 tiles in the output image out.png.
Original post here - http://ffmpeg.gusari.org/viewtopic.php?f=25&t=597
There is a solution from ffmpeg forum.
To make multiple screenshots and place them into a single image file (creating tiles), you can use FFmpeg's tile video filter, like this:
ffmpeg -ss 00:00:10 -i movie.avi -vf 'select=not(mod(n,1000)),scale=320:240,tile=2x3' out.png
That will seek 10 seconds into the movie, select every 1000th frame, scale it to 320x240 pixels and create 2x3 tiles in the output image out.png.
Original post here - http://ffmpeg.gusari.org/viewtopic.php?f=25&t=597
answered Feb 16 '15 at 8:15
Maxim KruglovMaxim Kruglov
411
411
Also, ffmpeg seems to support "crop" with the same syntax.
– some ideas
Sep 11 '15 at 16:23
add a comment |
Also, ffmpeg seems to support "crop" with the same syntax.
– some ideas
Sep 11 '15 at 16:23
Also, ffmpeg seems to support "crop" with the same syntax.
– some ideas
Sep 11 '15 at 16:23
Also, ffmpeg seems to support "crop" with the same syntax.
– some ideas
Sep 11 '15 at 16:23
add a comment |
This is how I process a simple contact sheet using AWS EC2, from my mac.
Step #1: Create an EC2 Instance at Amazon Web Services
I used:
Amazon Linux AMI 2015.03.1 (HVM), SSD Volume Type - ami-0d4cfd66
t2.medium
Step #2: Configure the instance
This is all run from my mac for convenience, but you could also run just the commands "sudu su..." from the EC2 command line.
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; curl -O http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; gunzip ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; tar -xf ffmpeg.static.64bit.latest.tar"
Replacing 11.22.33.44 with your EC2 IP.
Step #3: Process a video
Send the video:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem pem' /Users/mdouma/Desktop/myVideo.mov ec2-user@11.22.33.44:/home/ec2-user/
Process it into a contact sheet:
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "rm -f out.png ; ./ffmpeg -ss 00:00:00 -i myVideo.mov -vf 'select=not(mod(n,1)),scale=113:111,crop=111:111,tile=18x36' out.png"
Change /Users/mdouma to your local root
Change the ",1" to some other number, e.g., ",7", if you only want every 7th frame.
Change 111 to whatever size you want
Copy it back to my mac:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem' ec2-user@11.22.33.44:/home/ec2-user/out.png /Users/mdouma/Desktop/out.png
open /Users/mdouma/Desktop/out.png
This is a great tip. Note though thatsudo su
is aimless.
– Ken Sharp
Mar 8 '16 at 3:26
1
Why are you sending this to ec2? Why not just run it on your mac locally? the video files could be GBs large...
– haventchecked
Nov 28 '17 at 2:50
add a comment |
This is how I process a simple contact sheet using AWS EC2, from my mac.
Step #1: Create an EC2 Instance at Amazon Web Services
I used:
Amazon Linux AMI 2015.03.1 (HVM), SSD Volume Type - ami-0d4cfd66
t2.medium
Step #2: Configure the instance
This is all run from my mac for convenience, but you could also run just the commands "sudu su..." from the EC2 command line.
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; curl -O http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; gunzip ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; tar -xf ffmpeg.static.64bit.latest.tar"
Replacing 11.22.33.44 with your EC2 IP.
Step #3: Process a video
Send the video:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem pem' /Users/mdouma/Desktop/myVideo.mov ec2-user@11.22.33.44:/home/ec2-user/
Process it into a contact sheet:
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "rm -f out.png ; ./ffmpeg -ss 00:00:00 -i myVideo.mov -vf 'select=not(mod(n,1)),scale=113:111,crop=111:111,tile=18x36' out.png"
Change /Users/mdouma to your local root
Change the ",1" to some other number, e.g., ",7", if you only want every 7th frame.
Change 111 to whatever size you want
Copy it back to my mac:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem' ec2-user@11.22.33.44:/home/ec2-user/out.png /Users/mdouma/Desktop/out.png
open /Users/mdouma/Desktop/out.png
This is a great tip. Note though thatsudo su
is aimless.
– Ken Sharp
Mar 8 '16 at 3:26
1
Why are you sending this to ec2? Why not just run it on your mac locally? the video files could be GBs large...
– haventchecked
Nov 28 '17 at 2:50
add a comment |
This is how I process a simple contact sheet using AWS EC2, from my mac.
Step #1: Create an EC2 Instance at Amazon Web Services
I used:
Amazon Linux AMI 2015.03.1 (HVM), SSD Volume Type - ami-0d4cfd66
t2.medium
Step #2: Configure the instance
This is all run from my mac for convenience, but you could also run just the commands "sudu su..." from the EC2 command line.
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; curl -O http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; gunzip ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; tar -xf ffmpeg.static.64bit.latest.tar"
Replacing 11.22.33.44 with your EC2 IP.
Step #3: Process a video
Send the video:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem pem' /Users/mdouma/Desktop/myVideo.mov ec2-user@11.22.33.44:/home/ec2-user/
Process it into a contact sheet:
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "rm -f out.png ; ./ffmpeg -ss 00:00:00 -i myVideo.mov -vf 'select=not(mod(n,1)),scale=113:111,crop=111:111,tile=18x36' out.png"
Change /Users/mdouma to your local root
Change the ",1" to some other number, e.g., ",7", if you only want every 7th frame.
Change 111 to whatever size you want
Copy it back to my mac:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem' ec2-user@11.22.33.44:/home/ec2-user/out.png /Users/mdouma/Desktop/out.png
open /Users/mdouma/Desktop/out.png
This is how I process a simple contact sheet using AWS EC2, from my mac.
Step #1: Create an EC2 Instance at Amazon Web Services
I used:
Amazon Linux AMI 2015.03.1 (HVM), SSD Volume Type - ami-0d4cfd66
t2.medium
Step #2: Configure the instance
This is all run from my mac for convenience, but you could also run just the commands "sudu su..." from the EC2 command line.
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; curl -O http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; gunzip ffmpeg.static.64bit.latest.tar.gz"
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "sudo su root; tar -xf ffmpeg.static.64bit.latest.tar"
Replacing 11.22.33.44 with your EC2 IP.
Step #3: Process a video
Send the video:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem pem' /Users/mdouma/Desktop/myVideo.mov ec2-user@11.22.33.44:/home/ec2-user/
Process it into a contact sheet:
ssh -i "/local/path/to/key/your_ec2_key.pem" ec2-user@11.22.33.44 "rm -f out.png ; ./ffmpeg -ss 00:00:00 -i myVideo.mov -vf 'select=not(mod(n,1)),scale=113:111,crop=111:111,tile=18x36' out.png"
Change /Users/mdouma to your local root
Change the ",1" to some other number, e.g., ",7", if you only want every 7th frame.
Change 111 to whatever size you want
Copy it back to my mac:
rsync -Pav -e 'ssh -i /local/path/to/key/your_ec2_key.pem' ec2-user@11.22.33.44:/home/ec2-user/out.png /Users/mdouma/Desktop/out.png
open /Users/mdouma/Desktop/out.png
edited Feb 7 '16 at 2:22
i336_
351317
351317
answered Sep 11 '15 at 16:33
some ideassome ideas
1313
1313
This is a great tip. Note though thatsudo su
is aimless.
– Ken Sharp
Mar 8 '16 at 3:26
1
Why are you sending this to ec2? Why not just run it on your mac locally? the video files could be GBs large...
– haventchecked
Nov 28 '17 at 2:50
add a comment |
This is a great tip. Note though thatsudo su
is aimless.
– Ken Sharp
Mar 8 '16 at 3:26
1
Why are you sending this to ec2? Why not just run it on your mac locally? the video files could be GBs large...
– haventchecked
Nov 28 '17 at 2:50
This is a great tip. Note though that
sudo su
is aimless.– Ken Sharp
Mar 8 '16 at 3:26
This is a great tip. Note though that
sudo su
is aimless.– Ken Sharp
Mar 8 '16 at 3:26
1
1
Why are you sending this to ec2? Why not just run it on your mac locally? the video files could be GBs large...
– haventchecked
Nov 28 '17 at 2:50
Why are you sending this to ec2? Why not just run it on your mac locally? the video files could be GBs large...
– haventchecked
Nov 28 '17 at 2:50
add a comment |
The 'imagemagick' package has utilities for stuff like this.
http://www.imagemagick.org/Usage/thumbnails/
There are API libraries using imagemajick for a bunch of languages too.
What would be the corresponding command?
– student
Feb 5 '13 at 11:50
convert
is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to.
– goldilocks
Feb 5 '13 at 14:20
add a comment |
The 'imagemagick' package has utilities for stuff like this.
http://www.imagemagick.org/Usage/thumbnails/
There are API libraries using imagemajick for a bunch of languages too.
What would be the corresponding command?
– student
Feb 5 '13 at 11:50
convert
is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to.
– goldilocks
Feb 5 '13 at 14:20
add a comment |
The 'imagemagick' package has utilities for stuff like this.
http://www.imagemagick.org/Usage/thumbnails/
There are API libraries using imagemajick for a bunch of languages too.
The 'imagemagick' package has utilities for stuff like this.
http://www.imagemagick.org/Usage/thumbnails/
There are API libraries using imagemajick for a bunch of languages too.
edited Feb 5 '13 at 14:22
answered Feb 5 '13 at 10:16
goldilocksgoldilocks
62.4k15152210
62.4k15152210
What would be the corresponding command?
– student
Feb 5 '13 at 11:50
convert
is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to.
– goldilocks
Feb 5 '13 at 14:20
add a comment |
What would be the corresponding command?
– student
Feb 5 '13 at 11:50
convert
is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to.
– goldilocks
Feb 5 '13 at 14:20
What would be the corresponding command?
– student
Feb 5 '13 at 11:50
What would be the corresponding command?
– student
Feb 5 '13 at 11:50
convert
is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to.– goldilocks
Feb 5 '13 at 14:20
convert
is probably the most general one. Look at the section headed General Thumbnail Creation on the first page I linked to.– goldilocks
Feb 5 '13 at 14:20
add a comment |
Totem - the default video player for 14.04 and some earlier versions of Ubuntu - has menu option with simple options (under Edit menu, "Create Screenshot Gallery..."). There's also a command-line equivalent(ish) called "totem-video-thumbnailer" which has a man page that tells you how to use it; I wrote a simple bash script that used output from the find command (taking care to not separate files with spaces in names) to auto-generate a thumbnail screenshot gallery (or contact-sheet as also referred to above) for any files above a certain size in a directory that didn't already have one.
I could upload it to my github under ~jgbreezer if anyone fancied hunting for it.
Though solutions using ffmpeg and other things may be more flexible and reliable; I seem to get error outputs from the totem command about not finding certain frames but it seems to work anyway most of the time.
add a comment |
Totem - the default video player for 14.04 and some earlier versions of Ubuntu - has menu option with simple options (under Edit menu, "Create Screenshot Gallery..."). There's also a command-line equivalent(ish) called "totem-video-thumbnailer" which has a man page that tells you how to use it; I wrote a simple bash script that used output from the find command (taking care to not separate files with spaces in names) to auto-generate a thumbnail screenshot gallery (or contact-sheet as also referred to above) for any files above a certain size in a directory that didn't already have one.
I could upload it to my github under ~jgbreezer if anyone fancied hunting for it.
Though solutions using ffmpeg and other things may be more flexible and reliable; I seem to get error outputs from the totem command about not finding certain frames but it seems to work anyway most of the time.
add a comment |
Totem - the default video player for 14.04 and some earlier versions of Ubuntu - has menu option with simple options (under Edit menu, "Create Screenshot Gallery..."). There's also a command-line equivalent(ish) called "totem-video-thumbnailer" which has a man page that tells you how to use it; I wrote a simple bash script that used output from the find command (taking care to not separate files with spaces in names) to auto-generate a thumbnail screenshot gallery (or contact-sheet as also referred to above) for any files above a certain size in a directory that didn't already have one.
I could upload it to my github under ~jgbreezer if anyone fancied hunting for it.
Though solutions using ffmpeg and other things may be more flexible and reliable; I seem to get error outputs from the totem command about not finding certain frames but it seems to work anyway most of the time.
Totem - the default video player for 14.04 and some earlier versions of Ubuntu - has menu option with simple options (under Edit menu, "Create Screenshot Gallery..."). There's also a command-line equivalent(ish) called "totem-video-thumbnailer" which has a man page that tells you how to use it; I wrote a simple bash script that used output from the find command (taking care to not separate files with spaces in names) to auto-generate a thumbnail screenshot gallery (or contact-sheet as also referred to above) for any files above a certain size in a directory that didn't already have one.
I could upload it to my github under ~jgbreezer if anyone fancied hunting for it.
Though solutions using ffmpeg and other things may be more flexible and reliable; I seem to get error outputs from the totem command about not finding certain frames but it seems to work anyway most of the time.
answered May 10 '15 at 22:31
BreezerBreezer
313
313
add a comment |
add a comment |
I wanted the same thing and googling ended up using ffmpeg and imagemagick. NOT 'fast' IMHO. Then found a bash script named SlickSlice (last updated 2008 but worked perfectly as of yesterday). Installed it and customized it to my liking using the configuration file and the script itself. The script uses ImageMagick and MPlayer by the way.
I made a detail how-to and customization after I successfully used it.
Once installed successfully, you can generate video timeline thumbnail with as simple as command: slickslice -x "InputFile.mp4"
(default 4 column x 15 rows) or slickslice -x "InputFile.mp4" -S 6x10
(for 6 column x 10 rows).
It outputs as SLICKSLICED_InputFile.mp4.jpeg
and I customized it to produce InputFile.mp4-screen.jpeg
by editing the bash script itself.
Hope this helps.
add a comment |
I wanted the same thing and googling ended up using ffmpeg and imagemagick. NOT 'fast' IMHO. Then found a bash script named SlickSlice (last updated 2008 but worked perfectly as of yesterday). Installed it and customized it to my liking using the configuration file and the script itself. The script uses ImageMagick and MPlayer by the way.
I made a detail how-to and customization after I successfully used it.
Once installed successfully, you can generate video timeline thumbnail with as simple as command: slickslice -x "InputFile.mp4"
(default 4 column x 15 rows) or slickslice -x "InputFile.mp4" -S 6x10
(for 6 column x 10 rows).
It outputs as SLICKSLICED_InputFile.mp4.jpeg
and I customized it to produce InputFile.mp4-screen.jpeg
by editing the bash script itself.
Hope this helps.
add a comment |
I wanted the same thing and googling ended up using ffmpeg and imagemagick. NOT 'fast' IMHO. Then found a bash script named SlickSlice (last updated 2008 but worked perfectly as of yesterday). Installed it and customized it to my liking using the configuration file and the script itself. The script uses ImageMagick and MPlayer by the way.
I made a detail how-to and customization after I successfully used it.
Once installed successfully, you can generate video timeline thumbnail with as simple as command: slickslice -x "InputFile.mp4"
(default 4 column x 15 rows) or slickslice -x "InputFile.mp4" -S 6x10
(for 6 column x 10 rows).
It outputs as SLICKSLICED_InputFile.mp4.jpeg
and I customized it to produce InputFile.mp4-screen.jpeg
by editing the bash script itself.
Hope this helps.
I wanted the same thing and googling ended up using ffmpeg and imagemagick. NOT 'fast' IMHO. Then found a bash script named SlickSlice (last updated 2008 but worked perfectly as of yesterday). Installed it and customized it to my liking using the configuration file and the script itself. The script uses ImageMagick and MPlayer by the way.
I made a detail how-to and customization after I successfully used it.
Once installed successfully, you can generate video timeline thumbnail with as simple as command: slickslice -x "InputFile.mp4"
(default 4 column x 15 rows) or slickslice -x "InputFile.mp4" -S 6x10
(for 6 column x 10 rows).
It outputs as SLICKSLICED_InputFile.mp4.jpeg
and I customized it to produce InputFile.mp4-screen.jpeg
by editing the bash script itself.
Hope this helps.
answered Mar 31 '17 at 23:12
Saidul HassanSaidul Hassan
163
163
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f63769%2ffast-tool-to-generate-thumbnail-video-galleries-for-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown