castnow icon indicating copy to clipboard operation
castnow copied to clipboard

FR: Enable controls while conversion.

Open hemanth opened this issue 10 years ago • 6 comments

Can't pause or seek the stream with --tomp4 enabled.

hemanth avatar Nov 28 '15 15:11 hemanth

The only way to do this using FFMpeg with nodejs is to remove and recreate the ffmpeg process at the right time. FFMpeg itself does only support live streaming (meaning no pause, no seeking, etc).

artheus avatar Feb 11 '16 06:02 artheus

@hemanth I have done some testing on this matter. It seems that pause will actually work (at least for a while) when transcoding. If, and only if, you comment out the disable controls line in the transcode.js file. I am currently working a bit on this, as I think that this actually should be considered a bug.

artheus avatar Feb 26 '16 22:02 artheus

It seems ffmpeg does allow seeking after all: https://trac.ffmpeg.org/wiki/Seeking When spawning the process castnow should use the -ss parameter before -i. Also, the stream-transcoder plugin used by castnow supports it: https://www.npmjs.com/package/stream-transcoder (transcoder.custom, at the buttom)

uraid avatar Apr 26 '16 18:04 uraid

I already tried it with -ss. It does not work (can't remember the exact reasons) :( However, it will work if someone takes the code from https://github.com/xat/hls-chromecast-demo and integrates it into transcode.js. I would love to merge that PR :D

xat avatar Apr 26 '16 18:04 xat

See my pull request. It seems I got confused. This issue is about seeking while converting, my issue is seeking at the start (using --seek in castnow).

uraid avatar Apr 26 '16 18:04 uraid

I have not been playing around with this for a bit, and I have figured out that one can control the ffmpeg process using SIGSTOP and SIGCONT for pause/play like actions. I do not really know if this will be completely without draw-backs. I have not experimented enough to know that yet.

artheus avatar Apr 12 '17 20:04 artheus