Get Duration Of Audio File After Uploading Using FFMPEG
Apr 23, 2010I am uploading audio files in asp.net using FFMPEG.My question is how can i get the duration of the file(in seconds).
View 3 RepliesI am uploading audio files in asp.net using FFMPEG.My question is how can i get the duration of the file(in seconds).
View 3 Repliesi am using ffmpege.exe for getting duration and converting it.
but for certain type of file its showing error Error while opening file.
I was able to upload 4MB size audio file in my database. The problem occurred when I tried to upload 90MB .mp3 file to MS-SQL Server 2005. only 4MB is allowed by default. I increased the default size in the web config to 195MB,and it's still not working. The following code depicts the size that I currently set in the web config.
<httpRuntime
I want to upload audio file based on the ID which i choose
For ex: I have three ID's in drop downlist, say
ID #1: 1001
ID #2: 1002
ID #3: 1003
I want to upload audio file for 1001. Later, On the same id i may upload another file also.
Then, If i choose 1001, the list of files that has been uploaded on 1001 sholud be displayed with download option in Gridview.
For SQL SERVER 2008.
I am a Bigner in asp.net c# learning. How can i create a new folder in server from my c# program. in my semester asp.net project, i want to upload video/audio files into my own newly created folder and the storing folder's name must be given by me, which means each time folder name may change during uploading time. and how can i give a picture link to that vodeo files containing in different folders and how can i play that files in the browser using a player.
View 1 RepliesI am working on an ASP.NET Web application and I want it to have audio playback functionality. I can do is using directories. For example, using the ASP.NET Audio control like :- , is pretty easy and straight-forward and works accordingly. But, the trouble comes when I'm using a database and the control. I am totally new to data binding in ASP.NET. I don't like using JavaScript, but i am comfortable using it, but I would prefer C# solution (I know beggars can't be choosers).
I have a database containing only one table called tblAudio. This table has two fields only for the title of the audio file (type NVARCHAR(MAX)) and the field for the actual audio (type VAR BINARY(MAX)). I'm using Visual Studio 2010 Professional with SQL Server Express Edition. The table has a single record with the relevant data in their fields.
I am trying to find duration of an mp4 file using direct show component of windows using the Dotnet wrapper(directShow-lib 2005). But the method i used was GetDuration of IMediaSeeking interface. But this returns zero as duration.After searching i found the following statement:"It doesn't matter whether it's in a container or not, it only matters whether you have a parser/reader for it. There is no stock DirectShow parser to read raw H.264 files and no third-party one I can think of. Also, whether IMediaSeeking would work with such a raw file is implementation-dependent. Last, most H.264-related filters use MPEG2Video or
VideoInfo2 and neither works with MediaDet, so you would have to build the graph yourself."
Adobe Flash or QuickTime..???
I assume Flash is not available via Ipads???
Which method alows the URL of the audio to be hidden when others embed the audio ?
I have a uploader on my page which saves a video file, and then i call ffmpeg to convert it to a .flv standard. The problem is, i need to pull the video duration in from the file, and the ffmpeg output even says it, but when i tell the parameters to do the ffmpeg -i filename > fileinfo.txt it still doesnt take that information.
how i can pull this type of information?
Example of what i was trying:
[Code]....
I use media player control to play mp3 files in asp.net application. I want to find When the playing process gets end and the total time require to finish the file using javascript.
[Code].....
I already have my audio file in database (which is in varbinary(max) data type) and I could retrieve said music as byte(). But the problem is I don't know how to play it..
View 3 RepliesGiven an audio file (mp3 or wav), is here a way to get the duration, size (in bytes) and other other attributes of the file?
View 4 Repliesis there any way to convert all type of audio files into MP3 format. in my website... i have one control which plays MP3 files[audio]. but i have to provide facility to upload any kind of audio file[as i am developing audio gallary] and play it in my website..
if there is better solution to upload and play audio files in the website developed using asp.net 3.5.
string url = string.Empty;
string title = string.Empty;
//full file path should be assigned to url
//file name with format should be assigned to title
url = "p[URL]abc.mp3";
title = "abc.mp3.mp3";
WebClient wc = new WebClient();
byte[] byteData;
Response.ContentType="application/octet-stream";
Response.AddHeader("content-disposition","attachment;filename="+title);
Response.BinaryWrite(byteData= wc.DownloadData(@url));
How to play any audio file on browser? I used HTML5's <audio> but it does not support to all extensions. Is it any control for that that any file I can play?
View 1 Repliesffmpeg feels like its taking a long time. I then look at my output file and i see it stops between 6 and 8mbs. A fully encoded file is about 14mb. Why does ffmpeg stop? My code locks up on StandardOutput.ReadToEnd();. I had to kill the process (after seeing it not move for more then 10 seconds when i see it update every second previously) then i get the results of stdout and err. stdout is "" stderr is below.
The output msg shows the filesize ended. I also see a drop in my CPU usage when it stops. I copyed the argument from visual studios. CD to the same working directory and ran the cmd (bin/ffmpeg) and pasted the argument. It was able to complete.
NOTE: I must get std out and err to check for failures.
int soundProcess(string infn, string outfn)
{
string aa, aa2;
aa = aa2 = "DEAD";
var app = new Process();
How could i paly a video & audio file on an asp.net page so that the file is determined on the run time
View 2 RepliesIs it possible to have visitors to my website hear and see audio/video "mpg" files? I could not find any controls that output audio or video. Otherwise, is linking to u-tube my only other option?
View 2 RepliesIn my application I want to send an audio file (.mp3) as binary string through XML webservice, and save the binary data as audio file in server. In this case what should be the structure of XML file and how can I convert this incoming binary sting to audio file in webservice code.
Currently I tried a structure like the following
<XML>
<Files>
<File>
<FileName>audio_123.mp3</FileName>
<FileType>audio</FileType>
<FileData>![CDATA[ - binary data goes here -]]</FileData>
</File>
</Files>
</XML>
But it is not working correctly.
I am using ajax and javascript to play sound from specific time till a specific time.
I do change the class from play to pause when user plays it but i am unable to change it back to play when the sound duration stops
<script type="text/javascript">
function aud_play_pause() {
var myAudio = document.getElementById("myTune");
var musicStartTime = 25;
var musicStopTime = 35;
[Code] ....
what i will do is upload the mp3 files in my directory and called the file name on button click event in query string how can i pass query string vlaue to this html tag.
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
With the ajax file uploader, would it be possible to check the size of the image before uploading?Currently, it uploads the file to the server and then lets me know that it's bigger than the limit size.
i am using a file uploader to upload files. Now when i am using this on a mobile emulator with default browser IE it is uploading only those files whose name is less than 6 character. the files with name more than 6 character is not uploading through mobile emulator or mobile phone (PDA). I need this solution very soon.
View 1 RepliesIn my asp.net project i have a folder (folder name "Data").
I upload .pdf file and save the .pdf file in My Data folder.
In same day if i upload same name file then the previous file is overwrite without any message.
So I would like to know, how can i show a message like ("same name file is exit ,Do u want to replace it").
I've dug around in the SDK and managed to connect to my instance of S3, go into my bucket and create an empty file, but can't figure out how to take a file from my computer and upload it. If I have dragged a file upload control onto the designer surface how do I set the properties for it in the code behind?(If I absolutely need to have a 3rd party uploader which should I use). Here is the code I have so far.
static string bucketName = "myBucket";
static string keyName = "sampleKey";
static AmazonS3 client;
protected void Page_Load(object sender, EventArgs e)
{
string accessKeyID = System.Configuration.ConfigurationManager.AppSettings["AWSAccessKey"];
string secretAccessKeyID = System.Configuration.ConfigurationManager.AppSettings["AWSSecretKey"];
using (client = Amazon.AWSClientFactory.CreateAmazonS3Client(accessKeyID, secretAccessKeyID))
{
// simple object put
PutObjectRequest request = new PutObjectRequest();
request.WithContentBody("this is a test")
.WithBucketName(bucketName)
.WithKey(keyName);
S3Response response = client.PutObject(request);
response.Dispose();
// put a more complex object with some metadata and http headers.
PutObjectRequest titledRequest = new PutObjectRequest();
titledRequest.WithMetaData("title", "the title")
.WithContentBody("this object has a title")
.WithBucketName(bucketName)
.WithKey(keyName);
using (S3Response responseWithMetadata = client.PutObject(request))
{
WebHeaderCollection headers = response.Headers;
foreach (string key in headers.Keys)
{
Console.WriteLine("Response Header: {0}, Value: {1}", key, headers.Get(key));
}
}
}
}