URLからスクリーンショットを作成するphantomjsを使用してビデオストリーミングを作成しようとしているので、フレームをffmpegにパイプしますそれを使ってビデオをrtmpのURLにストリームします。ここ は、私がこれまで試したものです:ffmpeg throwing "出力ファイル#0にはストリームが含まれていません"
phantomjs runner.js | ffmpeg -f image2pipe -vcodec png -c:a copy -c:v libx264 -f flv rtmp://localhost/mystream
、ここではスクリプトです:
var page = require('webpage').create();
page.viewportSize = { width: 640, height: 480 };
page.open('http://www.goodboydigital.com/pixijs/examples/12-2/', function() {
setInterval(function() {
page.render('/dev/stdout', { format: "png" });
}, 25);
});
、これが出力されます:
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.29)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-vda
libavutil 55. 17.103/55. 17.103
libavcodec 57. 24.102/57. 24.102
libavformat 57. 25.100/57. 25.100
libavdevice 57. 0.101/57. 0.101
libavfilter 6. 31.100/6. 31.100
libavresample 3. 0. 0/3. 0. 0
libswscale 4. 0.100/4. 0.100
libswresample 2. 0.101/2. 0.101
libpostproc 54. 0.100/54. 0.100
Output #0, flv, to 'rtmp://localhost/mystream':
Output file #0 does not contain any stream
を使用(http://stackoverflow.com/questions/40325667/making-a-movie-from-the- url-using-ffmpeg-and-phantomjs) –
実際の質問は何ですか?どのような問題を解決しようとしていますか? – LordNeckbeard
@LordNeckbeard私は、URLのスクリーンショットからビデオを作成し、それをrtmpサーバーに公開したいと考えています。基本的にphantomjsはスクリーンショットを撮って「/ dev/stdout」にレンダリングするので、ffmpegでそれらを得ることができます。私は上記のコマンドを試してみたが、それは仕事をしなかった –