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

dont set video track size #440

Merged
merged 1 commit into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion clients/mediaconvert.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (mc *MediaConvert) outputVideoFiles(mcArgs TranscodeJobArgs, ourOutputBaseD
return nil, fmt.Errorf("error probing output file from S3: %w", err)

}
videoFile.SizeBytes = int64(outputVideoProbe.SizeBytes)
videoFile.SizeBytes = outputVideoProbe.SizeBytes
videoTrack, err := outputVideoProbe.GetVideoTrack()
if err != nil {
return nil, fmt.Errorf("no video track found in output video: %w", err)
Expand Down
14 changes: 6 additions & 8 deletions clients/mediaconvert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,9 @@ func TestProbe(t *testing.T) {
Duration: 16.254,
Tracks: []video.InputTrack{
{
Type: "video",
Codec: "h264",
Bitrate: 1234521,
SizeBytes: 2779520,
Type: "video",
Codec: "h264",
Bitrate: 1234521,
VideoTrack: video.VideoTrack{
Width: 576,
Height: 1024,
Expand Down Expand Up @@ -486,10 +485,9 @@ func (f stubFFprobe) ProbeFile(_ string) (video.InputVideo, error) {
Duration: f.Duration,
Tracks: []video.InputTrack{
{
Type: "video",
Codec: "h264",
Bitrate: f.Bitrate,
SizeBytes: 2779549,
Type: "video",
Codec: "h264",
Bitrate: f.Bitrate,
VideoTrack: video.VideoTrack{
Width: 576,
Height: 1024,
Expand Down
7 changes: 3 additions & 4 deletions video/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ func parseProbeOutput(probeData *ffprobe.ProbeData) (InputVideo, error) {
iv := InputVideo{
Tracks: []InputTrack{
{
Type: "video",
Codec: videoStream.CodecName,
Bitrate: bitrate,
SizeBytes: size,
Type: "video",
Codec: videoStream.CodecName,
Bitrate: bitrate,
VideoTrack: VideoTrack{
Width: int64(videoStream.Width),
Height: int64(videoStream.Height),
Expand Down