Hello frnd's...

Im new to web developement side.I have seeked a lot but i didnt got any idea that how to convert any kind of video files to flv type and display in that webpage.I have tried a lot but i didnt get any samples and code for this process.Can anyone help me how to do this.Awating for ur reply Experts...

Tks in Adv...

Samcaleb05....

Dani AI

Generated

This thread shows the typical problems when launching an encoder from an ASP.NET request. noted ffmpeg works at the command line but no file appears when started from the site; pointed to ffmpeg-based approaches, suggested Expression Encoder/Silverlight, and posted a short ffmpeg argument example. The most common causes are permission/path issues and silent failures because stderr/stdout were not captured.

Checklist (quick, actionable)

  • Use the full path to the ffmpeg executable and to both input and output files. Relative paths often point somewhere unexpected when called by IIS.
  • Ensure the IIS app pool identity has execute permission on ffmpeg and write permission on the output folder.
  • Run the same ffmpeg command interactively while impersonating the app pool identity (or run a scheduled task under that account) to reproduce the failure.
  • Configure the ProcessStartInfo correctly: disable shell execute, redirect stderr/stdout, set CreateNoWindow, set WorkingDirectory, and wait for the process to exit (with a sensible timeout). Capture and log stderr; most ffmpeg error messages go there.

Example pattern (C#)

var psi = new ProcessStartInfo {
  FileName = @"C:\ffmpeg\bin\ffmpeg.exe",
  Arguments = $"-y -i \"{inputPath}\" -c:v libx264 -c:a aac -f flv \"{outputPath}\"",
  UseShellExecute = false,
  RedirectStandardError = true,
  RedirectStandardOutput = true,
  CreateNoWindow = true,
  WorkingDirectory = Path.GetDirectoryName(inputPath)
};
using(var p = Process.Start(psi)) {
  string err = p.StandardError.ReadToEnd();
  p.WaitForExit(10 * 60 * 1000); // 10 minutes
  if (p.ExitCode != 0) Log(err);
}

Cautions and alternatives
Long-running transcodes should not run synchronously inside an ASP.NET request. Use a background worker, queue (or a Windows service) to avoid timeouts and thread-pool exhaustion. Also note FLV/Flash is legacy; for modern web delivery prefer MP4 (H.264/AAC) and HTML5 video or adaptive streams instead of relying on Flash/Silverlight.

Recommended Answers

All 5 Replies

Try the solution given in the following link.
Convert Viedo to .Flv Using c#.net on Web

Also refer this link.

How about converting it so that it can be played with the silverlight media player using Expression Encoder

Hello Mr.ramesh i used ffmpeg.exe to convert my video files to flv file but i converts in command prompt but that converted flv file is not save in my folder .Kindly aid me

Awaiting for ur reply...

Tks in Adv...

Samcaleb05...

Hello frnd's...

Can anyone say how to pass arguments for ffmpeg .exe in asp.net.When i use this

" ffmpeg -i D:\Source.wmv -s 480*360 -deinterlace -ab 32 -r 15 -ar 22050 -ac 1 + D:\Source.flv"

argument in command line in dos prompt its working fine.But when i use this in asp.net by passing arguments using System.Diagonistic;

Process ffmpeg;

"ffmpeg.StartInfo.Arguments ="-i "+ D:\\Source.wmv+"-s 480*360 -deinterlace -ab 32 -r 15 -ar 22050 -ac 1 " +D:\\ Source.flv; "

Its not converting my wmv file to flv.Can anyone debug and give me a proper solution for this still im in too choas...(huh)..and surfing for three days....

Awating for ur reply Experts....

Tks in Adv....

Caleb05....

use bellow line for convering .wmv to flv

(ffmpegPath, " -i " + path + "\" + fileName + " -ar 22050 -ab 32 -f flv " + path + "\" + fn.ToString().Trim());

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.