darknebular / Wrapper_VideoStation

Synology VideoStation and DLNA FFmpeg Wrapper with AAC, DTS, EAC3 and TrueHD support via pipes (now with GStreamer support). It enables full hardware transcoding from Synology´s FFmpeg for video and transcoding DTS, EAC3, TrueHD and AAC from the SynoCommunity's FFmpeg only when necessary.
657 stars 73 forks source link

Synology DS220+ issues with DSVideo on Google TV stick. #32

Closed k3iran closed 1 year ago

k3iran commented 1 year ago

Hi! I have this kind of setup: DS220+ NAS with videostation Samsung TV with some old DS Video app for samsung's system Realme TV stick with new DS Video app on older Panasonic TV

Initially - using DS Video on Samsung works without issue, same on the other setup. Unfortunately some movies would not work on Realme due to eac3 codec. I tried using mxplayer or vlc but that did not help at all. I found this wonderfull solution and tried installing it today. I did autoinstall, Now on Samsung everything seems to be like before (which is good). But on the Realme TV stick nothing seems to work. The ds video gives 'unknown error' everytime I tried it. I so another post about issues so I turned on transcoding, hardware acceleration was already on. Is there anything I should try to make it working? I will be very grateful for support!

darknebular commented 1 year ago

Please could you send me the logs?

You can do It sending me the result of This command when This occur: tail -f -n 150 /tmp/wrapper_ffmpeg.log

best regards.

k3iran commented 1 year ago

Yes, sure. What I get at the beginning of the log is:

[2023-07-28 13:15:57] INFO: Your system has a low performance, I recommend to you install the Simplest Wrapper. [2023-07-28 13:15:57] INFO: ==================== Installation of the Advanced Wrapper: START ==================== [2023-07-28 13:15:57] INFO: Backup the original ffmpeg41 as ffmpeg41.orig. [2023-07-28 13:15:57] INFO: Injection of the ffmpeg41 wrapper using this injector: X-Advanced. [2023-07-28 13:16:00] INFO: Fixing permissions of the ffmpeg41 wrapper. [2023-07-28 13:16:00] INFO: Adding of the KEY of this Wrapper in /tmp. [2023-07-28 13:16:00] INFO: Backup the original libsynovte.so in VideoStation as libsynovte.so.orig. [2023-07-28 13:16:00] INFO: Fixing permissions of /var/packages/VideoStation/target/lib/libsynovte.so.orig [2023-07-28 13:16:00] INFO: Patching /var/packages/VideoStation/target/lib/libsynovte.so for compatibility with AAC, DTS, EAC3 and TrueHD [2023-07-28 13:16:00] INFO: Adding of the KEY of this Wrapper in DLNA MediaServer. [2023-07-28 13:16:00] INFO: Backup the original libsynovte.so in MediaServer as libsynovte.so.orig. [2023-07-28 13:16:00] INFO: Fixing permissions of /var/packages/MediaServer/target/lib/libsynovte.so.orig [2023-07-28 13:16:00] INFO: Patching /var/packages/MediaServer/target/lib/libsynovte.so for compatibility with AAC, DTS, EAC3 and TrueHD [2023-07-28 13:16:00] INFO: Restarting CodecPack... [2023-07-28 13:16:04] INFO: Restarting VideoStation... [2023-07-28 13:16:10] INFO: Restarting MediaServer... [2023-07-28 13:16:14] INFO: ==================== Installation of the Advanced Wrapper: COMPLETE ====================

