jellyfin / jellyfin-tizen

Jellyfin Samsung TV Client
https://jellyfin.org
967 stars 74 forks source link

Problem with ASS/SSA codec subtitles on Tizen 5 #103

Closed Fallenbagel closed 2 years ago

Fallenbagel commented 2 years ago

I have built the wgt for my Samsung TV and it works seamlessly but when I play a media file with ASS/SSA it plays without the subtitles turned on but when I turn on the subtitles it plays a little and stream crashes with the error "Server didn't send a compatible media" or sth.

When I enable forced burn in, it works and the trascoding reason says "subtitle codec not supported". What I don't understand is, when I play the exact same file through USB, it plays because ASS/SSA is supported on Samsung TV 2021 models.

So is there any way to enable direct play for ASS files?

dmitrylyzo commented 2 years ago

I have built the wgt for my Samsung TV and it works seamlessly but when I play a media file with ASS/SSA it plays without the subtitles turned on but when I turn on the subtitles it plays a little and stream crashes with the error "Server didn't send a compatible media" or sth.

There was an error with attachments when the embedded cover (image) was passed to JavascriptSubtitlesOctopus as a font, and it would crash with Playback Error This client isn't compatible with the media and the server isn't sending a compatible media format.. But if you followed the guide (build with jellyfin-web:master branch), you should't have that error.

When I enable forced burn in, it works and the trascoding reason says "subtitle codec not supported"

This is normal: when you enable Burn in subtitles, you tell the server that your client doesn't support subtitles, which forces the server to transcode the video.

What I don't understand is, when I play the exact same file through USB, it plays because ASS/SSA is supported on Samsung TV 2021 models.

As I said, Jellyfin uses https://github.com/jellyfin/JavascriptSubtitlesOctopus The native player is AvPlay which I am going to add at some point because there are issues with switching audio tracks on Tizen 4 and lower.

So is there any way to enable direct play for ASS files?

What TV (Tizen version)? What version of the server are you using? Could you post your subtitles somewhere? But I have not yet been able to reproduce any of the subtitles problems - they work (more or less) on my side.

Also, jellyfin-web:master branch is supposed to work with jellyfin:master server branch or, currently, with alpha tags. I am not sure it will stably work with 10.7.x (but it has that "cover as font" bug).

Fallenbagel commented 2 years ago

I followed the guide on this github when I built but that error is there. I have built it 4 times now from scratch hoping it works and I spent almost 2 weeks trying to diagnose it. What am I doing wrong? It happens with any .ass files both embedded and external. Here's an external .ass file shared on my mega. (Im sorry idk how to link it on github its not working). https://mega.nz/file/s58XFSqa#YIVUd_XtsOlZxrgHM6fqOn_j-osu1HVkp_L4vvTmBA4

As for the TV version I have a Samsung TV ru7100 the 2021 model. I think the tizen is 5.0 because I remember the tizen studio saying it was. I'm not entirely sure I'll have to check.

I use jellyfin 10.8.0 because in 10.7.7 even the burn in doesn't work and so far 10.8.0 has been pretty good. Very performative. Just the .ass thing has been driving me crazy because burning is very heavy on my server as I only have an i3 6100u.

dmitrylyzo commented 2 years ago

I followed the guide on this github when I built but that error is there. I have built it 4 times now from scratch hoping it works and I spent almost 2 weeks trying to diagnose it. What am I doing wrong?

Do you mean the non-working subtitles (this) error? If you have successfully built web, then you are doing right.

It happens with any .ass files both embedded and external. Here's an external .ass file shared on my mega. (Im sorry idk how to link it on github its not working). https://mega.nz/file/s58XFSqa#YIVUd_XtsOlZxrgHM6fqOn_j-osu1HVkp_L4vvTmBA4

No problem. I will look when I get home. FYI, you can attach the subtitle text-file by appending `.txt'.

As for the TV version I have a Samsung TV ru7100 the 2021 model. I think the tizen is 5.0 because I remember the tizen studio saying it was. I'm not entirely sure I'll have to check.

Yes, this is Tizen 5 (https://developer.samsung.com/smarttv/develop/specifications/tv-model-groups.html).

I use jellyfin 10.8.0 because in 10.7.7 even the burn in doesn't work and so far 10.8.0 has been pretty good. Very performative. Just the .ass thing has been driving me crazy because burning is very heavy on my server as I only have an i3 6100u.

:+1:

Also, could you post mediainfo (to see what attachments there are)? Do not forget to wrap it with code block (```)

