Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Endless play #14

Closed
GMib opened this issue Oct 12, 2021 · 20 comments
Closed

[BUG] Endless play #14

GMib opened this issue Oct 12, 2021 · 20 comments

Comments

@GMib
Copy link

GMib commented Oct 12, 2021

System details

  • Synology model: DS418play
  • DSM version: DSM 7.0-41890
  • VideoStation version: 3.0.1-2067
  • Advanced Media Extensions version: 1.1.1-0202

Describe the bug
Can't play file with eac3 audio, playing icon endless turn, other file work.
i tried uninstall and reinstall videostation, then re applying the patch without success.

FFMPEG logs

2021-10-12 14:42:53 - FFM15503 - *** PROCESS START REV AME_12.2 DS418play (apollolake) PID 15503 ***
2021-10-12 14:42:53 - FFM15503 - MOVIE    = /volume1/Share/Séries/9-1-1/Saison 4/9-1-1 - 4x07 - Nos chers voisins.mkv
2021-10-12 14:42:53 - FFM15503 - VCODEC   = hevc (Main 10)
2021-10-12 14:42:53 - FFM15503 - ACODEC   = eac3
2021-10-12 14:42:53 - FFM15503 - PARAMVS  =
2021-10-12 14:42:53 - FFM15503 -          = -ss 0.000 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/Share/
2021-10-12 14:42:53 - FFM15503 -          = Séries/9-1-1/Saison 4/9-1-1 - 4x07 - Nos chers voisins.mkv -vcodec h264_vaapi -vf format=nv12|vaapi,hwupload,scale_vaap
2021-10-12 14:42:53 - FFM15503 -          = i=w=1920:h=1072:format=nv12 -vsync 2 -bf 0 -vb 5275218 -acodec libmp3lame -ab 128K -ac 2 -f ssegment -pix_fmt yuv420p -s
2021-10-12 14:42:53 - FFM15503 -          = egment_format mpegts -segment_list_type m3u8 -hls_seek_time 0 -segment_time 5 -segment_time_delta 0.000 -segment_start_n
2021-10-12 14:42:53 - FFM15503 -          = umber 00000 -avoid_negative_ts 0 -break_non_keyframes 1 -max_muxing_queue_size 1024 -map 0:0 -map 0:1 /tmp/VideoStation/
2021-10-12 14:42:53 - FFM15503 -          = HLS/674429cdf968961660fafd17cfe28aaf_BXW097OJ/slice-%05d.ts
2021-10-12 14:42:53 - FFM15503 - MODE     = ORIG
2021-10-12 14:42:53 - FFM15503 - FFMPEG   = /var/packages/CodecPack/target/bin/ffmpeg41.orig
2021-10-12 14:42:53 - FFM15503 - PARAMWP  =
2021-10-12 14:42:53 - FFM15503 -          = -ss 0.000 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/Share/
2021-10-12 14:42:53 - FFM15503 -          = Séries/9-1-1/Saison 4/9-1-1 - 4x07 - Nos chers voisins.mkv -vcodec h264_vaapi -vf scale_vaapi=format=nv12,hwupload,sets
2021-10-12 14:42:53 - FFM15503 -          = ar=sar=1 -vsync 2 -bf 0 -vb 5275218 -acodec libmp3lame -ab 128K -ac 2 -f ssegment -pix_fmt yuv420p -segment_format mpegt
2021-10-12 14:42:53 - FFM15503 -          = s -segment_list_type m3u8 -hls_seek_time 0 -segment_time 5 -segment_time_delta 0.000 -segment_start_number 00000 -avoid_
2021-10-12 14:42:53 - FFM15503 -          = negative_ts 0 -break_non_keyframes 1 -map 0:0 -map 0:1 /tmp/VideoStation/HLS/674429cdf968961660fafd17cfe28aaf_BXW097OJ/s
2021-10-12 14:42:53 - FFM15503 -          = lice-%05d.ts
2021-10-12 14:42:53 - FFM15503 - CHILDPID = 15568
2021-10-12 14:42:53 - FFM15568 - *** PROCESS START REV 12 DS418play (apollolake) PID 15568 ***
2021-10-12 14:42:53 - FFM15568 - DEVICE   =
2021-10-12 14:42:53 - FFM15568 - MOVIE    = /volume1/Share/Séries/9-1-1/Saison 4/9-1-1 - 4x07 - Nos chers voisins.mkv
2021-10-12 14:42:53 - FFM15568 - VCODEC   = hevc (Main 10)
2021-10-12 14:42:53 - FFM15568 - ACODEC   = eac3
2021-10-12 14:42:53 - FFM15568 - PARAMVS  =
2021-10-12 14:42:53 - FFM15568 -          = -ss 0.000 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/Share/
2021-10-12 14:42:53 - FFM15568 -          = Séries/9-1-1/Saison 4/9-1-1 - 4x07 - Nos chers voisins.mkv -vcodec h264_vaapi -vf scale_vaapi=format=nv12,hwupload,sets
2021-10-12 14:42:53 - FFM15568 -          = ar=sar=1 -vsync 2 -bf 0 -vb 5275218 -acodec libmp3lame -ab 128K -ac 2 -f ssegment -pix_fmt yuv420p -segment_format mpegt
2021-10-12 14:42:53 - FFM15568 -          = s -segment_list_type m3u8 -hls_seek_time 0 -segment_time 5 -segment_time_delta 0.000 -segment_start_number 00000 -avoid_
2021-10-12 14:42:53 - FFM15568 -          = negative_ts 0 -break_non_keyframes 1 -map 0:0 -map 0:1 /tmp/VideoStation/HLS/674429cdf968961660fafd17cfe28aaf_BXW097OJ/s
2021-10-12 14:42:53 - FFM15568 -          = lice-%05d.ts
2021-10-12 14:42:53 - FFM15568 - MODE     = WRAP
2021-10-12 14:42:53 - FFM15568 - FFMPEG   = /var/packages/ffmpeg/target/bin/ffmpeg
2021-10-12 14:42:53 - FFM15568 - PARAMWP  =
2021-10-12 14:42:53 - FFM15568 -          = -ss 0.000 -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i /volume1/Share/
2021-10-12 14:42:53 - FFM15568 -          = Séries/9-1-1/Saison 4/9-1-1 - 4x07 - Nos chers voisins.mkv -vcodec h264_vaapi -vf scale_vaapi=w=scale_vaapi=format=nv12
2021-10-12 14:42:53 - FFM15568 -          = ,hwupload,setsar=sar=1:h=scale_vaapi=format=nv12,hwupload,setsar=sar=1:format=nv12,hwupload,setsar=sar=1 -vsync 2 -bf 0
2021-10-12 14:42:53 - FFM15568 -          = -vb 5275218 -acodec libmp3lame -ab 128K -ac 2 -f ssegment -pix_fmt yuv420p -segment_format mpegts -segment_list_type m3u
2021-10-12 14:42:53 - FFM15568 -          = 8 -hls_seek_time 0 -segment_time 5 -segment_time_delta 0.000 -segment_start_number 00000 -avoid_negative_ts 0 -break_non
2021-10-12 14:42:53 - FFM15568 -          = _keyframes 1 -map 0:0 -map 0:1 /tmp/VideoStation/HLS/674429cdf968961660fafd17cfe28aaf_BXW097OJ/slice-%05d.ts
2021-10-12 14:42:53 - FFM15568 - CHILDPID = 15625
2021-10-12 14:42:54 - FFM15568 - *** CHILD END ***
2021-10-12 14:42:54 - FFM15568 - STDOUT   =
2021-10-12 14:42:54 - FFM15568 -          =       _STATISTICS_WRITING_DATE_UTC: 2021-06-29 18:57:45
2021-10-12 14:42:54 - FFM15568 -          =       _STATISTICS_WRITING_DATE_UTC-eng: 2021-06-29 18:57:45
2021-10-12 14:42:54 - FFM15568 -          =       _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
2021-10-12 14:42:54 - FFM15568 -          =       _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
2021-10-12 14:42:54 - FFM15568 -          =       DURATION        : 00:44:07.965000000
2021-10-12 14:42:54 - FFM15568 -          = Stream mapping:
2021-10-12 14:42:54 - FFM15568 -          =   Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi))
2021-10-12 14:42:54 - FFM15568 -          =   Stream #0:1 -> #0:1 (eac3 (native) -> mp3 (libmp3lame))
2021-10-12 14:42:54 - FFM15568 -          = Press [q] to stop, [?] for help
2021-10-12 14:42:54 - FFM15568 -          = [Parsed_setsar_2 @ 0xffc280] Option 'h' not found
2021-10-12 14:42:54 - FFM15568 -          = [AVFilterGraph @ 0xfc3440] Error initializing filter 'setsar' with args 'sar=1:h=scale_vaapi=format=nv12'
2021-10-12 14:42:54 - FFM15568 -          = Error reinitializing filters!
2021-10-12 14:42:54 - FFM15568 -          = Failed to inject frame into filter network: Option not found
2021-10-12 14:42:54 - FFM15568 -          = Error while processing the decoded data for stream #0:0
2021-10-12 14:42:54 - FFM15568 -          = Conversion failed!
2021-10-12 14:42:54 - FFM15568 - MODE     = PIPE SV
2021-10-12 14:42:54 - FFM15568 - FFMPEG1  = /var/packages/ffmpeg/target/bin/ffmpeg
2021-10-12 14:42:54 - FFM15568 - FFMPEG2  = /var/packages/VideoStation/target/bin/ffmpeg.orig

