Jellyfin Forum
SOLVED: Trickplay Using All of My Storage - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Trickplay Using All of My Storage (/t-solved-trickplay-using-all-of-my-storage)

Pages: 1 2


Trickplay Using All of My Storage - FactoriedMyAuth - 2024-11-04

I just upgraded my system to 10.10.0 and after a couple days, I noticed that my system was lagging really bad. Media would only play for a few minutes then stop, transcoding wouldn't work at all, and many times, I couldn't even connect to the server. I went to the computer hosting the server to see what was going on. I noticed that on the computer's hard drive, there was only 24MB of space left. That should not have been possible because there is over 300GB of space there after all programs are installed. 

I ran WinDirStat to see where all of the space was going and it was Jellyfin. Specifically, the temp folder created under AppData. The folder had a ton of files in it. Windows Explorer tried counting the number of items in it, but froze up after 23 Million. I was able to pull a log eventually and saw that the directory was being created by the Trickplay process in Jellyfin. After checking the logs, I stopped the server and tried to delete the temp folder. That did not work, because Windows Explorer kept trying to index the folder prior to deletion. I eventually resorted to renaming the folder and using a PowerShell command to force the delete. 

My Trickplay was set up to make a frame every 10s (10,000ms). For a 3-hour movie, that would be 1080 image files. Since over 23 million files were found in the temp folder, I have to assume there is something broken somewhere. Assuming all of my content is 3-hours long (which it is not), 23M files would imply that my system has a minimum of 22,300 movies in it. I can assure you, it does not. 

I have since gone thru each library and disabled Trickplay. I can't seem to find an option anywhere to limit the use of the temp folder.


RE: Trickplay Using All of My Storage - TheDreadPirate - 2024-11-04

This is a recently found bug.

https://github.com/jellyfin/jellyfin/issues/12937

That should be fixed by this PR.

https://github.com/jellyfin/jellyfin/pull/12940

And was part of 10.10.1. Clean out that folder, upgrade to 10.10.1, and this shouldn't happen anymore.


RE: Trickplay Using All of My Storage - FactoriedMyAuth - 2024-11-04

That fixed it. Thanks.


RE: Trickplay Using All of My Storage - FactoriedMyAuth - 2024-11-09

I take it back, the issue popped up again today. System was good for a week. I am currently running another script to purge the temp location. Is there a way to reset the "Solved" flag?


RE: Trickplay Using All of My Storage - TheDreadPirate - 2024-11-09

You updated to the server to 10.10.1? I am not seeing files build up in my temp folder after upgrading from 10.10.0 to 10.10.1.

Can you tell what kind of files the temp files are?


RE: Trickplay Using All of My Storage - FactoriedMyAuth - 2024-11-12

Yes, server updated to 10.10.1. All of the images are .jpg


RE: Trickplay Using All of My Storage - FactoriedMyAuth - 2024-11-12

