Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 26 May 2015, 10:14
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
The magic of commands_ Edition of Video.
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:13    Post subject:  The magic of commands_ Edition of Video.  

I’ll show you a way to treat the videos as would make any program for video processing that are out there, this way is original and invented by myself so anyone to publish it in some other site I hope to show their origin.

This video processing blocks ffmpeg command and the command nconvert, for more information about nconvert:


https://misterelectronicoes.wordpress.com/2015/02/08/command-nconvert/


Well that modify the video by commands when professionals and non-professionals for this program is simple to explain, as we will see, the combinations you can make using the commands are endless.

No professional program it may make as many combinations.

For our example we will leave a video cast by me on the coast of Gijon in Spain

https://www.youtube.com/watch?v=5AP5IwRtxyM


__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/

Last edited by mister_electronico on Sat 14 Feb 2015, 14:25; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:18    Post subject: FILTER1  

Editing video using commands

In this section I’ll show you a way to treat the videos as would make any program for video processing that are out there, this way is original and invented by myself so anyone to publish it in some other site I hope to show their origin.



Well that modify the video by commands when professionals and non-professionals for this program is simple to explain, as we will see, the combinations you can make using the commands are endless.

No professional program it may make as many combinations.

For our example we will leave a video cast by me on the coast of Gijon in Spain

From this video or any other video that we ourselves, ensure that not too large for example 20, 30 or 60 seconds.

1) create a temporary folder using:

mkdir /temp
2) We put the video call eg “video1.mov” inside this folder does not have to be in mov format, can be in ts format, mpeg, flv, avi etc ..

3) Open a terminal in the temporary directory where the video is.
There should be no other file in this folder except the video.
And execute the following command:

ffmpeg -i video.mov -qscale 0 imagen%d.jpg

We will see that many files * .jpg ie that shows all the frame containing the video images are created.

4) Then apply a filter to each of the images that were created with the nconvert command.

nconvert -out png -grey 256 -embossmore -balance 2 2 2 -autocontrast *.jpg

Create a comic-like effect and png image type is generated for each of the jpg images that had before.

5) delete all images “jpg”

rm * .jpg

6) Now we will package all png images with filter in a video for this run the following command:

ffmpeg -f image2 -i imagen%d.png -target pal-dvd -aspect 16:9 out.mpeg

out.mpeg obtain a video that contains the original video comic type

Well the resulting video is as follows.

7) Remove the images png

rm * .png

https://www.youtube.com/watch?v=ahP5ZTA66Nk




__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:29    Post subject: FILTER2  

Doing the same steps as in the previous case but shortening the explanation:

1) mkdir /temp moving video.mov to /temp

2) open terminal in temporal and type:

ffmpeg -i video.mov -qscale 0 imagen%d.jpg

3) After the terminal type from the following filter to convert images to png:

nconvert -out png -grey 256 -embossmore -grey 256 -balance 30 30 30 -gamma 3.0 -contrast 20 -hls -904 -20 100 *.jpg

4) Deleting all «jpg» images rm *.jpg

6) Packing again imagens all png by:

ffmpeg -f image2 -i imagen%d.png -target pal-dvd -aspect 16:9 final.mpeg

Deleting all «png» images rm *.jpg

Well the resulting video is as follows.

https://www.youtube.com/watch?v=XMiFFrufrPw



__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:31    Post subject: FILTER3  

more abbreviated
1) mkdir /temp video.mov a temp
2) terminal : ffmpeg -i video.mov -qscale 0 imagen%d.jpg
3) Filter: nconvert -out png -eedge 100 -eedge 100 -levels 1 30 -contrast 60 *.jpg
4) rm *.jpg
5) Terminal: ffmpeg -f image2 -i imagen%d.png -target pal-dvd -aspect 16:9 final.mpeg
6) rm *.png
7) The final video es:

https://www.youtube.com/watch?v=cVZrMnM0qcc



__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:34    Post subject: FILTER4  

