-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playback controls for transcoded files #58
Comments
I'm not sure using ffmpeg's Another thought I've had is to write the output of ffmpeg to a temp file and then serve range requests against that temp file. The problem here is that you can only seek forward as far as ffmpeg has already decoded. That said, the |
Tempfile also was my initial thought on this topic. Although it's not so "cool" like an on-the-fly thing, but if it does the job, why not :) |
I just did some testing with a temp-file. To stream from that temp-file (while it is getting created) to the HTTP response I used this module: https://github.com/jasontbradshaw/tailing-stream |
Just noticed that the play/pause problem also occurs after the file is fully transcoded. |
Interesting, setting output FPS to 25 will make play/pause work the first 10 seconds. ffmpeg(input)
.videoCodec('libx264')
.format('mp4')
.fps(25)
.outputOptions([
'-movflags frag_keyframe+faststart',
'-strict experimental'
])
.pipe(output); |
I got it to work using HLS (HTTP Live Streaming). Created a proof of concept demo repo over here: https://github.com/xat/hls-chromecast-demo |
That's awesome! Are there any drawbacks to using HLS? I've been trying to experiment with the temp file approach, but haven't had much luck or time. I had an issue getting Chromecast to send range requests in response to my ff/rw commands. I disabled |
Sometimes the video lagged/stocked while transcoding it with HLS. I think I have to play around with the ffmpeg parameters. But that was the only drawback I experienced until now using HLS. options.disableSeek is a pure castnow internal option. Chromecast does not process that option. I think that we won't get seeking to work without an other approach like HLS. I also ran some tests last sunday where I just displayed the output of ffmpeg in an video-tag on my local machine. But even in that simplified case seek/pause/play didn't work properly. |
This issue is about playback controls (play/pause, seeking) for files that are transcoded "on the fly" with ffmpeg. Currently playback controls do not work due to technical limitations. This continues the conversation from xat/chromecast-scanner#2 and #45.
The text was updated successfully, but these errors were encountered: