fbrassin 35 Posted November 7, 2017 Author Share Posted November 7, 2017 Why not try obtaining external subtitles? I'm trying now to download all external subtitles. But i would like to have some info. Setted that i have external subtitles .srt file for a movie, how should i set my server linux and my client ATV4 to have subtitles for foreign language part of the movie taking them from external file? Is it possible? Tnx Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 7, 2017 Share Posted November 7, 2017 Unfortunately open subtitles does not have this information in their api so our downloader cannot do that. But we hope to add support for more downloaders in the future. If you are downloading the subtitles yourself, you can name the subtitles appropriately to indicate they are forced subtitles: https://github.com/MediaBrowser/Wiki/wiki/Subtitles Thanks. Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 7, 2017 Author Share Posted November 7, 2017 It seems no subtitle is forced. All subtitles i found are complite subtitles. What happen is i have a full subtitle and rename it *.force.srt? Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 7, 2017 Share Posted November 7, 2017 Then it will consider the entire subtitle file to be forced. Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 8, 2017 Author Share Posted November 8, 2017 So, i found no solution to have foreing language subtitles. Do you have one? Link to comment Share on other sites More sharing options...
sualfred 677 Posted November 10, 2017 Share Posted November 10, 2017 (edited) @@LukeI was able to reproduce it on two different Emby servers. Both are running Debian and one is running the latest Mono and one is running the latest .NET version. It makes no difference if on-the-fly extraction is activated and only disabling the subtitles in the user config helps.One device is powered by a Intel i5 (Haswell) and the other one with a Intel i3 (Skylake). As soon as the subtitles are extracted, it works without any delay. Suggestion: Does it make sense to add a optional task for it? Like "Extract missing subtitles" I know this would take a long time for the first run, but I think an additional library option like "Extract subtitiles during library scan for new content" (similar to chapter image extraction) would do the trick. Edited November 10, 2017 by sualfred Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 10, 2017 Author Share Posted November 10, 2017 Yes i think this is a good idea. Maybe also having the possibility to extract subtitles for a single movie or extract from movies in background. Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 10, 2017 Share Posted November 10, 2017 The amount of time it takes is a function of three factors, the cpu and the performance of the storage drive holding the media, as well as any network boundaries that may have to be crossed between emby server and the media files. You are best off just unchecking the box to not allow on the fly subtitle extraction. If something fails to play, then please see how to report a media playback issue. @@fbrassin since you have provided log files and I am not able to spot the issue, can you provide a sample video for testing? thanks. Link to comment Share on other sites More sharing options...
sualfred 677 Posted November 10, 2017 Share Posted November 10, 2017 @@Luke For me it does not fail to play but results in a loading spinner for up to 2-5 minutes. No matter if subtitle extraction is enabled or disabled. It seems that the extraction just takes this time. That's why I suggest to add such options. It will speed up the user experience, because in my eyes it doesn't matter how long the library scan takes for new contents, but it matters as soon as the playback is going to be started. Link to comment Share on other sites More sharing options...
sualfred 677 Posted November 10, 2017 Share Posted November 10, 2017 (edited) Ok, I finally switched to .NET and now I have this issue on all of my movies (freshly scanned DB). Hopefully you will add a optional batch process to do it in the background (manually triggered or via library scan). Nearly all German movies have a forced track and it's annoying. Especially in the web GUI. I already see my family members complaining about what's going on Edited November 10, 2017 by sualfred Link to comment Share on other sites More sharing options...
sualfred 677 Posted November 10, 2017 Share Posted November 10, 2017 @@fbrassin Do you use Chrome? I have the bad feeling that this is browser related. With enabled on the fly extraction: Chrome -> Hangs for 2-5 minutes until the plackback starts Microsoft Edge -> Starts instantly and subtitles will be extracted in the background during the playback Firefox -> Same. No problems @@Luke The logs are fine and the Chrome issue won't be reflected there. Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 10, 2017 Share Posted November 10, 2017 @saulfred please disable on the fly subtitle extraction, then follow my instructions in post 33. Thanks. Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 10, 2017 Author Share Posted November 10, 2017 (edited) @@fbrassin Do you use Chrome? I have the bad feeling that this is browser related. With enabled on the fly extraction: Chrome -> Hangs for 2-5 minutes until the plackback starts Microsoft Edge -> Starts instantly and subtitles will be extracted in the background during the playback Firefox -> Same. No problems @@Luke The logs are fine and the Chrome issue won't be reflected there. No, i'm not using web browser but ATv4. Edited November 10, 2017 by fbrassin Link to comment Share on other sites More sharing options...
sualfred 677 Posted November 10, 2017 Share Posted November 10, 2017 (edited) @@Luke Logs are attached: - server - ffmpeg log for playback via Chrome with enabled and one with disabled on-the-fly-extraction - ffmpeg log for playback via FireFox with enabled and one with disabled on-the-fly-extraction Notes: - I always deleted the subtitles folder (/var/lib/emby/data/subtitles) for my tests. - I've tested it with VAAPI and software transcoding. No differences. With extraction enabled: - FireFox playback starts immediately with extraction enabled and the .srt files will be created in the background (same applies to the Edge browser and Emby Theater M$ Store version) - Chrome playback starts as soon as the active subtitle track has been extracted completely. It just waits for it. With extraction disabled: - Playback starts after a few minutes on all browsers. server.txt ffmpeg-chrome-extraction-disabled.txt ffmpeg-chrome-extraction-enabled.txt ffmpeg-firefox-extraction-disabled.txt ffmpeg-firefox-extraction-enabled.txt Edited November 10, 2017 by sualfred Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 10, 2017 Share Posted November 10, 2017 Right OK. With extraction disabled your system is just unable to transcode fast enough because burning in subtitles can be painful. I would suggest using the open subtitle downloading feature to acquire text copies of these subtitles. Link to comment Share on other sites More sharing options...
sualfred 677 Posted November 10, 2017 Share Posted November 10, 2017 I know that. My problem is the behaviour of the extraction method in different players. Is there any reason why players like Chrome, ATV4 or the Kodi plugin with addon playback method have to wait for the extraction? I mean, ... FireFox, ET and Co. are able to start the playback while the extraction is in progress. Is this a technical limitation? And another question: I don't really know how the burn-in method works. But since transcoding starts without any noticeable delay -> Is there a extraction too, which has to be done at first? If yes, it could be stored next to other ones to speed up future transcodings. I tried downloading subtitles in the past and it works okay for EN. But other languages and for own created BR rips? I still think adding an extracting option to the library options would make sense. Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 10, 2017 Share Posted November 10, 2017 And another question: I don't really know how the burn-in method works. But since transcoding starts without any noticeable delay -> Is there a extraction too, which has to be done at first? If yes, it could be stored next to other ones to speed up future transcodings. It does start without delay, however since you're only encoding at 6fps it takes a bit of time just to get even a small segment of the video encoded to start playing with. Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 10, 2017 Share Posted November 10, 2017 I know that. My problem is the behaviour of the extraction method in different players. Is there any reason why players like Chrome, ATV4 or the Kodi plugin with addon playback method have to wait for the extraction? I mean, ... FireFox, ET and Co. are able to start the playback while the extraction is in progress. Is this a technical limitation? Yea i agree it would be preferable to let the video start but that's up to the actual video player to decide and it's not necessarily something we can override. Link to comment Share on other sites More sharing options...
sualfred 677 Posted November 10, 2017 Share Posted November 10, 2017 It does start without delay, however since you're only encoding at 6fps it takes a bit of time just to get even a small segment of the video encoded to start playing with. Can you tell me the difference via transcode with and without subtiltes burned in? Even without VAAPI I can transcode a video with >50 fps. And with VAAPI enabled i get up to 100 fps. Just want to understand why subtitles are causing a drop down to 6fps. Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 11, 2017 Author Share Posted November 11, 2017 My problem is that for some reason it seems that when i play trying to extract subtitles the file .srt is created then deleted then created again and so on. I think that something is making extraction fail. For example right now. I've started to play and i see 6 log named ffmpeg-directstream. It seems emby is making more streaming simoultaneusly. Here is what i see in my terminal ps -aux | grep emby root 5793 0.0 0.0 86188 1352 ? Ss nov04 0:00 su -s /bin/sh -c umask $0; exec "$1" "$@" emby -- 002 env MAGICK_HOME=/usr/lib/emby-server MAGICK_CODER_FILTER_PATH=/usr/lib/emby-server/x86_64-linux-gnu/EmbyMagick-6.9.6/modules-Q8/filters MAGICK_CODER_MODULE_PATH=/usr/lib/emby-server/x86_64-linux-gnu/EmbyMagick-6.9.6/modules-Q8/coders MONO_THREADS_PER_CPU=500 max-heap-size=96m,soft-heap-limit=64m,nursery-size=4m LD_LIBRARY_PATH=/usr/lib/emby-server/x86_64-linux-gnu /usr/bin/mono-sgen --optimize=all /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh emby 5818 0.6 19.8 2722024 789264 ? Ssl nov04 55:24 /usr/bin/mono-sgen --optimize=all /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh emby 18825 0.0 0.1 57364 7380 ? S 08:43 0:00 /var/lib/emby-server/ffmpeg/20170308/ffmpeg -i file:/media/google_crypt/crypt/Serie_Tv/Narcos/Season03/Narcos.S03E04.Scacco matto.mkv -map 0:3 -an -vn -c:s copy /var/lib/emby-server/data/subtitles/4/45457903-cd96-727f-3e00-3c370db27353.srt emby 18859 0.2 0.2 59372 9196 ? S 08:45 0:00 /var/lib/emby-server/ffmpeg/20170308/ffmpeg -ss 00:00:30.000 -noaccurate_seek -f matroska,webm -i file:/media/google_crypt/crypt/Serie_Tv/Narcos/Season03/Narcos.S03E05.MRO.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 copy -copypriorss:a:0 0 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -segment_time_delta -30 -individual_header_trailer 0 -break_non_keyframes 1 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 5 -segment_list /var/lib/emby-server/transcoding-temp/89775f0bf4608bacb8ef8b08bbbf367e.m3u8 -y /var/lib/emby-server/transcoding-temp/89775f0bf4608bacb8ef8b08bbbf367e%d.ts emby 18864 0.0 0.1 57492 7328 ? S 08:45 0:00 /var/lib/emby-server/ffmpeg/20170308/ffmpeg -i file:/media/google_crypt/crypt/Serie_Tv/Narcos/Season03/Narcos.S03E03.I soldi fanno girare il mondo.mkv -map 0:3 -an -vn -c:s copy /var/lib/emby-server/data/subtitles/a/a6398176-292f-e8ee-6644-2d27e28f41aa.srt emby 18888 0.0 0.1 57488 7376 ? S 08:46 0:00 /var/lib/emby-server/ffmpeg/20170308/ffmpeg -i file:/media/google_crypt/crypt/Serie_Tv/Narcos/Season03/Narcos.S03E05.MRO.mkv -map 0:3 -an -vn -c:s copy /var/lib/emby-server/data/subtitles/b/b205d0a5-0e4c-f259-78cf-052ba6a85ba2.srt As you can see i have 4 ffmpeg processes running together. I don't know if it is normal. What do you think? Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 11, 2017 Author Share Posted November 11, 2017 (edited) Moreover, i've just realizing. I'm playing episode Narcos.S03E03 But i see that emby have a ffmpeg of episode Narcos.S03E05 that i never started nor never even enter into it. I don't know what does it has to do with it. Maybe some kind of bug?? Here is the log if it can help: https://paste2.org/htyzss6E Edited November 11, 2017 by fbrassin Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 13, 2017 Author Share Posted November 13, 2017 Just want to let you know that i tried with plex the same movies on the same server and client and i can play them with forced subtitles with no problem. I don't know what can it be. Or if i can do anything... Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 14, 2017 Share Posted November 14, 2017 Moreover, i've just realizing. I'm playing episode Narcos.S03E03 But i see that emby have a ffmpeg of episode Narcos.S03E05 that i never started nor never even enter into it. I don't know what does it has to do with it. Maybe some kind of bug?? Here is the log if it can help: https://paste2.org/htyzss6E You may have advanced to the next episode using the video player controls. Or more likely, the video encountered an error and automatically advanced to the next item in the now playing queue. Link to comment Share on other sites More sharing options...
Luke 37094 Posted November 14, 2017 Share Posted November 14, 2017 Just want to let you know that i tried with plex the same movies on the same server and client and i can play them with forced subtitles with no problem. I don't know what can it be. Or if i can do anything... They could be automatically downloading subtitles on the fly and you're not even realizing it. We don't do that. Link to comment Share on other sites More sharing options...
fbrassin 35 Posted November 14, 2017 Author Share Posted November 14, 2017 They could be automatically downloading subtitles on the fly and you're not even realizing it. We don't do that. There must be something that destroy extraction of subtiles. When i start a play and go in terminal in my server if i give tail -f SUBTILE.srt i see the file filling with subtitles, but suddenly for no apperently reason it restart extraction from the beginning. I think that the problem is that. If the .srt file would fill without stopping i think i could have movie and subtitles. But i cannot understand the reason for this. Any idea? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now