mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 18:15:44 +00:00
Merge pull request #601 from rosenbjerg/fix-changing-of-output-extension-in-BaseSubVideo
Fix changing of output extension in BaseSubVideo
This commit is contained in:
commit
f9a3f2b0dc
2 changed files with 6 additions and 6 deletions
|
|
@ -154,7 +154,7 @@ public class VideoTest
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
|
||||||
var videoFramesSource = new RawVideoPipeSource(BitmapSource.CreateBitmaps(128, pixelFormat, 256, 256));
|
var videoFramesSource = new RawVideoPipeSource(BitmapSource.CreateBitmaps(64, pixelFormat, 256, 256));
|
||||||
var success = FFMpegArguments
|
var success = FFMpegArguments
|
||||||
.FromPipeInput(videoFramesSource)
|
.FromPipeInput(videoFramesSource)
|
||||||
.OutputToFile(outputFile, false, opt => opt
|
.OutputToFile(outputFile, false, opt => opt
|
||||||
|
|
@ -474,7 +474,7 @@ public class VideoTest
|
||||||
private static async Task Video_ToTS_Args_Pipe_Internal(dynamic pixelFormat, CancellationToken cancellationToken)
|
private static async Task Video_ToTS_Args_Pipe_Internal(dynamic pixelFormat, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
using var output = new TemporaryFile($"out{VideoType.Ts.Extension}");
|
using var output = new TemporaryFile($"out{VideoType.Ts.Extension}");
|
||||||
var input = new RawVideoPipeSource(BitmapSource.CreateBitmaps(128, pixelFormat, 256, 256));
|
var input = new RawVideoPipeSource(BitmapSource.CreateBitmaps(64, pixelFormat, 256, 256));
|
||||||
|
|
||||||
var success = await FFMpegArguments
|
var success = await FFMpegArguments
|
||||||
.FromPipeInput(input)
|
.FromPipeInput(input)
|
||||||
|
|
@ -511,7 +511,7 @@ public class VideoTest
|
||||||
public void RawVideoPipeSource_Ogv_Scale(SKColorType pixelFormat)
|
public void RawVideoPipeSource_Ogv_Scale(SKColorType pixelFormat)
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Ogv.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Ogv.Extension}");
|
||||||
var videoFramesSource = new RawVideoPipeSource(BitmapSource.CreateBitmaps(128, pixelFormat, 256, 256));
|
var videoFramesSource = new RawVideoPipeSource(BitmapSource.CreateBitmaps(64, pixelFormat, 256, 256));
|
||||||
|
|
||||||
FFMpegArguments
|
FFMpegArguments
|
||||||
.FromPipeInput(videoFramesSource)
|
.FromPipeInput(videoFramesSource)
|
||||||
|
|
@ -565,7 +565,7 @@ public class VideoTest
|
||||||
private static void Video_ToMP4_Resize_Args_Pipe_Internal(dynamic pixelFormat, CancellationToken cancellationToken)
|
private static void Video_ToMP4_Resize_Args_Pipe_Internal(dynamic pixelFormat, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
var videoFramesSource = new RawVideoPipeSource(BitmapSource.CreateBitmaps(128, pixelFormat, 256, 256));
|
var videoFramesSource = new RawVideoPipeSource(BitmapSource.CreateBitmaps(64, pixelFormat, 256, 256));
|
||||||
|
|
||||||
var success = FFMpegArguments
|
var success = FFMpegArguments
|
||||||
.FromPipeInput(videoFramesSource)
|
.FromPipeInput(videoFramesSource)
|
||||||
|
|
@ -927,7 +927,7 @@ public class VideoTest
|
||||||
{
|
{
|
||||||
using var resStream = new MemoryStream();
|
using var resStream = new MemoryStream();
|
||||||
var reader = new StreamPipeSink(resStream);
|
var reader = new StreamPipeSink(resStream);
|
||||||
var writer = new RawVideoPipeSource(BitmapSource.CreateBitmaps(128, pixelFormat, 128, 128));
|
var writer = new RawVideoPipeSource(BitmapSource.CreateBitmaps(64, pixelFormat, 128, 128));
|
||||||
|
|
||||||
FFMpegArguments
|
FFMpegArguments
|
||||||
.FromPipeInput(writer)
|
.FromPipeInput(writer)
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ public static class FFMpeg
|
||||||
{
|
{
|
||||||
if (Path.GetExtension(input) != Path.GetExtension(output))
|
if (Path.GetExtension(input) != Path.GetExtension(output))
|
||||||
{
|
{
|
||||||
output = Path.Combine(Path.GetDirectoryName(output), Path.GetFileNameWithoutExtension(output), Path.GetExtension(input));
|
output = Path.ChangeExtension(output, Path.GetExtension(input));
|
||||||
}
|
}
|
||||||
|
|
||||||
return FFMpegArguments
|
return FFMpegArguments
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue