-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update to the latest FFMpeg (5.1) on Debian #72
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is an incredibly helpful contribution.
src/Codec/FFmpeg/Juicy.hs
Outdated
where | ||
aux md r = runMaybeT $ do | ||
frame <- MaybeT r | ||
MaybeT $ toJuicyImage mdisp (displayRotation md) frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to understand the extra Bool
argument we pick up in the image related functions, and I think maybe the naming is a bit confusing along this path. Above, we have toJuicyImage rotateIfPres mdisp
, but here we have this mdisp
parameter that is actually not the same as the mdisp
parameter of toJuicyImage
. I'm also a bit unclear on why we need a Bool
in addition to the Maybe
. Could the Nothing
variant imply a False
for the boolean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Bool
to imageWriterT
allows the caller to not want the image rotated even if rotation metadata is present. I can clean up the aux function for False to be Nothing so that toJuicyImage
always takes a Maybe and doesn't care about the flag.
(avcodec_send_frame ctx frame) | ||
read_pkts | ||
return writeAudioFrame | ||
else | ||
return $ \_ -> return () | ||
|
||
videoWriter <- case mVideoStream of | ||
vWriter <- case mVideoStream of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for the name changes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name clashing with the videoWriter function so the change to reduce warnings
src/Codec/FFmpeg/Encode.hsc
Outdated
@@ -498,7 +514,7 @@ videoWriter ep fname = do | |||
|
|||
data StreamParams = | |||
JustVideo VideoParams | |||
| JustAudio AudioParams | |||
| JustAudio AudioParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to have picked up some spurious trailing whitespace here.
src/Codec/FFmpeg/Encode.hsc
Outdated
write_header_check oc | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More spurious whitespace.
I'm not too familiar with the Github CI process, should I update the |
…d remove extra whitespace
…s a #define. Add alpine container build to ensure build succeeds on musl.
This package has been marked as broken for a year. If anyone wants to fix it, there is a pull request updating it to the current FFmpeg API: <acowley/ffmpeg-light#72>.
This package has been marked as broken for a year. If anyone wants to fix it, there is a pull request updating it to the current FFmpeg API: <acowley/ffmpeg-light#72>. (cherry picked from commit 7ce990f)
This package has been marked as broken for a year. If anyone wants to fix it, there is a pull request updating it to the current FFmpeg API: <acowley/ffmpeg-light#72>. (cherry picked from commit 7ce990f)
This package has been marked as broken for a year. If anyone wants to fix it, there is a pull request updating it to the current FFmpeg API: <acowley/ffmpeg-light#72>. (cherry picked from commit 7ce990f)
Changes to support the 5.x and greater libav* versions. New encoding and decoding process was needed. I have cleaned up the PR as much as possible to align with the original coding style.
I am not a stack user at all so I don't know if the stack requirements are met - it builds with stack but I am not sure about LTS version management.
Had to remove 8.6.5 and 9.0.2 from the supported builds as I had trouble building hsc2hs and JuicyPixels using these ghc versions.