Skip to content

Funimation subtitle mux failing again #2987

@orbitalflower

Description

@orbitalflower

Plugin Issue

  • This is a plugin issue and I have read the contribution guidelines.

Description

I am attempting to view with Japanese audio and English subtitles, using streamlink 1.4.1 on Ubuntu 20.04 with VLC 3.0.9.2.

With --funimation-mux-subtitles and --ffmpeg-audio-transcode aac (the latter required, as per #2615), VLC fails to recognize the format of the embedded subtitles. However, the debug output shows available vtt and srt sub files which, if downloaded separately, work fine in VLC.

Reproduction steps / Explicit stream URLs to test

  1. Install streamlink 1.4.1 on Ubuntu 20.04.
  2. Attempt to view an episode using Japanese audio and English subtitles as follows (you will need to supply your own --http-cookie variables): streamlink --locale en_US -l debug --ffmpeg-audio-transcode aac --ffmpeg-verbose --funimation-mux-subtitles --funimation-language ja --http-cookie "incap_ses_979_998813=#####" --http-cookie "visid_incap_998813=######" "https://www.funimation.com/shows/dragon-ball-super/the-peace-reward-who-will-get-the-100-million-zeni/?qid=ae3f56434b70cdc4" best
  3. The episode plays correctly, but no subtitles are displayed. VLC gives an error, claiming that it does not recognize the codec. Viewing codec information shows that the subtitle track is not recognized.
  4. Download the .vtt or .srt subtitle tracks listed in the debug outfit, and add them to the running video. Observe that they function correctly, meaning that it's not a symptom of an inability to use these formats in the current version of VLC.
  5. Run ffmpeg -i filename.vtt filename.ass (where "filename" is the name of the .vtt sub file you downloaded) and add it to the running video. Observe that it too functions correctly, meaning that it's neither a symptom of ffmpeg's inability to convert webvtt to ssa, nor VLC's inability to play ssa.

Log output

[cli][debug] OS:         Linux-5.4.0-31-generic-x86_64-with-glibc2.29
[cli][debug] Python:     3.8.2
[cli][debug] Streamlink: 1.4.1
[cli][debug] Requests(2.22.0), Socks(1.6.7), Websocket(0.53.0)
[cli][info] Found matching plugin funimationnow for URL https://www.funimation.com/shows/dragon-ball-super/the-peace-reward-who-will-get-the-100-million-zeni/?qid=ae3f56434b70cdc4
[cli][debug] Plugin specific arguments:
[cli][debug]  --funimation-language=ja (language)
[cli][debug]  --funimation-mux-subtitles=True (mux_subtitles)
[plugin.funimationnow][debug] Found experience ID: 537564
[plugin.funimationnow][debug] Requesting experience data: https://www.funimation.com/api/experience/537564/
[plugin.funimationnow][debug] Making request to https://www.funimation.com/api/experience/537564/
[plugin.funimationnow][debug] Found episode: The Peace Reward - Who Will Get the 100 Million Zeni?
[plugin.funimationnow][debug]   has languages: japanese, english
[plugin.funimationnow][debug]   requested language: japanese
[plugin.funimationnow][debug]   current language:   english
[plugin.funimationnow][debug] switching language to: japanese
[plugin.funimationnow][debug] Requesting experience data: https://www.funimation.com/api/experience/183047/
[plugin.funimationnow][debug] Making request to https://www.funimation.com/api/experience/183047/
[plugin.funimationnow][debug] New experience ID: 183047
[plugin.funimationnow][debug] Subtitles: https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/1562711/Japanese/1562711_Japanese_94762093-ec55-e711-8175-020165574d09.vtt
[plugin.funimationnow][debug] Subtitles: https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/1562711/Japanese/1562711_Japanese_97762093-ec55-e711-8175-020165574d09.dfxp
[plugin.funimationnow][debug] Subtitles: https://d132fumi6di1wa.cloudfront.net/FunimationStoreFront/1562711/Japanese/1562711_Japanese_98762093-ec55-e711-8175-020165574d09.srt
[plugin.funimationnow][debug] Making request to https://www.funimation.com/api/showexperience/183047/
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: 234p_alt2 (worst), 234p_alt, 234p, 270p_alt2, 270p_alt, 270p, 360p_alt2, 360p_alt, 360p, 480p, 540p_alt2, 540p_alt, 540p, 720p_alt2, 720p_alt, 720p, 810p_alt2, 810p_alt, 810p, 1080p_alt2, 1080p_alt, 1080p (best)
[cli][info] Opening stream: 1080p (muxed-stream)
[stream.ffmpegmux][debug] Opening hls substream
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Segments in this playlist are encrypted
[stream.hls][debug] First Sequence: 0; Last Sequence: 175
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 0; End Sequence: 175
[stream.hls][debug] Adding segment 0 to queue
[stream.ffmpegmux][debug] Opening http substream
[stream.hls][debug] Adding segment 1 to queue
[stream.hls][debug] Adding segment 2 to queue
[stream.hls][debug] Adding segment 3 to queue
[stream.hls][debug] Adding segment 4 to queue
[stream.hls][debug] Adding segment 5 to queue
[stream.hls][debug] Adding segment 6 to queue
[stream.hls][debug] Adding segment 7 to queue
[stream.hls][debug] Adding segment 8 to queue
[stream.hls][debug] Adding segment 9 to queue
[stream.hls][debug] Adding segment 10 to queue
[stream.hls][debug] Adding segment 11 to queue
[stream.hls][debug] Adding segment 12 to queue
[stream.hls][debug] Adding segment 13 to queue
[stream.hls][debug] Adding segment 14 to queue
[stream.hls][debug] Adding segment 15 to queue
[stream.hls][debug] Adding segment 16 to queue
[stream.hls][debug] Adding segment 17 to queue
[stream.hls][debug] Adding segment 18 to queue
[stream.hls][debug] Adding segment 19 to queue
[stream.hls][debug] Adding segment 20 to queue
[stream.hls][debug] Adding segment 21 to queue
[stream.ffmpegmux][debug] ffmpeg command: ffmpeg -nostats -y -i /tmp/ffmpeg-73896-33 -i /tmp/ffmpeg-73896-248 -c:v copy -c:a aac -map 0 -map 1 -metadata:s:s:0 language=eng -metadata:s:a:0 language=jpn -f matroska pipe:1
[stream.ffmpegmux][debug] Starting copy to pipe: /tmp/ffmpeg-73896-33
[stream.ffmpegmux][debug] Starting copy to pipe: /tmp/ffmpeg-73896-248
[cli][debug] Pre-buffering 8192 bytes
ffmpeg version 4.2.2-1ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-3ubuntu1)
  configuration: --prefix=/usr --extra-version=1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[stream.hls][debug] Download of segment 0 complete
