I have a large library of videos which I am trying to convert to hevc for playback on a Roku Ultra. Per Roku's official streaming specifications (https://developer.roku.com/docs/specs/media/streaming-specifications.md#supported-video-codecs) the maximum level that it can support is 5.1. I have tested this and while higher levels do work, there are playback issues like tearing and hanging, so I need to stick with the 5.1 level. I am using FFmpeg to perform the conversions.
Here's my issue; I have been playing with both software (libx265) and hardware (hevc_nvenc) to do the conversions. However, I keep running into issues where the conversion will fail because the set level (5.1) isn't sufficient for the bit rate. For example, if I run the following:
I get the error:Code:-c:v libx265 -vf scale=3840:2160 -preset veryslow -crf 23 -profile:v main -x265-params "level-idc=5.1" -c:a copy
If I run:Code:x265 [error]: frame rate is out of range for specific level
I get:Code:-c:v hevc_nvenc -vf scale=3840:2160 -preset:v 18 -tune:v 1 -profile:v 0 -level:v 153 -tier:v 1 -rc:v 1 -cq:v 23 -c:a copy
The maddening thing is that if i remove the Level 5.1 arguments, let the encode complete (which results in a Level 6 / 5.2 / etc.), then re-encode it again with the Level 5.1 argument, it works fine because the bitrate has dropped to a level which is supported by Level 5.1. Obviously, this isn't a good option because the loss levels go through the roof by re-encoding twice.Code:InitializeEncoder faile: invalid param (8): Invalid Level
My question is two-fold; first, is there anything I could be doing differently to get this to function in one pass, second, is it possible to set the level on an existing file without re-encoding? This would let me convert everything to whatever level the encoder determines is needed, drop the bitrate to an appropriate level, then manually set the level to 5.1.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 3 of 3
Thread
-
-
You can try to change level only, without reencoding, with clever Ffmpeg-GUI, main section.
-
Thank you, this does appear to work! The question I have now is whether you or anyone else knows the raw commands to do this natively. I am using FFmpeg Batch to run these conversions in bulk and would like to create a preset to do this following conversion. I did not see any option in Clever FFmpeg-GUI to create a log file showing the commands being passed nor did I see anything in Windows Event Log...
EDIT: I figured it out. Basically, what you need to do is run the stream through the bitstream filter like so:
Code:-c:v copy -bsf:v hevc_metadata=level=153 -c:a copy
Last edited by copperheadclgp; 16th Nov 2022 at 13:58.
Similar Threads
-
best device for miniDV playback-Walkman?
By clashradio in forum MediaReplies: 7Last Post: 12th Mar 2022, 12:38 -
VCR Playback Issues
By amer1337 in forum RestorationReplies: 1Last Post: 22nd Nov 2020, 20:01 -
.AVI Playback Issues
By Moomoo2 in forum Newbie / General discussionsReplies: 10Last Post: 28th Sep 2020, 17:28 -
Japanese DVD playback issues
By remdale in forum Software PlayingReplies: 6Last Post: 12th Feb 2019, 01:46 -
How do i take my re-encoding to the next level?
By defeatedrebel in forum Video ConversionReplies: 3Last Post: 30th Nov 2017, 13:19