Repository navigation
Conversation
Interval sampling mapped every video stream of a video to one output, and ffmpeg numbers the frames of all of them in one sequence. A GoPro MAX .360 video has two video streams, so its frames came out interleaved, and frame i, taken at (i - 1) // 2 intervals, was stamped (i - 1) intervals into the video. Half of them were stamped past its end. On a 5-minute .360 video sampled every second, the frames that could be geotagged were placed a median of 73 m from where they were taken, and the other half failed. Interval sampling now samples the video stream with the highest resolution, as distance sampling does. A video with a single video stream, which is nearly every video, is sampled as before and its samples keep their names.
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.
Problem
Interval sampling maps every video stream to one output (
-map 0:v), and ffmpeg numbers the frames of all of them in one sequence. A GoPro MAX.360video has two video streams, so frame i, taken at ⌊(i-1)/2⌋ intervals, is stamped at (i-1) intervals. On a 5-minute normal-speed.360sampled every second,video_processgives 588 samples. 298 of them fail, and the other 290 are placed a median of 73 m (max 190 m) from where they were taken, with--geotag_source gpxand with--geotag_source goproalike.Changes
Interval sampling samples the video stream with the highest resolution, as distance sampling does. A video with a single video stream, which is nearly every video, is sampled as before, and its samples keep their
_v_names. A video with several streams gets the index of the sampled stream in the names, as distance samples do.Verification
.360: 294 samples, 290 geotagged withgpxat a median of 2 m (the GPX's own error), 293 withgoproat 0 m.gpxand with their own source: output identical to main.mypy,ruff check,ruff format --checkandusort diffare clean.With #852: one hunk in
_sample_single_video_by_interval: probe once, then #852's telemetry and rate.