You can also get more information from the TV: #79 (script) or https://github.com/jellyfin/jellyfin-tizen/issues/46#issuecomment-683747890

Fallenbagel commented 2 years ago

I meant the Playback Error This client isn't compatible with the media and the server isn't sending a compatible media format. error whenever I try to play anything with ASS/SSA format subtitles. Other than that everything else works even srt. Like the media can be played if I turn off the ass subtitles but when I turn it on, it plays a few seconds, doesn't display the subtitles and then stream crashes with that error.

Screenshot_20220204-133033_Jellyfin Screenshot_20220204-133044_Jellyfin

As you can see it's H264 format with audio codec that is also supported by the tv model and it plays seamlessly if I turn off subtitles or use an srt file. But you know how anime and srt files don't really work and so I'm really hoping to fix this.

Fallenbagel commented 2 years ago

Also I wasn't sure what you meant by

Also, jellyfin-web:master branch is supposed to work with jellyfin:master server branch or, currently, with alpha tags. I am not sure it will stably work with 10.7.x (but it has that "cover as font" bug).

Should I rebuild the wgt with the jellyfin-web 10.8.0 alpha 5 release and then try and see if the ass/ssa works or should I just clone repository link given in the main wiki?

Fallenbagel commented 2 years ago

Should I rebuild the wgt with the jellyfin-web 10.8.0 alpha 5 release and then try and see if the ass/ssa works or should I just clone repository link given in the main wiki?

I just tried this. I still get the This client isnt compatible with the media and the server isn't sending a compatible media format error and the stream crashes.

dmitrylyzo commented 2 years ago

Should I rebuild the wgt with the jellyfin-web 10.8.0 alpha 5 release and then try and see if the ass/ssa works or should I just clone repository link given in the main wiki?

For server 10.8.0 you need the master branch. The alpha5 tag doesn't have the mentioned fix.

I have looked at your subtitles - they are pretty simple (no animation, no different styles) and work with no problem on NU7400 (Tizen 4) and Tizen 6 emulator.

Since the failure only occurs when SSA/ASS is enabled (with no burning), it means that JSO (subtitle renderer) is in use and it crashes, so JF stops playback with that error. As I said, it was previously related to the passing non-font data (JPEG) as a font to JSO, but it has been fixed in https://github.com/jellyfin/jellyfin-web/pull/3302 So it could be something else. Emptying this array completely disables passing attachments.

Jellyfin doesn't show all attachments (in particular fonts) through MediaInfo menu entry (the ones you posted). To see them, you need to use ffprobe, but I don't think there are any.

There are also fallback fonts: Dashboard -> Playback -> Fallback font folder path I would also check them.

Currently, the only way to check what is happening are #79 (script) or https://github.com/jellyfin/jellyfin-tizen/issues/46#issuecomment-683747890

Fallenbagel commented 2 years ago

For server 10.8.0 you need the master branch. The alpha5 tag doesn't have the mentioned fix.

I just rebuilt the wgt using the the guide by cloning the master branch as mentioned in the guide and the error still occurs.

There are also fallback fonts: Dashboard -> Playback -> Fallback font folder path I would also check them.

Should I set a fallback font?

Currently, the only way to check what is happening are #79 (script) or #46 (comment)

I tried this, since I'm deploying the app to tizen using windows, I tried the debugging using powershell method and I get the content shell remote debugging window with inspectable webcontents and when I press the link it's all blank. IMG_20220205_021049_315 IMG_20220205_021051_341

dmitrylyzo commented 2 years ago

Should I set a fallback font?

Not unless you want custom or, say, Chinese/Korean/Japanese.

I tried this, since I'm deploying the app to tizen using windows, I tried the debugging using powershell method and I get the content shell remote debugging window with inspectable webcontents and when I press the link it's all blank.

That's weird :confused: https://developer.tizen.org/forums/web-application-development/devtools-inspector-hangs-blank-screen Any other browser?

Fallenbagel commented 2 years ago

That's weird 😕 https://developer.tizen.org/forums/web-application-development/devtools-inspector-hangs-blank-screen Any other browser?

Okay so I tried with chromium 80. And I checked the console it says uncaught error: networkerror for: subtitles-octopus-worker.data IMG_20220205_023656_198 IMG_20220205_023659_697

Edit: I tried again with the .ass file I sent and I get the same error IMG_20220205_024921_213

dmitrylyzo commented 2 years ago

That's why it fails - it can't load its own data. Find subtitles-octopus-worker.data on the Network tab.

