Yoohoo
Yoohoo

Reputation: 227

c/c++ program for ffmpeg command line

I want to find the corresponding c/c++ program for the ffmpeg command line:

ffmpeg -i sample.mp4 -an -vcodec libx264 -crf 23 outfile.h264

which convert a sample.mp4 file to outfile.h264, and

ffplay outfile.h264

What I am doing is to combine the ffmpeg program with my udp socket program to do a real-time video transmission. beacause it is 'real-time', so I want to find the ffmpeg program cut it at the frame encoding step instead of writing the frames into output file, and send frame by frame and also read frame by frame at the server side.

My questions are:

1.What c/c++ program is actually running when I use the above command line?

2.where can i find the c/c++ program?

Upvotes: 0

Views: 2271

Answers (1)

  1. ffmpeg is running. Same as any other program, there's an actual file on "the path" called ffmpeg. Use which ffmpeg or where ffmpeg to find it. On the systems at my university it is in /usr/pkg/bin/ffmpeg, but /usr/bin/ffmpeg is probably more typical.

  2. The program itself is the ffmpeg file. If you mean the source code for the program, that is most likely not installed on your computer - you'll need to download it from somewhere (such as from the official FFmpeg website).

Note that FFmpeg is both a program and a set of libraries (libavformat, libavcodec, libavutil, etc). Most of the work is done in the libraries; the ffmpeg program itself just glues them together depending on the command line options.

As such, a more useful approach might be to learn how to use libavformat and libavcodec (and whichever other FFmpeg libraries) to do what you want. The documentation at http://ffmpeg.org/documentation.html doesn't seem to go into much detail; you might want to search for some tutorials.

Upvotes: 2

Related Questions