javascript - PhantomJs | FFMPEG Audio from website -
i have following phantom
script:
var page = require('webpage').create(); page.viewportsize = { width: 640, height: 480 }; page.open('http://ads-e-bauerse-fm-05-gos2.sharp-stream.com/popfm_dk_mp3', function () { settimeout(function() { // initial frame var frame = 0; // add interval every second setinterval(function() { frame++; if(frame > 10) { phantom.exit(); } }, 1); }, 666); });
now run script following command (adding ffmpeg
)
phantomjs hello.js | ffmpeg -i stereo.wav -map_channel 0.0.0 left.wav -map_channel 0.0.1 right.wav
the error is: stereo.wav: no such file or directory
now goal of operation open website listen music played on site 10 seconds add audio file in project.
my question doing wrong?
unfortunately phantomjs supports opening web pages.
i'd suggest using streamripper want do:
apt-get install streamripper -y streamripper http://ads-e-bauerse-fm-05-gos2.sharp-stream.com/popfm_dk_mp3 -l 10 -k 0 -a -a stream.mp3
where -l
rip length in seconds
Comments
Post a Comment