New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hardware transcode failed, raspberry pi 4 #1747
Comments
Can you please try adding your user jellyfin is running as to the I think that should fix your problem. |
thanks, but transcode still not work. root@pi4:~# cat /etc/group | grep jellyfin video:x:44:jellyfin jellyfin:x:111: play with firefox, set bitrate limit to 1M to force transcode
|
you can try this repo . The 10.3.7 is not working on raspbian(buster based). How do you run 10.3.7 on raspbian(buster based)? |
I'm personally using the docker image (but I'm on a raspberry pi 3). It works mostly fine. |
@SharerMax buster is supported, pls check installing jellyfin NOTE: Supported releases are: stretch and buster. |
@kt1024 This is true, but if I recall, there's changes to the way the video hardware is handled for an RPi4, so we haven't caught up with those yet in jellyfin-ffmpeg. This might be okay in our next release, which would use a newer ffmpeg, but we'd have to check. I don't know if @joshuaboniface has any suggestions on this. |
@SharerMax you can manually install libssl1.0.2 and get 10.3.7 working. |
@kt1024 please try installing Jellyfin 10.4.0 plus jellyfin-ffmpeg 4.2.1 |
@JustAMan root@pi4:~# dpkg --list | grep jellyfin ii jellyfin 10.4.0-1 armhf Jellyfin is a home media server. ii jellyfin-ffmpeg 4.2.1-1-buster armhf Tools for transcoding, streaming and playing of multimedia files root@pi4:~# id jellyfin uid=107(jellyfin) gid=111(jellyfin) groups=111(jellyfin),44(video) Oct 11 10:11:11 pi4 jellyfin[488]: [10:11:11] [ERR] FFMpeg exited with code 1 Oct 11 10:11:11 pi4 jellyfin[488]: [10:11:11] [INF] returning /var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e731750.ts Oct 11 10:11:13 pi4 jellyfin[488]: [10:11:13] [ERR] Failed to bind to port 1900: Address already in use. DLNA will be unavailable Oct 11 10:11:20 pi4 jellyfin[488]: [10:11:20] [WRN] HTTP Response 500 to 172.17.0.7. Time (slow): 0:00:10.0206913. http://172.17.0.9:8096/videos/66fbfb1e-1992-8ad7-1a27-e8f552b9e1ee/hls1/main/0.ts?DeviceId=TW96aWxsYS81LjAgKGlQaG9uZTsgQ1BVIGlQaG9uZSBPUyAxM18xXzIgbGlrZSBNYWMgT1MgWCkgQXBwbGVXZWJLaXQvNjA1LjEuMTUgKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzEzLjAuMSBNb2JpbGUvMTVFMTQ4IFNhZmFyaS82MDQuMXwxNTcwNzU5NTQ4MTAz&MediaSourceId=66fbfb1e19928ad71a27e8f552b9e1ee&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=776001&AudioBitrate=224000&PlaySessionId=6cd868bb80f54a4998d1f80a630dd85d&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=2b21c1a2e9d900b22d33d94893a2cd37&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&TranscodeReasons=ContainerBitrateExceedsLimit Oct 11 10:11:20 pi4 jellyfin[488]: [10:11:20] [INF] /usr/lib/jellyfin-ffmpeg/ffmpeg -i file:"/mnt/test.mp4" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_omx -b:v 776001 -maxrate 776001 -bufsize 1552002 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,640)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 libmp3lame -ac 2 -ab 224000 -af "volume=2" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e73175.m3u8" -y "/var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e73175%d.ts" Oct 11 10:11:21 pi4 jellyfin[488]: [10:11:21] [ERR] FFMpeg exited with code 1 Oct 11 10:11:21 pi4 jellyfin[488]: [10:11:21] [INF] returning /var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e731750.ts Oct 11 10:11:30 pi4 jellyfin[488]: [10:11:30] [WRN] HTTP Response 500 to 172.17.0.7. Time (slow): 0:00:09.9974056. http://172.17.0.9:8096/videos/66fbfb1e-1992-8ad7-1a27-e8f552b9e1ee/hls1/main/0.ts?DeviceId=TW96aWxsYS81LjAgKGlQaG9uZTsgQ1BVIGlQaG9uZSBPUyAxM18xXzIgbGlrZSBNYWMgT1MgWCkgQXBwbGVXZWJLaXQvNjA1LjEuMTUgKEtIVE1MLCBsaWtlIEdlY2tvKSBWZXJzaW9uLzEzLjAuMSBNb2JpbGUvMTVFMTQ4IFNhZmFyaS82MDQuMXwxNTcwNzU5NTQ4MTAz&MediaSourceId=66fbfb1e19928ad71a27e8f552b9e1ee&VideoCodec=h264&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=776001&AudioBitrate=224000&PlaySessionId=6cd868bb80f54a4998d1f80a630dd85d&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=2b21c1a2e9d900b22d33d94893a2cd37&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&TranscodeReasons=ContainerBitrateExceedsLimit Oct 11 10:11:30 pi4 jellyfin[488]: [10:11:30] [INF] /usr/lib/jellyfin-ffmpeg/ffmpeg -i file:"/mnt/test.mp4" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_omx -b:v 776001 -maxrate 776001 -bufsize 1552002 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,640)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 libmp3lame -ac 2 -ab 224000 -af "volume=2" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e73175.m3u8" -y "/var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e73175%d.ts" Oct 11 10:11:31 pi4 jellyfin[488]: [10:11:31] [ERR] FFMpeg exited with code 1 Oct 11 10:11:31 pi4 jellyfin[488]: [10:11:31] [INF] returning /var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e731750.ts |
Can you show what happens if you run
? |
@JustAMan here it's root@pi4:~# sudo -u jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -i file:"/mnt/test.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_omx -b:v 776001 -maxrate 776001 -bufsize 1552002 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -vf "scale=trunc(min(max(iw\,ih*dar)\,640)/2)*2:trunc(ow/dar/2)*2" -copyts -vsync -1 -codec:a:0 libmp3lame -ac 2 -ab 224000 -af "volume=2" -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e73175.m3u8" -y "/var/lib/jellyfin/transcoding-temp/transcodes/01a8b008d437891a02917c2df9e73175%d.ts" ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8 (Debian 8.3.0-2) configuration: --toolchain=hardened --prefix=/usr --target-os=linux --enable-cross-compile --extra-cflags=--static --enable-gpl --enable-static --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-libfontconfig --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libwebp --enable-libx264 --enable-libx265 --enable-libzvbi --enable-omx --enable-omx-rpi --enable-version3 --enable-vaapi --enable-vdpau --enable-cross-compile --cross-prefix=/usr/bin/arm-linux-gnueabihf- --arch=armhf libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Input #0, matroska,webm, from 'file:/mnt/test.mkv': Metadata: title : test encoder : libebml v1.3.6 + libmatroska v1.4.9 creation_time : 2018-08-07T04:44:43.000000Z Duration: 01:59:29.25, start: 0.000000, bitrate: 4893 kb/s Chapter #0:0: start 0.000000, end 150.692000 Metadata: title : Chapter 01 Chapter #0:1: start 150.692000, end 352.435000 Metadata: title : Chapter 02 Chapter #0:2: start 352.435000, end 490.656000 Metadata: title : Chapter 03 Chapter #0:3: start 490.656000, end 689.563000 Metadata: title : Chapter 04 Chapter #0:4: start 689.563000, end 891.097000 Metadata: title : Chapter 05 Chapter #0:5: start 891.097000, end 979.977000 Metadata: title : Chapter 06 Chapter #0:6: start 979.977000, end 1223.512000 Metadata: title : Chapter 07 Chapter #0:7: start 1223.512000, end 1319.524000 Metadata: title : Chapter 08 Chapter #0:8: start 1319.524000, end 1593.464000 Metadata: title : Chapter 09 Chapter #0:9: start 1593.464000, end 1899.770000 Metadata: title : Chapter 10 Chapter #0:10: start 1899.770000, end 2115.944000 Metadata: title : Chapter 11 Chapter #0:11: start 2115.944000, end 2339.375000 Metadata: title : Chapter 12 Chapter #0:12: start 2339.375000, end 2508.919000 Metadata: title : Chapter 13 Chapter #0:13: start 2508.919000, end 2775.226000 Metadata: title : Chapter 14 Chapter #0:14: start 2775.226000, end 3029.021000 Metadata: title : Chapter 15 Chapter #0:15: start 3029.021000, end 3235.060000 Metadata: title : Chapter 16 Chapter #0:16: start 3235.060000, end 3386.419000 Metadata: title : Chapter 17 Chapter #0:17: start 3386.419000, end 3504.703000 Metadata: title : Chapter 18 Chapter #0:18: start 3504.703000, end 3625.031000 Metadata: title : Chapter 19 Chapter #0:19: start 3625.031000, end 3838.285000 Metadata: title : Chapter 20 Chapter #0:20: start 3838.285000, end 4076.481000 Metadata: title : Chapter 21 Chapter #0:21: start 4076.481000, end 4177.456000 Metadata: title : Chapter 22 Chapter #0:22: start 4177.456000, end 4406.810000 Metadata: title : Chapter 23 Chapter #0:23: start 4406.810000, end 4668.112000 Metadata: title : Chapter 24 Chapter #0:24: start 4668.112000, end 4855.007000 Metadata: title : Chapter 25 Chapter #0:25: start 4855.007000, end 5044.905000 Metadata: title : Chapter 26 Chapter #0:26: start 5044.905000, end 5180.332000 Metadata: title : Chapter 27 Chapter #0:27: start 5180.332000, end 5367.894000 Metadata: title : Chapter 28 Chapter #0:28: start 5367.894000, end 5500.276000 Metadata: title : Chapter 29 Chapter #0:29: start 5500.276000, end 5605.339000 Metadata: title : Chapter 30 Chapter #0:30: start 5605.339000, end 5728.295000 Metadata: title : Chapter 31 Chapter #0:31: start 5728.295000, end 5933.541000 Metadata: title : Chapter 32 Chapter #0:32: start 5933.541000, end 6135.159000 Metadata: title : Chapter 33 Chapter #0:33: start 6135.159000, end 6318.008000 Metadata: title : Chapter 34 Chapter #0:34: start 6318.008000, end 6539.562000 Metadata: title : Chapter 35 Chapter #0:35: start 6539.562000, end 7169.247000 Metadata: title : Chapter 36 Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x804 [SAR 1:1 DAR 160:67], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default) Metadata: title : test BPS-eng : 4508173 DURATION-eng : 01:59:29.204000000 NUMBER_OF_FRAMES-eng: 171889 NUMBER_OF_BYTES-eng: 4040001992 _STATISTICS_WRITING_APP-eng: mkvmerge v25.0.0 ('Prog Noir') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2018-08-07 04:44:43 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default) Metadata: title : Deadpool.2.2018.1080p.WEB-DL.DD5.1.H264-FGT BPS-eng : 384000 DURATION-eng : 01:59:17.248000000 NUMBER_OF_FRAMES-eng: 223664 NUMBER_OF_BYTES-eng: 343547904 _STATISTICS_WRITING_APP-eng: mkvmerge v25.0.0 ('Prog Noir') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2018-08-07 04:44:43 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 120x176, 90k tbr, 90k tbn, 90k tbc (attached pic) Metadata: filename : small_cover.jpg mimetype : image/jpeg Stream #0:3: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 213x120, 90k tbr, 90k tbn, 90k tbc (attached pic) Metadata: filename : small_cover_land.jpg mimetype : image/jpeg Stream #0:4: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 600x882, 90k tbr, 90k tbn, 90k tbc (attached pic) Metadata: filename : cover.jpg mimetype : image/jpeg Stream #0:5: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1067x600, 90k tbr, 90k tbn, 90k tbc (attached pic) Metadata: filename : cover_land.jpg mimetype : image/jpeg Only '-vf scale=trunc(min(max(iw\,ih*dar)\,640)/2)*2:trunc(ow/dar/2)*2' read, ignoring remaining -vf options: Use ',' to separate filters Only '-af volume=2' read, ignoring remaining -af options: Use ',' to separate filters Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_omx)) Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help [h264_omx @ 0x1d56d70] Using OMX.broadcom.video_encode [h264_omx @ 0x1d56d70] OMX_GetHandle(OMX.broadcom.video_encode) failed: 80001005 Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height [libmp3lame @ 0x1d73b10] 3 frames left in the queue on closing Conversion failed! |
Can you post:
|
root@pi4:~# cat /boot/config.txt # IMPORTANT: # - Modifications to /boot/config.txt will not be preserved on reboot. # - Please ensure you edit from the DietPi-RAMdisk location: /DietPi/config.txt #-------Display--------- # If you get no picture, set the following to "1" to apply most compatible HDMI settings. #hdmi_safe=1 # Uncomment to adjust the HDMI signal strength if you have interferences, blanking, or no display. # - Values from "0" to "11" are allowed, use values above "7" only if required, e.g. with very long HDMI cable. # - Default on first RPi1 is "2" and on RPi2 and above: "5" #config_hdmi_boost=5 # Uncomment if HDMI display is not detected and composite is being outputted. #hdmi_force_hotplug=1 # Set the following two settings to "1" to disable video output and framebuffer completely. # NB: This will lead to some error messages on boot, which can be safely ignored. #hdmi_ignore_hotplug=1 #hdmi_ignore_composite=1 # Uncomment to force a console size. By default it will be display's size minus overscan. #framebuffer_width=1280 #framebuffer_height=720 # SDTV_MODES #sdtv_mode=0 # Uncomment to force a specific HDMI mode (this will force VGA). #hdmi_group=1 #hdmi_mode=1 # Uncomment to force an HDMI mode rather than DVI. This can make audio work in DMT (computer monitor) modes. #hdmi_drive=2 # Set "hdmi_blanking=1" to allow the display going into standby after 10 minutes without input. # With default value "0", the display shows a blank screen instead, but will not go into standby. # NB: With "1" some applications (e.g. Kodi, OMXPlayer) cannot prevent display standby due to missing DPMS signal. #hdmi_blanking=1 # Set to "1" if your display has a black border of unused pixels visible. disable_overscan=1 # Uncomment the following to adjust overscan. Use positive numbers if console goes off screen, and negative if there is too much border. #overscan_left=16 #overscan_right=16 #overscan_top=16 #overscan_bottom=16 # Rotation display_hdmi_rotate=0 lcd_rotate=0 #-------RPi camera module------- start_x=0 disable_camera_led=0 #-------GPU memory splits------- gpu_mem_256=16 gpu_mem_512=16 gpu_mem_1024=16 #-------Max USB current--------- max_usb_current=1 #-------Disable Pi splash screen on boot----------- disable_splash=1 #-------SoundCard------- dtparam=audio=off #-------I²C------------- dtparam=i2c_arm=off dtparam=i2c1=off i2c_arm_baudrate=100000 #-------SPI------------- dtparam=spi=off #-------Serial/UART----- # NB: Enabled for 1st run only, if you want to keep this setting, please set CONFIG_SERIAL_CONSOLE_ENABLE=1 in /DietPi/dietpi.txt. #core_freq=500 enable_uart=0 #-------Overclock------- temp_limit=65 # Initial turbo currently leads to CPU not being throttled down by CPU governor: https://github.com/MichaIng/DietPi/issues/1836 #initial_turbo=20 force_turbo=0 #over_voltage=0 #arm_freq=1500 #core_freq=500 #sdram_freq=3200 #arm_freq_min=700 #core_freq_min=250 #sdram_freq_min=400 # Note To Self, NEVER enable L2 cache, breaks most X based applications that were not compiled with L2 cache enabled. root@pi4:~# id jellyfin uid=107(jellyfin) gid=111(jellyfin) groups=111(jellyfin),44(video) root@pi4:~# ls -l /dev/vchiq crw-rw---- 1 root video 244, 0 Oct 13 23:17 /dev/vchiq root@pi4:~# |
I think this might be problematic a bit - I don't think 16 MB of memory is enough, see this for inspiration: Sunoo/homebridge-camera-ffmpeg#38 (comment) |
yes, it's. changed mem to 256, now transcode works. thanks all. |
I recommend you update this page: |
Is right there...
|
You're right. guess I missed it. |
hw: Raspberry Pi 4, 2GB
OS: dietpi (based on raspbian)
transcoding is set to OpenMAX OMX, enabled for H264.
issue: transcode not work. error logs as bellow:
Expected behavior
Hardware acceleration should work.
Logs
jellyfin logs:
ffmpeg transcode logs:
System (please complete the following information):
jellyfin 10.3.7-1 armhf Jellyfin is a home media server.
jellyfin-ffmpeg 4.0.4-3-buster armhf Tools for transcoding, streaming and playing of multimedia files
thank you.
The text was updated successfully, but these errors were encountered: