Output: pick the codec from the extension; add --keep-audio - #55
Merged
Merged
Conversation
.mkv writes lossless FFV1 (frames match the 8-bit output exactly), .avi MJPG and .mp4 MPEG-4 (mp4v); other extensions are rejected before processing instead of writing MJPG into any container. --keep-audio copies the input's audio track into the output with ffmpeg when it is on the PATH, and warns otherwise. Closes #43.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #43.
Changes
.mkvwrites FFV1, lossless; the frames read back match the 8-bit output exactly (the acceptance test);.aviwrites MJPG (unchanged, still the default output);.mp4writes MPEG-4 Part 2 (mp4v). H.264 isn't available in OpenCV's pip builds.--keep-audiocopies the input's audio track into the output withffmpeg -map 0:v -map 1:a? -c copy. Without ffmpeg it warns at startup and writes video only. If the container can't hold the audio codec, it warns and keeps the video-only file..mkvfor analysis: JPEG compression noise is as large as the sub-1% colour changes EVM reveals.Not done
--save-npy: suggested, but not in the acceptance criteria..mkvalready gives lossless 8-bit output, and library users get the float result fromeulerian_magnification().Verification
./test.sh: all pass.test_keep_audio_end_to_endis skipped there because the image has no ffmpeg.--keep-audiorun (ffprobe shows a video and an audio stream)..mkvgives ffv1 + aac,.mp4gives mpeg4 + aac,.avigives mjpeg + aac.-o out.webmexits 1 with the list of supported extensions.