Video freezing with audio continuing

  • Using LibreELEC-RPi4.aarch64-12.0-nightly-20230428 on RPi4B 4GB with firmware / USB drivers up to latest

    I'm trying version 12 to see if that will work any better for me than version 11. Clean install on a 16GB MicroSD card. I did install TVHeadend and NextPVR and then uninstalled them. No other addons installed by me.

    Videos stored on a spare 128GB USB drive.

    With the HDD plugged into a USB3 socket I just started a video and left it running. First with TVHeadend installed and then without. Just to make sure what was happening I started the video several times. Each time the video froze but at a different point, but the audio continued.

    I then unplugged the HDD from the USB3 port and plugged it into a USB2 port. It played the entire video without a problem. I'm trying a few others so it will be a while before I'm sure that the problem is the USB port. I'll also need to test the other USB3 port.

    Are there any known problems with the VIA drivers?

  • Sal0kyn
    April 20, 2023 at 8:34 AM
    Morphy
    December 31, 2022 at 1:55 PM
  • Thanks for that, I've had a read and it doesn't seem very similar. 1) I'm running LE v12 not v10, 2) no TVHeadend installed (I did have it on but removed to make sure that wasn't it) 3) locally connected HDD via USB

    Someone who knows about these things can correct me but I would have expected buffering issues to be more likely on the slower USB port.

    On the positive side I like ctrl-shift-o and I'll have a play with cache and buffermode just to see.

  • Mediainfo of the videofile?

    Bitrate?

    Sound, DTS-MA, 2-channel or what?

    Mp4 or mkv?

    2160 or 1080p

    I can boot up the Pi4 that i have running LE12 aarch64.

    Edited once, last by MatteN (April 30, 2023 at 4:42 PM).

  • I used my Pi4 8GB with LibreELEC-RPi4.aarch64-12.0-nightly-20230430-c9f5751 for several hrs last night, playing mp4 & mkv, 1080p & 2160p over smb, no problems at all.

  • Unfortunately, my theory has been proven wrong this morning, I just had a freeze with the HDD plugged into the USB2 socket.

    Hope this doesn't break the rules - here's the output from MediaInfo

    General

    Complete name : S:\Films\E\Ever Decreasing Circles\Series 04\00-01 New Horizons.mp4

    Format : MPEG-4

    Format profile : Base Media / Version 2

    Codec ID : mp42 (isom/iso2/avc1/mp41)

    File size : 1.02 GiB

    Duration : 1 h 20 min

    Overall bit rate mode : Variable

    Overall bit rate : 1 808 kb/s

    Encoded date : UTC 2016-11-04 13:49:54

    Tagged date : UTC 2016-11-04 13:49:54

    Writing application : HandBrake 0.10.5 2016021100

    Video

    ID : 1

    Format : AVC

    Format/Info : Advanced Video Codec

    Format profile : Main@L4

    Format settings : CABAC / 4 Ref Frames

    Format settings, CABAC : Yes

    Format settings, Reference frames : 4 frames

    Codec ID : avc1

    Codec ID/Info : Advanced Video Coding

    Duration : 1 h 20 min

    Bit rate : 1 642 kb/s

    Width : 696 pixels

    Height : 576 pixels

    Display aspect ratio : 1.289

    Original display aspect ratio : 1.290

    Frame rate mode : Variable

    Frame rate : 25.000 FPS

    Minimum frame rate : 12.500 FPS

    Maximum frame rate : 25.000 FPS

    Color space : YUV

    Chroma subsampling : 4:2:0

    Bit depth : 8 bits

    Scan type : Progressive

    Bits/(Pixel*Frame) : 0.164

    Stream size : 949 MiB (91%)

    Writing library : x264 core 142 r2479 dd79a61

    Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=20000 / vbv_bufsize=25000 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00

    Encoded date : UTC 2016-11-04 13:49:54

    Tagged date : UTC 2016-11-04 13:49:54

    Color range : Limited

    Color primaries : BT.601 PAL

    Transfer characteristics : BT.709

    Matrix coefficients : BT.601

    Menus : 3

    Codec configuration box : avcC

    Audio

    ID : 2

    Format : AAC LC

    Format/Info : Advanced Audio Codec Low Complexity

    Codec ID : mp4a-40-2

    Duration : 1 h 20 min

    Bit rate mode : Variable

    Bit rate : 160 kb/s

    Channel(s) : 2 channels

    Channel layout : L R

    Sampling rate : 48.0 kHz

    Frame rate : 46.875 FPS (1024 SPF)

    Compression mode : Lossy

    Stream size : 92.7 MiB (9%)

    Title : Stereo / Stereo

    Language : English

    Default : Yes

    Alternate group : 1

    Encoded date : UTC 2016-11-04 13:49:54

    Tagged date : UTC 2016-11-04 13:49:54

    Menus : 3

    Menu

    ID : 3

    Codec ID : text

    Duration : 1 h 20 min

    Language : English

    Encoded date : UTC 2016-11-04 13:49:54

    Tagged date : UTC 2016-11-04 13:49:54

    Menu For : 1,2

    00:00:00.000 : Chapter 1

    00:10:46.400 : Chapter 2

    00:18:53.600 : Chapter 3

    00:25:26.160 : Chapter 4

    00:29:14.640 : Chapter 5

    00:37:40.880 : Chapter 6

    00:44:58.800 : Chapter 7

    00:53:46.600 : Chapter 8

    01:04:47.120 : Chapter 9

    01:12:43.120 : Chapter 10

  • Running the latest nightly LE12 30/04/2023 I'm still getting freezes with the audio continuing. This time I grabbed the log

    http://ix.io/4vk7

    Hope it helps to find the problem.

    Looking at the log there are calls to 192.168.0.14 which is the RPi3 running TVHeadend which is not installed (either client or server) on the RPi4 which is 192.168.0.

    10

  • The log shows that your USB (SSD?) drive frequently stops responding and the kernel needs to reset it (after the 30 second timeout elapsed) so no wonders you have issues playing media from it.

    Code
    May 07 07:49:49.601266 RPi4 kernel: usb 2-2: reset SuperSpeed USB device number 2 using xhci_hcd
    May 07 07:49:49.617935 RPi4 kernel: sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=DRIVER_OK cmd_age=30s
    May 07 07:49:49.618535 RPi4 kernel: sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 03 3b 5d e2 00 01 00 00
    May 07 07:49:49.618913 RPi4 kernel: I/O error, dev sda, sector 54222306 op 0x0:(READ) flags 0x80700 phys_seg 6 prio class 2

    Insufficient power and broken cables/connectors/... are very often causing such errors, so first try to look into that and connect via a powered USB3 hub.

    Lots of USB devices, especially the cheap no-name ones, have broken USB implementations and sometimes it's possible to work around those with usb-storage.quirks - in your case it's not the rather frequent UAS issue though, it's already using the usb-storage driver.

    Quick search for the USB IDs (idVendor=13fd, idProduct=3456) didn't show up anything useful, searching for "sage 3639S" did neither so not sure what device you actually have.

    so long,

    Hias

  • OK I can test that easily by swapping to a powered Seagate 3TB drive (not a powered hub since I don't have one).

    The USB drive is an old 120GB drive removed from an HP laptop bunged into a case bought from Amazon so I'm not surprised you can't find information on it.

    I don't understand why the audio would keep on in that case because its coming from the same source.

  • I'm no expert in kodi caching details but quite likely it had cached more audio data than video so audio could continue for a while.

    As for the USB drive: might be worth to just ditch the case, there are tons of reports of cheap USB-SATA/NVMe adapters/cases being crap.

    so long,

    Hias

  • Looks like you are right - put a 3TB powered drive in and things seem fine. Shame the Pi can't handle more power but I don't suppose plugging USB HDDs into each USB port was a design consideration.

    Next part of my journey of discovery is to see if the Pi will support a Hauppage tuner as well as the powered disk.

    ",there are tons of reports of cheap USB-SATA/NVMe adapters/cases being crap."

    I bought one of those <G> The case has M2 memory in it in my HP but the cable was duff.

  • Looks like you are right - put a 3TB powered drive in and things seem fine. Shame the Pi can't handle more power but I don't suppose plugging USB HDDs into each USB port was a design consideration.

    It's a "grey zone" between powered enough and no enough power. The current consumption not "flat", it's dinamic, and sometimes, for short time, can be insufficient, leading to strange issues. I had some strange freezing issues with my RPi3B, after changed the power source, no more freezing...

    And why only the picture freezing... probably it's something with media player or the codec, when in the stream some issue occurred, sometimes the video part can't be recovered, remaining blocked, meantime the audio part continued... that can explain why with a skip forward the video started working again.

  • It's a "grey zone" between powered enough and no enough power. The current consumption not "flat", it's dinamic, and sometimes, for short time, can be insufficient, leading to strange issues. I had some strange freezing issues with my RPi3B, after changed the power source, no more freezing...

    And why only the picture freezing... probably it's something with media player or the codec, when in the stream some issue occurred, sometimes the video part can't be recovered, remaining blocked, meantime the audio part continued... that can explain why with a skip forward the video started working again.

    This happens to me all over the board, rpi3, rpi4, different power cables and sources. Doesn't matter. It is not a power issue. Streams do get interrupted and only the audio returns. It started after the big update which is called Matrix. Leia did not have this problem.

  • This happens to me all over the board, rpi3, rpi4, different power cables and sources. Doesn't matter. It is not a power issue. Streams do get interrupted and only the audio returns. It started after the big update which is called Matrix. Leia did not have this problem.

    I think two "things" lead to that "picture freezing", the imperfect stream (from RPi powered HDD or TVheadend server with interlaced video and limited antenna signal) and the mediaplayer/codec changed after Leia (probably far more sensibile to stream issues).

  • twilightened

    You may well be right which is why I do not auto update on the 2 RPi3Bs that I'm currently running under LE9.2.8. I've made several attempts to switch to the RPi4 since buying it and one problem or another has seen me scuttle back to the RPi3s. I'm seriously thinking of switching hardware.

    VLouis

    Your suggestion can be reduced to one thing - the HDD since I don't have either the server or the client for TVHeadend installed and twilightened didn't mention it. I'm leaning to it being the HDD being underpowered but it may be the VIA USB firmware or something else entirely. I won't say until I've spent many more hours running videos through the RPi4.