'Video is cutting off the end when transcoding
I am trying to convert the MOV file to mp4 using the VLC transcoding, I am using the LIBVLC NuGet package in Dot Net Framework. But when I see the output video, it is cutting off at the end around by 30 sec.
my code is
`static void Main(string[] args)
{
try
{
var currentDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
WriteToFile("currentDirectory : " + currentDirectory);
Console.WriteLine(currentDirectory);
//Default installation path of VideoLAN.LibVLC.Windows
var libDirectory =
new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
Console.WriteLine(libDirectory);
WriteToFile("libDirectory : " + libDirectory);
using (var mediaPlayer = new Vlc.DotNet.Core.VlcMediaPlayer(libDirectory))
{
WriteToFile("In Using : " + mediaPlayer);
var mediaOptions = new[]
{
":sout=#transcode{vcodec=avc1,vb=1024,fps=70,acodec=mpga,ab=128}:std{mux=mp4,dst=D:\\AVC1_transcoded.mp4,access=file}",
":sout-keep"
};
FileInfo file = new FileInfo(@"D:\video_20220120003955_0.mov");
mediaPlayer.SetMedia(file, mediaOptions);
mediaPlayer.Play();
//Console.WriteLine($"Recording in {destination}");
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
catch (Exception exx)
{
}
}`
I am taking help from https://wiki.videolan.org/VLC_command-line_help and tried almost every syntax but didn't find any help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
