Open Glavin001 opened 9 years ago
Create a video slideshow from images: https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images
This might work! http://stackoverflow.com/a/13298538/2578205
Ok I got it working. thanks to LordNeckbeard suggestion to use image2pipe. I had to use jpg encoding instead of png because image2pipe with png doesn't work on my verision of ffmpeg. The first script is essentially the same as your question's code except I implemented a simple image creation that just creates images going from black to red. I also added some code to time the execution.
parallel execution (with no images saved to disk)
import Image from subprocess import Popen, PIPE fps, duration = 24, 100 p = Popen(['ffmpeg', '-y', '-f', 'image2pipe', '-vcodec', 'mjpeg', '-r', '24', '-i', '-', '-vcodec', 'mpeg4', '-qscale', '5', '-r', '24', 'video.avi'], stdin=PIPE) for i in range(fps * duration): im = Image.new("RGB", (300, 300), (i, 1, 1)) im.save(p.stdin, 'JPEG') p.stdin.close() p.wait()
Take a read of recording a website with phantomjs and ffmpeg
: http://mindthecode.com/recording-a-website-with-phantomjs-and-ffmpeg/
Chromecast can simply run a Canvas in their app's web browser, so this entire project is useless so long as someone builds a Chromecast app. This would be useful if they did not want to build an app and instead use the builtin capabilities, such as video streaming.
LIVE
streaming: https://github.com/mafintosh/chromecasts/blob/master/index.js#L117 and https://github.com/fardog/node-chromecast-osx-audio/blob/master/lib/index.js#L61