1) mkdir /temp video.mov a temp
2) terminal : ffmpeg -i video.mov -qscale 0 imagen%d.jpg
3) Filter: nconvert -out png -grey 10 -eedge detect -eedge detect *.jpg
4) rm *.jpg
5) Terminal: ffmpeg -f image2 -i imagen%d.png -target pal-dvd -aspect 16:9 final.mpeg
6) rm *.png
7) The final video es:

https://www.youtube.com/watch?v=XMiFFrufrPw




__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:37    Post subject: FILTER5  

1) mkdir /temp video.mov to temp
2) terminal : ffmpeg -i video.mov -qscale 0 imagen%d.jpg
3) Filter: nconvert -out png -sepia 90 *.jpg
4) rm *.jpg
5) Terminal: ffmpeg -f image2 -i imagen%d.png -target pal-dvd -aspect 16:9 final.mpeg
6) rm *.png
7) The final video:

https://www.youtube.com/watch?v=dR1S3SwhLw8





__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:38    Post subject: FILTER6  

1) mkdir /temp video.mov to temp
2) terminal : ffmpeg -i video.mov -qscale 0 imagen%d.jpg
3) Filter: nconvert -out png -binary nodither *.jpg
4) rm *.jpg
5) Termianal: ffmpeg -f image2 -i imagen%d.png -target pal-dvd -aspect 16:9 final.mpeg
6) rm *.png


https://www.youtube.com/watch?v=6XdH_OWnGwE




__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 14:41    Post subject: FILTER7  

One of the wonders of the commands is that we can create script for command as in this case combined.

The following filter is not a filter but the application of a script for images.

We need to create a script on behalf eg “convert” and contains the following:

for F in *.jpg
do
archivo=$F

if [ $P -lt 91 ] && [ $M -eq 0 ]; then echo $F $S; nconvert -out png -mosaic $S $F; let P=$P+1; fi

if [ $P -lt 11 ] && [ $M -eq 0 ]; then let S=$S+1; let P=0; fi

if [ $S -eq 40 ] && [ $M -eq 0 ]; then let M=1 ; let P=0; let S=$S-2; fi

if [ $P -lt 91 ] && [ $M -eq 1 ]; then nconvert -out png -mosaic $S $F; let P=$P+1; fi

if [ $P -lt 11 ] && [ $M -eq 1 ]; then let S=$S-1; let P=0; fi

if [ $S -eq 1 ] && [ $M -eq 1 ]; then let M=0 ; let P=0; let S=2; fi

rm $F
done

This script basically what it does is start counting the images and apart from a certain number will increase the filter value “-mosaic” within the nconvert command:

The effect is that the image is pixelando mosaic of more to less and less to more.

I do not stay very well why not me I’ve worked hard but good effect can be seen.

To create the video do the following:

1) mkdir /temp video.mov to /temp
2) terminal : ffmpeg -i video.mov -qscale 0 imagen%d.jpg
3) Filter: Run in the same directory ./nconvert
4) Terminal: ffmpeg -f image2 -i imagen%d.png -target pal-dvd -aspect 16:9 final.mpeg
5) rm *.png
5) The final video in:


https://www.youtube.com/watch?v=0SbNrbOSMuI



__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
greengeek

Joined: 20 Jul 2010
Posts: 3073
Location: New Zealand

PostPosted: Sat 14 Feb 2015, 15:17    Post subject:  

Very clever! I especially like the embossed one. The pixelando one nearly made my eyeballs fall out - but very interesting effect! Smile
Back to top
View user's profile Send private message 
mister_electronico


Joined: 20 Jan 2008
Posts: 807
Location: Asturias_ España

PostPosted: Sat 14 Feb 2015, 15:32    Post subject:  

The effects are infinite, as combinations of nconvert command, if anyone is encouraged to make one I would like to leave him here.

greetings.




__________________________________________________________

My Blog

https://misterelectronicoes.wordpress.com/trainer-board-homemade/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0714s ][ Queries: 11 (0.0033s) ][ GZIP on ]