Convert Video to .ogv

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.

Try something like Digiber converter, a standalone tool that converts formats from one to another. http://www.digiber.com

1 Like

Try xmedia recode. It handles ogv and others. http://www.xmedia-recode.de

1 Like

I understand that it is a bit late… but better late than never.

I’m the author of NReco.VideoConverter; by default it embeds x86 version of ffmpeg and cannot be used with Unity.
To support more platforms, I’ve introduced NReco.VideoConverter.LT build without embedded ffmpeg; it targets .NET 2.0, and can be referenced from Mono/Unity projects. LT build can be used with various ffmpeg builds, including Linux and OS-X.

I’ve tested it with simple empty Unity project, and it seems it works fine. If someone wants to test LT build real-life Unity project, I’ll send it upon request.

@nreco I was about to bang my head with the wall but read your comment. I have to get thumbnail from mp4 video file. Can you provide the solution for this?

@nreco I’d like the opportunity to try the LT build to experiment in Unity, I’m trying to create a small video from an array of images. May you please help? Thank you

@nreco I’d like the opportunity to try the LT build to experiment in Unity, I’m trying to
FFMpegConverter.GetVideoThumbnail(). May you please help? Thank you!!!

As far as I know, iDealshare VideoGo works to convert video to OGV
It also helps to convert OGV to other video formats

string GetVideoFilePath
string GetAudioFilePath
var videoConverter = new NReco.VideoConverter.FFMpegConverter();
videoConverter.ConvertMedia(GetVideoFilePath, GetAudioFilePath, “mp3”);

When I run the above code the error in picture occurs. Anyone who can come up with a solution please?

I use Avdshare Video Converter to convert various video files to OGV. It also helps to convert OGV to MP4, AVI, MOV, MPG, MKV, 3GP etc.
It has both Mac and Windows version