dmitrylyzo commented 2 years ago

So, is it fixable?

We need to find out why it fails to load data.

Find subtitles-octopus-worker.data on the Network tab. In emulator on the Network tab I have:

Request URL: file:///www/libraries/subtitles-octopus-worker.data
Request Method: GET
Status Code: 200 OK
Referrer Policy: no-referrer-when-downgrade
Fallenbagel commented 2 years ago

That's why it fails - it can't load its own data. Find subtitles-octopus-worker.data on the Network tab.

Found it. It says (pending). IMG_20220205_032517_904 IMG_20220205_032655_959

Fallenbagel commented 2 years ago

I think I figured out what is happening maybe? I think it's a problem with the building. I just tested it out with tizen 5.0 emulator and I am getting the same error. IMG_20220205_054759_545

Could you test your built with tizen 5.0 emulator and see if you get the same error?

EDIT: I dont think it is a building problem anymore... I was able to direct play the subtitles on tizen 6.0 emulator. image

Does this mean its a lost cause because I have a tizen OS 5.0? :(

EDIT 2: It does work on emby and it looks like they use the same method of html5 player and uses subtitles-octopus to render .ass files. I really hope this can be fixed :(

dmitrylyzo commented 2 years ago

I think it's a problem with the building. I just tested it out with tizen 5.0 emulator and I am getting the same error.

What error occurred (in console)? Also see if www/libraries/subtitles-octopus-worker.data is in WGT (it is just a ZIP). That's just to be sure.

Could you test your built with tizen 5.0 emulator and see if you get the same error?

5.0 exactly? or 5.5?

I dont think it is a building problem anymore... I was able to direct play the subtitles on tizen 6.0 emulator.

In my experience, emulators are suitable for most cases, but can give false results - they do not take the hardware into account, may lack some security policy.

Fallenbagel commented 2 years ago

What error occurred (in console)? Also see if www/libraries/subtitles-octopus-worker.data is in WGT (it is just a ZIP). That's just to be sure.

I'm guessing its the same. I couldn't figure out how to debug for emulators (What ip do I connect to?). EDIT: It is the same error. I just checked the console (after figuring out how to debug). image And yes the subtitles-octopus-worker.data as well as the legacy version is there in the wgt. Plus that would explain why it works on 6.0 emulator and 4.0 as well.

5.0 exactly? or 5.5?

5.0 (Manually downloaded the image and tested and the same thing happens). Because that is what I tested for emulator as well as what I have as a TV (my main client).

In my experience, emulators are suitable for most cases, but can give false results - they do not take the hardware into account, may lack some security policy.

Ah. But it's still weird that it works on 4.0 and 6.0 but not 5.0

EDIT: I just checked the debugging for 6.0 and as you can see the request is successful. image

is this related to what is happening?

dmitrylyzo commented 2 years ago

Hmm, at least I got this error on the Tizen 5.0 emulator.

Fallenbagel commented 2 years ago

Hmm, at least I got this error on the Tizen 5.0 emulator.

yeah it only happens in 5.0 for some reason

dmitrylyzo commented 2 years ago

file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.wasm, but file:///www/libraries/subtitles-octopus-worker.data. Both files are loaded by the worker, but using different API. Fixing the second path (being in debug) solves this error. Maybe we need to update emscripten in our JSO fork.

Fallenbagel commented 2 years ago

file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.wasm, but file:///www/libraries/subtitles-octopus-worker.data. Both files are loaded by the worker, but using different API. Fixing the second path (being in debug) solves this error. Maybe we need to update emscripten in our JSO fork.

It works seamlessly when the second path is changed? Is there a temporary workaround for that (until maybe you guys update the emscripten), that I could manually maybe edit and rebuild and deploy?

dmitrylyzo commented 2 years ago

Maybe we need to update emscripten in our JSO fork.

Even worse - both data and wasm couldn't be loaded.

Is there a temporary workaround for that (until maybe you guys update the emscripten), that I could manually maybe edit and rebuild and deploy?

As a VERY temporary workaround:

  1. Locate the file www/libraries/subtitles-octopus-worker.js.
  2. Find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data".
  3. Set it as REMOTE_PACKAGE_BASE="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data".
  4. Build WGT.

Tbh, I dunno if this is a Tizen 5 bug or if some fix is needed. It also turned out that sync XMLHttpRequest works - that's how WASM is loaded. :man_shrugging:

Fallenbagel commented 2 years ago

Even worse - both data and wasm couldn't be loaded.

Mind if I ask what you meant by that? When you update the emscripten, data and wasm couldn't be loaded?

Also I checked from the Internet browser of the tizen 5.0, and it works from there too. (I wonder how emby does it...)

As a VERY temporary workaround:

  1. Locate the file www/libraries/subtitles-octopus-worker.js.
  2. Find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data".
  3. Set it as REMOTE_PACKAGE_BASE="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data".
  4. Build WGT.

THIS WORKS! I CAN'T THANK YOU ENOUGH!! Also I couldn't find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data" as it was not present in the file but I edited this variable with the path instead:

encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var t="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data"
dmitrylyzo commented 2 years ago

Mind if I ask what you meant by that? When you update the emscripten, data and wasm couldn't be loaded?

I have a branch with updated emscripten and features from our fork - I tried to transfer them to upstream. I built jellyfin-web with it, and now I have 2 identical errors (subtitles-octopus-worker.data and subtitles-octopus-worker.wasm) - emscripten started loading WASM asynchronously:

        } else {
            if (readAsync) {
                return new Promise(function(resolve, reject) {
                    readAsync(wasmBinaryFile, function(response) {
                        resolve(new Uint8Array(response))
                    }, reject)
                })
            }
        }
Old getBinaryPromise ```js function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'" } return response["arrayBuffer"]() }).catch(function() { return getBinary() }) } return new Promise(function(resolve, reject) { resolve(getBinary()) }) } ```
New getBinaryPromise ```js function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'" } return response["arrayBuffer"]() }).catch(function() { return getBinary(wasmBinaryFile) }) } else { if (readAsync) { return new Promise(function(resolve, reject) { readAsync(wasmBinaryFile, function(response) { resolve(new Uint8Array(response)) }, reject) }) } } } return Promise.resolve().then(function() { return getBinary(wasmBinaryFile) }) } ```

Also I checked from the Internet browser of the tizen 5.0, and it works from there too.

LG updates its browser (Chrome), but doesn't update the engine for apps. Samsung is probably doing the same.

(I wonder how emby does it...)

This too, but I'm wondering why sync XMLHttpRequest works, but async doesn't. I created this test. All requests except async from the worker correctly resolve the relative URL - file:///opt/usr/apps/.../res/wgt/test.data. And only async request from the worker - file:///test.data :man_shrugging:

Also I couldn't find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data" as it was not present in the file but I edited this variable with the path instead:

That was for development version of web. I am glad you found the correct one in the production version. :+1:

Fallenbagel commented 2 years ago

Mind if I ask what you meant by that? When you update the emscripten, data and wasm couldn't be loaded?

I have a branch with updated emscripten and features from our fork - I tried to transfer them to upstream. I built jellyfin-web with it, and now I have 2 identical errors (subtitles-octopus-worker.data and subtitles-octopus-worker.wasm) - emscripten started loading WASM asynchronously:

        } else {
            if (readAsync) {
                return new Promise(function(resolve, reject) {
                    readAsync(wasmBinaryFile, function(response) {
                        resolve(new Uint8Array(response))
                    }, reject)
                })
            }
        }
