keredson / gnomecast

Chromecast local files from Linux - supports MKV, subtitles, 5.1 sound and 4K!
GNU General Public License v3.0
1.43k stars 50 forks source link

Error playing Movie 720p BluRay x265 ESubs.mkv #141

Open slumbergod opened 4 years ago

slumbergod commented 4 years ago

A lot of new releases have video encoded with x265 now.

When the video is loaded in gnomecast it starts re-encoding as expected but when it starts to stream there is no video, only sound. What I do not understand is whether gnomecast's re-encoding is supposed to include files encoded with x265 or not. Shouldn't ffmpeg convert the file into a format that gnomecast is able to stream on all chromecasts older than the new ultra version? Sometimes it is the same with audio...there is picture but no sound. Is this a failure of ffmpeg to correctly choose the right codecs to re-encode?

I'm not complaining. I use gnomecast everyday and in most cases it works flawlessly. I'm just struggling to understand why some files refuse to play video or sound even after the conversion process. Any thoughts?

  1. From INFO button in Gnomecast File: Movie.720p.BluRay.x265.mkv Video: Movie.720p.BluRay.x265.mkv hevc Audio: Movie.720p.BluRay.x265.mkv aac/stereo Subtitles: Movie.720p.BluRay.x265.mkv Device: Chromecast Google Inc. Chromecast: v1.9.11 FileMetadata fn:/mnt/storage/just.landed/Movie.720p.BluRay.x265.mkv, ready:True, thumbnail_fn:/tmp/gnomecast_pid2724_thumbnail_4bbut2zm.jpg, container:mkv, video_streams: StreamMetadata index:0:0, codec:hevc, title:Movie.720p.BluRay.x265.mkv , audio_streams: AudioMetadata index:0:1, codec:aac, title:Movie.720p.BluRay.x265.mkv, channels:2 , subtitles: StreamMetadata index:0:2, title:Movie.720p.BluRay.x265.mkv ffmpeg version n4.3.1 Copyright c 2000-2020 the FFmpeg developers Stream #0:0 eng : Video: hevc Main 10 , yuv420p10le tv , 1280x752 SAR 893:900 DAR 76:45 , SAR 128:129 DAR 10240:6063, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc default title : Movie.720p.BluRay.x265.mkv Stream #0:1 eng : Audio: aac LC , 48000 Hz, stereo, fltp default title : Movie.720p.BluRay.x265.mkv Stream #0:2 eng : Subtitle: subrip default forced title : Movie.720p.BluRay.x265.mkv

  2. From ffprobe ffprobe -i Movie.720p.BluRay.x265.mkv ffprobe version n4.3.1 Copyright (c) 2007-2020 the FFmpeg developers built with gcc 10.1.0 (GCC) configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3 libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Input #0, matroska,webm, from 'Movie.720p.BluRay.x265.mkv': Metadata: title : Movie.720p.BluRay.x265.mkv encoder : libebml v1.3.4 + libmatroska v1.4.5 creation_time : 2020-09-06T10:22:42.000000Z Duration: 01:27:50.38, start: 0.000000, bitrate: 1585 kb/s Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 1280x752 [SAR 893:900 DAR 76:45], SAR 128:129 DAR 10240:6063, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default) Metadata: title : Movie.720p.BluRay.x265.mkv BPS : 1454916 BPS-eng : 1454916 DURATION : 01:27:50.370000000 DURATION-eng : 01:27:50.370000000 NUMBER_OF_FRAMES: 126362 NUMBER_OF_FRAMES-eng: 126362 NUMBER_OF_BYTES : 958493792 NUMBER_OF_BYTES-eng: 958493792 _STATISTICS_WRITING_APP: mkvmerge v10.0.0 ('To Drown In You') 64bit _STATISTICS_WRITING_APP-eng: mkvmerge v10.0.0 ('To Drown In You') 64bit _STATISTICS_WRITING_DATE_UTC: 2020-09-06 10:22:42 _STATISTICS_WRITING_DATE_UTC-eng: 2020-09-06 10:22:42 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default) Metadata: title : Movie.720p.BluRay.x265.mkv BPS : 128198 BPS-eng : 128198 DURATION : 01:27:50.377000000 DURATION-eng : 01:27:50.377000000 NUMBER_OF_FRAMES: 247049 NUMBER_OF_FRAMES-eng: 247049 NUMBER_OF_BYTES : 84456721 NUMBER_OF_BYTES-eng: 84456721 _STATISTICS_WRITING_APP: mkvmerge v10.0.0 ('To Drown In You') 64bit _STATISTICS_WRITING_APP-eng: mkvmerge v10.0.0 ('To Drown In You') 64bit _STATISTICS_WRITING_DATE_UTC: 2020-09-06 10:22:42 _STATISTICS_WRITING_DATE_UTC-eng: 2020-09-06 10:22:42 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(eng): Subtitle: subrip (default) (forced) Metadata: title : Movie.720p.BluRay.x265.mkv BPS : 44 BPS-eng : 44 DURATION : 01:21:19.483000000 DURATION-eng : 01:21:19.483000000 NUMBER_OF_FRAMES: 869 NUMBER_OF_FRAMES-eng: 869 NUMBER_OF_BYTES : 27348 NUMBER_OF_BYTES-eng: 27348 _STATISTICS_WRITING_APP: mkvmerge v10.0.0 ('To Drown In You') 64bit _STATISTICS_WRITING_APP-eng: mkvmerge v10.0.0 ('To Drown In You') 64bit _STATISTICS_WRITING_DATE_UTC: 2020-09-06 10:22:42 _STATISTICS_WRITING_DATE_UTC-eng: 2020-09-06 10:22:42 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

keredson commented 4 years ago

It depends on the device. Some Chromecasts can play x265, others not. (Seems to correlate to if it supports 4k.). If it thinks it can't it's supposed to transcode back to x264 (which is slow as mud).

But it should never be playing with only sound. If it doesn't support a video format or just doesn't play at all from my experience.

slumbergod commented 4 years ago

So it could be the software logic that's failing or maybe that our older chromecast misreports itself?

Maybe a future enhancement could be to add an option to simply force x264+mp3, bypassing the software logic completely. It's not common that I encounter this problem but it is happening a lot more frequently because of so many files recently are being encoded in x265 and newer audio codecs.

I know that chromecasts can be notoriously tricky. I still haven't managed to get my firewall configured to let it through.