So maybe I should try minimal version? What is very weird to me is that video station played directly from web browser using my PC adds to the log like this: 2023-07-28 14:36:34 - FFM28791 - PROCESS START REV AME_12.4.2 DS220+ (geminilake) PID 28791 2023-07-28 14:36:34 - FFM28791 - MOVIE = /volume1/video/Filmy/Main/[title]/[title].mkv 2023-07-28 14:36:34 - FFM28791 - VCODEC = hevc (Main 10) 2023-07-28 14:36:34 - FFM28791 - ACODEC = eac3 2023-07-28 14:36:34 - FFM28791 - PARAM_ORIG = 2023-07-28 14:36:34 - FFM28791 - = -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorot ate -i /volume1/video/Filmy 2023-07-28 14:36:34 - FFM28791 - = /Main/[title]/[title].mkv -vcodec h264_vaapi -v f format=nv12|vaapi,hwupload,sca 2023-07-28 14:36:34 - FFM28791 - = le_vaapi=w=1920:h=1072,scale_vaapi=format=nv12 -vsync 2 -bf 0 -b:v 15000000 -acodec libm p3lame -ab 128k -ac 2 -progress 2023-07-28 14:36:34 - FFM28791 - = - -f mp4 -skip_displaymatrix 1 -max_muxing_queue_size 1024 -map 0:0 -map 0:1 -y /volume1 /video/@eaDir/@tmp/434c619ef23d2 2023-07-28 14:36:34 - FFM28791 - = f7bdf872f3230e89e3b_590258141 2023-07-28 14:36:34 - FFM28791 - MODE = MP4_TRANSCO-VS 2023-07-28 14:36:34 - FFM28791 - FFMPEG = /var/packages/ffmpeg6/target/bin/ffmpeg 2023-07-28 14:36:34 - FFM28791 - PARAM_WRAP = 2023-07-28 14:36:34 - FFM28791 - = -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorot ate -i /volume1/video/Filmy 2023-07-28 14:36:34 - FFM28791 - = /Main/[title]/[title].mkv -vcodec h264_vaapi -v f format=nv12|vaapi,hwupload,sca 2023-07-28 14:36:34 - FFM28791 - = le_vaapi=w=1920:h=1072,scale_vaapi=format=nv12 -vsync 2 -bf 0 -b:v 15000000 -acodec libm p3lame -ab 128k -ac 2 -progress 2023-07-28 14:36:34 - FFM28791 - = - -f mp4 -skip_displaymatrix 1 -max_muxing_queue_size 1024 -map 0:0 -map 0:1 -y /volume1 /video/@eaDir/@tmp/434c619ef23d2 2023-07-28 14:36:34 - FFM28791 - = f7bdf872f3230e89e3b_590258141 2023-07-28 14:36:34 - FFM28791 - CHILDPID = 28840 BUT the movie I watched yesterday using my Samsung NU8042 and the app did not record in logs at all. And all the failed attempts to watch anything using realme TV stick also do not put themselves to the log at all. It's as if there was no start of the wrapper at all. Does that make any sense to you? Maybe I should change something in the google tv app?

Best regards.

darknebular commented 1 year ago

Had you installed others Wrappers? My Wrapper is incompatible with others Wrappers... If there isn't any log IS because It doesn't use my wrapper...

k3iran commented 1 year ago

No, like i said before. The first thing I found was your wrapper, I used auto. That's all

darknebular commented 1 year ago

Could you tell me the steps using realme TV?

darknebular commented 1 year ago

I think that I found your problem. Tomorrow I Will write to you yo check some things in DLNA Media Server.

BEST regards.

darknebular commented 1 year ago

This device is using DLNA. Have you got Media Server installed?

darknebular commented 1 year ago

Please confirm me this settings: image

image

Regards.

darknebular commented 1 year ago

Could you confirm me If you have Media Server installed? If not, please install this package and then-re-install again my Wrapper and try again.

Best regards.

k3iran commented 1 year ago

Hi! I had some time away from PC, sorry. I will quickly check everything you've written post by post and get back to you.

k3iran commented 1 year ago

This device is using DLNA. Have you got Media Server installed?

Yes, I installed it before the wrapper. Wasn't using it before.

k3iran commented 1 year ago

Please confirm me this settings: image

image

Regards.

None of these things were set like you shown, so I am doing it write now. Should I then download VLC on this android device and use it to watch movies?

k3iran commented 1 year ago

After these settings and resetting realme tv stick some movies are working normally (in ds video app without any combination with other apps). Some still show 'unknown error'. I'll try to get you the logs.

k3iran commented 1 year ago

