Skip to content
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 nvidia tests to pass with VFR changes. #404

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions ffmpeg/nvidia_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ func TestNvidia_DrainFilters(t *testing.T) {
ffprobe -loglevel warning -show_streams -select_streams v -count_frames out.ts > probe.out

# These used to be same, but aren't since we've diverged the flushing and PTS handling from ffmpeg
grep nb_read_frames=100 probe.out
grep duration=1.0000 probe.out
grep nb_read_frames=101 probe.out
grep duration=1.0100 probe.out
grep nb_read_frames=102 ffmpeg.out
grep duration=1.0200 ffmpeg.out
`
Expand Down Expand Up @@ -555,9 +555,9 @@ func TestNvidia_API_MixedOutput(t *testing.T) {

# sanity check ffmpeg frame count against ours
ffprobe -count_frames -show_streams -select_streams v ffmpeg_nv_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v nv_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v sw_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v nv_audio_encode_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v nv_$1.ts | grep nb_read_frames=245
ffprobe -count_frames -show_streams -select_streams v sw_$1.ts | grep nb_read_frames=245
ffprobe -count_frames -show_streams -select_streams v nv_audio_encode_$1.ts | grep nb_read_frames=245

# check image quality
ffmpeg -loglevel warning -i nv_$1.ts -i ffmpeg_nv_$1.ts \
Expand Down Expand Up @@ -646,9 +646,9 @@ func TestNvidia_API_AlternatingTimestamps(t *testing.T) {

# sanity check ffmpeg frame count against ours
ffprobe -count_frames -show_streams -select_streams v ffmpeg_nv_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v nv_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v sw_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v nv_audio_encode_$1.ts | grep nb_read_frames=246
ffprobe -count_frames -show_streams -select_streams v nv_$1.ts | grep nb_read_frames=245
ffprobe -count_frames -show_streams -select_streams v sw_$1.ts | grep nb_read_frames=245
ffprobe -count_frames -show_streams -select_streams v nv_audio_encode_$1.ts | grep nb_read_frames=245

# check image quality
ffmpeg -loglevel warning -i nv_$1.ts -i ffmpeg_nv_$1.ts \
Expand All @@ -665,7 +665,6 @@ func TestNvidia_API_AlternatingTimestamps(t *testing.T) {
}


# re-enable for seg 0 and 1 when alternating timestamps can be handled
check 0
check 1
check 2
Expand Down