Conversation
Using Lsio base Suport for AMD, Intel, Nvidia and others
Parse FFMPEG_ARGS and FFMPEG_OUTPUT_ARGS into arrays Detect 'qsv' and 'cuda' flags and map codecs to Hardware encoders (h264_qsv/hevc_qsv and h264_nvenc/hevc_nvenc) Make codec_short mutable to allow reassignment Log constructed ffmpeg command for visibility Enables runtime custom ffmpeg args and hw encoder selection Improves deployment flexibility and performance tuning
There was a problem hiding this comment.
3 issues found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="Dockerfile">
<violation number="1" location="Dockerfile:52">
P2: Hard-coded x86_64 multiarch paths in buildstage and LIBVA_DRIVERS_PATH break arm64 builds and VAAPI driver discovery when building for aarch64.</violation>
</file>
<file name="src/converters/ffmpeg.ts">
<violation number="1" location="src/converters/ffmpeg.ts:751">
P2: CUDA hardware acceleration cases incorrectly select Intel QSV encoders instead of NVIDIA NVENC encoders.</violation>
<violation number="2" location="src/converters/ffmpeg.ts:761">
P2: Incorrect removal of hardware-accel args: slice keeps only the element before -hwaccel and drops all other args instead of removing -hwaccel and its value.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
|
The arm image fails to build |
I don't have arm here, the lsio have another dockerfile for it. There something I can do to solve fix this? |
As you can see here (https://github.com/linuxserver/docker-ffmpeg/blob/master/Dockerfile.aarch64) they use a dockerfile specialized for arm, because the drivers change. We need to do the same or drop support for arm in the next release until we change the workflow to build a arm dedicated image, this is required as the drivers differs a lot. We need someone with arm to help with this part, I don't have a way to test in my side, sorry. |
Hi, I tested your build with:
H264.mp4 and H265.mp4 transcoding (encode + decode) works. As for the ARM build failing: I don't think even Nvidia has an ARM driver and The OSS Nouveau driver has ARM support but doesn't appear to support encoding yet (it's decode only using VDPAU). Maybe it makes sense to just not include the conflicting Nvidia driver/ffmpeg with We can always make another PR once the driver and library are available. |
yeap, can you split the dockerfile in two and edit the workflow? |
|
here is another approach: #534 or is there a difference between linuxserver ffmpeg and debian ffmpeg? |
Exists, the ffmpeg is compiled from source to allow filters and functions to work well with /dev/dri (amd/intel) and nvidia. But maybe for our use case make sense only use a plain ffmpeg and see what happens. |

make this pr obsolete: #480
fix #523
add drivers, need configuration to fix #518
Testing:
ghcr.io/webysther/convertx:hwadocker compose for intel:
Same as documentation in lsio for intel, amd and others. We need volunteer to test with gpu.