This is what I get trying to play movie getting 'unknown error': 2023-08-02 15:21:20 - FFM25051 - *** PROCESS START REV AME_12.4.2 DS220+ (geminilake) PID 25051 *** 2023-08-02 15:21:20 - FFM25051 - MOVIE = /movie.mkv 2023-08-02 15:21:20 - FFM25051 - VCODEC = hevc (Main 10) 2023-08-02 15:21:20 - FFM25051 - ACODEC = eac3 2023-08-02 15:21:20 - FFM25051 - PARAM_ORIG = 2023-08-02 15:21:20 - FFM25051 - = -ss 0.000 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/v 2023-08-02 15:21:20 - FFM25051 - = ideo/movie.mkv -r 24 -vcodec h264_vaa 2023-08-02 15:21:20 - FFM25051 - = pi -vf format=nv12|vaapi,hwupload,scale_vaapi=w=1920:h=1072,scale_vaapi=format=nv12 -vsync 2 -bf 0 -vb 15000000 -acodec 2023-08-02 15:21:20 - FFM25051 - = libmp3lame -ab 128K -ac 2 -f ssegment -pix_fmt yuv420p -segment_format mpegts -segment_list_type m3u8 -hls_seek_time 0 - 2023-08-02 15:21:20 - FFM25051 - = segment_time 5 -segment_time_delta 0.000 -segment_start_number 00000 -individual_header_trailer 0 -avoid_negative_ts 0 - 2023-08-02 15:21:20 - FFM25051 - = break_non_keyframes 1 -max_muxing_queue_size 1024 -map 0:0 -map 0:1 /tmp/VideoStation/HLS/8153f3a669308d7fd33f358160f4e9 2023-08-02 15:21:20 - FFM25051 - = 99_w1VV64j1/slice-%05d.ts 2023-08-02 15:21:20 - FFM25051 - MODE = ORIG-VSMS 2023-08-02 15:21:20 - FFM25051 - FFMPEG = /var/packages/CodecPack/target/pack/bin/ffmpeg41.orig 2023-08-02 15:21:20 - FFM25051 - PARAM_WRAP = 2023-08-02 15:21:20 - FFM25051 - = -ss 0.000 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/v 2023-08-02 15:21:20 - FFM25051 - = ideo/movie.mkv -r 24 -vcodec h264_vaa 2023-08-02 15:21:20 - FFM25051 - = pi -vf format=nv12|vaapi,hwupload,scale_vaapi=w=1920:h=1072,scale_vaapi=format=nv12 -vsync 2 -bf 0 -vb 15000000 -acodec 2023-08-02 15:21:20 - FFM25051 - = libmp3lame -ab 128K -ac 2 -f ssegment -pix_fmt yuv420p -segment_format mpegts -segment_list_type m3u8 -hls_seek_time 0 - 2023-08-02 15:21:20 - FFM25051 - = segment_time 5 -segment_time_delta 0.000 -segment_start_number 00000 -individual_header_trailer 0 -avoid_negative_ts 0 - 2023-08-02 15:21:20 - FFM25051 - = break_non_keyframes 1 -max_muxing_queue_size 1024 -map 0:0 -map 0:1 /tmp/VideoStation/HLS/8153f3a669308d7fd33f358160f4e9 2023-08-02 15:21:20 - FFM25051 - = 99_w1VV64j1/slice-%05d.ts 2023-08-02 15:21:20 - FFM25051 - CHILDPID = 25100 2023-08-02 15:21:20 - FFM25051 - *** CHILD END *** 2023-08-02 15:21:20 - FFM25051 - STDOUT = 2023-08-02 15:21:20 - FFM25051 - = DURATION : 02:01:32.375000000 2023-08-02 15:21:20 - FFM25051 - = NUMBER_OF_FRAMES: 839 2023-08-02 15:21:20 - FFM25051 - = NUMBER_OF_BYTES : 22045 2023-08-02 15:21:20 - FFM25051 - = _STATISTICS_WRITING_APP: mkvmerge v74.0.0 ('You Oughta Know') 64-bit 2023-08-02 15:21:20 - FFM25051 - = _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 2023-08-02 15:21:20 - FFM25051 - = Stream #0:39(chi): Subtitle: subrip 2023-08-02 15:21:20 - FFM25051 - = Metadata: 2023-08-02 15:21:20 - FFM25051 - = title : Traditional 2023-08-02 15:21:20 - FFM25051 - = BPS : 22 2023-08-02 15:21:20 - FFM25051 - = DURATION : 02:01:32.375000000 2023-08-02 15:21:20 - FFM25051 - = NUMBER_OF_FRAMES: 845 2023-08-02 15:21:20 - FFM25051 - = NUMBER_OF_BYTES : 20962 2023-08-02 15:21:20 - FFM25051 - = _STATISTICS_WRITING_APP: mkvmerge v74.0.0 ('You Oughta Know') 64-bit 2023-08-02 15:21:20 - FFM25051 - = _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 2023-08-02 15:21:20 - FFM25051 - = Stream mapping: 2023-08-02 15:21:20 - FFM25051 - = Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi)) 2023-08-02 15:21:20 - FFM25051 - = Stream #0:1 -> #0:1 (? (?) -> mp3 (libmp3lame)) 2023-08-02 15:21:20 - FFM25051 - = Decoder (codec eac3) not found for input stream #0:1 2023-08-02 15:21:20 - FFM25051 - MODE = PIPE V_ORIG-A_WRAP-VS 2023-08-02 15:21:20 - FFM25051 - FFMPEG1 = /var/packages/CodecPack/target/pack/bin/ffmpeg41.orig 2023-08-02 15:21:20 - FFM25051 - FFMPEG2 = /var/packages/ffmpeg6/target/bin/ffmpeg 2023-08-02 15:21:20 - FFM25051 - PARAM_WRAP1 = 2023-08-02 15:21:20 - FFM25051 - = -ss 0.000 -noaccurate_seek -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorot 2023-08-02 15:21:20 - FFM25051 - = ate -i /volume1/video/movie.mkv -vcod 2023-08-02 15:21:20 - FFM25051 - = ec h264_vaapi -vf format=nv12|vaapi,hwupload,scale_vaapi=w=1920:h=1072,scale_vaapi=format=nv12 -vsync 2 -bf 0 -vb 150000 2023-08-02 15:21:20 - FFM25051 - = 00 -acodec copy -f mpegts -pix_fmt yuv420p -map 0:0 -map 0:1 -bufsize 8192k pipe: 2023-08-02 15:21:20 - FFM25051 - PARAM_WRAP2 = 2023-08-02 15:21:20 - FFM25051 - = -analyzeduration 10000000 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorota 2023-08-02 15:21:20 - FFM25051 - = te -i pipe: -map 0:0 -map 0:1 -map 0:1 -vcodec copy -vsync 2 -bf 0 -vb 15000000 -c:a:0 libmp3lame -c:a:1 libfdk_aac -b:a 2023-08-02 15:21:20 - FFM25051 - = :0 256k -b:a:1 512k -ac:1 2 -ac:2 6 -f ssegment -pix_fmt yuv420p -segment_format mpegts -segment_list_type m3u8 -hls_see 2023-08-02 15:21:20 - FFM25051 - = k_time 0 -segment_time 5 -segment_time_delta 0.000 -segment_start_number 00000 -individual_header_trailer 0 -avoid_negat 2023-08-02 15:21:20 - FFM25051 - = ive_ts 0 -break_non_keyframes 1 -max_muxing_queue_size 1024 /tmp/VideoStation/HLS/8153f3a669308d7fd33f358160f4e999_w1VV6 2023-08-02 15:21:20 - FFM25051 - = 4j1/slice-%05d.ts$ 2023-08-02 15:21:20 - FFM25051 - CHILDPID = 25132 2023-08-02 15:21:29 - FFM25051 - *** KILLCHILD *** 2023-08-02 15:21:29 - FFM25051 - STDOUT = 2023-08-02 15:21:29 - FFM25051 - = 2023-08-02 15:21:29 - FFM25051 - *** CHILD END *** 2023-08-02 15:21:29 - FFM25051 - *** PROCESS END ***

