Parse HandBrakeCLI JSON output (Fixes #234) #333
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.
Uses the
HandBrakeCLI --json
option to get media info.Tested with
I ran
transcode-video --dry-run
on a bunch of DVD directory rips and a couple of .mkv and .mp4 files with no options and compared the output between video_transcoding-0.25.3 and video_transcoding-0.26.0 (this PR). The output for all of those was the same. When I added--crop detect --add-audio "spa" --add-subtitle "eng,spa"
, the only difference was that subtitle tracks were correctly added. My video library is very limited, however, and I didn't play with any of the other options.convert-video
doesn't always select the correct streams (the stream IDs aren't available in the HandBrake JSON output).Should now select the streams correctly, though it will only get the first video stream (which I think matches the old behavior, and is probably the most common use case).detect-crop
seems unaffected.TODOs:
Add stream IDs to media.info. They are not available in the JSON output, so they need to be found elsewhere.