RPI4 HWA Transcoding #1614

Closed
opened 2025-12-21 19:09:02 +01:00 by backuprepo · 5 comments
Owner

Originally created by @kjelderg on GitHub (Apr 27, 2020).

Describe the bug

Unable to transcode videos on Raspberry Pi 4.
System (please complete the following information):

  • OS: [e.g. Debian, Windows] Respbian
  • Virtualization: [e.g. Docker, KVM, LXC] None
  • Clients: [Browser, Android, Fire Stick, etc.] Browser
  • Browser: [e.g. Firefox 72, Chrome 80, Safari 13] Chrome 81
  • Jellyfin Version: [e.g. 10.4.3, nightly 20191231] 10.5.5
  • Playback: [Direct Play, Remux, Direct Stream, Transcode] Transcode
  • Installed Plugins: [e.g. none, Fanart, Anime, etc.] none
  • Reverse Proxy: [e.g. none, nginx, apache, etc.] none
  • Base URL: [e.g. none, yes: /example] none
  • Networking: [e.g. Host, Bridge/NAT] Local network
  • Storage: [e.g. local, NFS, cloud] local USB

To Reproduce

  1. Try to play video with OpenMax HWA and H264

Expected behavior

Transcoded video playback

Logs

https://pastebin.com/x2C5zTZj

Screenshots

Additional context

With hardware transcoding disabled, the video plays, but transcoding is too slow to make it usable.

Originally created by @kjelderg on GitHub (Apr 27, 2020). **Describe the bug** <!-- A clear and concise description of what the bug is. --> Unable to transcode videos on Raspberry Pi 4. **System (please complete the following information):** - OS: [e.g. Debian, Windows] Respbian - Virtualization: [e.g. Docker, KVM, LXC] None - Clients: [Browser, Android, Fire Stick, etc.] Browser - Browser: [e.g. Firefox 72, Chrome 80, Safari 13] Chrome 81 - Jellyfin Version: [e.g. 10.4.3, nightly 20191231] 10.5.5 - Playback: [Direct Play, Remux, Direct Stream, Transcode] Transcode - Installed Plugins: [e.g. none, Fanart, Anime, etc.] none - Reverse Proxy: [e.g. none, nginx, apache, etc.] none - Base URL: [e.g. none, yes: /example] none - Networking: [e.g. Host, Bridge/NAT] Local network - Storage: [e.g. local, NFS, cloud] local USB **To Reproduce** <!-- Steps to reproduce the behavior: --> 1. Try to play video with OpenMax HWA and H264 **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> Transcoded video playback **Logs** <!-- Please paste any log errors. --> https://pastebin.com/x2C5zTZj **Screenshots** <!-- If applicable, add screenshots to help explain your problem. --> **Additional context** <!-- Add any other context about the problem here. --> With hardware transcoding disabled, the video plays, but transcoding is too slow to make it usable.
backuprepo 2025-12-21 19:09:02 +01:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Artiume commented on GitHub (Apr 27, 2020):

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx))
  Stream #0:1 -> #0:1 (flac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[h264_mmal @ 0x22936b0] MMAL error 2 on control port
    Last message repeated 34 times
[h264_mmal @ 0x22936b0] Did not get output frame from MMAL.
Error while decoding stream #0:0: Unknown error occurred
[h264_mmal @ 0x22936b0] MMAL error 2 on control port
    Last message repeated 5 times
@Artiume commented on GitHub (Apr 27, 2020): ``` Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx)) Stream #0:1 -> #0:1 (flac (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help [h264_mmal @ 0x22936b0] MMAL error 2 on control port Last message repeated 34 times [h264_mmal @ 0x22936b0] Did not get output frame from MMAL. Error while decoding stream #0:0: Unknown error occurred [h264_mmal @ 0x22936b0] MMAL error 2 on control port Last message repeated 5 times ```
Author
Owner

@Artiume commented on GitHub (Apr 27, 2020):

So I updated to 10.5.5 and verified mmal operation, it could be the file or your system.

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A    
[h264_omx @ 0x25a2770] Using OMX.broadcom.video_encode
[hls @ 0x25a21e0] Opening '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e5832.ts' for writing
Output #0, hls, to '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e58.m3u8':
  Metadata:
    encoder         : Lavf58.29.100
    Stream #0:0: Video: h264 (h264_omx), yuv420p, 426x318 [SAR 212:213 DAR 4:3], q=2-31, 272 kb/s, 25 fps, 90k tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc58.54.100 h264_omx
    Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      encoder         : Lavc58.54.100 aac
frame=   54 fps= 54 q=-0.0 size=N/A time=00:01:36.55 bitrate=N/A speed=96.3x    
[hls @ 0x25a21e0] Opening '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e5833.ts' for writing
frame=  109 fps= 72 q=-0.0 size=N/A time=00:01:38.64 bitrate=N/A speed=65.5x    
[hls @ 0x25a21e0] Opening '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e5834.ts' for writing
frame=  172 fps= 86 q=-0.0 size=N/A time=00:01:41.24 bitrate=N/A speed=50.4x    
@Artiume commented on GitHub (Apr 27, 2020): So I updated to 10.5.5 and verified mmal operation, it could be the file or your system. ``` Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help frame= 0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A [h264_omx @ 0x25a2770] Using OMX.broadcom.video_encode [hls @ 0x25a21e0] Opening '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e5832.ts' for writing Output #0, hls, to '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e58.m3u8': Metadata: encoder : Lavf58.29.100 Stream #0:0: Video: h264 (h264_omx), yuv420p, 426x318 [SAR 212:213 DAR 4:3], q=2-31, 272 kb/s, 25 fps, 90k tbn, 25 tbc (default) Metadata: encoder : Lavc58.54.100 h264_omx Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: encoder : Lavc58.54.100 aac frame= 54 fps= 54 q=-0.0 size=N/A time=00:01:36.55 bitrate=N/A speed=96.3x [hls @ 0x25a21e0] Opening '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e5833.ts' for writing frame= 109 fps= 72 q=-0.0 size=N/A time=00:01:38.64 bitrate=N/A speed=65.5x [hls @ 0x25a21e0] Opening '/ramfs/jellyfin/2872cb3885f1193e6be3b35a79ed4e5834.ts' for writing frame= 172 fps= 86 q=-0.0 size=N/A time=00:01:41.24 bitrate=N/A speed=50.4x ```
Author
Owner

@kjelderg commented on GitHub (Apr 29, 2020):

This should come as no surprise, but you are right.

Every file I tried was slightly corrupted and mmal is not very forgiving for corruptions.

@kjelderg commented on GitHub (Apr 29, 2020): This should come as no surprise, but you are right. Every file I tried was slightly corrupted and mmal is not very forgiving for corruptions.
Author
Owner

@Artiume commented on GitHub (Apr 29, 2020):

What was the source of corruption? If you're still having issues, no need to close the ticket early

@Artiume commented on GitHub (Apr 29, 2020): What was the source of corruption? If you're still having issues, no need to close the ticket early
Author
Owner

@kjelderg commented on GitHub (Apr 29, 2020):

I had no par2 installed so the files that came from usenet had undetected corruptions.

@kjelderg commented on GitHub (Apr 29, 2020): I had no par2 installed so the files that came from usenet had undetected corruptions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#1614
No description provided.