Old getBinaryPromise ```js function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) && typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'" } return response["arrayBuffer"]() }).catch(function() { return getBinary() }) } return new Promise(function(resolve, reject) { resolve(getBinary()) }) } ```
New getBinaryPromise ```js function getBinaryPromise() { if (!wasmBinary && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { if (typeof fetch === "function" && !isFileURI(wasmBinaryFile)) { return fetch(wasmBinaryFile, { credentials: "same-origin" }).then(function(response) { if (!response["ok"]) { throw "failed to load wasm binary file at '" + wasmBinaryFile + "'" } return response["arrayBuffer"]() }).catch(function() { return getBinary(wasmBinaryFile) }) } else { if (readAsync) { return new Promise(function(resolve, reject) { readAsync(wasmBinaryFile, function(response) { resolve(new Uint8Array(response)) }, reject) }) } } } return Promise.resolve().then(function() { return getBinary(wasmBinaryFile) }) } ```

Also I checked from the Internet browser of the tizen 5.0, and it works from there too.

LG updates its browser (Chrome), but doesn't update the engine for apps. Samsung is probably doing the same.

(I wonder how emby does it...)

This too, but I'm wondering why sync XMLHttpRequest works, but async doesn't. I created this test. All requests except async from the worker correctly resolve the relative URL - file:///opt/usr/apps/.../res/wgt/test.data. And only async request from the worker - file:///test.data :man_shrugging:

