Hello everyones !
I am currently trying to convert video to .ogv to use them as movietexture in runtime. I have looked FFmpeg library and I am trying to use the NReco.videoConverter, I have created a script containing the lines from the NReco tutorial but when I launch the scene I had an error :
DllNotFoundException: MonoPosixHelper
System.IO.Compression.DeflateStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip)
(wrapper remoting-invoke-with-check) System.IO.Compression.DeflateStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionMode,bool,bool)
System.IO.Compression.GZipStream..ctor (System.IO.Stream compressedStream, CompressionMode mode, Boolean leaveOpen)
(wrapper remoting-invoke-with-check) System.IO.Compression.GZipStream:.ctor (System.IO.Stream,System.IO.Compression.CompressionMode,bool)
NReco.VideoConverter.FFMpegConverter.EnsureFFMpegLibs ()
NReco.VideoConverter.FFMpegConverter.ConvertMedia (NReco.VideoConverter.Media input, NReco.VideoConverter.Media output, NReco.VideoConverter.ConvertSettings settings)
NReco.VideoConverter.FFMpegConverter.ConvertMedia (System.String inputFile, System.String inputFormat, System.String outputFile, System.String outputFormat, NReco.VideoConverter.ConvertSettings settings)
NReco.VideoConverter.FFMpegConverter.ConvertMedia (System.String inputFile, System.String outputFile, System.String outputFormat)
VideoConvert.Start () (at Assets/Scripts/v0.2/VideoConvert.cs:13)
my code :
using UnityEngine;
using System.Collections;
using NReco.VideoConverter;
public class VideoConvert : MonoBehaviour {
public string VideoPath;
void Start () {
var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
ffMpeg.ConvertMedia(VideoPath, "video.ogv", Format.ogg);
}
}
I have downloaded the FFmpeg dlls and put it in the Asset folder, it didn’t worked.
Then I put the NReco.VideoConverter in the Asset/Plugins folder with and without the FFmpeg dlls but it didn’t work either.
I have read on others topic that I will have to code an interface for the FFmpeg but since it is writen in C I really don’t know how to make it. Furthermore I don’t know why I would have to do that because nothing is said about that is the NReco.VideoConverter page.
I am using Unity 5.3.4f1 Personnal edition.