Windows Phone 8 Video to MP3 converter - c#

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.

Related

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.

Trim mp4 videos in .NET application

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.

merge sound file audio and record in Widows 8 Metro Windows Store application

I have two sound files that I need to merge. One is an audio file and the other is a recording file.
I am using c# to build a Metro Style App. Is there any libraries or any functionality in .net I can use to complete this?
Take a look to NAudio, I don't know if they have a version for Windows store apps.
An option could be to write .net web service that uses NAudio to do the job of merging the audio files and send it back to your app.

Using the Windows MP3 decoder with Un4Seen Bass.NET

I'm writing a media player that uses the Bass.Net wrapper for Un4Seen's Bass native audio API.
The library is all free for non-commercial use and I have the free license, but in the documentation it says that unless you tell Bass to use the MP3 decoder built into Windows, it requires that you to also get a separate license from the MP3 licensing organization.
However, I cannot find anywhere how to get Bass.Net to tell it to use the Windows decoder instead of the one built into Bass (that requires the license).
This is going to be an open source application and I don't want to have to get a license for something that's free.
Any ideas how to do this?
According to some forums:
With version 2.3.0.1 there are now two versions of the bass.dll available:
a) the standard on in the main directory based on the BASS internal MP3 decoder
b) the on the 'mp3-free' directory which is using the Windows based MP3 decoder
Source
So, you should be able to simply replace the bass.dll with the version in the mp3-free directory, and it will use the windows mp3 decoder automatically.
The information below the line is outdated. Apparently, they got rid of the BASS_CONFIG_MP3_CODEC config in an earlier version of Bass.NET
If you have the .NET API help chm (/help), you can look at the BASS_SetConfig method in the Bass class for more information on setting up configurations.
Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_MP3_CODEC, 1);
Interestingly enough, the BASS_CONFIG_MP3_CODEC value (supposedly of the BASSConfig enumeration), is listed in the Get/SetConfig methods, but not in the actual documentation of the enum.

Silverlight 4 - encoding PCM data from the microphone

I've written a basic SL4 application to capture audio data from the microphone using CaptureSource. The trouble is, it's raw PCM output - which means huge and uncompressed.
Given that I need this application to run purely within a SL4 environment, how can I compress the PCM audio data into something that can be delivered to a remote server more easily?
Essentially I need a solution that I can also deploy/include in a Windows Phone Series 7 application as well as one that will work in the browser environment - so managed code solutions only, I think?
In conversation, people have suggested Speex and WMA for instance, but I haven't found any libraries or examples that work without requiring reference to DLL's that won't work in a SL4 project.
Just a small addition to Jason's post:
There is another port of Speex to .Net and Silverlight 4 called NSpeex.
Please see the WavFileHelper class in Silverlight 4 Rough Notes: Camera and Microphone Support on Mike Taulty's blog (a bit lower than the middle of the page, but the full article is worthwhile) in which he compresses the PCM file to WAV.
Here's another example of when writing to WAV you can change values such as Mono/Stereo, which will directly change the size of the WAV file: Audio recorder Silverlight 4 sample. And one more that gives more details about writing to WAV: Creating Sound using MediaStreamSource in Silverlight 3 Beta
Take a look at this. It looks like he has ported the Speex encoder to C# for the exact problem you are trying to solve. It is available here. Speex is designed for speech and should perform better than wma, mp3, or other audio codecs that are designed to handle music if you are just encoding speech, which I assume since you are grabbing from the mic.
This article http://alvas.net/alvas.audio,articles.aspx#how-to-save-audio-to-mp3-on-silverlight about save audio on client. To send audio data to a server you can use WebClient, for example.
You can do encoding thru the server, by send all stream to WCF service and do your encoding thru Microsoft Expression Encoding SDK API.
Please, see this url that i have asked before:
http://forums.silverlight.net/forums/t/181141.aspx
Regards

Categories