Ce projet essai, en partant d'une IMAGESOURCE de : - appliquer des effets à l'image - la redimmensionner - changer son mode de couleur - la HAACHEER...
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2_video2d.py 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. #!/usr/bin/python
  2. # coding: utf-8
  3. # sys.popen youtube.dl
  4. '''
  5. youtube-dl $1
  6. '''
  7. # rename file
  8. '''
  9. sys.popen("mv $1 $2")
  10. '''
  11. # mosaique
  12. '''
  13. ffmpeg -i drone.mp4 -vf fps=30 ./drone/img%03d.jpg
  14. '''
  15. import sys # sys.argv[]
  16. import Image # Image.open()
  17. import os # os.getcwd
  18. '''
  19. im1 = Image.open(str(sys.argv[1]))
  20. width, height = im1.size
  21. <<<<<<< HEAD
  22. print "width =% 5.2i" % width
  23. print "height =% 5.2i" % height
  24. allongement = 8
  25. im4 = Image.new("RGBA",(im1.size[0]*allongement, im1.size[1]))
  26. =======
  27. print
  28. print "width =% 5.2i" % width
  29. print "height =% 5.2i" % height
  30. print
  31. allongement = 8
  32. im4 = Image.new("RGBA",(im1.size[0]*allongement, im1.size[1]))
  33. >>>>>>> adc56b0f751a338bfe5c843061889df049d4390b
  34. for x in range(1,allongement+1):
  35. print('%03.1i' % x)
  36. '''
  37. script = os.getcwd()
  38. print script
  39. index = 1
  40. allongement = 32 #4818
  41. im1 = Image.open("./lila/img001.jpg")
  42. im2 = Image.new("RGBA",(im1.size[0]*allongement, im1.size[1]))
  43. largeur = im1.size[0]
  44. for x in range(0,allongement):
  45. positionx = 0
  46. for y in range(1,33):
  47. z = x*allongement + y
  48. im1 = Image.open("./lila/img%03.1i.jpg" % z)
  49. im2.paste(im1, (positionx,0))
  50. positionx = positionx + largeur
  51. im2.save(script+"/"+str(x)+".2.png",'PNG', quality=100)
  52. '''
  53. # VERSION BATAILLE NAVALE
  54. for x in range(0,allongement):
  55. positionx = 0
  56. for y in range(1,6):
  57. z = x*10 + y
  58. im1 = Image.open("./capt/img%03.1i.jpg" % z)
  59. #print "z="+str(z)
  60. im2.paste(im1, (positionx,positiony))
  61. #print position
  62. #print("./drone/img%03.1i.jpg" % x)
  63. positionx = positionx + largeur
  64. #print "px"+str(positionx)
  65. positiony = positiony + hauteur
  66. #print "py"+str(positiony)
  67. #scriptpy = str(sys.argv[1])
  68. #script = scriptpy[:-3]
  69. im2.save(script+"/"+str(x)+".2.png",'PNG', quality=100)
  70. '''
  71. '''
  72. 1145 ffmpeg -i noir...png.mp4 noir...png.enscribe.norm.wav -c:a copy -c:v copy noir..HQ..mp4
  73. 1146 ffmpeg -i noir...png.mp4 -i noir...png.enscribe.norm.wav -c:a copy -c:v copy noir..HQ..mp4
  74. 1147 ffmpeg -i noir...png.mp4 -i noir...png.enscribe.norm.wav -c:a aac -c:v copy noir..HQ..mp4
  75. 1148 ffmpeg -i noir...png.mp4 -i noir...png.enscribe.norm.wav -c:a libfaac -c:v copy noir..HQ..mp4
  76. 1158 ffmpeg -i pylone3.png.mp4 -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v copy pylone3.HQ.mp4
  77. 1162 ffmpeg -i pylone3.HQ.mp4
  78. 1163 ffmpeg -i pylone3.png.mp4 -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v copy pylone3.HQ.mp4
  79. 1177 ffmpeg -i horizontal%d.png -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v libx264 -preset ultrafast -crf 32 final.mp4
  80. 1178 ffmpeg -i horizontal%d.png -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v libx264 -b:v 5000k final2.mp4
  81. 1179 ffmpeg -i horizontal%d.png -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v libx264 -vf format=gray -b:v 5000k final2.mp4
  82. 1180 ffmpeg -i horizontal%d.png -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v libx264 -vf format=gray -b:v 5000k final3.mp4
  83. 1181 ffmpeg -i horizontal%d.png -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v libx264 -pix_fmt monow final3.mp4
  84. 1182 ffmpeg -i horizontal%d.png -i pylone3.png.enscribe.norm.wav -c:a libfaac -c:v mjpeg -b:v 3000 final4.avi
  85. 1183 ffmpeg -q:v
  86. 1184 ffmpeg -q:v 0
  87. 1186 ffmpeg -pix_fmts
  88. 1265 ffmpeg -pix_fmts
  89. 1266 ffmpeg -pix_fmts | grep H
  90. 1321 history | grep ffmpeg
  91. 1323 nano ffmpeg_one_liner
  92. 1403 ffmpeg -i Ajja_Tulpa_Full_Album.webm -vn -ar 44100 -ac 2 -ab 192k -f mp3 Ajja_Tulpa_Full_Album.mp3
  93. 1404 ffmpeg -i Ajja_Tulpa_Full_Album.webm -vn -ar 44100 -ac 2 -ab 192k -acodec copy Ajja_Tulpa_Full_Album.ogg
  94. 1770 ffmpeg ffmpeg -i test0%4d.jpg -vcodec mjpeg out.avi
  95. 1771 ffmpeg -i test0%4d.jpg -vcodec mjpeg out.avi
  96. 1774 ffmpeg -i out.avi -c:v libvpx -crf 10 -b:v 2M -threads 4 out.webm
  97. 1916 ffmpeg -i drone.mp4 -vf fps=1 ./drone/img%03d.jpg
  98. 1917 ffmpeg -i drone.mp4 -vf fps=4 ./drone/img%03d.jpg
  99. 1918 ffmpeg -i drone.mp4 -vf fps=20 ./drone/img%03d.jpg
  100. 1922 ffmpeg -i drone.mp4 -vf fps=30 ./drone/img%03d.jpg
  101. 1943 ffmpeg -i drone.mp4 -vf fps=20 ./images_yatil/img%03d.jpg
  102. 1946 ffmpeg -i yatil.mkv -vf fps=1 ./images_yatil/img%03d.jpg
  103. 1952 ffmpeg -i final.mp4 -v:c h264 -a:c copy tintin.mpeg
  104. 1953 ffmpeg -i final.mp4 -v:c libvpx -a:c copy tintin.mpeg
  105. 1954 ffmpeg -i final.mp4 -v:c libvpx -a:c copy tintin.mpeg
  106. 1956 ffmpeg -i final.mp4 -c:v libvpx -crf 10 -b:v 2M -threads 4 final.webm
  107. 1958 ffmpeg -formats
  108. 1959 ffmpeg -formats | grep DE
  109. 1975 ffmpeg -i drone.mp4
  110. 2006 history | grep ffmpeg
  111. 2009 history | grep ffmpeg
  112. '''
  113. '''
  114. index = 1
  115. allongement = 300 #4818
  116. im1 = Image.open("./drone/img001.jpg")
  117. im2 = Image.new("RGBA",(im1.size[0]*allongement, im1.size[1]))
  118. largeur = im1.size[0]
  119. for x in range(0,allongement/10):
  120. position = 0
  121. for y in range(1,11):
  122. im1 = Image.open("./drone/img%03.1i.jpg" % y)
  123. im2.paste(im1, (position,0))
  124. #print position
  125. #print("./drone/img%03.1i.jpg" % x)
  126. position = position + largeur
  127. scriptpy = str(sys.argv[1])
  128. script = scriptpy[:-3]
  129. im2.save(script+"_"+str(x)+".png",'PNG', quality=100)
  130. '''