Some Audio codec will have a null CodecTag, check for that to avoid null reference
If the client already requests a specific sample rate, use that instead of our default sample rate for AC-4
Signed-off-by: gnattu <gnattuoc@me.com>
LAME's VBR mode only has advantage over a certain bitrate range. For very low and very high bitrate, use the ABR mode instead.
aac_at's CVBR mode produces very good quality and is not worse than its TVBR mode in blind testing. Use this mode for convenience.
The ffmpeg native aac encoder will have quality regression with its VBR mode. Always use CBR mode for ffmpeg's native aac encoder.
Signed-off-by: gnattu <gnattuoc@me.com>
FFmpeg deletes segments based on its own transcoding progress,
but we need to delete segments based on client download progress.
Since disk and GPU speeds vary, using hlsenc's built-in deletion
will result in premature deletion of some segments. As a consequence,
the server has to constantly respin new ffmpeg instances, resulting
in choppy video playback.
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
AV1 in fMP4 requires global_header data for parsing.
Only disable global_header in TS since it has no global_header.
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
The -strict -2 setting was only added if the encoder was set to 'copy'.
If 'flac' is explicitly requested, we also need to set it, so that
ffmpeg doesn't abort the conversion.
Fixes: #10066
Escape the path to pass as a command line argument
Original-merge: 09f1c7f535
Merged-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
Backported-by: crobibero <cody@robibe.ro>
Adds dts to the list of audio codecs where ffmpeg will throw asking us
to opt into experimental support. This is seen when the original content
is based on dts and we don't acopy using ffmpeg.