It is currently 13 Jul 2020, 20:14

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Mosaic Poster from video frames guide & plug-ins

Share your Python Fu Scripts/plug-ins for GIMP here
tim
GL Blogger

Mosaic Poster from video frames guide & plug-ins

Post#1 by tim » 12 Sep 2018, 22:36


This is more for my personal pursuit just a place to back up and info so I don't lose it.

Commands to extract frames, crop, then resize (adjust commands accordingly).

Command to extract frames from video(from terminal)
ffmpeg -i Video.mpg image-%05d.png

Or use the below command to control how many frames you want per second (example below produces 2 frames per second [Given by Rich2005 in post #2 below])
ffmpeg -y -r 25 -i <filename.ext> -r 2 image.%06d.jpg


Crop multiple files to the cropped folder after making cropped directory
mkdir cropped
mogrify -crop 360x360+80+0 +repage -path ./cropped *.png


Resizes after making resized directory
cd cropped
mkdir resized
mogrify -resize 100x100 -path ./resized *.png

Optional grayscale
cd resized
mkdir gray
mogrify -grayscale Average -path ./gray *.png


a_read_colors.py
will read images from a folder, figure out average color of frames and outputs to code.py (which has data.appends()) which will be read by later script. Will be available under Python-Fu>A Read Colors...
(3.14 KiB) Downloaded 29 times
a_read_colors.py
version 2. Allow color or b&w selection so that code doesn't error out reading colors when it's black and white.
(3.43 KiB) Downloaded 31 times
a_read_colors.py
version 3. When doing colors, try to read colors if fail read b&w
(3.65 KiB) Downloaded 32 times
a_generate_image.py
this will read info from code.py from the selected folder, specifying width and height. then runs on a pixelized (scaled down image) to generate the final mosaic. Will be available under Python-Fu>A Generate Image...
(5.26 KiB) Downloaded 29 times
a_generate_image.py
version 2. Random scatter while generating image so if you have a lot of one color and the matching colors are a bit off it's scattered so it's not noticable (well at least that's the goal. experimental)
(5.47 KiB) Downloaded 27 times
a_generate_image.py
version 3. Save .jpg when complete. and uses copy and paste instead of creating new layer a little faster I think.
(5.66 KiB) Downloaded 26 times
Note when running a generate image script/plug in use the same width and height as your mogrify -resize 100x100 -path ./resized *.png command because that's the size you've resized them to.

link to public domain movies (Given by animicule): https://free-classic-movies.com/
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

rich2005
GIMP Guru

Post#2 by rich2005 » 13 Sep 2018, 10:08


Your mpg video file might have a frame rate of 25 (PAL) or 29.97 (NTSC) frames per second. That is a lot of pictures and not much colour variation between adjacent images on the timeline. You can thin them down afterwards or use ffmpeg something like this

ffmpeg -y -r 25 -i <filename.ext> -r 2 image.%06d.jpg which gives about 2 frames per second. Plenty to get some variation.
0

tim
GL Blogger

Post#3 by tim » 13 Sep 2018, 15:16


thanks rich! i'lll keep that in mind to try next time.

UPDATE: your ffmpeg command is awesome I have so much control over frames. Thanks again!
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

tim
GL Blogger

Post#4 by tim » 14 Sep 2018, 21:03


What about copyrights?
Is this kind of product considered transformative enough that I could try to post these on fineartamerica and sell it or no?

I never clearly understand copyrights when it comes to using some copyrighted material.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

animicule
Script Coder

Post#5 by animicule » 14 Sep 2018, 23:01


I knew a person who made copies of copyrighted movies and sold them at truck stops, flea markets and events.
One day the polices searched his house and confiscated his computers and dvd duplicators and related materials.
It was less than a year later I moved to a different state; his property had not yet been returned and he had not yet faced trial. I never learned what the outcome was though I doubt it was good.

If I were you I would not display in public or sell online. The better your success in selling, the worse the penalty.

From Legal Zoom
Copyright law does not contain any caveat that allows unauthorized parties to make personal copies of copyrighted products. However, under the doctrine of "fair use," individuals may be permitted to make backup copies or archival copies of some materials as long as certain conditions are met. Creating a copy of a copyrighted work for your own ease of use is likely to be considered copyright infringement. But if you are making a copy so that you may use a copyrighted product in case the original is stolen, damaged or destroyed, your conduct may fall within the doctrine of fair use.

Generally, copyright infringement occurs when an unauthorized party reproduces, distributes, performs, publicly displays, or makes a derivative work from a copyrighted work without the permission of the copyright owner. Although the practice commonly occurs, making a copy of a protected work for a friend or for personal ease of access is prohibited and may subject the person making copies to personal liability. Additionally, making a personal copy of copyrighted material so that you can use it in a different manner may be prohibited under copyright law.

Within copyright law there is a doctrine of law known as fair use. Although fair use does not actually give permission to make copies of a work or otherwise use a work without consent, the doctrine provides a defense to copyright infringement. The factors considered when applying the doctrine of fair use include: the purpose and character of the use, the nature of the copyrighted work, the amount of the work used, and the effect the use has upon the market for the copyrighted work.
0

tim
GL Blogger

Post#6 by tim » 15 Sep 2018, 01:52


Thanks animicule.
I was hoping it would be transformative enough to dodge the copyrights bullet.

I guess I'll limit myself to public domain films (not too many choices though).
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

tim
GL Blogger

Post#7 by tim » 15 Sep 2018, 02:52


I am going to do one of a public domain movie/film called "The Kid" with Charlie Chaplin
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

animicule
Script Coder

Post#8 by animicule » 15 Sep 2018, 04:05


A link to the best public domain movie site I know of (some are in color in 1940's and newer)
https://free-classic-movies.com

I thought of movie trailers also because of reviewers on youtube showing trailers
and it looks like they are able to get permission from the studio's (who also have copyrights on the trailers).
Last edited by animicule on 15 Sep 2018, 04:18, edited 1 time in total.
0

tim
GL Blogger

Post#9 by tim » 15 Sep 2018, 04:14


Cool..thanks. That should keep me busy for a while.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

tim
GL Blogger

Post#10 by tim » 15 Sep 2018, 15:13


That site is awesome animicule.
IF (big IF) I ever sell any posters.
I'll turn around and donate some monies to that site.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 16 guests