:tv: Chromecast Node.js module
Hello, I've an ip cam but it deos not offer a direct access to the stream. I want to stream it on my cromecast. After research i found that it is possible to get the stream via rtsp using ffmpeg. Now i'm able to get an hsl(?) video using the following command ```ffmpeg -i rtsp://admin:[email protected]/h264_stream -fflags flush_packets -max_delay 5 -flags -global_header -hls_time 5 -hls_list_size 3 -vcodec copy -y ./static/ipcam/index.m3u8``` I prepared a function on my server code to serve the file ``` @Get('/hslVideo') hslVideo(@Response() res, @Request() req) { const headers = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'OPTIONS, POST, GET', 'Access-Control-Max-Age': 2592000, // 30 days /** add other headers as per requirement */ }; if (req.method === 'OPTIONS') { req.writeHead(204, headers); req.end(); return; } const filePath = path.resolve('static/ipcam/index.m3u8'); console.log('filePath:', filePath) readFile(filePath, function (error, content) { res.writeHead(200, { 'Access-Control-Allow-Origin': '*' }); if (error) { if (error.code == 'ENOENT') { readFile('./404.html', function (error, content) { res.end(content, 'utf-8'); }); } else { res.writeHead(500); res.end('Sorry, check with the site admin for error: ' + error.code + ' ..\n'); res.end(); } } else { res.end(content, 'utf-8'); } }); } ``` Thus i start ffmpeg command and start it on chromecast ``` device.play( { url: `http://${ipaddr}:3000/chromecast/hslVideo`, contentType: "video/H264" }, function (err) { if (err) { console.log(err); } }, ); ``` But i end up in an error that I really do not understand. Am I missing something?? I red that with this kind of file i should me able to play on the chromecast.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by GoldMyr1994 and has received 0 comments.