Netfool 20 Posted March 7 Posted March 7 I have several series that play on the web client but fail on Roku Ultras running Emby client 4.1.33. Server: Operating System: Linux version 5.15.0-1072-raspi (buildd@bos03-arm64-059) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #75-Ubuntu OS/Process: arm/arm Emby Server version: 4.8.10.0 Operating system: Unix 5.15.0.1072 The attached logs are for one of these files that puts up a spinner for 30 seconds or so and then plays a few seconds of video and then repeats the process. This generated the attached server log, a hardware detection log and then 25 ffmpeg-transcode logs (first and last attached), at which point I gave up. This was on a freshly rebooted Roku. I've tested with identical results with both 5Ghz WiFI and a wired ethernet connection to the Roku. I initially though the problem was with very large files but the example logged was passed through Handbrake to produce a 3.33 MBPS H.264 file, with exactly the same symptoms as the original larger file. I've been unable to identify a way to get logs from the Roku. embyserver-63876877475.txt ffmpeg-transcode-75169916-d902-44de-a256-8595e6ea1e9f_1.txt ffmpeg-transcode-92ed2db9-1c0f-4f8c-aa31-15a173c5f27b_1.txt hardware_detection-63876876023.txt
Luke 39394 Posted March 7 Posted March 7 HI, if you look at this data from ffprobe: {"Protocol":"File","Id":"b30368082de39c8a299a00122e097aef","Path":"/mnt/emby2/tv/Would I Lie to You!/Season 18/Would.I.Lie.to.You.S18E01.1080p.iP.WEB-DL.AAC2.0.H.264-NTb.mp4","Type":"Default","Container":"mp4","Size":721157989,"Name":"Would.I.Lie.to.You.S18E01.1080p.iP.WEB-DL.AAC2.0.H.264-NTb","IsRemote":false,"HasMixedProtocols":false,"RunTimeTicks":17288520000,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"RequiresLooping":false,"SupportsProbing":false,"MediaStreams":[{"Codec":"h264","CodecTag":"avc1","Language":"und","ColorTransfer":"bt709","ColorPrimaries":"bt709","ColorSpace":"bt709","TimeBase":"1/90000","VideoRange":"SDR","DisplayTitle":"1080p H264","NalLengthSize":"4","IsInterlaced":false,"BitRate":3164102,"BitDepth":8,"RefFrames":1,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":1080,"Width":1920,"AverageFrameRate":29.347536,"RealFrameRate":150,"Profile":"Main","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","PixelFormat":"yuv420p","Level":40,"IsAnamorphic":false,"ExtendedVideoType":"None","ExtendedVideoSubType":"None","ExtendedVideoSubTypeDescription":"None","AttachmentSize":0},{"Codec":"aac","CodecTag":"mp4a","Language":"eng","TimeBase":"1/48000","DisplayTitle":"English AAC stereo (Default)","DisplayLanguage":"English","IsInterlaced":false,"ChannelLayout":"stereo","BitRate":164098,"Channels":2,"SampleRate":48000,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Profile":"LC","Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Protocol":"File","ExtendedVideoType":"None","ExtendedVideoSubType":"None","ExtendedVideoSubTypeDescription":"None","AttachmentSize":0}],"Formats":[],"Bitrate":3337049,"RequiredHttpHeaders":{},"AddApiKeyToDirectStreamUrl":false,"ReadAtNativeFramerate":false,"ItemId":"89287"} This is what is causing the server transcoding: "RealFrameRate":150 Is there anything you might have configured in handbrake to cause that? The Roku can possibly direct play this file, it's just that framerate is one of the criteria that our app uses to determine if it can handle it or not.
speechles 1991 Posted March 7 Posted March 7 >>>>>> FindVideoEncoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Automatic Info Checking: 'x264' Info Check successful - selecting 'x264' >>>>>> FindVideoDecoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Automatic Info Checking: 'MMAL H.264' Info Check successful - selecting 'MMAL H.264' ... snipped irrelevant stuff ... mmalipc: mmal_vc_init_fd: could not open vchiq service 16:42:56.631 [h264_mmal @ 0x122b40] Cannot initialize MMAL VC driver! 16:42:56.632 Stream mapping: 16:42:56.632 Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (libx264)) 16:42:56.632 Stream #0:1 -> #0:1 (copy) 16:42:56.632 Error while opening decoder for input stream #0:0 : Function not implemented 16:42:56.632 Execution Date: 2025-03-06 16:42:56 16:42:56.633 EXIT https://randomadult.com/raspberry-pi-failed-open-vchiq-instance-solved/ Might be the same problem shown above that was solved with usermod changes.
Solution Netfool 20 Posted March 7 Author Solution Posted March 7 The original file was 1920x1080 at 50 fps. Here are the Handbrake settings I used: So a 150fps frame rate is a bit of a puzzle. I'll try turning off the Variable Frame Rate option and report back.
softworkz 4464 Posted March 15 Posted March 15 On 3/7/2025 at 10:37 PM, Netfool said: So a 150fps frame rate is a bit of a puzzle No really. When you convert from 50 to 30 fps, you need to distribute the existing 50 in each second frames in some ideally equal way to 30. Example: You got 50 pieces of cake and 30 guests. How can you make sure that each guest can get the equal amount of cake? Prime Factorization to find the smallest common multiple: 50 = 2 * 5 * 5 30 = 2 * 3 * 5 All green factors appear in both, except the red one (3) is missing in the 50 and needs to be added: 2 * 5 * 5 * 3 = 150 So, to distribute your 50 pieces of cake, you cut each one into three pieces, so you got 150 pieces and each guest will get 5. (150 / 30 = 5) For the framerate conversion, each frame isn't cut but tripled, so for each 30 fps frame, you have 5 50 fps frames as a source merge into a single frame. 1 1 1 2 2 => 1 2 3 3 3 4 => 2 4 4 5 5 5 => 3 6 6 6 7 7 => 4 7 8 8 8 9 => 5 etc
softworkz 4464 Posted March 15 Posted March 15 On 3/7/2025 at 10:37 PM, Netfool said: I'll try turning off the Variable Frame Rate Variable frame rate is something for screen recordings or surveillance cams, but nor for home entertainment!
Luke 39394 Posted Thursday at 12:49 AM Posted Thursday at 12:49 AM @Netfoolcan you provide a sample video for testing? Thanks !
Netfool 20 Posted Thursday at 09:06 PM Author Posted Thursday at 09:06 PM On 3/11/2025 at 3:40 PM, Luke said: Hi, has this helped? Setting constant frame rate in Handbrake seems to have done the trick. Sadly I don't see a way to make that happen in Emby's transcode processor. 1
Luke 39394 Posted Thursday at 10:24 PM Posted Thursday at 10:24 PM 21 hours ago, Luke said: @Netfoolcan you provide a sample video for testing? Thanks !
Netfool 20 Posted Friday at 12:26 AM Author Posted Friday at 12:26 AM On 3/11/2025 at 3:40 PM, Luke said: Hi, has this helped? Yes, setting constant frame rate seems to do the trick.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now