The Raspberry Pi Thread

So i got my raspberry pi yesterday and since morning I have been playing with it. I was able to install jellyfin (i set gpu_mem to 512) and enabled hardware acceleration, sonarr, qbittorent and in terms of setup, everything works.

Problem I have is jellyfin is working terribly. In the sense, on the Pi, i have my all setup under jellyfin done and scanning of library and all is complete. But when using the jellyfin app on my iPad, the video takes lots of time to start and then too things lag and buffer. If I increase playback speed to 1.25x it keeps stopping even more. Or even if I double tap right side of screen to go ahead by 10 seconds or so, it sort os freezes.
To see if the issue is with iPad app, i even tried on my fire hd 10 and samsung Tab A7 and still same result. I am suspecting it is due to transcoding as the video files are HEVC (is that x265?).

I unchecked the option under my user profile to NOT Transcode and that prevented the videos from completely playing now on my client devices.


So I installed kodi on my android tablet and installed the jellyfin addon and there, everything plays super smooth. I believe that is due to kodi's support for most formats which is always using direct play. But I don't want to use kodi since it does not have playback speed control function. (If there is one, please suggest how to use it).

Can anyone tell me what am i doing wrong and what is the fix?
 
So i got my raspberry pi yesterday and since morning I have been playing with it. I was able to install jellyfin (i set gpu_mem to 512) and enabled hardware acceleration, sonarr, qbittorent and in terms of setup, everything works.

Problem I have is jellyfin is working terribly. In the sense, on the Pi, i have my all setup under jellyfin done and scanning of library and all is complete. But when using the jellyfin app on my iPad, the video takes lots of time to start and then too things lag and buffer. If I increase playback speed to 1.25x it keeps stopping even more. Or even if I double tap right side of screen to go ahead by 10 seconds or so, it sort os freezes.
To see if the issue is with iPad app, i even tried on my fire hd 10 and samsung Tab A7 and still same result. I am suspecting it is due to transcoding as the video files are HEVC (is that x265?).

I unchecked the option under my user profile to NOT Transcode and that prevented the videos from completely playing now on my client devices.


So I installed kodi on my android tablet and installed the jellyfin addon and there, everything plays super smooth. I believe that is due to kodi's support for most formats which is always using direct play. But I don't want to use kodi since it does not have playback speed control function. (If there is one, please suggest how to use it).

Can anyone tell me what am i doing wrong and what is the fix?
HEVC uses x265 and if your client does not support native playback then it will fall back to transcoding which will be crappy on the Pi for sure.

Try this though. Keep in mind that x265 will eat CPUs for breakfast if its an older device.

 
HEVC uses x265 and if your client does not support native playback then it will fall back to transcoding which will be crappy on the Pi for sure.

Try this though. Keep in mind that x265 will eat CPUs for breakfast if its an older device.


As of now downloading x264 version of same file to see it plays fine as iPad I know (read specs) can play x264 natively.

Btw does jellyfin server do DLNA or something so at least I can use my nplayer to do direct streaming?
Also in my sonarr indexer, I have put restrictions to ignore all file names that have HEVC or x265 in them.

Edit: The H264 plays perfect in jellyfin app without buffering or anything and even plays well in safari browser. I will use safari since when playing back there the player gives speed control while in jellyfin since no transcoding is happening, the video player defaults to iOS default which doesn't give any speed control.
 
