* wip * fix songs again * don't use lists of video and audio input files * test concat command output * move concat pipeline * start to use ffmpeg state * add ffmpeg state and audio state * audio state is required * attach input options directly to input files * move filters to input files * add watermark support
24 lines
703 B
C#
24 lines
703 B
C#
using System.Globalization;
|
|
|
|
namespace ErsatzTV.FFmpeg.Option;
|
|
|
|
public class OutputTsOffsetOption : OutputOption
|
|
{
|
|
private readonly long _ptsOffset;
|
|
private readonly int _videoTrackTimeScale;
|
|
|
|
public OutputTsOffsetOption(long ptsOffset, int videoTrackTimeScale)
|
|
{
|
|
_ptsOffset = ptsOffset;
|
|
_videoTrackTimeScale = videoTrackTimeScale;
|
|
}
|
|
|
|
public override IList<string> OutputOptions => new List<string>
|
|
{
|
|
"-output_ts_offset",
|
|
$"{(_ptsOffset / (double)_videoTrackTimeScale).ToString(NumberFormatInfo.InvariantInfo)}"
|
|
};
|
|
|
|
// public override FrameState NextState(FrameState currentState) => currentState with { PtsOffset = _ptsOffset };
|
|
}
|