If you need to test it on a real tizen 5.0, do let me know. I want to help figure this issue out

vacances commented 2 years ago

Even worse - both data and wasm couldn't be loaded.

Mind if I ask what you meant by that? When you update the emscripten, data and wasm couldn't be loaded?

Also I checked from the Internet browser of the tizen 5.0, and it works from there too. (I wonder how emby does it...)

As a VERY temporary workaround:

  1. Locate the file www/libraries/subtitles-octopus-worker.js.
  2. Find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data".
  3. Set it as REMOTE_PACKAGE_BASE="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data".
  4. Build WGT.

THIS WORKS! I CAN'T THANK YOU ENOUGH!! Also I couldn't find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data" as it was not present in the file but I edited this variable with the path instead:

encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var t="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data"

Same thing happened when i posted here: https://github.com/jellyfin/jellyfin-tizen/issues/62 changing this encodeURI string helped, videos are played directly. Thank you so much guys. I no longer have to burn subtitles to every episode. UE65RU8002U updated to the latest Tizen.

dmitrylyzo commented 2 years ago

Starting with version 10.8 you probably do not need to use that workaround - https://github.com/jellyfin/jellyfin-web/pull/3643

joanmoraes commented 2 years ago

Hi guys, is anyone having the same problem today? I'm having this same problem, impossible to watch with .ass subtitles... Is there any solution?

vacances commented 2 years ago

Hi guys, is anyone having the same problem today? I'm having this same problem, impossible to watch with .ass subtitles... Is there any solution?

Can you provide more details? Is it also affecting other devices? Like windows/android from the same server? Did you tried to play with transcoding options? Are you sure that your permissions for video card and files are ok? What's the model of your TV? Version of jellyfin on the TV and Server?

HimbeersaftLP commented 2 years ago

Not sure if this is related, but I noticed that for me, subtitles only work when I select them on the episode pre-playback screen and only work for that episode, once it rolls over to the next one, they show as selected, but don't actually display. I have to test if this still occurrs on current versions, though, as I built mine quite a while ago.

joanmoraes commented 2 years ago

Hi guys, is anyone having the same problem today? I'm having this same problem, impossible to watch with .ass subtitles... Is there any solution? Can you provide more details? Is it also affecting other devices? Like windows/android from the same server? Did you tried to play with transcoding options? Are you sure that your permissions for video card and files are ok? What's the model of your TV? Version of jellyfin on the TV and Server?

Ok.

1- I can play it on amazon Fire TV, on an android smartphone, and on the web browser perfectly. The problem only happens on the Samsung Smart TV. Therefore it does not affect other devices.

2- I'm using openmediavault as a server, and Jellyfin is running via docker.

3- I haven't tried other transcoding options. Could you suggest me some?

4- What would these permissions be? Could you help me with this?

5- My TV is the UN49NU7100.

6- The version of Jellyfin both on the server and on the TV is the latest

joanmoraes commented 2 years ago

Não tenho certeza se isso está relacionado, mas notei que, para mim, as legendas só funcionam quando eu as seleciono na tela de pré-reprodução do episódio e só funcionam para esse episódio, uma vez que ele passa para o próximo, elas aparecem como selecionadas, mas na verdade não exibe. Eu tenho que testar se isso ainda ocorre nas versões atuais, já que eu construí o meu há um tempo atrás.

Não tenho certeza se isso está relacionado, mas notei que, para mim, as legendas só funcionam quando eu como seleção na tela de pré-reprodução do episódio e só funcionam para esse episódio, uma vez que ele passa para o próximo, elas aparecem como Selecionados, mas na verdade não exibe. Eu tenho que testar se isso ainda ocorre nas atuais, já que eu construí o meu tempo atrás.

I've already tried it this way and without success. What happens here is that when I put the subtitles the playback freezes and the application closes a few seconds later. If I don't turn on subtitles, media playback flows normally for hours and hours.

joanmoraes commented 2 years ago

I would like to leave a tip guys, it's not an integral solution but a palliative that got around the problem.

My problem was playing subtitles in (.ass) format in (.mkv) files, so what I did was:

1- I used the FFmpeg program to first extract the subtitles in the extension (.srt);

2- I ran another FFmpeg script that removed all the subtitles contained in the file (.mkv);

This way I kept the media files in (.mkv) and the separate subtitles files in (.srt) and no more problems with playback.

