All Activity
- Past hour
-
Dionisio1981 joined the community
-
Lamooo joined the community
-
Technomart joined the community
-
Atyaf91876 joined the community
-
zuluhayes joined the community
-
rayqua joined the community
-
Atyaf98277 joined the community
-
Shadowcrow joined the community
-
Khalid1997lam joined the community
-
acfek joined the community
-
SP33R started following How to remove subtitles except English
-
I ran the subtitle download task. I did not realize this would download ALL languages. How do I delete them and make sure only English or English forced is there?
- Today
-
mtk143089 started following Emby Theater with Emby Server without Network Connection
-
Emby Theater with Emby Server without Network Connection
mtk143089 posted a topic in Linux & Raspberry Pi
Forgive me if this has been answered, but I haven't found it. Here's my use case: I'm starting to travel a lot more for work and I wanted a portable emby instance that I could just plug into a hotel TV. I set up emby theater on a Raseberry PI 4 from the downloadable image. I then added an installation of emby server. Emby theater connects to this server manually using 127.0.0.1. It runs great, especially with a FLIRC receiver for the remote. Here's the issue: Emby instance will not initiate after boot without an attached network cord or WiFi connection. After boot, I just get a blank screen with a notification to attach a network connection on the top right corner. The entire point of this build is for it to run local only. Is there any way to prevent it from seeking a network connection? -
Another data point. Today I tried watching a movie on my laptop through the webUI to see if it played fine and hopefully narrow this down to the Apple TV app. However, it failed miserably. Stuttering immediately upon start. This time at least, it was transcoding audio rather than straight direct play across the board. But still, stuttered a few times immediately, then played about 3 or 4 minutes before starting to stutter real bad to point of entirely unwatchable. So for another test, I decided to try watching the same exact movie via Jellyfin. Again still in the web UI. Movie file and Jellyfin instance are all on the same server as the Emby server. Not a single stutter at any point. Played straight through perfectly fine despite also transcoding the audio. Both Emby and Jellyfin are configured for hardware transcoding using the same NVME drive for transcoding and cache paths. Any ideas how to troubleshoot any potential configuration issues that could be causing this on the Emby side?
-
Emby Theme: Retro Navy & Gold (W/ Seasonal Themes)
MediaEmby1968 replied to Aleas's topic in Web App CSS
Everything is working perfectly. I have to say it's even better than what I've always had... especially in the background; before, my image only appeared in certain settings. The best theme, without a doubt, in my opinion. Just one question: when I delete a file or device from the server, this window appears (see below). How do I change that orange color to another color? Thanks and congratulations on this wonderful theme (with the added advantage that changing the color is easy). -
I know, but what shall i do with the wrong ids? The only methode i found, is to search and correct them manually (identify), including change of pictures. The rest ist hope... Btw. - For other user: if you go to imdb.com, You can extract the id from the URL. Looks like "tt1234"
-
JuJuJurassic started following Dos Attack / Hacker? Claude AI Fix.
-
So yesterday evening my emby server just died, everything I did gave me a blue spinning circle. I spent hours on it then thought I'd try AI, used Claude code in a ssh session. It found the problem, effecivly a dos from an IP address, but no one was in. I think it may be a bad client, but in the end I just blocked it at the firewall. In finding it, Claude also suggested a few things, that i got it to put in a text file, including hints for the developers. Watch out Luke, Claude is after you So I've put the text file below for you to look at , hopefully it'll help if you're ever in my situation, but it does have a few modifications that woudl have stopped the problem for the developers. It's actually quite a bit faster now too! ----- ================================================================================ EMBY SERVER PERFORMANCE ISSUE: TV SHOWS LIBRARY HANGING / 100% CPU Emby Version: 4.9.3.0 OS: Ubuntu 20.04, Kernel 5.4.0-227-generic SQLite: 3.49.2 .NET: 8.0.22 ================================================================================ SYMPTOMS -------- - Emby web UI shows a spinning loading wheel; some pages never load - CPU pegged at 100% continuously on the server (one core fully saturated) - Emby API requests from some clients time out after 30 seconds - The TV Shows library in particular refuses to load / shows a loading spinner - Other libraries (Films, Music) may continue to work normally - Issue persists after restarting Emby; CPU immediately climbs back to 100% - `top` shows the EmbyServer process at or near 100% CPU with one .NET TP Worker thread rotating between LWPs at full utilisation HOW TO IDENTIFY THE SPECIFIC QUERY CAUSING IT ---------------------------------------------- 1. Check the Emby log (/var/lib/emby/logs/embyserver.txt) for lines like: Info SqliteItemRepository: Interrupt query due to cancellation. Info ItemsService-...: http/2 Response completed after client disconnected to <CLIENT_IP>. Time: 30050ms. GET https://<HOST>/emby/Users/.../Items? ...StartIndex=150&...SortBy=SortName&IncludeItemTypes=Series&ParentId=4... If you see this repeating every ~30 seconds from the same client IP, that client is stuck in a retry loop and is hammering one specific query. 2. Identify the hot thread on Linux: ps -L -p $(pgrep EmbyServer) -o lwp,pcpu,comm --sort=-pcpu | head -5 You will see a ".NET TP Worker" thread at 90-100% CPU. ROOT CAUSE ---------- The Emby server generates the following SQL for browsing TV Shows sorted by name when a client requests page 2 (StartIndex >= 150): WITH WithAncestors AS ( SELECT itemid FROM AncestorIds2 WHERE AncestorId=3 ) SELECT count(*) OVER() AS TotalRecordCount, A.Id, A.Name, A.SortName, ... , UserDatas.IsFavorite FROM MediaItems A LEFT JOIN ( SELECT AncestorIds2.ItemId FROM AncestorIds2 JOIN ItemLinks2 ON ItemLinks2.Type=4 AND ItemLinks2.LinkedId=<tag_id> AND ItemLinks2.ItemId=AncestorIds2.AncestorId ) itemlinksexcludeinheritedtagids ON itemlinksexcludeinheritedtagids.ItemId=A.Id LEFT JOIN UserDatas ON A.UserDataKeyId=UserDatas.UserDataKeyId AND UserDatas.UserId=<uid> WHERE A.Type=6 AND itemlinksexcludeinheritedtagids.itemid IS NULL AND A.Id IN WithAncestors GROUP BY A.PresentationUniqueKey ORDER BY A.SortName COLLATE NATURALSORT ASC LIMIT 500 OFFSET 150; The problem is the combination of: 1. GROUP BY on one column (PresentationUniqueKey) 2. ORDER BY on a DIFFERENT column (SortName) using the custom NATURALSORT collation Because GROUP BY and ORDER BY use different columns, SQLite cannot satisfy the ORDER BY using any index. It must sort ALL matching rows (~600 in a typical TV library) in a temporary B-tree using the NATURALSORT comparator. 3. NATURALSORT is a custom collation implemented as a .NET managed delegate. Every comparison SQLite makes during the sort crosses the native-to-managed boundary (a P/Invoke callback). With ~600 TV series, a quicksort requires approximately 5,500 comparisons. Each managed callback takes ~5ms under a loaded .NET runtime (due to string marshalling, GC pressure, etc.). 5,500 x 5ms = ~27 seconds, which exceeds the client's 30-second timeout. 4. The count(*) OVER() window function means SQLite cannot short-circuit even when enough rows have been returned — it must see all rows before it can compute the total count. This applies equally to page 1 and page 2. WHY IT APPEARS INTERMITTENTLY ------------------------------ The query has always been slow. It becomes a visible problem when a client app gets into a retry loop: - Client requests TV Shows page 2 (StartIndex=150) - Emby starts the SQLite query - After 30 seconds the client disconnects and retries immediately - Emby calls sqlite3_interrupt() to cancel the query, logs the timeout - The cycle repeats indefinitely, pinning one CPU core continuously - Other Emby operations become slow or unresponsive due to CPU starvation The trigger is usually: a client app (e.g. Infuse, Emby for Apple TV) being left open on the TV Shows grid page. When the app reconnects (e.g. after the TV wakes from sleep) it re-fetches the library list, hits page 2, and loops. Closing the client app or blocking the retrying client IP stops the CPU load immediately. Restarting Emby alone does NOT fix it because the client reconnects and resumes retrying within seconds. HOW TO CONFIRM IT IS THIS ISSUE --------------------------------- Run this on the server while the problem is active: # 1. Show the retrying requests in the log (should repeat every ~30s): tail -f /var/lib/emby/logs/embyserver.txt | grep "StartIndex=150.*Series" # 2. Identify the hot thread: watch -n2 "ps -L -p \$(pgrep EmbyServer) -o lwp,pcpu,comm --sort=-pcpu | head -6" # 3. Confirm the query is slow in isolation (takes ~0.1s without NATURALSORT): sudo -u emby sqlite3 /var/lib/emby/data/library.db ".timer on SELECT COUNT(*) FROM MediaItems WHERE Type=6;" # Should return in <1ms. If SQLite itself is slow, check disk/IO instead. # 4. Check whether the client has stopped retrying after blocking/closing: tail -20 /var/lib/emby/logs/embyserver.txt | grep "Interrupt query" # Should show no new entries once the client is gone. WHAT DOES NOT FIX IT --------------------- - Restarting Emby (client reconnects and retries) - Adding standard SQLite indexes on (Type, SortName) — SQLite cannot use a BINARY-collated index for an ORDER BY that specifies NATURALSORT - Adding a NATURALSORT-collated index on (Type, SortName) — the GROUP BY on a different column forces a temporary sort table, bypassing the index - Removing or adding plugins (the issue is in the core SQL query builder) IMMEDIATE WORKAROUND --------------------- Block the retrying client at your firewall or router (not iptables on the Emby server — the client will still reach Emby). The IP in our case was the Apple TV / Infuse client. Once blocked, CPU drops immediately to normal. Alternatively: close/force-quit the client app that is stuck retrying. SUGGESTED FIX (for Emby developers) ------------------------------------- 1. The SQL query builder should avoid generating GROUP BY + ORDER BY on different columns simultaneously. If deduplication is needed, consider using a subquery or ROW_NUMBER() window function so that ORDER BY can operate on an indexed column using the correct collation. 2. Consider implementing NATURALSORT as a native C function registered via sqlite3_create_collation_v2() rather than as a managed .NET delegate. This would eliminate the P/Invoke callback overhead on every sort comparison, potentially reducing query time from ~30 seconds to ~100ms for a library of 600 series. 3. Consider adding a query result cache for library browse queries. The TV Shows list changes infrequently; even a 60-second cache would serve all retry attempts from a cached result and completely eliminate the CPU spike. 4. The 30-second database query timeout (cancelled via sqlite3_interrupt when the HTTP client disconnects) causes no data loss, but the retry loop it creates can make the server unusable. An exponential backoff on the client side, or a server-side per-client rate limit on identical requests, would prevent the retry storm. SERVER CHANGES MADE DURING DIAGNOSIS -------------------------------------- The following were changed on this server and should be noted if you are helping reproduce or reverting the issue: - /etc/systemd/system/emby-server.service.d/override.conf Added: After=network-online.target remote-fs.target, Wants=network-online.target Reason: Emby was starting before SMB/CIFS shares were mounted. - /etc/fstab Added nofail,x-systemd.device-timeout=30 to one share with an unreachable host; fixed a missing trailing zero on another line. - /var/lib/emby/data/library.db VACUUM was run (database shrank from 2.0GB to 1.4GB, 600MB freed). Two indexes added (these do not harm but also do not fix the root issue): CREATE INDEX idx_MediaItems_type_sortname ON MediaItems(Type, SortName); CREATE INDEX idx_MediaItems_type_topparent_sortname ON MediaItems(Type, TopParentId, SortName); CREATE INDEX idx_MediaItems_type_naturalsort_sortname ON MediaItems(Type, SortName COLLATE NATURALSORT); ANALYZE run on MediaItems. - Scheduled task trigger files (StartupTrigger removed from 3 tasks): /var/lib/emby/config/ScheduledTasks/6330ee8f-*.js (Scan media library) /var/lib/emby/config/ScheduledTasks/66ff02a8-*.js (Scan Metadata Folder) /var/lib/emby/config/ScheduledTasks/9492d30c-*.js (Refresh Guide/EPG) Reason: All three heavy tasks were firing simultaneously on every restart, causing additional CPU load on top of the query issue. ================================================================================ emby_performance_issue_forum.txt
-
@luke : hello, any update ?
-
SRT subtitles not displaying, other unknown subtitles are displaying
ebr replied to davesurfer's topic in Roku
As far as I know, this treatment of sub streams is unique to the Roku player. -
Emby premiere member unable to access Emby server on android tv, android phone and lg tv via apps.
ebr replied to sk818's topic in Android
Another quick thing to check is, if on Windows, be sure your network wasn't marked as public. It should be private. -
Emby crashing on almost every movie on Shield TV Pro
ebr replied to adnaan77's topic in Android Server
Did you read the link I provided? One may still be there but you may need to reproduce the problem to be sure.- 4 replies
-
- shield tv pro
- android
-
(and 1 more)
Tagged with:
-
Hi. We don't see or control the traffic to your server. The system has a lockout but there is nothing we can directly do about connections to your server.
-
I think my server was hacked
edvinmorales@hotmail.com replied to edvinmorales@hotmail.com's topic in General/Windows
Yesterday they attempted to hack me again, i changed all passwords and activate a pin lock too, suggest you do that, and hopefully emby does something agains hacks -
Users get access to directories they shouldn't
NicerDicer replied to NicerDicer's topic in General/Windows
@NeminemYes that's active, it's an important puzzle piece in the workflow described above. This grouping is the desired behaviour, but it should not lead to bypassing accessibility checks for entries. -
brcarls started following Next up order for new episodes/seasons
-
Emby premiere member unable to access Emby server on android tv, android phone and lg tv via apps.
Luke replied to sk818's topic in Android
Hi, the link he provided does exactly that. Did you go through it? What steps did you try based on it? -
Hi, in your movie list you can filter by titles that are missing movie db ids.
-
Hi, in order for him to best help you, can you please provide more specifics? How to Report a Problem Thanks.
-
@Luke, Any thoughts, comments or suggestions regarding my playlist issue?
-
Collections randomly lost movies but display art still shows them
zellonatious replied to zellonatious's topic in General/Windows
No -
Houfino started following CSFD scraper
-
Yes..I agree...We need a lot of CSFD and is the best.
-
Select “Continue watching episode,” but the episode listed under it doesn’t match the selected episode.
kira yamato replied to kira yamato's topic in Apple iOS / macOS
Could you please provide a timeline for fixing this bug? This really ruins my long-running series episode. I am so exhausted. With these bugs. -
SRT subtitles not displaying, other unknown subtitles are displaying
Starlionblue replied to davesurfer's topic in Roku
Just to clarify. If I swap out the Roku to an Apple TV, this would not be an issue? -
Subtitles not showing on Android for an mkv during playback
sa2000 replied to UsamaWaheed's topic in Android
@UsamaWaheedThis has been fixed in Emby for Android version 3.5.32 which is available to download and install - see https://emby.media/community/topic/95467-emby-for-android-release-notes/ -
Thank you! I have decided to go for the Beelink, as that has more RAM, an Intel CPU and in the end is more powerful, uses less power and is cheaper to buy. For Immich, I already am able to offload machine learning on my main laptop, which has an RTX 3080 16GB VRAM. That works perfectly.
-
This is an open issue with the development team. I understood that there was a workaround for the issue outlined in a post in this thread here
