lisamelton / video_transcoding

Tools to transcode, inspect and convert videos.
MIT License
2.39k stars 160 forks source link

Linux/Ubuntu HandBrakeCLI not found via flatpak #325

Closed RobertLesjak closed 3 years ago

RobertLesjak commented 3 years ago

Hi Don,

I hope my inquiry will reach you since you would obviously focus more on the new project other_video_transcoding. I was setting up in an Linux/Ubuntu environment video_transcoding. Due to the Ubuntu base 18.04 there is no latest release of HandBrake available except via flatpak. So I installed through flatpak Handbrake 1.3.3 and HandBrakeCLI and also the Intel Media SDK for Quick Sync support. I didn't manage to get transcode-video running because HandBrakeCLI is not found. I was playing around on the module handbrake.rb tried to change COMMAND_NAME = 'HandBrakeCLI' to 'fr.handbrake.HandBrakeCLI'. That would surprisingly work but without QSV support. I now that the main flatpak package include HandBrakeCLI and can be called through 'flatpak run --command=HandBrakeCLI fr.handbrake.ghb' but this leads to lots of errors. I played around with system(flatpak run, --command=HandBrakeCLI, fr.handbrake.ghb) with back ticks ' and [ ] etc. but I have to admit that I'm not familiar with Ruby.

Do you have a hint in which direction I could succeed or should I target my issue to the flathub community?

Thanks for your time and the great tools which I much appreciate (working of course for me on Mac and Windows though).

Best regards. Robert

lisamelton commented 3 years ago

@RobertLesjak I'm sorry you're having this problem. But, yes, I would contact the Flathub community because, honestly, I'm not sure how to solve this problem. I suspect this is simply some kind of problem with how your $PATH environment variable is configured but those folks might know for sure.

lisamelton commented 3 years ago

@RobertLesjak I'm going to assume you contacted the Flathub community and close this issue because... there's not really much I can do here.

parkerbrother1 commented 2 years ago

I ran into this same issue and was able to resolve it thanks to this: https://github.com/bast1aan/scripts/blob/master/flatpak-runner

Here is what my usr/libexec/flatpak-runner script looks like:

#!/bin/bash

declare -A pkgs

pkgs=(
 [HandBrakeCLI]=fr.handbrake.ghb  
)

cmd=`basename $0`
args=$@

flatpak run --command="$cmd" ${pkgs[$cmd]} $args