-
Notifications
You must be signed in to change notification settings - Fork 0
/
ffmpeg.html
70 lines (68 loc) · 4.81 KB
/
ffmpeg.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<!-- Mirrored from dranger.com/ffmpeg/ffmpeg.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 05 Jun 2020 09:18:38 GMT -->
<head>
<title>ffmpeg tutorial</title>
<link href="ffmpeg.css" rel="stylesheet" type="text/css">
</title>
</head>
<body>
<h2 class="center">An ffmpeg and SDL Tutorial</h2><h3 class='center'>or</h3>
<h2 class='center'>How to Write a Video Player in<br>Less Than 1000 Lines</h2>
<div class="nav">
<span class="left">Page
<a href="tutorial01.html">1</a>
<a href="tutorial02.html">2</a>
<a href="tutorial03.html">3</a>
<a href="tutorial04.html">4</a>
<a href="tutorial05.html">5</a>
<a href="tutorial06.html">6</a>
<a href="tutorial07.html">7</a>
<a href="end.html">End</a>
</span>
<span class="right">
Prev
Home
<a href="tutorial01.html">Next</a>
</span>
<span class="clear"> </span>
</div>
<h1>UPDATE: This tutorial is up to date as of February 2015.</h1>
<p><a href="http://ffmpeg.mplayerhq.hu/">ffmpeg</a> is a wonderful library for creating video applications or even general purpose utilities. ffmpeg takes care of all the hard work of video processing by doing all the decoding, encoding, muxing and demuxing for you. This can make media applications much simpler to write. It's simple, written in C, fast, and can decode almost any codec you'll find in use today, as well as encode several other formats.
</p>
<p>
The only problem is that documentation was basically nonexistent. There is a <a href="http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html">single tutorial</a> that shows the basics of ffmpeg and auto-generated doxygen documents. That's it. So, when I decided to learn about ffmpeg, and in the process about how digital video and audio applications work, I decided to document the process and present it as a tutorial.</p>
<p>There is a sample program that comes with ffmpeg called ffplay. It is a simple C program that implements a complete video player using ffmpeg. This tutorial will begin with an updated version of the original tutorial, written by <a href="http://www.inb.uni-luebeck.de/staff/boehme-d.html">Martin Böhme</a> (I have <span class="crossout">stolen</span> liberally borrowed from that work), and work from there to developing a working video player, based on Fabrice Bellard's ffplay.c. In each tutorial, I'll introduce a new idea (or two) and explain how we implement it. Each tutorial will have a C file so you can download it, compile it, and follow along at home. The source files will show you how the real program works, how we move all the pieces around, as well as showing you the technical details that are unimportant to the tutorial. By the time we are finished, we will have a working video player written in less than 1000 lines of code!
</p>
<p>In making the player, we will be using <a href="http://www.libsdl.org/">SDL</a> to output the audio and video of the media file. SDL is an excellent cross-platform multimedia library that's used in MPEG playback software, emulators, and many video games. You will need to download and install the SDL development libraries for your system in order to compile the programs in this tutorial.
</p>
<p>
This tutorial is meant for people with a decent programming background. At the very least you should know C and have some idea about concepts like queues, mutexes, and so on. You should know some basics about multimedia; things like waveforms and such, but you don't need to know a lot, as I explain a lot of those concepts in this tutorial.
</p>
<p>
There are also old school ASCII files of the tutorials. You can also get a tarball of the <a href="ffmpegtutorial.tar.gz">text files and source code</a> or <a href="ffmpegsource.tar.gz">just the source.</a>
</p>
<p>
Please feel free to email me with bugs, questions, comments, ideas, features, whatever, at <em>dranger at gmail dot com</em>.
</p>
<p><em><b>>></b> <a href="tutorial01.html">Proceed with the tutorial!</a></em></p>
<hr>
<div class="links">
<a href="functions.html">Function Reference</a><br>
<a href="data.html">Data Reference</a>
</div>
<div class="footer">
<table>
<tr><th>email:</th> <td>dranger at gmail dot com</td></tr>
</table>
<a href="http://www.dranger.com/">Back to dranger.com</a>
</div>
<span class="fineprint">This work is licensed under the Creative Commons Attribution-Share Alike 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
<br />
<br />
Code examples are based off of FFplay, Copyright (c) 2003 Fabrice Bellard, and a tutorial by Martin Bohme.
</span>
</body>
<!-- Mirrored from dranger.com/ffmpeg/ffmpeg.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 05 Jun 2020 09:18:41 GMT -->
</html>