Code:
[2024-11-10 03:01:04.418 -05:00] [INF] [91] Jellyfin.Server.Implementations.Trickplay.TrickplayManager: Finished creation of trickplay files for "Z:\Movies - SD\Crocodile Dundee II (1988)\Crocodile Dundee II (1988) - DVD.mkv"
[2024-11-10 03:01:04.623 -05:00] [INF] [91] Jellyfin.Server.Implementations.Trickplay.TrickplayManager: Creating trickplay files at 320 width, for "Z:\Movies - SD\Five Children and It (2004)\Five Children and It (2004) - DVD.mkv" [ID: 4d87e04f-e5d6-0921-6a2f-4e31e5c9d565]
[2024-11-10 03:01:04.625 -05:00] [INF] [91] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Trickplay generation: "ffmpeg -loglevel error -init_hw_device d3d11va=dx11:,vendor=0x8086 -init_hw_device qsv=qs@dx11 -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -noautorotate -c:v mpeg2_qsv -i file:\"Z:\Movies - SD\Five Children and It (2004)\Five Children and It (2004) - DVD.mkv\" -noautoscale -an -sn -vf \"fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,deinterlace_qsv=mode=2,vpp_qsv=w=320:h=240:format=nv12:out_range=pc:scale_mode=hq\" -threads 0 -c:v mjpeg_qsv -global_quality:v 91 -fps_mode passthrough -f image2 \"C:\Users\Chuck\AppData\Local\Temp\jellyfin\701e739281624c3fb82f075089ff5404\%08d.jpg\""
[2024-11-10 03:01:05.539 -05:00] [ERR] [91] Jellyfin.Server.Implementations.Trickplay.TrickplayManager: Error creating trickplay images.
System.ArgumentException: Can't create trickplay from 0 images.
  at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.CreateTiles(IReadOnlyList`1 images, Int32 width, TrickplayOptions options, String outputDir)
  at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.RefreshTrickplayDataInternal(Video video, Boolean replace, Int32 width, TrickplayOptions options, LibraryOptions libraryOptions, CancellationToken cancellationToken)
[2024-11-10 03:01:05.904 -05:00] [INF] [91] Jellyfin.Server.Implementations.Trickplay.TrickplayManager: Creating trickplay files at 320 width, for "Z:\Movies - SD\Miss Congeniality (2000)\Miss Congeniality (2000) - DVD.mkv" [ID: 2aad3933-a663-a664-cb69-d21cc95bbf71]
[2024-11-10 03:01:05.906 -05:00] [INF] [91] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Trickplay generation: "ffmpeg -loglevel error -init_hw_device d3d11va=dx11:,vendor=0x8086 -init_hw_device qsv=qs@dx11 -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -noautorotate -c:v mpeg2_qsv -i file:\"Z:\Movies - SD\Miss Congeniality (2000)\Miss Congeniality (2000) - DVD.mkv\" -noautoscale -an -sn -vf \"fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,vpp_qsv=w=320:h=180:format=nv12:out_range=pc:scale_mode=hq\" -threads 0 -c:v mjpeg_qsv -global_quality:v 91 -fps_mode passthrough -f image2 \"C:\Users\Chuck\AppData\Local\Temp\jellyfin\f3e0147848a64d949b39b3a245b06707\%08d.jpg\""

This is the only location in my log where I can see the folder with 30 Million jpgs being called.


RE: Trickplay Using All of My Storage - TheDreadPirate - 2024-11-12

If you open a powershell and run the ffmpeg command manually, what does it print out?

Code:
ffmpeg -loglevel error -init_hw_device d3d11va=dx11:,vendor=0x8086 -init_hw_device qsv=qs@dx11 -filter_hw_device qs -hwaccel qsv -hwaccel_output_format qsv -noautorotate -c:v mpeg2_qsv -i file:"Z:\Movies - SD\Five Children and It (2004)\Five Children and It (2004) - DVD.mkv" -noautoscale -an -sn -vf "fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,deinterlace_qsv=mode=2,vpp_qsv=w=320:h=240:format=nv12:out_range=pc:scale_mode=hq" -threads 0 -c:v mjpeg_qsv -global_quality:v 91 -fps_mode passthrough -f image2 "C:\Users\Chuck\AppData\Local\Temp\jellyfin\701e739281624c3fb82f075089ff5404\%08d.jpg"



RE: Trickplay Using All of My Storage - FactoriedMyAuth - 2024-11-13

This is what it kicked back

Code:
[Parsed_deinterlace_qsv_2 @ 000002ab4d953140] Error running VPP: device failed (-17)
[vf#0:0 @ 000002ab4d80bc00] Error while filtering: I/O error
[vf#0:0 @ 000002ab4d80bc00] Task finished with error code: -5 (I/O error)
[vf#0:0 @ 000002ab4d80bc00] Terminating thread with return code -5 (I/O error)
[vost#0:0/mjpeg_qsv @ 000002ab4a9f9340] Could not open encoder before EOF
[vost#0:0/mjpeg_qsv @ 000002ab4a9f9340] Task finished with error code: -22 (Invalid argument)
[vost#0:0/mjpeg_qsv @ 000002ab4a9f9340] Terminating thread with return code -22 (Invalid argument)
[out#0/image2 @ 000002ab4a8db480] Nothing was written into output file, because at least one of its streams received no packets.



RE: Trickplay Using All of My Storage - TheDreadPirate - 2024-11-13

Dashboard > Playback > Trickplay

Uncheck both hardware decoding and accelerated MJPEG encoding.

What are your system hardware specs?