Revuen Ben Dror
Revuen Ben Dror

Reputation: 237

How do i know in the ffmpeg arguments command line what each argument do?

I have this code:

public void Start(string FileName, Bitmap Sample_Bitmap, int BitmapRate )
        {
            p = new NamedPipeServerStream(pipename, PipeDirection.Out, 1, PipeTransmissionMode.Byte);
            byte[] b = new byte[1280 * 720 * 3]; // some buffer for the r g and b of pixels of an image of size 720p 
            System.Diagnostics.Process process = new System.Diagnostics.Process();
            process.StartInfo.FileName = @"D:\pipetest\pipetest\ffmpegx86\ffmpeg.exe";
            process.EnableRaisingEvents = false;
            process.StartInfo.WorkingDirectory = @"D:\pipetest\pipetest\ffmpegx86";
            process.StartInfo.Arguments = @"-f rawvideo -pix_fmt rgb24 -video_size 1280x720 -i
                                          \\.\pipe\mytestpipe -map 0 -c:v libx264 -r " + BitmapRate + " " + FileName;
            process.Start();

            process.StartInfo.UseShellExecute = false;
            process.StartInfo.CreateNoWindow = false;
            p.WaitForConnection();
        }

So i know what BitmapRate do and the FileName but the rest of the arguments.

What odes it mean the -f ? and the rawvideo is that from the decoders or encoders ? -i ? -c:v ? libx264 is a codec i guess and -r ?

Tried to google for this arguments format but didn't find any.

I have 4 text files lists:

encoders.txt decoders.txt in both files i have rawvideo too. I have pixfmts.txt and fileformats.txt files.

I want to build the arguments string from variables.

So for example BitmapRate is int and FileName is string. And the rest of the arguments what types of variables each one i should put to get in the function ?

For example

the rgb24 what type is it ? the 1280x720 what type of variable it should be ?

Upvotes: 4

Views: 4662

Answers (1)

KbManu
KbManu

Reputation: 418

Have you seen this link ?

http://linux.die.net/man/1/ffmpeg

It may answer some of your questions on parameters including 1280x720. Through this, hopefully you can map to your requirements (using ffmpeg.exe !) and verify !

Upvotes: 2

Related Questions