Additional context

@AlexPresso
Copy link
Owner

Hey,
Which SynoCommunity ffmpeg version are you using ?

@GMib
Copy link
Author

GMib commented Oct 12, 2021

hi, 4.3.2-38

@AlexPresso
Copy link
Owner

AlexPresso commented Oct 12, 2021

The issue is probably due to the fact you're not using the wrapper from my patcher.

You only uninstalled VideoStation and not VideoStation and Advanced Media Extensions. Then the old wrapper from another repository wasn't replaced in Advanced Media Extensions.

Please proceed in this order:

  • uninstall VideoStation (keep your library)
  • uninstall Advanced Media Extensions
  • Reinstall VideoStation (will automatically install Advanced Media Extensions)
  • Re-execute the patch

@GMib
Copy link
Author

GMib commented Oct 12, 2021

thx for help, now video work but not sound.

https://gist.github.com/GMib/d21de583061c23de9cce54505fe9a4ac#file-gistfile1-txt

@AlexPresso
Copy link
Owner

The gist you provided is the same log file than the one you already sent ;)

But there's a way to get aditional details on why it doesn't work. When a video is playing, the wrapper creates a temporary debug file storing infos from ffmpeg.
To get its content, you can:

  • Start the video on VideoStation, wait for the video to play and put the browser in background (keep the video playing)
  • Connect through SSH
  • Impersonate root user (sudo -i)
  • Go to /tmp (cd /tmp)
  • Type ls -al | grep ffmpeg to list all files containing "ffmpeg"
  • You should see two files, the ffmpeg.log and a new one, that should look like ffmpeg-FFMxxxx.stderr
  • Type tail -100 ffmpeg-FFMxxxx.stderr with the filename you got previously, to print its content to the console
  • Copy paste the content to a gist