Through some research I created a script in .sh to scan the entire folder and do the two conversions automatically.

Hope this helps anyone who is having the same problem.

Below I leave the shell scripts for linux and .bat for linux:

Script for linux, first create a subfolder named "outputs": This script extracts the subtitles into .srt and must be run first. #!/bin/sh for f in *.mkv; do ffmpeg -txt_format text -i "$f" outputs/"${f%.*}.srt"; done

This second script strips out all the subtitles embedded in the .mkv file, creating a new copy to use. #!/bin/sh for f in *.mkv; do ffmpeg -i "$f" -vcodec copy -acodec copy -sn outputs/"$f"; done

These two are for windows, and do the same thing, with the exception of creating the subfolder automatically. echo off mkdir outputs for %%a in ("*.mkv") do ffmpeg -txt_format text -i "%%a" "outputs\%%~na.srt" pause

echo off for %%a in ("*.mkv") do ffmpeg -i "%%a" -vcodec copy -acodec copy -sn "outputs\%%~na.mkv" pause

Fallenbagel commented 2 years ago

Even worse - both data and wasm couldn't be loaded.

Mind if I ask what you meant by that? When you update the emscripten, data and wasm couldn't be loaded?

Also I checked from the Internet browser of the tizen 5.0, and it works from there too. (I wonder how emby does it...)

As a VERY temporary workaround:

  1. Locate the file www/libraries/subtitles-octopus-worker.js.
  2. Find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data".
  3. Set it as REMOTE_PACKAGE_BASE="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data".
  4. Build WGT.

THIS WORKS! I CAN'T THANK YOU ENOUGH!! Also I couldn't find REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data" as it was not present in the file but I edited this variable with the path instead:

encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var t="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data"

@joanmoraes You could also maybe try this. Last time I tested tizen app (about 3 months ago or so I now use androidtv) I had to do this again with the new build for ASS/SSA to be direct played

joanmoraes commented 2 years ago

Pior ainda - ambos datae wasmnão puderam ser carregados.

Se importa se eu perguntar o que você quis dizer com isso? Quando você atualiza o emscripten, os dados e o wasm não podem ser carregados? Também verifiquei no navegador de Internet do tizen 5.0 e funciona a partir daí também. (Eu me pergunto como emby faz isso...)

Como uma solução MUITO temporária:

  1. Localize o arquivo www/libraries/subtitles-octopus-worker.js.
  2. Encontre REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data".
  3. Defina como REMOTE_PACKAGE_BASE="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data".
  4. Construir WGT.

ISSO FUNCIONA! NÃO CONSIGO TE AGRADECER!! Também não consegui encontrar REMOTE_PACKAGE_BASE="subtitles-octopus-worker.data", pois não estava presente no arquivo, mas editei esta variável com o caminho:

encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var t="file:///opt/usr/apps/AprZAARz4r/res/wgt/www/libraries/subtitles-octopus-worker.data"

@joanmoraesVocê também pode tentar isso. A última vez que testei o aplicativo tizen (cerca de 3 meses atrás, agora uso androidtv) tive que fazer isso novamente com a nova compilação para ASS / SSA para ser reproduzido diretamente

I changed the line in the "subtitles-octopus-worker" file and ran the WGT Build again but it didn't work.

Is it necessary to remove Jellyfin from the TV first?

dmitrylyzo commented 2 years ago

The original issue concerns only Tizen 5 (it doesn't resolve URLs in the webworker).

I had to do this again with the new build for ASS/SSA to be direct played

@Fallenbagel Have you tried jf-web after this fix? SSA/ASS works in the latest jf-web in the Tizen 5 emulator.

@joanmoraes I have NU7400 (Tizen 4 like yours). I see ASS subs, but they may take a long time to display if they have a lot of fonts. Sometimes I have to pause and rewind. Haven't looked why yet.

Does the freeze depend on the complexity of the subtitles?

If you still have Tizen Studio, you could try to debug the app: #79.

Fallenbagel commented 2 years ago

@Fallenbagel Have you tried jf-web after this fix? SSA/ASS works in the latest jf-web in the Tizen 5 emulator.

The last time I built was on June 10th so after that fix and it still was doing the same error thing. Maybe I forgot to pull the changes. I will try it once again and update here

EDIT: I successfully built it but I ran into this issue #144. Its stuck on the splash logo

EDIT 2: Solved #144 issue by checking out to 10.8.5 branch

Edit 3: it works wonders! I probably forgot to pull the changes before I built it on june 10th