k3iran commented 1 year ago

Thank you for your patience :)

darknebular commented 1 year ago

Thanks for the logs, I don't see any error in your logs. There is a message that the eac3 codec doesn't support in the native binary and then, the Wrapper was activated to convert this movie to two audio streams: 1) in MP3 256 Kbps and 2) AAC 5.1 512 Kbps. If you can see this movie in your browser then my Wrapper is working fine and your system too.

Checking it out your logs's timming, It looks like that there was a network outage. The realme TV has a good LAN connection?

Have you tried to use DLNA for the realme tv?

Perhaps there is another possibility, your system has a low performance, and your system is converting hevc to h264 and the audio to two audio streams (one of them in 5.1) in real time and this could generate latency and the realme TV close the connection. Using the Simplest Wrapper (you will lost the 5.1 streams and the configuration options) but you will use the defaults arguments from Video Station and the Simplest Wrapper doesn't touch or change any argument and this will permit us to know if this issue is Video Station related or by the Advanced Wrapper related or by a low performace.

Another possibility, I think that the Realme TV can't work fine with 2 audio's streams from the same track. I suggest to you to configure the advanced Wrapper, in order to use only 1 audio stream. You need to go to the installer and then select the ( C ) Option ( You will see the configuration menu), then select the option ( G ) . This will save a little CPU and RAM (because only It will be 1 audio stream MP3 256 Kbps) and it will help to check if the Realme TV can do only one audio stream or not.

image

Best regards.

k3iran commented 1 year ago

I tried to use C+G option - it did not help. Then I changed wifi connection from 2.4 to 5, that did not help either, but I am now almost 100% sure it is a problem of connection. Smaller files (like movies split to 4-8GB parts) work while bigger do not. I will try changing to the simplest wrapper and go from there.

darknebular commented 1 year ago

Ah! I forgeted to tell you, that there is a bug in Video Station using DTS or EAC3 7.1 audio tracks, due to this with the Simplest you will not be able to play them (7.1 audios). I fixed this bug in the Advanced because with the Advanced Wrapper I can change the bad arguments sended by VideoStation.

I'm afraid, if the problem is the quality of the network, there is a good chance that with the Simplest Wrapper it will not work well either.

Please keep me informed.

Kind regards.

darknebular commented 1 year ago

Hello @k3iran any news about this?