private void Browse_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Multiselect = false; if (openFileDialog.ShowDialog() == true) { audioList = new List <Audio>(); MediaInfoWrapper track = new MediaInfoWrapper(openFileDialog.FileName); string title = track.Tags.Title; string fileNames = openFileDialog.FileName; int fileSize = (int)track.Size; string fType = track.ToString(); string filePath = track.Tags.SubTrack; string times = track.Duration.ToString(); TimeSpan tt = TimeSpan.FromMilliseconds(track.Duration); Global_Log.startTimeInSec = 0; Global_Log.endTimeInSec = Convert.ToInt32(tt.TotalSeconds); ConvertFileDetails convertFileDetails = new ConvertFileDetails(); convertFileDetails.InputFilePath = System.IO.Path.GetFullPath(openFileDialog.FileNames[0]); { } convertFileDetails.OutputFilePath = title + ".shd"; { } string outputFileName = FfmpegHandler.convertFile2(convertFileDetails, 0); { } //convertFileDetails.InputFilePath = System.IO.Path.GetFullPath(openFileDialog.FileNames[0]); //byte[] fileDataBytes = File.ReadAllBytes(System.IO.Path.GetFullPath(openFileDialog.FileNames[0])); //String fileDataBase64 = Convert.ToBase64String(fileDataBytes); String fileDataBase64 = outputFileName; Global_Log.newSongTrack = fileDataBase64; Trim.Trim obj_Trim = new Trim.Trim(Global_Log.endTimeInSec); Fade_in_out.Fade_in_out obj_Fade_in_out = new Fade_in_out.Fade_in_out(Global_Log.endTimeInSec); fileName.Text = fileNames; Song_Name.Text = title; File_Type.Text = " audio/mpeg "; File_Size.Text = fileSize.ToString(); Duration.Text = times; Start_Time.Text = TimeSpan.FromSeconds(0).ToString(); End_Time.Text = TimeSpan.FromMilliseconds(track.Duration).ToString(); TimeSpan ttt = TimeSpan.FromSeconds(Global_Log.endTimeInSec - 10); audioList.Add(new Audio() { UID = "000", Title = track.Tags.Title, FileName = track.Tags.Title, Filesize = 0, Filetype = "audio", Filepath = filePath, Duration = TimeSpan.FromMilliseconds(track.Duration), Track = fileDataBase64, Trim_Start = TimeSpan.FromSeconds(Global_Log.startTimeInSec), Trim_End = TimeSpan.FromSeconds(Global_Log.endTimeInSec), Intro = TimeSpan.FromSeconds(Global_Log.startFadeInSec), EOM = TimeSpan.FromSeconds(Global_Log.endFadeInSec) }); } }