Why I can't play this file (Rpi4)?

This video plays only audio on Rpi4 (Kodi 19.4, OSMC 2022.10-1)

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 16 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 23 min 21 s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 80 r1376M 3feaec2
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=0.6:0.2 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-5 / threads=3 / sliced_threads=0 / nr=0 / decimate=0 / mbaff=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=40 / rc=crf / mbtree=0 / crf=16.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=2:0.70

Kodi log:
ERROR : CDVDVideoCodecDRMPRIME::AddData - send packet failed: End of file (-541478725)

Have you tried playing it from local storage?

Yes, different erros but still can’t play:

2022-12-14 15:13:56.586 T:32405 INFO : VideoPlayer::OpenFile: /home/osmc/S01E02.mkv
2022-12-14 15:13:56.587 T:2445 INFO : Creating InputStream
2022-12-14 15:13:56.696 T:2445 ERROR : GetDirectory - Error getting /storage/Subs/
2022-12-14 15:13:56.698 T:2445 INFO : Creating Demuxer
2022-12-14 15:13:57.036 T:2445 INFO : Opening stream: 0 source: 256
2022-12-14 15:13:57.036 T:2445 INFO : [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 23.976, 3D: false
2022-12-14 15:13:57.036 T:2445 ERROR : ** T99 ** 1920/1080 vs. 1280/720 - 23.976025 vs. 60.000000, flags: 0x0
2022-12-14 15:13:57.036 T:2445 ERROR : ** T99 ** 1920/1080 vs. 1360/768 - 23.976025 vs. 60.000000, flags: 0x0
2022-12-14 15:13:57.036 T:2445 ERROR : ** T99 ** 1920/1080 vs. 1920/1080 - 23.976025 vs. 50.000000, flags: 0x0
2022-12-14 15:13:57.036 T:2445 ERROR : ** T99 ** 1920/1080 vs. 1920/1080 - 23.976025 vs. 60.000000, flags: 0x0
2022-12-14 15:13:57.037 T:2445 INFO : Display resolution ADJUST : 1920x1080 @ 60.000000 Hz (18) (weight: -23221234137802472381480960.000)
2022-12-14 15:13:57.058 T:2445 INFO : Creating video codec with codec id: 27
2022-12-14 15:13:57.058 T:2445 INFO : CDVDVideoCodecDRMPRIME::Open - using decoder V4L2 mem2mem H.264 decoder wrapper
2022-12-14 15:13:57.083 T:2445 INFO : Creating video thread
2022-12-14 15:13:57.083 T:2447 INFO : running thread: video_thread
2022-12-14 15:13:57.083 T:2445 INFO : Opening stream: 1 source: 256
2022-12-14 15:13:57.083 T:2445 INFO : Finding audio codec for: 86019
2022-12-14 15:13:57.083 T:2445 INFO : Creating audio thread
2022-12-14 15:13:57.084 T:2448 INFO : running thread: CVideoPlayerAudio::Process()
2022-12-14 15:13:57.084 T:2445 INFO : Opening stream: 4 source: 256
2022-12-14 15:13:57.084 T:2445 INFO : CDVDSubtitlesLibass: Creating ASS library structure
2022-12-14 15:13:57.084 T:2445 INFO : CDVDSubtitlesLibass: Initializing ASS library font settings
2022-12-14 15:13:57.084 T:2445 INFO : CDVDSubtitlesLibass: Initializing ASS Renderer
2022-12-14 15:13:57.096 T:2445 INFO : CDVDSubtitlesLibass: Creating new ASS track
2022-12-14 15:13:57.104 T:2448 INFO : CAEStreamParser::TrySyncAC3 - AC3 stream detected (2 channels, 48000Hz)
2022-12-14 15:13:57.104 T:2448 INFO : Creating audio stream (codec id: 86019, channels: 2, sample rate: 48000, pass-through)
2022-12-14 15:13:57.122 T:32419 INFO : CActiveAESink::OpenSink - initialize sink
2022-12-14 15:13:57.321 T:32419 INFO : CAESinkALSA::Initialize - Attempting to open device “hdmi:CARD=vc4hdmi1,DEV=0”
2022-12-14 15:13:57.325 T:32419 INFO : CAESinkALSA::Initialize - Opened device “hdmi:CARD=vc4hdmi1,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x02”
2022-12-14 15:13:57.343 T:32405 INFO : [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 23.976, 3D: false
2022-12-14 15:13:57.344 T:32405 ERROR : ** T99 ** 1920/1080 vs. 1280/720 - 23.976025 vs. 60.000000, flags: 0x0
2022-12-14 15:13:57.344 T:32405 ERROR : ** T99 ** 1920/1080 vs. 1360/768 - 23.976025 vs. 60.000000, flags: 0x0
2022-12-14 15:13:57.344 T:32405 ERROR : ** T99 ** 1920/1080 vs. 1920/1080 - 23.976025 vs. 50.000000, flags: 0x0
2022-12-14 15:13:57.344 T:32405 ERROR : ** T99 ** 1920/1080 vs. 1920/1080 - 23.976025 vs. 60.000000, flags: 0x0
2022-12-14 15:13:57.344 T:32405 INFO : Display resolution ADJUST : 1920x1080 @ 60.000000 Hz (18) (weight: 0.000)
2022-12-14 15:14:20.829 T:32405 INFO : CVideoPlayer::CloseFile()

High @ L5.1 and 16 Reframes is quite high and may be out of the spec of H264 decoding on RBP.

Some logs would certainly be useful.

Raspberry Pi’s H264 block likely supports 4 reference frames which would be the standard for commercial Blu-ray content at 1080p

I’ll ask @popcornmix to have a look at this post.

Sam

I think this can be the culprit.

Logs here (removed)

Speaking to @popcornmix, he says:

h264 (unlike hevc) uses firmware side driver and allocates from gpu_mem. The default (76M on pi4) is enough for L4.1 (bluray) which is all we claim to support. However if you increase gpu_mem enough we can play higher profile streams. Set gpu_mem=256 will likely play these streams (but isn’t recommended in general as that extra memory is wasted when you are not playing a 5.1 stream.

You could try increasing your GPU memory.

1 Like

Thank you for the response, but looks like I can’t do this on RPi4 GPU Memory Allocation option not selectable in "Pi Config" settings - #2 by darwindesign

You can probably use 256MB without having an issue but you will need to change it via the terminal and in a manor that is not officially sanctioned as these changes may be overwritten in a future update requiring you to have to manually reapply your modification (this particular setting will not work if put in config-user.txt). For information on accessing the terminal see [here]. Once your there you need to type in…

sudo nano /boot/config.txt

and press enter. You will then add “gpu_mem=256” to the [pi4] section and then press ctrl+x, then y, then enter to save and exit nano. You can then type “reboot” and press enter to reboot and allow the new setting to take effect.

Thank Yoooou. It is playing fine now

2 Likes