Last edited:
Btw does jellyfin server do DLNA or something so at least I can use my nplayer to do direct streaming?
Not used jellyfin, but seems it does have DLNA - https://jellyfin.org/docs/general/networking/dlna.html
Else go for mDLNA (https://wiki.debian.org/minidlna) its the best dlna server but no transcoding. its is already in software repo of dietpi -- https://dietpi.com/docs/software/media/#readymedia
It will show up in nplayer available upnp device, just bookmark it. or point the ip/server address to your nplayer.

Just for my understanding you using the pi as your media server? or using it as a client and files will be shared somewhere else ?
 
@Ramadhir Singh

Using Pi as media server with a 2TB hdd connected to it. I formatted the HDD with the ext4 format from pi only.

I will try the mini DLNA you mentioned.


Btw I have now restricted sonarr to NOT consider x265 and HEVC so effectively, it is downloading only x264 / H264 videos in 720p and 1080p format. I am yet to try more so will be streaming few things today and see how well things go.
 
... Btw does jellyfin server do DLNA or something so at least I can use my nplayer to do direct streaming? ...
As already suggested, Jellyfin does serve over DLNA. Second the MiniDLNA recommendation too.

MiniDLNA is quite easy to set up, and well suited to low-power hardware. Have successfully used it to serve up to 720p content from a Pi 2 (didn't quite work for 1080p content, understandably). Have since switched to a low-power AMD Hudson machine on which it contines to serve 1080p content seamlessly.

As already pointed out, MiniDLNA does not do transcoding (but there is a fork of the project that does). Also, from what I have seen, DLNA doesn't do meta data very well, if it matters to you. And I occassionally have needed to update the database manually.

In case you need to try out different clients, VLC works fine on Android and Fire TV. DMS Explorer is another super-lightweight Android client I often use. And Kodi probably works on nearly everything else.
 
As people like [mention]Marcus Fenix [/mention] told me before, the heat sinks do nothing in regulating temperature on Rpi4. I have kept the top part of my case open for now. With torrenting and a single 720p direct play stream using jellyfin server, Temps are 75 degree Celsius.

So now I am hunting for a solution to this. Will a passive cooling case actually help or a case with fan will? Links appreciated. I don't want to do trial and error so will buy something that actually works.
 
Regarding Case Fan's, the overall experience I had is not desired; fan either worn out easily and most of the time they are 2-pin fans running at max settings.

If things ease out and in case of no lockdown situation, we can do some DIY to have PWM fans alongside external PWM controller. This way we can have desirable setup.

On a side note, considering having DIY PCI Bracket for RPi, so you can have Pi running within your PC and add more cooling options
 
As people like [mention]Marcus Fenix [/mention] told me before, the heat sinks do nothing in regulating temperature on Rpi4. I have kept the top part of my case open for now. With torrenting and a single 720p direct play stream using jellyfin server, Temps are 75 degree Celsius.

So now I am hunting for a solution to this. Will a passive cooling case actually help or a case with fan will? Links appreciated. I don't want to do trial and error so will buy something that actually works.
This is the one I have.

Like I said even during heavy torrent downloads with >30 files downloading at 7-8 MB/s it never breaches 50C on an ambient temp of 30C.
But I have also changed the Pi CPU governor to schedutil

1623001816057.png


If you want top of the line go for this one-

Check out this channel which does a darn good job of reviewing Pi cases.
 

Attachments

  • 1623001800155.png
    1623001800155.png
    30.3 KB · Views: 95
[mention]Marcus Fenix [/mention] wow your pi temps are great. I have never seen anything below 60 Celsius in mine. Is this passive metal case so effective?
My governer too is same as yours right from day 1.


But in my situation, I have applied those 3 heat sinks so can I remove them easily or it needs some special skill? I don't want to screw up the Pi.
 
Last edited:
[mention]Marcus Fenix [/mention] wow your pi temps are great. I have never seen anything below 60 Celsius in mine. Is this passive metal case so effective?
My governer too is same as yours right from day 1.
Well right now its sitting at 10% CPU usage so don't get your hopes up to that extent but yeah its pretty good.

I just ran a 100% CPU/RAM stress test for 5 minutes and these are my temps on an ambient of 30C.

1623005963459.png


Keep in mind the case sits below my PC desk and doesn't get much airflow over it.

I tried 3 cases before I settled on this one.
But in my situation, I have applied those 3 heat sinks so can I remove them easily or it needs some special skill? I don't want to screw up the Pi.

Those are attached by the adhesive thermal pads right? Its easy enough to take them off.

The chips are soldered on to the board and I don't think you have the kind of upper body strength to rip out a CPU. :p
 
Last edited:
Qbittorrent will sometimes crash on my RPi4 and I have to manually ssh and restart. Anyway to restart it automatically if it crashes? Any shell script which can be scheduled using cron to check status every 30 min and If crashed then restart.
 
Apologies I missed that the link I posted was mentioned earlier in this thread.
Throttling starts at 80s but 75 does seem high for that kind of workload. Is the chip transcoding that video ?
 
Last edited:
Apologies I missed that the link I posted was mentioned earlier in this thread.
Throttling starts at 80s but 75 does seem high for that kind of workload. Is the chip transcoding that video ?

Combined with high ambient temperature in my city (Mumbai) and running 720p direct stream and few torrents going on, Temps hit 70+. Since then I have restricted torrents to download only 2 at a time which bring back Temps in lower 60.
I have ordered the passive cooling case so will see how it is then.



On a different note, I tried the new alternate jellyfin app on my iPad and it works great on x265 files too. No transcoding, it's direct play. And TvOS app is coming soon too.
 
Anyway to restart it automatically if it crashes? Any shell script which can be scheduled using cron to check status every 30 min and If crashed then restart.
yes you could try this - a shell script to check status of qBittorrent, if not running restart it.
Bash:
#!/bin/bash
if ! ps x | grep qbittorrent | grep -v grep &>/dev/null ; then
~/usr/bin/qbittorrent
sleep 5
echo "qBittorrent successfully restarted    : Time $(TZ=":Asia/Kolkata" date)" >> ~/status_check/qBittorrent_Status.log
fi
save this file probably in ~/status_check/, called "check_torrent"
Line#2 - you might have to replace as how you are starting qbit form the terminal, you could be starting it using "qbittorrent-nox" command.
Line#3 - allowing a 5 second gap before writing out log file.
Line#4 - you have the log file to indicate the script is working, along with timestamp.
EDit: I deliberately added this log file, so that we can monitor, as how many times qbit is failing, if it failing too frequently, we must troubleshoot it.


use cron to call this script at desired interval, 5 minute is good time. 30 minute is too long.
Code:
*/5 * * * * /bin/bash ~/status_check/check_torrent
 
Last edited:
@Ramadhir Singh

I am using following commands to check status and start qbittorrent. I am also attaching output of each of them...

Bash:
sudo systemctl status qbittorrent

root@DietPi:~# sudo systemctl status qbittorrent
● qbittorrent.service - qBittorrent (DietPi)
Loaded: loaded (/etc/systemd/system/qbittorrent.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-06-09 12:52:02 BST; 3min 50s ago
Docs: man:qbittorrent-nox(1)
Main PID: 13150 (qbittorrent-nox)
Tasks: 14 (limit: 4915)
CGroup: /system.slice/qbittorrent.service
└─13150 /usr/bin/qbittorrent-nox

Bash:
sudo systemctl start qbittorrent

The start command doesn't give any output.


Based on this can you make the script? I know little shell script but no much. Also the location ~/status_check/ is I believe a custom folder (named status_check) you are telling me to make under root folder right?
 
systemd will automatically restart when a service crashes. no need to script.
seems in your case it is disabled.
Bash:
sudo systemctl enable qbittorrent
 
systemd will automatically restart when a service crashes. no need to script.
seems in your case it is disabled.
Bash:
sudo systemctl enable qbittorrent

Ok so how do I check the status? I know that at least with this dietpi installation, if I switch off the Pi and switch it back on, everything (all services) start again.
 
Back
Top