xat / castnow

commandline chromecast player
MIT License
3.81k stars 243 forks source link

transcoding testers wanted #77

Open xat opened 9 years ago

xat commented 9 years ago

As you might have read we are working on a new castnow version (v0.5) which has the goal to do smarter transcoding and enable player controls like seeking, play/pause on files while they are transcoding (besides other goals).

Smarter transcoding: There are often video files where you only need to transcode the audio stream and not the video stream to get it chromecast-compatible (often the case for .mkv files). Currently castnow always transcodes both (video and audio). Within v0.5 only the required streams should be transcoded.

Player controls: see https://github.com/xat/castnow/issues/58

I've now created a small commandline tool (for testing) which tries to archive those goals by using HTTP Live Streaming (HLS) and https://github.com/xat/chromecast-can-play. You can install it with

npm install hlscast -g

Playback of a local video file can be started like this:

hlscast ./myvideo.mkv

These player controls are availible:

space: toggle between play and pause
left: seek backward
right: seek forward

Of course ffmpeg is required for this to work.

I would love feedback how well this works for people and what problems occur.

JonathanCooper commented 9 years ago

With the current version of castnow, I need to pass --ffmpeg-ac 2 when transcoding files with 5.1 (surround) audio. For example, the following output from ffprobe:

Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)

Would it be possible to detect that and handle automatically?

Also is there an IRC channel for discussing things like this?

HLFH commented 9 years ago

@xat Thanks a lot!!! With hlscast, you can close this issue: https://github.com/xat/castnow/issues/44

I'm just playing an episode of The 100 (MKV format, AC3 audio codec...) and it's fully works!!

The full transcoding to mp4 does not seem to work well with castnow (many needed pauses to transcode) so if you only transcode the audio with hlscast, it's ok.

So you just need to add to hlscast: -all the player controls -the options --device "my chromecast", --address , --subtitles <path/URL>, --myip , --quiet, --peerflix-* , --ffmpeg-* , --type , --seek , --bypass-srt-encoding -the playback of a folder of MP3s hlscast ./mydirectory/ with options like --shuffle to play in random order. -better support for subtitles https://github.com/xat/castnow/issues/57 -a web interface https://github.com/xat/castnow/issues/29 -at the end, iOS + Android support https://github.com/facebook/react-native

xat commented 9 years ago

@JonathanCooper Sry for the late response :( AFAIK Chromecast supports 5.1 Sound in general (depending on your HIFI setup). So I guess it will be the best to let the user choose if he wants to downgrade the sound to stereo. I just opened the #castnow channel on freenode :) I'm on IRC all the time, so feel free to join me :)

@HLFH nice to hear :) For me hlscast also worked fine most times so far. But I had some cases where the video lagged when transcoding MKV audio only. Already spent some time in solving the lag-problem but didn't come up with a solution yet.

It will be the other way around, hls transcoding will likely be added to castnow. hlscast it self is just for testing the transcoding possibilities :)

omgbox commented 9 years ago

xat, look here, https://github.com/mifi/hls-vod , https://github.com/mifi/hls-vod/blob/master/hls-vod.js

works perfectly for IPhones, ipads

xat commented 9 years ago

@omgbox Nice! I'll play around with their the ffmpeg settings they use.

omgbox commented 9 years ago

It works fast due to encoding to mpeg4 not h264 part 10. Transcoding to h264 is very slow even on i7. Casting with h264 is slow. Webm unfortunately is the same as h264 very slow.

Sent from my iPhone

On 14 Apr 2015, at 06:28 pm, Simon Kusterer notifications@github.com wrote:

@omgbox Nice! I'll play around with their the ffmpeg settings they use.

— Reply to this email directly or view it on GitHub.

parshap commented 9 years ago

hlscast worked for me and successfully transcoded audio only from a h264/ac3 mkv source!

Edit: And seeking worked.

BP602 commented 9 years ago

This worked really well for me :+1:

alexandre-mbm commented 9 years ago
$ castnow --address 192.168.0.11 http://hemingway.softwarelivre.org/fisl16/high/41a/sala_41a-high-201507091402.ogv --tomp4

:+1: It works for me. Great!