HEVC playing just audio on Rasp Pi 4

  • Hi everyone,

    I am new here so I hope this is the right place to post my question.

    I have just installed LibreElec 11.0.3 n my Raspberry Pi 4, but when I try to play any HEVC video (even small ones, no 4K), it plays just the audio and not the video.

    What am I missing in the configuration?

    Thank you in advance,

    Janus

  • This doesn't look like a typical hevc file:

    Code
    2023-07-31 22:33:58.744 T:1118     info <general>: ffmpeg[0x417b128]: [matroska,webm] Unknown/unsupported AVCodecID V_MS/VFW/FOURCC.
    2023-07-31 22:33:58.753 T:1118    debug <general>: ffmpeg[0x417b128]: [matroska,webm] Could not find codec parameters for stream 0 (Video: none (HEVC / 0x43564548), none, 1280x540): unknown codec
    2023-07-31 22:33:58.753 T:1118     info <general>: ffmpeg[0x417b128]:   Stream #0:0: Video: none (HEVC / 0x43564548), none, 1280x540, SAR 1:1 DAR 64:27, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)

    Note that it probes "Video: none (HEVC / 0x43564548), none"

    When I play a hevc file I see:

    Code
    Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709),

    Can you confirm if you can play a typical hevc file? e.g. this?

    Can you post output of mediainfo for your file?

  • This evening I will try to play the sample file you posted.

    In the meantime here is the mediainfo (I encoded it using FFmpeg embedded in VirtualDub2):

    General

    Unique ID : 327503377267111458763086869130134561745 (0xF662DB2A7642933EA19B1314B3EA23D1)

    Complete name : D:\Movies\2018 - Loro 1\2018 - Loro 1.mkv

    Format : Matroska

    Format version : Version 4

    File size : 579 MiB

    Duration : 1 h 43 min

    Overall bit rate : 781 kb/s

    Movie name : Loro 1

    Encoded date : UTC 2023-07-24 12:23:28

    Writing application : mkvmerge v64.0.0 ('Willows') 64-bit

    Writing library : libebml v1.4.2 + libmatroska v1.6.4 / Lavf58.29.100

    Video

    ID : 1

    Format : V_MS/VFW/FOURCC / HEVC

    Codec ID : V_MS/VFW/FOURCC / HEVC

    Duration : 1 h 43 min

    Bit rate : 587 kb/s

    Width : 1 280 pixels

    Height : 540 pixels

    Display aspect ratio : 2.40:1

    Frame rate mode : Constant

    Frame rate : 30.000 FPS

    Bits/(Pixel*Frame) : 0.028

    Stream size : 435 MiB (75%)

    Default : Yes

    Forced : No

    Audio

    ID : 2

    Format : AAC LC

    Format/Info : Advanced Audio Codec Low Complexity

    Codec ID : A_AAC-2

    Duration : 1 h 43 min

    Bit rate : 192 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

    Delay relative to video : 18 ms

    Stream size : 142 MiB (25%)

    Title : Italiano

    Language : Italian

    Default : Yes

    Forced : No

  • Do any other players play this file? Does kodi on windows/linux play it?

    This looks strange:

    Format : V_MS/VFW/FOURCC / HEVC

    Codec ID : V_MS/VFW/FOURCC / HEVC

    This would be the mediainfo output a normal hevc encode:

    Format : HEVC

    Format/Info : High Efficiency Video Coding

    Format profile : Main 10@L4@Main

    Codec ID : V_MPEGH/ISO/HEVC

    Can you upload a short sample file encoded that way?

  • I play the file without problems using vlc (is there a way to install VLC in libreELEC?).

    I have just installed Kodi on the same machine (Windows) and you are right: it does not work.

    I tried to re-encode the file using the same tool and the same settings changing only the bit depth: from 8 to 10. The codec ID changes to a simple "HEVC" and the file is played by windows' kodi.

    Later I will post a video sample of both 8-bit and 10-bit encodings.

    Thanks,

    Fabio

  • Further investigation:

    I found that the issue is not in the encoding itself (so what I wrote about 8 and 10 bit depths is wrong) but in the multiplexer (I am using MKVToolnix): the file plays fine, but when I add subtitles, audio, etc. and save it as a matroska file, the Codec ID changes.


    Later I will check if the newly encoded file plays on the raspberry as well.

    Janus (Fabio)


    Solved!

    Or, at least, I've found a workaround.

    As you guys told me, the problem was indeed in the Codec ID.

    I tried to remux some files with mkvmerge using the --fourcc 0:HEVC option and now the new files play fine.

    I have to remux a lot of files, but at least there's no need to re-encode them.

    For those who might face the same issue, I remux the files using the following command line:

    mkvmerge.exe --fourcc 0:HEVC --output oldfile.mkv newfile.mkv

    Thanks to you all for helping me.

    Fabio (Janus)

    Edited once, last by Janus: Merged a post created by Janus into this post. (August 1, 2023 at 11:48 PM).