func (t *GenerateTranscodeTask) isTranscodeNeeded() bool {
	hasTranscode := HasTranscode(&t.Scene, t.fileNamingAlgorithm)
	if !t.Overwrite && hasTranscode {
		return false
	}

	if t.Force {
		return true
	}

	videoCodec := t.Scene.VideoCodec.String
	container := ""
	audioCodec := ffmpeg.MissingUnsupported
	if t.Scene.AudioCodec.Valid {
		audioCodec = ffmpeg.ProbeAudioCodec(t.Scene.AudioCodec.String)
	}

	if t.Scene.Format.Valid {
		container = t.Scene.Format.String
	}

	if ffmpeg.IsStreamable(videoCodec, audioCodec, ffmpeg.Container(container)) == nil {
		return false
	}

	return true
}
// return true if transcode is needed
// used only when counting files to generate, doesn't affect the actual transcode generation
// if container is missing from DB it is treated as non supported in order not to delay the user
return true if transcode is needed
used only when counting files to generate, doesn't affect the actual transcode generation
if container is missing from DB it is treated as non supported in order not to delay the user
// return true if transcode is needed // used only when counting files to generate doesn ' t affect the actual transcode generation // if container is missing from DB it is treated as non supported in order not to delay the user
func (t *GenerateTranscodeTask) isTranscodeNeeded() bool {
	hasTranscode := HasTranscode(&t.Scene, t.fileNamingAlgorithm)
	if !t.Overwrite && hasTranscode {
		return false
	}
	if t.Force {
		return true
	}
	videoCodec := t.Scene.VideoCodec.String
	container := ""
	audioCodec := ffmpeg.MissingUnsupported
	if t.Scene.AudioCodec.Valid {
		audioCodec = ffmpeg.ProbeAudioCodec(t.Scene.AudioCodec.String)
	}
	if t.Scene.Format.Valid {
		container = t.Scene.Format.String
	}
	if ffmpeg.IsStreamable(videoCodec, audioCodec, ffmpeg.Container(container)) == nil {
		return false
	}
	return true
}
func ( t * GenerateTranscodeTask ) isTranscodeNeeded ( ) bool { hasTranscode := HasTranscode ( & t . Scene , t . fileNamingAlgorithm ) if ! t . Overwrite && hasTranscode { return false } if t . Force { return true } videoCodec := t . Scene . VideoCodec . String container := " " audioCodec := ffmpeg . MissingUnsupported if t . Scene . AudioCodec . Valid { audioCodec = ffmpeg . ProbeAudioCodec ( t . Scene . AudioCodec . String ) } if t . Scene . Format . Valid { container = t . Scene . Format . String } if ffmpeg . IsStreamable ( videoCodec , audioCodec , ffmpeg . Container ( container ) ) == nil { return false } return true }
return true if transcode is needed
used only when counting files to generate, doesn't affect the actual transcode generation
if container is missing from DB it is treated as non supported in order not to delay the user
return true if transcode is needed used only when counting files to generate doesn ' t affect the actual transcode generation if container is missing from DB it is treated as non supported in order not to delay the user