AlexPresso / VideoStation-FFMPEG-Patcher

Patcher to enable DTS, EAC3 and TrueHD transcoding support to Synology VideoStation (from DSM 6.2 to DSM 7.0 and above ; ffmpeg4, 5, 6 ready)
1.02k stars 99 forks source link

[QA] HLS support #20

Closed sgregori closed 2 years ago

sgregori commented 2 years ago

Question

There are any patch for hls playing?

With 2.3.2 until 2.3.8 is working but not at newer versions.

AlexPresso commented 2 years ago

Good Evening,

I'm not sure to understand your question, the VideoStation's web player is already working over HLS (m3u8), the patcher is not changing the default VideoStation's behavior, only enabling some codecs and replacing default ffmpeg

Do you mean the patcher is not working for your VideoStation ?

sgregori commented 2 years ago

Hi, videostation doesnt indexes m3u8 files, but indexes .ts files with same m3u8 content.

With version 2.3.2 of libsynovte.so file you can play via dsVideo apk, but using 2.5.0 version file of libsynovte.so you can't play them.

I'm comparing each version because you patch this file, and changing file between versions it works, but interface crashes for all rest of functions.

thanks.

AlexPresso commented 2 years ago

Are you using the default patching option or the wrapper one ?

sgregori commented 2 years ago

at this time, i just learning about your patch, because i surprised that the patch of libsynovte.so is done with "sed" on a binary file.

sgregori commented 2 years ago
# Patch libsynovte.so to authorize DTS, EAC3 and TrueHD
sed -i -e 's/eac3/3cae/' -e 's/dts/std/' -e 's/truehd/dheurt/' /var/packages/VideoStation/target/lib/libsynovte.so
AlexPresso commented 2 years ago

It's done with a sed because even in a binary file, a string remains a string, of course in most case you can't do it that way, because altering a binary may create an invalid offset and break all the pointer values.

But in that case, we can, because VideoStation is only checking for those specific codec names to deny them, putting them in reverse order doesn't change the bytes length and does not change the pointers offsets, it just prevents VideoStation's conditions to be able to check for those codecs.

That sed is the only thing altering the VideoStation's shared objects

Also, don't use the "default" patching procedure, I'll remove it soon as it was only for older VideoStation and only for DS218Play architectures

sgregori commented 2 years ago

Yes, i understand.

The code that have "strings" with "m3u" or "hls" still at all versions of libsynovte.so, but playing isnt available after 2.3.8 version.

I think that synology has disabled this for same reasons that has disabled those codecs, when i use the libsynovte.so (2.3.8) with the all rest of package 2.4.0 or higher, playing is working but web interface crashes.

Have you got any idea ?

Thank you very much.

AlexPresso commented 2 years ago

but playing isnt available after 2.3.8 version.

Does it stop with an error message or is it loading forever ?

when i use the libsynovte.so (2.3.8) with the all rest of package 2.4.0 or higher, playing is working but web interface crashes

Do you mean the DS Video app (Android) is able to play the files, but the web version crashes or none of the apps are able to play the file ?

I'm not using the Android app at all, I'm expecting it to have the same behavior as the web version (HLS / .ts files with m3u8 playlist format) but they may have implemented another way to do it. That issue may also be related to the implementation of Advanced Media Extensions from Synology, which is the tool I'm still struggling with at the moment ( #16 )

I'll have a closer look at the differences between these two versions

sgregori commented 2 years ago

Any error message, infinite loading.

Using a 2.4.9 or 2.5.0 version, with libsynovte.so (2.3.8) is able to play the HLS file, but web interface is not working.

I installed the Advanced Media Extensions on my DSM 6.1 Xpenology, but is just a few libraries and 2 versions of ffmpeg precompiled with more options.

I'm dissasembling per example the libsynovte(2.3.8) and comparing with same file on version 2.4.0, but i didn't found the difference, but total size is 4 kb more.

thanks for your ideas.