Skip to content

Commit

Permalink
task/probe: Add pixelFormat field on probe log
Browse files Browse the repository at this point in the history
  • Loading branch information
victorges committed Jun 15, 2022
1 parent 02336bd commit a1c3185
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion task/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,14 @@ func logProbeData(assetId, filename string, probeData *ffprobe.ProbeData) {
add("startTime", stream.StartTime)
add("duration", stream.Duration)
if stream.CodecType == "video" {
add("pixelFormat", stream.PixFmt)
width, height = stream.Width, stream.Height
}
if startTime, err := strconv.ParseFloat(stream.StartTime, 64); err == nil {
maxStartTime = math.Max(maxStartTime, startTime)
}
}
glog.Infof("Probed video file assetId=%s filename=%q format=%v width=%d height=%d bitrate=%s startTime=%v maxStreamStartTime=%v %s",
glog.Infof("Probed video file assetId=%s filename=%q format=%q width=%d height=%d bitrate=%s startTime=%v maxStreamStartTime=%v %s",
assetId, filename, probeData.Format.FormatName, width, height, probeData.Format.BitRate,
probeData.Format.StartTimeSeconds, maxStartTime, strings.Join(streamFields, " "))

Expand Down

0 comments on commit a1c3185

Please sign in to comment.