[stream.hls][debug] Adding segment 22 to queue
Input #0, mpegts, from '/tmp/ffmpeg-73896-33':
  Duration: N/A, start: 1.440756, bitrate: N/A
  Program 1 
    Metadata:
      service_name    : Service
      service_provider: Hybrik
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 245 kb/s
[stream.ffmpegmux][debug] Pipe copy complete: /tmp/ffmpeg-73896-248
Input #1, webvtt, from '/tmp/ffmpeg-73896-248':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: webvtt
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
  Stream #1:0 -> #0:2 (webvtt (native) -> ass (ssa))
Press [q] to stop, [?] for help
[mpegts @ 0x55bffffa4840] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Output #0, matroska, to 'pipe:1':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn, 90k tbc
    Stream #0:1(jpn): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.54.100 aac
    Stream #0:2(eng): Subtitle: ass (ssa)
    Metadata:
      encoder         : Lavc58.54.100 ssa
[webvtt @ 0x55c00067a480] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[cli][info] Starting player: /usr/bin/vlc
[cli.output][debug] Opening subprocess: /usr/bin/vlc --input-title-format https://www.funimation.com/shows/dragon-ball-super/the-peace-reward-who-will-get-the-100-million-zeni/?qid=ae3f56434b70cdc4 -
[cli][debug] Writing stream to output
[stream.hls][debug] Download of segment 1 complete
[stream.hls][debug] Adding segment 23 to queue
[stream.hls][debug] Download of segment 2 complete
[stream.hls][debug] Adding segment 24 to queue
[stream.hls][debug] Download of segment 3 complete
[stream.hls][debug] Adding segment 25 to queue
^C[stream.ffmpegmux][debug] Closing ffmpeg thread
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[stream.ffmpegmux][debug] Closed all the substreams
[cli][info] Stream ended
[stream.hls][debug] Download of segment 4 complete
[stream.ffmpegmux][error] Pipe copy aborted: /tmp/ffmpeg-73896-33
Interrupted! Exiting...
[cli][info] Closing currently open stream...
[stream.ffmpegmux][debug] Closing ffmpeg thread
[stream.ffmpegmux][debug] Closed all the substreams
[stream.ffmpegmux][debug] Closing ffmpeg thread
[stream.ffmpegmux][debug] Closed all the substreams

Additional comments, screenshots, etc.

It appears that --funimation-mux-subtitles fails on all Funimation content I've found unless --ffmpeg-audio-transcode aac is added, as advised in #2615. Users may find this requirement unintuitive, particularly as the equivalent Crunchyroll module does not require either such parameter, but rather "just works".

Love Streamlink? Please consider supporting our collective. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions