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

DVDSUB gets mixed together during playback. #522

Open
5 tasks done
Antonbp5 opened this issue Dec 30, 2024 · 14 comments
Open
5 tasks done

DVDSUB gets mixed together during playback. #522

Antonbp5 opened this issue Dec 30, 2024 · 14 comments
Labels
bug Something isn't working upstream

Comments

@Antonbp5
Copy link

This issue respects the following points:

  • This is a bug, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found here.
  • This issue is not already reported on GitHub (I've searched it).
  • I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Description of the bug

It seems that after upgrading to jellyfin Server version 10.10.3 all movies that transcode, with DVDSUBs seem to get the Subtitles mixed up during playback.

It seems to only happen with DVDSUBs and only when it transcodes, both on a browser, like Firefox or on a google Chromecast.

You can play a movie for 30 seconds, and during the movie the first 30 seconds of subtitles will repeat itself in between the correct Subtitles.
I have even made a video of it as I find it hard to describe. I apologize for the low quality and the missing audio, but you can see the subtitles acting as described. It can be found in the Videoes section of the report.

Reproduction steps

  1. Play something with DVDSUB on a client that would require transcoding, like a browser.
  2. Play for about 1 minute and it will show the issue of subtitles repeating itself.

What is the current bug behavior?

The subtitles repeats itself throughout.

What is the expected correct behavior?

It should just play normally, like when you Direct play on a compatible client, or play directly from the file outside of jellyfin.

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.3

Environment

- OS: Windows 10
- Clients: Browser and google tv Chromecast
- Browser: Firefox
- FFmpeg Version: 7.0.2-Jellyfin 
- Playback Method: Transcode
- Hardware Acceleration: QuickSync
- GPU Model: UHD 630
- Plugins: AudioDB, IntroSkipper, MusicBrainz, OMDb, Studio Images, Subtitles Extract, TMDb, TMDb Box Sets, TheTVDB
- Reverse Proxy: None
- Base URL:
- Networking: NAT
- Storage: NFS

Jellyfin logs

FFmpeg logs will be imported as a .txt file under Additional information

FFmpeg logs

FFmpeg logs will be imported as a .txt file under Additional information

Client / Browser logs

No response

Relevant screenshots or videos

https://drive.google.com/file/d/1-HpXiVKyN3vLwnwwj2IShPu2VccF4Ma9/view?usp=sharing

Additional information

Jellyfin transcode log.txt

@Antonbp5 Antonbp5 added the bug Something isn't working label Dec 30, 2024
@gnattu
Copy link
Member

gnattu commented Dec 31, 2024

Does it happen with software transcoding as well?

@Antonbp5
Copy link
Author

Does it happen with software transcoding as well?

No it does not seem to happen when software transcoding. I have added the Log to this comment.Jellyfin Software Transcoding Log.txt

@gnattu
Copy link
Member

gnattu commented Dec 31, 2024

cc @nyanmisaka

Do you have any info about the regressions of qsv overlay?

@nyanmisaka
Copy link
Member

@Antonbp5

after upgrading to jellyfin Server version 10.10.3

Do you remember which version you upgraded from to 10.10.3?

@Antonbp5
Copy link
Author

@Antonbp5

after upgrading to jellyfin Server version 10.10.3

Do you remember which version you upgraded from to 10.10.3?

Yes it was from 10.9.11.

@nyanmisaka
Copy link
Member

nyanmisaka commented Dec 31, 2024

Yes it was from 10.9.11.

@Antonbp5 There are many changes between 10.9 and 10.10. Especially the FFmpeg version.

So can you try to downgrade to FFmpeg 6 and see if the problem persists? If the problem persists then it may be related to the FFmpeg command used in JF 10.10.

ffmpeg6:
https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v6.0.1-8/jellyfin-ffmpeg_6.0.1-8-portable_win64.zip

ffmpeg7:
https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v7.0.2-8/jellyfin-ffmpeg_7.0.2-8_portable_win64-clang-gpl.zip

Download and extract to C:\Program Files\Jellyfin\Server\, restart the server.

@Antonbp5
Copy link
Author

Yes it was from 10.9.11.

@Antonbp5 There are many changes between 10.9 and 10.10. Especially the FFmpeg version.

So can you try to downgrade to FFmpeg 6 and see if the problem persists? If the problem persists then it may be related to the FFmpeg command used in JF 10.10.

I have downgraded and can confirm that the issue still persists on FFmpeg 6. I have added a log below if needed.

FFmpeg 6.0.1 transcode log.txt

@nyanmisaka
Copy link
Member

I have downgraded and can confirm that the issue still persists on FFmpeg 6.

@Antonbp5 Try this modified ffmpeg command in cmd/powershell and play C:\test.mp4 to see if it works.

ffmpeg -analyzeduration 200M -probesize 1G -f matroska -init_hw_device d3d11va=dx11:,vendor=0x8086 -init_hw_device qsv=qs@dx11 -filter_hw_device qs -hwaccel d3d11va -hwaccel_output_format d3d11 -noautorotate -threads 2 -canvas_size 720x576 -i file:"Z:\JellyFin Media\Shows\Big Bang Theory (2007)\Season 10\S10e01.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 h264_qsv -low_power 1 -preset veryfast -b:v 4487248 -maxrate 4487248 -bufsize 8974496 -profile:v:0 high -level 30 -g:v:0 75 -keyint_min:v:0 75 -filter_complex "[0:3]scale,scale=720:576:fast_bilinear,format=bgra,hwupload=derive_device=qsv:extra_hw_frames=64[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=qsv,vpp_qsv=format=nv12:passthrough=0[main];[main][sub]overlay_qsv=eof_action=pass:repeatlast=0:w=720:h=576" -start_at_zero -codec:a:0 copy -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -y C:\test.mp4

@Antonbp5
Copy link
Author

I have downgraded and can confirm that the issue still persists on FFmpeg 6.

@Antonbp5 Try this modified ffmpeg command in cmd/powershell and play C:\test.mp4 to see if it works.

Had some trouble with my Network drive mounting, but after fixing it, I ran the command and played the file through VLC. I can see that the issue persists.

@nyanmisaka
Copy link
Member

I can see that the issue persists.

@Antonbp5 This is very strange. The problem may be between the video file itself and the QSV hwaccel. Unfortunately I have not encountered similar issues with DVDSUB. Can you share a sample clip that can be used to reproduce the problem? (You can send to nst799610810 at gmail dot com) So that I can check it later on the same HD630 iGPU.

@Antonbp5
Copy link
Author

I can see that the issue persists.

@Antonbp5 This is very strange. The problem may be between the video file itself and the QSV hwaccel. Unfortunately I have not encountered similar issues with DVDSUB. Can you share a sample clip that can be used to reproduce the problem? (You can send to nst799610810 at gmail dot com) So that I can check it later on the same HD630 iGPU.

I have also posted this issue on forum.jellyfin.org and they could not reproduce the problem either. You of cause seem to know much more about how it works though.
I have sent a shortened version of the video to the email you listed above. I also ran the modified Command again on the file to confirm that the issue still occurs on it, and I can confirm that it does.
Thank you very much for the help! Can't wait to see what you turn up

@nyanmisaka
Copy link
Member

@Antonbp5 The issue can be reproduced on HD630 using legacy windows driver. Intel 11th gen+ seems not to be affected.

It's a memory alignment issue specific to the MediaSDK, and Intel doesn't seem to handle it well in all cases.

Using this command should encode the correct video C:\test2.mp4:

ffmpeg -analyzeduration 200M -probesize 1G -f matroska -init_hw_device d3d11va=dx11:,vendor=0x8086 -init_hw_device qsv=qs@dx11 -filter_hw_device qs -hwaccel d3d11va -hwaccel_output_format d3d11 -noautorotate -threads 2 -canvas_size 720x576 -i file:"Z:\JellyFin Media\Shows\Big Bang Theory (2007)\Season 10\S10e01.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 h264_qsv -low_power 1 -preset veryfast -b:v 4487248 -maxrate 4487248 -bufsize 8974496 -profile:v:0 high -level 30 -g:v:0 75 -keyint_min:v:0 75 -filter_complex "[0:3]scale,scale=720:576:fast_bilinear,format=bgra,hwupload=derive_device=d3d11va,format=d3d11,hwmap=derive_device=qsv[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,hwmap=derive_device=qsv,vpp_qsv=format=nv12:passthrough=0[main];[main][sub]overlay_qsv=eof_action=pass:repeatlast=0:w=720:h=576" -start_at_zero -codec:a:0 copy -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -y C:\test2.mp4

This is not our regression, it should have been there for a long time. It will take more time to investigate before a full fix.

@Antonbp5
Copy link
Author

Antonbp5 commented Dec 31, 2024

@Antonbp5 The issue can be reproduced on HD630 using legacy windows driver. Intel 11th gen+ seems not to be affected.

It's a memory alignment issue specific to the MediaSDK, and Intel doesn't seem to handle it well in all cases.

Using this command should encode the correct video C:\test2.mp4:

This is not our regression, it should have been there for a long time. It will take more time to investigate before a full fix.

Okay very cool. I'm very happy we have at least found the reason for the issue. If the issue is only on the HD630 it should only hit 7th gen intel, unless the issue also occurs on the UHD630 as well.

I will be looking to upgrade my machine and otherwise wait patiently for a fix. Thank you very much. Should I close this issue, or do you want to keep it open until there is a potential fix?

ps: I tried your command but I am receiving the below error:

[Parsed_hwmap_5 @ 000001d6ee199880] Failed to map frame: -40.
Error while add the frame to buffer source(Function not implemented).
Error while filtering: Function not implemented
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
Conversion failed!

I am not sure what it means, but it doesn't resolve the issue in jellyfin anyways, so it's not very important.

@nyanmisaka
Copy link
Member

Should I close this issue

You can keep it open

I am receiving the below error

Perhaps you are using ffmpeg 6?

@nyanmisaka nyanmisaka transferred this issue from jellyfin/jellyfin Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

3 participants