Trim mp4 videos in .NET application - c#

I am developing an application where I deal with .mp4 videos. One of the features I would like to add to this app is the possiblity to trim/cut videos.
Therefore, I am looking for some SDK or other kind of solution that enables me to trim .mp4 videos.
I have tried cutting videos with Microsoft Encoder 4 Pro, but I cannot export them to .mp4, since the full version is needed. I wouldn't have trouble in paying for this full version, but then anyone who uses the application would have to afford it too.

Related

OCR for extracting text from cedula/passport C#

I'm looking for a Tesseract or Google's Vision API type of OCR which can help in extracting textual information in passport / ID card image, (which may be captured from mobile or may be scanned. Hence frame size may vary a little). I have been through several posts, and and found Tesseract as preferred solution.
I also tested my test data using Vision API, and got 99% accurate and satisfactory results. But I have following problems/requirements:
Problems:
Tesseract is the suggested solution that i found on most of the posts i had been through, but it gives very bad results, as frame may vary. I can't train data, and I'm okay with any paid library available to help me in my scenario.
Vision API gives accurate result, but my requirement is to not to use cloud based solution.
There are few providers, (eg, LeadTool, IdScan etc.) which provide this feature, but they use their scanners first to scan the passport. Hence their SDK works for their scanners device.
Summary: Is there any available (paid or opensource) c# library available, which takes passport/cedula image as input, and returns accurate text?. Any suggestion/help will be appreciated.
Company called MicroBlink created BlinkID SDK to scan passports, ID cards. It is not free for commercial usage, but free for development. Link to SDK's site HERE. Tesseract OCR tool may give you false results because you probably have not done any processing for an image before OCR scan, which is mandatory if you want a proper result, especially for images of passports and ID's and so on. For image processing you can use OpenCV (free), but it may take you time to learn computer vision and image processing (which are very rewarding actually).
I'm one of the developers in MicroBlink, which is a company specializing in development of barcode and OCR solutions.
Tesseract is indeed one of the options you have. The problem with Tesseract is that it's hard to set the right parameters to get really accurate OCR results. And you still need to implement the data extraction logic on top of the OCR results. And integration on iOS/Android requires two separate codebases.
Google Cloud Vision gives very accurate OCR result, but as you said, it performs image processing on server side, which raises privacy and security concerns regarding sending private ID information over the network to third parties.
There are other companies developing similar products with similar properties (server side, no data extraction, etc..)
MicroBlink's BlinkID is different in the sense that it performs all processing locally (without server side connection). It uses our proprietary machine-learning based OCR engine to ensure data is captured correctly. It supports MRZ, PDF417 barcodes, and scanning the front side of some ID documents (such as UK Driver's licenses, Malaysian IDs, EU IDs...). All ID data is parsed and verified according to country's standards with checksum validation.
BlinkID is provided as a native iOS, Android and Windows Phone 8 SDKs, Phonegap / Cordova plugins for iOS and Android, and Xamarin component (C#) for iOS and Android.
There are also server side library (available on request) which can run on Linux / Windows / MacOS and which has C API and that can be used from .NET application using C++/CLI. Our development team is here to help with the integration in a .NET app.
Please contact support#microblink.com for more information on the subject.
Asprise C# .NET OCR and Barcode Recognition SDK can recognize both normal text, MRZ data and barcodes on passports and other identity documents. The accuracy rate for MRZ data is extremely high.
You can simply pass input images in formats like BMP, JPG, PNG, PDF or TIFF.
Many government agencies use Asprise OCR to read passport MRZ information.
You may contact Asprise support to obtain a special evaluation version for your scenario.
Just a correction about LEADTOOLS needing to...
"use their scanners first to scan the passport. Hence their SDK
works for their scanners device"
This part is not correct. We do not make or sell any type of scanning device. LEADTOOLS SDKs can use different standard devices (Twain and WIA on Windows, Sane on Linux, and cameras on Android and iOS devices using the operating system's own APIs). The OCR and ID recognition is then done through software.

WP8.1 PlayerFramework and FLV playback support

I'm trying to add flv support to my Windows Phone 8.1 (XAML) app. The idea is to retrieve multiple urls (containing 30-minute segments of a video) from a (single) call to an api (in this case, Twitch API) and use the resulting links for playback.
The problem is WP has no native support for .flv files, so I can't seem to play the files using Microsoft's Media Player Framework.
I've dug around a little and others seem to be suggesting (albeit non-trivially) creating a MediaStreamSource and connecting the links (or even writing my own container), though it seems like a huge hassle.
Has anyone come across any helpful libraries or any solutions to this problem? Would prefer not to have to download each segment to the phone (for obvious reasons) and simply create a 'stream' if possible.
Note: If it's any help, according to this thread, the flv files from Twitch are h264/aac content (which IS a supported video codec from the link above).
Example (single) link returned from the api call to Twitch:
http://media-cdn.twitch.tv/store92.media67/archives/2014-10-12/live_user_riotgames_1413100271.flv
Thanks.

Windows Phone 8 Video to MP3 converter

I did some research on converting video's to audio (MP3) on Windows Phone, but I can't find any converter or even basic functionality on the Windows Phone core to do this. Is this even possible?
You have a NuGet package named: MediaToolkit which is available with the NuGet package manager and also here: https://www.nuget.org/packages/MediaToolkit/
The library exposes features which convert video files into various other video formats. Grab images from videos. Perform a range of other audio / video transcoding tasks, even cutting / splitting videos.
To find the source code / code examples, visit GitHub: https://github.com/AydinAdn/MediaToolkit
To download it straight in to your project, use the Project Manager Console for NuGet: PM> Install-Package MediaToolkit.
There are no classes inside the Windows Phone 8 framework, the best thing to do is to go with an external library (like the one #Gaurav Deochakke) posted.
I've looked at the supported Win32 and COM APIs inside the WP8 framework, there are lots of API's that can help you (dis)playing media files, but none of them will help you either capture the desired audio or convert the video file to an audio file.
Although you might want to look at IAudioCaptureClient and IAudioClient (less documented), they might be able to help you with capturing the output of a file that has audio (a video for example). The only downside of this will be that you will have to loop through the video per second.
As stated above I'd go with a simple library to complete your task, but if you have time and you are interested in creating the solution yourself, I'd go with the links I posted.

Playing media from byte stream in .net

I am developing application that receives media content(.mp3/.mp4/.avi) in form of bytes.
However, as WPF doesn't support playing media from stream, So I started with WMP.dll.
I am creating class library that receives media in form of bytes and media format and play media accordingly.
Referring Creating the WMP Programmatically, however, I didn't find method to pass bytes stream.
So My question is how do I play media from bytes using wmp.dll?
Edit: I am using WMP.dll using COM located at C:\WINDOWS\system32\wmp.dll
I've been through this process a long time ago ...
Basically I would advise you NOT to go down the WMP route at all. It's heavy, cumbersome and not very nice to work with. I encountered lots of issues along the way basically. Least of all it being feature rich (which it isn't).
The best solution I found and the one I'm still using now is a library called BASS from Un4SeenDevelopments.
This library is tiny < 100k and basically it's awesome. Never had a problem with it and it has it's own .NET wrapper that is a free download from the site.
The support is amazing and the compatibility via a massive selection of plugins and additional libraries is staggering.
Highly recommended for what you want to do.
"BASS is an audio library for use in software on several platforms. Its purpose is to provide developers with powerful and efficient sample, stream (MP3, MP2, MP1, OGG, WAV, AIFF, custom generated, and more via OS codecs and add-ons), MOD music (XM, IT, S3M, MOD, MTM, UMX), MO3 music (MP3/OGG compressed MODs), and recording functions. All in a compact DLL that won't bloat your distribution."

.NET: How can I convert an mp3 or a wav file to .flac

I need to write a utility in c# that uses Google Speech Api to convert speech from an audio file into text. As far as I know, Google only accepts .flac format for this api. Unfortunately, I have .wav and .mp3 audio files. So I am trying to find out if there is a way for me to convert mp3 to flac in .NET. I looked at NAudio, but it doesn't seem to be working with flac files.
I ended up using Gregory S. Chudov's C# implementation of FLAKE encoder. You can find more information at
http://www.hydrogenaudio.org/forums/index.php?showtopic=74242
There is another project on BitBucket that uses CUETools FLAKE in its Google Speech Api wrapper. It is a good starting point for implementing speech to text using Google speech api. You can find it at
https://bitbucket.org/josephcooney/cloudspeech
I was able to convert wav to flac without much difficulty using the FLAKE encoder. Hope this helps you.
Take a look at http://naudio.codeplex.com/
NAudio is an open source .NET audio and MIDI library, containing dozens of useful audio related classes intended to speed development of audio related utilities in .NET. It has been in development since 2002 and has grown to include a wide variety of features. While some parts of the library are relatively new and incomplete, the more mature features have undergone extensive testing and can be quickly used to add audio capabilities to an existing .NET application. NAudio can be quickly added to your .NET application using NuGet.
Edit
Sadly FLAC is not supported there, as i see in the overview. Try it yourself.

Categories