konaman Posted December 9, 2022 Share #76 Posted December 9, 2022 18 часов назад, wangsiji сказал: How to get AME3.0 to work: Install AME package, and run the following python script to get latest codec! import hashlib import os r = ['669066909066906690', 'B801000000', '30'] s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4975, 1), (0x9AC8, 2)] prefix = '/var/packages/CodecPack/target/usr' so = prefix + '/lib/libsynoame-license.so' print("Patching") with open(so, 'r+b') as fh: full = fh.read() if hashlib.md5(full).digest().hex() != 'fcc1084f4eadcf5855e6e8494fb79e23': print("MD5 mismatch") exit(1) for x in s: fh.seek(x[0] + 0x8000, 0) fh.write(bytes.fromhex(r[x[1]])) lic = '/usr/syno/etc/license/data/ame/offline_license.json' os.makedirs(os.path.dirname(lic), exist_ok=True) with open(lic, 'w') as licf: licf.write('[{"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "hevc", "type": "free"}, "licenseContent": 1}, {"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "aac", "type": "free"}, "licenseContent": 1}]') print("Checking whether patch is successful...") ret = os.system(prefix + "/bin/synoame-bin-check-license") if ret == 0: print("Successful, updating codecs...") os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec") print("Done") else: print(f"Patch is unsuccessful, retcode = {ret}”) After codec is installed, you have to replace `synocodectool` to an empty bin returning 0. Execute the following shell script as root: cd /var/packages/CodecPack/target/bin mv synocodectool synocodectool.bak echo "#!/bin/sh" > synocodectool chmod 755 synocodectool Enjoy! Please test and feedback! I have DSM 7.1.1-42962 Update 2 on DS3615xs. After run script i have error: "root@core:/var/packages/CodecPack/target/bin# python /volume1/localhost/ame.py Patching MD5 mismatch" Quote Link to comment Share on other sites More sharing options...
wifi75 Posted December 10, 2022 Share #77 Posted December 10, 2022 is there a patch for advanced media extension? Quote Link to comment Share on other sites More sharing options...
dominatorstang Posted December 10, 2022 Share #78 Posted December 10, 2022 (edited) Most of us have already installed ADM and tried to get the codec working in the normal method before we found this thread. That is why we get the MD5 mismatch when trying the script... For me the fix was to uninstall ADM, reinstall ADM and then run the script, without opening ADM first this time ;). Working perfectly for me now. After patching, I open it and it shows the codec installed. Testing shows it to be working too. Thank you Wangsiji !!!! Edited December 10, 2022 by dominatorstang bad wording Quote Link to comment Share on other sites More sharing options...
konaman Posted December 11, 2022 Share #79 Posted December 11, 2022 7 часов назад, dominatorstang сказал: Most of us have already installed ADM and tried to get the codec working in the normal method before we found this thread. That is why we get the MD5 mismatch when trying the script... For me the fix was to uninstall ADM, reinstall ADM and then run the script, without opening ADM first this time ;). Working perfectly for me now. After patching, I open it and it shows the codec installed. Testing shows it to be working too. Thank you Wangsiji !!!! YES YES YES!!! Thank you !!! Quote Link to comment Share on other sites More sharing options...
ti9errr Posted December 11, 2022 Share #80 Posted December 11, 2022 DSM 7.1-42661 Update 1 1. ssh as admin user 2. Uninstall AME - /var/packages/CodecPack/target/usr/lib/ folder is empty 3. Install AME - file populated in folder 4. sudo python ame.py Patching MD5 mismatch Quote Link to comment Share on other sites More sharing options...
john2214 Posted December 11, 2022 Share #81 Posted December 11, 2022 On 12/8/2022 at 9:29 PM, wangsiji said: How to get AME3.0 to work: Install AME package, and run the following python script to get latest codec! import hashlib import os r = ['669066909066906690', 'B801000000', '30'] s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4975, 1), (0x9AC8, 2)] prefix = '/var/packages/CodecPack/target/usr' so = prefix + '/lib/libsynoame-license.so' print("Patching") with open(so, 'r+b') as fh: full = fh.read() if hashlib.md5(full).digest().hex() != 'fcc1084f4eadcf5855e6e8494fb79e23': print("MD5 mismatch") exit(1) for x in s: fh.seek(x[0] + 0x8000, 0) fh.write(bytes.fromhex(r[x[1]])) lic = '/usr/syno/etc/license/data/ame/offline_license.json' os.makedirs(os.path.dirname(lic), exist_ok=True) with open(lic, 'w') as licf: licf.write('[{"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "hevc", "type": "free"}, "licenseContent": 1}, {"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "aac", "type": "free"}, "licenseContent": 1}]') print("Checking whether patch is successful...") ret = os.system(prefix + "/bin/synoame-bin-check-license") if ret == 0: print("Successful, updating codecs...") os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec") print("Done") else: print(f"Patch is unsuccessful, retcode = {ret}”) After codec is installed, you have to replace `synocodectool` to an empty bin returning 0. Execute the following shell script as root: cd /var/packages/CodecPack/target/bin mv synocodectool synocodectool.bak echo "#!/bin/sh" > synocodectool chmod 755 synocodectool Enjoy! Please test and feedback! SyntaxError: EOL while scanning string literal Why? Quote Link to comment Share on other sites More sharing options...
wifi75 Posted December 11, 2022 Share #82 Posted December 11, 2022 12 hours ago, dominatorstang said: Most of us have already installed ADM and tried to get the codec working in the normal method before we found this thread. That is why we get the MD5 mismatch when trying the script... For me the fix was to uninstall ADM, reinstall ADM and then run the script, without opening ADM first this time ;). Working perfectly for me now. After patching, I open it and it shows the codec installed. Testing shows it to be working too. Thank you Wangsiji !!!! hello what is the script to run? Quote Link to comment Share on other sites More sharing options...
Johanzorz Posted December 11, 2022 Share #83 Posted December 11, 2022 (edited) 2 hours ago, john2214 said: SyntaxError: EOL while scanning string literal Why? Try this one i got the same error, quote sign at the end was wrong one i think. @wangsiji thank you so much it's working ^^ import hashlib import os r = ['669066909066906690', 'B801000000', '30'] s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4975, 1), (0x9AC8, 2)] prefix = '/var/packages/CodecPack/target/usr' so = prefix + '/lib/libsynoame-license.so' print("Patching") with open(so, 'r+b') as fh: full = fh.read() if hashlib.md5(full).digest().hex() != 'fcc1084f4eadcf5855e6e8494fb79e23': print("MD5 mismatch") exit(1) for x in s: fh.seek(x[0] + 0x8000, 0) fh.write(bytes.fromhex(r[x[1]])) lic = '/usr/syno/etc/license/data/ame/offline_license.json' os.makedirs(os.path.dirname(lic), exist_ok=True) with open(lic, 'w') as licf: licf.write('[{"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "hevc", "type": "free"}, "licenseContent": 1}, {"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "aac", "type": "free"}, "licenseContent": 1}]') print("Checking whether patch is successful...") ret = os.system(prefix + "/bin/synoame-bin-check-license") if ret == 0: print("Successful, updating codecs...") os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec") print("Done") else: print("Patch is unsuccessful, retcode = {ret}") Edited December 11, 2022 by Johanzorz 1 Quote Link to comment Share on other sites More sharing options...
rafoloru Posted December 11, 2022 Share #84 Posted December 11, 2022 Il y a 4 heures, ti9errr a dit : DSM 7.1-42661 Update 1 1. ssh as admin user 2. Uninstall AME - /var/packages/CodecPack/target/usr/lib/ folder is empty 3. Install AME - file populated in folder 4. sudo python ame.py Patching MD5 mismatch Same thing... I even did a reboot after uninstalling AME. Quote Link to comment Share on other sites More sharing options...
john2214 Posted December 11, 2022 Share #85 Posted December 11, 2022 1 hour ago, Johanzorz said: Try this one i got the same error, quote sign at the end was wrong one i think. @wangsiji thank you so much it's working ^^ import hashlib import os r = ['669066909066906690', 'B801000000', '30'] s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4975, 1), (0x9AC8, 2)] prefix = '/var/packages/CodecPack/target/usr' so = prefix + '/lib/libsynoame-license.so' print("Patching") with open(so, 'r+b') as fh: full = fh.read() if hashlib.md5(full).digest().hex() != 'fcc1084f4eadcf5855e6e8494fb79e23': print("MD5 mismatch") exit(1) for x in s: fh.seek(x[0] + 0x8000, 0) fh.write(bytes.fromhex(r[x[1]])) lic = '/usr/syno/etc/license/data/ame/offline_license.json' os.makedirs(os.path.dirname(lic), exist_ok=True) with open(lic, 'w') as licf: licf.write('[{"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "hevc", "type": "free"}, "licenseContent": 1}, {"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "aac", "type": "free"}, "licenseContent": 1}]') print("Checking whether patch is successful...") ret = os.system(prefix + "/bin/synoame-bin-check-license") if ret == 0: print("Successful, updating codecs...") os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec") print("Done") else: print("Patch is unsuccessful, retcode = {ret}") It's working! thx! My nas: 918+ 7.1.1 AME 3.0 Quote Link to comment Share on other sites More sharing options...
wangsiji Posted December 12, 2022 Share #86 Posted December 12, 2022 For those who got MD5 mismatch message: Please post libsynoame-license.so so I can have a look. Quote Link to comment Share on other sites More sharing options...
ti9errr Posted December 12, 2022 Share #87 Posted December 12, 2022 libsynoame-license.so Quote Link to comment Share on other sites More sharing options...
popeye Posted December 12, 2022 Share #88 Posted December 12, 2022 Hi Followed the instructions , dont have errors when trying to play hevc file now , but I get black screen , and after few minutes "connection expired". All is ok with H264 files. What can I do / check please ? AME 3.0.1-2004 HEVC 1.0.0-00001 DSM 7.1.1-42962 Update 2 DS920+ fake SN as I dont have real one Quote Link to comment Share on other sites More sharing options...
wangsiji Posted December 12, 2022 Share #89 Posted December 12, 2022 5 hours ago, ti9errr said: libsynoame-license.so 85.5 kB · 0 downloads After checking, I found that this file is almost the same as my file, so the patch script still applies. Please try this updated script: import hashlib import os r = ['669066909066906690', 'B801000000', '30'] s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4975, 1), (0x9AC8, 2)] prefix = '/var/packages/CodecPack/target/usr' so = prefix + '/lib/libsynoame-license.so' print("Patching") with open(so, 'r+b') as fh: full = fh.read() if hashlib.md5(full).digest().hex() not in ['fcc1084f4eadcf5855e6e8494fb79e23', '923fd0d58e79b7dc0f6c377547545930']: print("MD5 mismatch") exit(1) for x in s: fh.seek(x[0] + 0x8000, 0) fh.write(bytes.fromhex(r[x[1]])) lic = '/usr/syno/etc/license/data/ame/offline_license.json' os.makedirs(os.path.dirname(lic), exist_ok=True) with open(lic, 'w') as licf: licf.write('[{"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "hevc", "type": "free"}, "licenseContent": 1}, {"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "aac", "type": "free"}, "licenseContent": 1}]') print("Checking whether patch is successful...") ret = os.system(prefix + "/bin/synoame-bin-check-license") if ret == 0: print("Successful, updating codecs...") os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec") print("Done") else: print(f"Patch is unsuccessful, retcode = {ret}") 1 Quote Link to comment Share on other sites More sharing options...
rafoloru Posted December 12, 2022 Share #90 Posted December 12, 2022 il y a 18 minutes, wangsiji a dit : After checking, I found that this file is almost the same as my file, so the patch script still applies. Please try this updated script: import hashlib import os r = ['669066909066906690', 'B801000000', '30'] s = [(0x1F28, 0), (0x48F5, 1), (0x4921, 1), (0x4953, 1), (0x4975, 1), (0x9AC8, 2)] prefix = '/var/packages/CodecPack/target/usr' so = prefix + '/lib/libsynoame-license.so' print("Patching") with open(so, 'r+b') as fh: full = fh.read() if hashlib.md5(full).digest().hex() not in ['fcc1084f4eadcf5855e6e8494fb79e23', '923fd0d58e79b7dc0f6c377547545930']: print("MD5 mismatch") exit(1) for x in s: fh.seek(x[0] + 0x8000, 0) fh.write(bytes.fromhex(r[x[1]])) lic = '/usr/syno/etc/license/data/ame/offline_license.json' os.makedirs(os.path.dirname(lic), exist_ok=True) with open(lic, 'w') as licf: licf.write('[{"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "hevc", "type": "free"}, "licenseContent": 1}, {"appType": 14, "appName": "ame", "follow": ["device"], "server_time": 1666000000, "registered_at": 1651000000, "expireTime": 0, "status": "valid", "firstActTime": 1651000001, "extension_gid": null, "licenseCode": "0", "duration": 1576800000, "attribute": {"codec": "aac", "type": "free"}, "licenseContent": 1}]') print("Checking whether patch is successful...") ret = os.system(prefix + "/bin/synoame-bin-check-license") if ret == 0: print("Successful, updating codecs...") os.system(prefix + "/bin/synoame-bin-auto-install-needed-codec") print("Done") else: print(f"Patch is unsuccessful, retcode = {ret}") There's some progession, but I got this: Patching Checking whether patch is successful... Patch is unsuccessful, retcode = 256 Quote Link to comment Share on other sites More sharing options...
Asd125 Posted December 12, 2022 Share #91 Posted December 12, 2022 Thank you. AME is patched, but the recognition of people in Synology Photos does not work, and the HEIC format is not displayed. What could it be? 1 Quote Link to comment Share on other sites More sharing options...
ti9errr Posted December 12, 2022 Share #92 Posted December 12, 2022 (edited) 1. Re-copy the script and paste it in visual code just incase. 2. Upload to home folder 3. ssh in to synology 4. sudo python ame.py 5. return code 256 6. ran synoame-bin-check-license - no return msg - think it is ok now? 7. ran synoame-bin-auto-install-needed-codec - no return msg Edited December 12, 2022 by ti9errr 1 Quote Link to comment Share on other sites More sharing options...
wangsiji Posted December 13, 2022 Share #93 Posted December 13, 2022 12 hours ago, rafoloru said: There's some progession, but I got this: Patching Checking whether patch is successful... Patch is unsuccessful, retcode = 256 interesting, could you please tell me which model are you using? Quote Link to comment Share on other sites More sharing options...
rafoloru Posted December 13, 2022 Share #94 Posted December 13, 2022 Il y a 12 heures, wangsiji a dit : interesting, could you please tell me which model are you using? DS3622xs+ DSM 7.1-42661 Update 1 AME 2.0.1-1021 I have a real Serial and MAC address Quote Link to comment Share on other sites More sharing options...
Orphée Posted December 13, 2022 Share #95 Posted December 13, 2022 Why do you need to patch if you have a real SN/MAC ??? 1 Quote Link to comment Share on other sites More sharing options...
rafoloru Posted December 13, 2022 Share #96 Posted December 13, 2022 Il y a 3 heures, Orphée a dit : Why do you need to patch if you have a real SN/MAC ??? Because even with real MAC and serial it won't activate Quote Link to comment Share on other sites More sharing options...
Orphée Posted December 13, 2022 Share #97 Posted December 13, 2022 1 minute ago, rafoloru said: Because even with real MAC and serial it won't activate Well it does for me. Quote Link to comment Share on other sites More sharing options...
tiendat Posted December 14, 2022 Share #98 Posted December 14, 2022 patch ok with fake sn and mac, DSM 7.1.1-42962 Update 2 1 Quote Link to comment Share on other sites More sharing options...
ulissessantos Posted December 14, 2022 Share #99 Posted December 14, 2022 +1 Quote Link to comment Share on other sites More sharing options...
popeye Posted December 14, 2022 Share #100 Posted December 14, 2022 Ok Its working now , redone it from start , and re-read all the steps , now I get a fully fonctionnel VIDEOSTATION without any hurt on NAS CPU ! Thank you very much for all the time spend for us and special thanx to wangsiji ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.