@GMib
Copy link
Author

GMib commented Oct 12, 2021

@AlexPresso
Copy link
Owner

Perfect, thank you, so there's no error during stream transcoding.
Could you please do the same with

  • head -50 ffmpeg-FFMxxxx.stderr instead of tail

@GMib
Copy link
Author

GMib commented Oct 12, 2021

@AlexPresso
Copy link
Owner

No worries ;)

I'm sorry, I should have given you a higher count 😶, but the head part is incomplete, the video is having a lot of streams (video and audio sources) so it takes a lot of lines to print it all out.
Could you increase the lines count to 300 or more if needed (head -300 ffmpeg-FFMxxxx.stderr) ?

@GMib
Copy link
Author

GMib commented Oct 12, 2021

@AlexPresso
Copy link
Owner

AlexPresso commented Oct 12, 2021

Perfect ! Thank you.

As I can tell from the logs, everything is supposed to work as expected, FFMPEG is tuned to transcode from EAC3 to MP3 and there's no error when the stream segments are being processed.

I'm sorry to ask, but are you sure you haven't muted VideoStation / Chrome / your computer / speakers ? 😉

@GMib
Copy link
Author

GMib commented Oct 12, 2021

Yes i'm sure, video with aac work fine, video with ac3 or eac3 have no sound and playback cut often.

@AlexPresso
Copy link
Owner

Could you upload this specific file on a file host (media fire, wetransfer, ...) and post the link please

@GMib
Copy link
Author

GMib commented Oct 12, 2021

trying to upload, it's strange, some movie with ac3 have sound work some not

@GMib
Copy link
Author

GMib commented Oct 12, 2021

@AlexPresso
Copy link
Owner

AlexPresso commented Oct 13, 2021

My NAS is playing it sucessfully, but the audio only starts to play near 00:00:17 and stops randomly. Since that problem occurs in VLC too, I'm pretty sure it's a file related issue, which probably happened when the uploader merged/muxed the video and audio streams.

Unfortunately, I won't be able to do a lot on that side, I'm also watching HEVC + EAC3 series and never had that issue so far.

@GMib
Copy link
Author

GMib commented Oct 13, 2021

There is no sound before 00:00:17 it's normal, ripper had removed this part because it was in english, for me it not stop randomly after, i've seen this with kodi without problem, and tested now with kmplayer. I can't play movies or tvshows with eac3, I've just see also a quality problem, picture is very pixelized. i never had issue before i update in dsm7 (don't remind what method i've used before update for playing eac3). I actually test Plex because videostation is too bad. thank you for taking the time to help me

@AlexPresso
Copy link
Owner

Yeah, VideoStation is really bad, if you have the opportunity to switch to another tool, Jellyfin is (in my opinion) a better free alternative to Plex.
The quality "problem" is due to two things:

  • the realtime transcoding: when ffmpeg converts a video codec to another (i.e. HEVC --> H.264), it's losing a bit quality.
  • because the realtime transcoding can be hard for some CPUs, ffmpeg-wrapper is tuned to use a 1024kb buffer size, which you can double / triple if you have a good CPU.

@GMib
Copy link
Author

GMib commented Oct 13, 2021

I discarded jellyfin because my nas is not docker compatible but i just see there is community package, i will test that, thx

@GMenethil
Copy link

it works on web video station, but on android the playing icon endless turn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants