Posts by ciclista71

    What I have seen is that there is a problem on the WiFi whenever I use it "heavily".

    For instance, doing an scp on my mac from my Rpi4 in order to download a video file from my LE server made the wifi crash when transfer rate was 18%. And there is nothing I can do, it will always fail.

    So I guess the problem is in the WiFi firmware

    Code
    Lucas-iMac:Movies luca$ scp [email protected]:/var/media/DVR/RegistrazioniTV/CLV/CLV2023-01-25.ts .
    CLV2023-01-25.ts                                                                                                                                                                              18% 1448MB  28.9KB/s - stalled -client_loop: send disconnect: Broken pipe
    scp: Connection closed

    What I have seen is that there is a problem on the WiFi whenever I use it "heavily".

    For instance, doing an scp on my mac from my Rpi4 in order to download a video file from my LE server made the wifi crash when transfer rate was 18%. And there is nothing I can do, it will always fail.

    So I guess the problem is in the WiFi firmware

    Code
    Lucas-iMac:Movies luca$ scp [email protected]:/var/media/DVR/RegistrazioniTV/CLV/CLV2023-01-25.ts .
    CLV2023-01-25.ts                                                                                                                                                                              18% 1448MB  28.9KB/s - stalled -client_loop: send disconnect: Broken pipe
    scp: Connection closed

    Hi

    I am using LE 10.0.4 on a Rpi4.

    I use it only to view recorded videos and since I basically only record one program, the video file is always the same

    When I play it, I see tons of skipped frames (if I activate the debug info, I see that number increasing every second or so). It looks to me that CPU spikes a bit when the frame is lost. Of course, final result is jerkyness of the video especially during pans or scrolling titles.

    I believe 10.0.3 was fixing it greatly but I am not fully sure. I for sure noticed it way more in 10.0.2 and 10.0.4

    Is there anything I can set in the debug log to show you where the problem is? I have activated ffmpeg debug but I am not sure all that info is relevant.

    For sure it's not a media problem as I stream from an USB3, locally plugged, and I tested r/w speed with dd

    Code
    LibreELEC:~ # dd if=/var/media/DVR/RegistrazioniTV/CLV/TestSppedFile of=/dev/zero bs=1G count=5
    5+0 records in
    5+0 records out
    5368709120 bytes (5.0GB) copied, 54.167245 seconds, 94.5MB/s

    I played the recorded video on my Mac and I didn't see any lost frames (I don't know if there a way with ffmpeg to check this).

    I have recorded a small video, actually with slow-motion but YouTube doesn't seem to care: LE10_DroppingFrames

    HD Version should be ready in 30 minutes from now (it's xx:43)

    I have checked the buffer and I have seen a very interesting thing:

    If I play the video through tvheadend (LiveTV —> recordings) I have ZERO buffer.

    If instead I go to Videos and play the file from there, buffer goes up to around 420MB and then goes down to 390 and stays there.

    Of course playing a video being recorded doesn’t update the standard player time, so seeking is not possible etc etc but at least I could try to stream it that way.

    But why can’t I see any buffer when I use TVH?

    By the way I also tested PVR Simple IPTV and I get around 8-20 KB of buffer only (these values change continuously)

    It would be nice to set up buffering also for LiveTV

    My advancedsettings.xml is the following:

    Code
    <advancedsettings>
    <cache>
    <buffermode>1</buffermode>
    <memorysize>536870912</memorysize>
    <readfactor>5</readfactor>
    <curlclienttimeout>10</curlclienttimeout>
    <curllowspeedtime>10</curllowspeedtime>
    </cache>
    </advancedsettings>

    The issue of video freezing only happens while I play a file being recorded. If I just play the file on the next day, for instance, then it will all be ok and there are no glitches in the video; this means that recording and playing at the same time work well, as I am not missing any frames, but playing while recording still has some buffer underruns and sometimes freezes.

    So to me it looks like file is ok.

    I have to say I am also running comskip while recording, so that I will skip commercials. Tomorrow I will try recording and playing back without using comskip to see if I have any improvements - I will report back

    I have the very same problem though in my case I see it happening while I am recording a video and playing it back one hour later (so I am watching it live but with 1hr delay).

    I am recording over USB so I shouldn't see any buffering, but I do. Sometimes, in rare occasions, video resumes, but generally speaking, audio keeps working while video is frozen. I normally stop and play again, now I see I can also go back 10s, will try that.

    In kodi logs I see this:

    2023-01-18 23:11:17.814 T:10596 INFO <general>: CVideoPlayerAudio::Process - stream stalled

    2023-01-18 23:11:24.481 T:10602 ERROR <general>: CDVDVideoCodecDRMPRIME::AddData - send packet failed: End of file (-541478725)

    2023-01-18 23:11:31.210 T:904 INFO <general>: Skipped 574 duplicate messages..

    Note that if TVH is not recording, I never face buffering or stalling issues at all.

    I checked CPU and RAM resources and they look fine (I am also using comskip while recording, so CPU% is a bit high)

    Video is HD, H264 interlaced

    nput #0, mpegts, from '/media/DVR/RegistrazioniTV/CLV/CLV2023-01-18.ts':
    Duration: 03:20:00.61, start: 82849.148356, bitrate: 5753 kb/s
    Program 1
    Metadata:
    service_name : Rai 3 HD
    service_provider: Rai
    Stream #0:0[0xc9]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x12d](ita): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 128 kb/s
    Stream #0:2[0x191](oth): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, fltp, 64 kb/s
    Stream #0:3[0x259](ita,ita,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    No Program
    Stream #0:4[0x12]: Data: epg

    Hi

    I have the very same issue of playback with stalls, mainly when I play a video being recorded (I record it at 21:00 and I start watching it at 22:30).

    Your hint is nice, I will try using the same trick to see if I can solve the problems as you do.

    Did you solve your problems another way, in the meantime?

    EDIT: I tried the method you proposed but I get stalls in both scenarios

    What happens recently is that when I watch IPTV, all of a sudden playback hangs and if I press the stop button, I get back to the LiveTV menu only after a couple of minutes. From that moment on, no streaming is possible unless I reboot. But if I reboot, I lose the logs, so I don't know what to check.

    But I am not sure if it's a WiFi issue (my Rpi is not over ethernet)

    Another problem I get (rarely) is when I playback a recording over the USB: sometimes, all of a sudden, I see a rebuffering that takes two-three seconds, and then it resumes but video is frozen and audio works fine; I need to stop and resume the video to make it work.

    All of this happened lately, but the logs don't show anything particularly interesting (they point to a buffering problem which is the effect of the problem and not the cause)

    I have exactly the same "flashing" issue on my USB pen mounted as ext4 on my Rpi4 with LE10.0.0.2

    All of a suddenly, recently, when I go to the recording sections of my LiveTV (I am using TVH and PVR IPTV Simple Client), in the bottom right corner I see the available disk space which changes continuously between the available GB and "unknown".

    I can't find anything in any logs, maybe it's Kodi or TVH or PVR or LE related, who knows?

    So far I don't think this is a real issue but all of a sudden it happened and I haven't updated anything.

    I have found the problem, it's in the code of the vpn manager.

    I debbuged it and found this line being printed, while at the very same time the kodi log was also printing the PID (at least on a RPI4):

    Code
    2022-05-03 11:05:53.986 T:978      INFO <general>: VPN Mgr : VPN is started on /storage/.kodi/addons/service.vpn.manager/NordVPN/Italy.ovpn requesting
    ...
    2022-05-03 11:06:22.868 T:978      INFO <general>: VPN Mgr : (Linux) Checking VPN task with pidof openvpn
    May 03 11:06:22 LibreELEC kodi.sh[3953]: 774 (This line comes from the journalctl log)
    2022-05-03 11:06:36.799 T:978      INFO <general>: Skipped 2 duplicate messages..
    May 03 11:06:27 LibreELEC kodi.sh[4050]: 774 (This line comes from the journalctl log)
    May 03 11:06:32 LibreELEC kodi.sh[4055]: 774 (This line comes from the journalctl log)
    2022-05-03 11:06:36.799 T:978      INFO <general>: VPN Mgr : (Linux) Checking VPN task with pidof openvpn
    May 03 11:06:36 LibreELEC kodi.sh[4061]: 774 (This line comes from the journalctl log)
    2022-05-03 11:06:50.648 T:978      INFO <general>: Skipped 2 duplicate messages..

    The problem is in this line of the code, in the vpnplatform.py file, LINE 523

    The os.command("getpidof openvpn") which is executed at that line gives two outputs: the exit code (which is stored in the pid variable) and the PID, which is printed to stdout, as you can see from this code:

    A workaround is to change that command by adding a redirection of stdout and stderr to null:

    Code
            try:
                command = getPidofPath() + " openvpn >/dev/null 2>&1" 
                if useSudo() : command = "sudo " + command
                debugTrace("(Linux) Checking VPN task with " + command)         
                pid = os.system(command)  

    This change works for me, now I don't get the PID printed in the logs anymore.

    It would be nice if you could update the code.

    Thanks!

    Luca