tomaszzmuda / Xabe.FFmpeg

.NET Standard wrapper for FFmpeg. It allows to process media without know how FFmpeg works, and can be used to pass customized arguments to FFmpeg from dotnet core application.

Home Page:https://xabe.net/product/xabe_ffmpeg/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting FFMPEG version error, everytime I press Conversion.start

lovebif4ever opened this issue · comments

Should be some pretty basic code,

var conversion = await FFmpeg.Conversions.FromSnippet.ToWebM(fileToConvert.FullName, outputFileName);

                conversion.OnProgress += async (sender, args) =>
                {
                    //Show all output from FFmpeg to console
                    Debug.WriteLine($"[{args.Duration}/{args.TotalLength}][{args.Percent}%] {fileToConvert.Name}");
                };


                await conversion.Start();

but no matter what I do, I get an exception, when I try to use the Conversion.start method.

Xabe.FFmpeg.Exceptions.ConversionException
HResult=0x80131500
Message=ffmpeg version git-2020-08-31-4a11a6f Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.1 (GCC) 20200805
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 58.100 / 56. 58.100
libavcodec 58.101.101 / 58.101.101
libavformat 58. 51.101 / 58. 51.101
libavdevice 58. 11.101 / 58. 11.101
libavfilter 7. 87.100 / 7. 87.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\love-\source\repos\RedditScraper2.0\RedditScraper2.0\bin\Debug\net6.0-windows\lol.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.76.100
Duration: 00:00:37.04, start: 0.000000, bitrate: 1392 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 480x480 [SAR 1:1 DAR 1:1], 1192 kb/s, 30 fps, 30 tbr, 12k tbn, 60 tbc (default)
Metadata:
handler_name : Bento4 Video Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> vp8 (libvpx))
Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
[libvpx @ 000002e845fc0540] v1.8.2
[libvpx @ 000002e845fc0540] Neither bitrate nor constrained quality specified, using default CRF of 32 and bitrate of 256kbit/sec
[mp4 @ 000002e845f2b2c0] Could not find tag for codec vp8 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
[libvorbis @ 000002e845f227c0] 41 frames left in the queue on closing
Conversion failed!
Source=Xabe.FFmpeg
StackTrace:
at Xabe.FFmpeg.FFmpegWrapper.<>c__DisplayClass14_0.b__0()
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xabe.FFmpeg.Conversion.<Start>d__35.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at RedditScraper2._0.Form1.<>c__DisplayClass22_0.<<button6_Click>b__0>d.MoveNext() in C:\Users\love-\source\repos\RedditScraper2.0\RedditScraper2.0\Form1.cs:line 279
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at RedditScraper2._0.Form1.<button6_Click>d__22.MoveNext() in C:\Users\love-\source\repos\RedditScraper2.0\RedditScraper2.0\Form1.cs:line 269

This exception was originally thrown at this call stack:
[External Code]
RedditScraper2._0.Form1.button6_Click.AnonymousMethod__0() in Form1.cs
[External Code]
RedditScraper2._0.Form1.button6_Click(object, System.EventArgs) in Form1.cs

Hello,

It is possible to share video that you are trying to convert?
I think there is a problem with your file, look at these lines:
image