• Complain

Yaprakgül - Understanding FFmpeg with source code: FFMPEG Fundementals

Here you can read online Yaprakgül - Understanding FFmpeg with source code: FFMPEG Fundementals full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2021, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover
  • Book:
    Understanding FFmpeg with source code: FFMPEG Fundementals
  • Author:
  • Genre:
  • Year:
    2021
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Understanding FFmpeg with source code: FFMPEG Fundementals: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Understanding FFmpeg with source code: FFMPEG Fundementals" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Yaprakgül: author's other books


Who wrote Understanding FFmpeg with source code: FFMPEG Fundementals? Find out the surname, the name of the author of the book and a list of all author's works by series.

Understanding FFmpeg with source code: FFMPEG Fundementals — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Understanding FFmpeg with source code: FFMPEG Fundementals" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
UNDERSTANDING FFMPEG WITH SOURCE CODE Copyright 2020 Akn Yaprakgl All rights - photo 1
UNDERSTANDING FFMPEG WITH SOURCE CODE
Copyright 2020 Akn Yaprakgl
All rights reserved
Acknowledgements
I thank all who in one way or another contributed in the completion of this book. First, I give thanks to God for protection and ability to do work
The Greatest thanks belongs to the developers of FFmpeg libraries. The project documentation and Chinese articles from Communication University of China were the main source for the book. Another great source was the Wikipedia.
I give deep thanks to Easy Media Suite family and my boss Osman Yel. My special and heartily thanks to my wife Betl Yaprakgl who encouraged and directed me.
Thank you to my son Grkem Yaprakgl who always cheered up his father.
Thank you very much and best wishes.
Table of Contents
Video
Generate Various Pictures
Separate Y, U, V components in YUV420P pixel data
Separate Y, U, V components in YUV444P pixel data
Remove the Color of YUV420P Pixel Data
Reduce the Brightness of YUV420P Pixel Data by Half
Add a Frame Around the YUV420P Pixel Data
Generate Gray Scale Test Chart in YUV420P Format
Calculate the PSNR of two YUV420P Pixel Data
Separate R, G, B Components in RGB24 Pixel Data
Encapsulate RGB24 Format Pixel Data into BMP Image
Convert RGB24 Format Pixel Data to YUV420P Format Pixel Data
Generate Color Bar Test Chart in RGB24 Format
Introduction
Dear reader,
FFmpeg is the most complete set of multimedia support library in free software. It implements almost all the common data encapsulation formats, multimedia transmission protocols and audio and video codecs. It is the Swiss army knife of the multimedia industry. Today, youtube, facebook, google and many broadcasters and television channels use the ffmpeg library.
In this book, we will review the ffmpeg source code and learn about ffmpeg's capabilities. In the first part, we will consider ffmpeg in general terms. In the second part, we will discuss the ffmpeg methods related to video. In this section, we will also examine the ffmpeg filters closely.
In the third part, we will learn the details and methods of audio. In the fourth and fifth part, we will learn about Interlaced video and I-B-P frames. In the sixth part, we will learn what is codec and how does ffmpeg handle it. In the seventh part, we will try to explain how video encoding and audio encoding take place in ffmpeg, with sample codes. In the eighth part, we will try to explain how decoding works in fmmpeg and how to make a sample player with the help of SDL. In parts 9, 10 and 11, we will show the video and audio multiplexing methods. In the twelfth part, how to convert a video file into another format. We will learn all the transcoding steps. In the thirteenth part, we will learn all streaming protocols. In the last part, we will learn how to manage video and audio devices with ffmpeg.
1. FFMPEG Fundementals
FFMPEG is the most complete set of multimedia support library in free software. It implements almost all the common data encapsulation formats, multimedia transmission protocols and audio and video codecs. It is the Swiss army knife of the multimedia industry. Therefore, for engineers engaged in multimedia technology development, in-depth study of FFMPEG becomes an indispensable job. It can be said that FFMPEG is as important to multimedia development engineers as kernel is to embedded system engineers.
FFMPEG is functionally divided into several modules, namely core tools (libutils), media formats (libavformat), codecs (libavcodec), devices (libavdevice) and post-processing (libavfilter, libswscale, libpostproc), respectively responsible for providing public function, realize the reading and writing of multimedia files, complete the coding and decoding of audio and video, manage the operation of audio and video equipment, and perform audio and video post-processing.
FFMPEG Data Structure
Codecs, data frames, media streams and containers are the four basic concepts of digital media processing systems.
First, the terminology needs to be unified:
  • Container / File : It is a multimedia file in a specific format.
  • Media stream : refers to a piece of continuous data on the time axis, such as a piece of sound data, a piece of video data or a piece of subtitle data, which can be compressed or uncompressed. Compressed data needs to be associated with a specific codec.
  • Frame / Packet: Generally, a media stream consists of a large number of data frames. For compressed data, the frame corresponds to the smallest processing unit of the codec. Generally, data frames belonging to different media streams are interleaved and reused in containers
  • Codec: The codec converts compressed data to original data in units of frames.
In FFMPEG, structures such as AVFormatContext, AVStream, AVCodecContext, AVCodec, and AVPacket are used to abstract these basic elements. Their relationship is shown in the following figure:
AVCodecContext This is a data structure that describes the context of the - photo 2
AVCodecContext
This is a data structure that describes the context of the codec. It contains the parameter information required by many codecs.
typedef struct AVCodecContext {
...
/**
* some codecs need / can use extradata like Huffman tables.
* mjpeg: Huffman tables
* rv10: additional flags
* mpeg4: global headers (they can be in the bitstream or here)
* The allocated memory should be FF_INPUT_BUFFER_PADDING_SIZE bytes larger
* than extradata_size to avoid prolems if it is read with the bitstream reader.
* The bytewise contents of extradata must not depend on the architecture or CPU endianness.
*-encoding: Set / allocated / freed by libavcodec.
*-decoding: Set / allocated / freed by user.
*/
uint8_t * extradata ;
int extradata_size ;
/**
* This is the fundamental unit of time (in seconds) in terms
* of which frame timestamps are represented. For fixed-fps content,
* timebase should be 1 / framerate and timestamp increments should be
* identically 1.
*-encoding: MUST be set by user.
*-decoding: Set by libavcodec.
*/
AVRational time_base ;
/* video only */
/**
* picture width / height.
*-encoding: MUST be set by user.
*-decoding: Set by libavcodec.
* Note: For compatibility it is possible to set this instead of
* coded_width / height before decoding.
*/
int width , height ;
...
/* audio only */
int sample_rate ; /// << samples per second
int channels ; ///
/**
* audio sample format
*-encoding: Set by user.
*-decoding: Set by libavcodec.
*/
enum SampleFormat sample_fmt ; ///
/* The following data should not be initialized. */
/**
* Samples per packet, initialized when calling 'init'.
*/
int frame_size ;
int frame_number ; ///
...
char codec_name [ 32 ] ;
enum AVMediaType codec_type ; /* see AVMEDIA_TYPE_xxx */
enum CodecID codec_id ; /* see CODEC_ID_xxx */
/**
* fourcc (LSB first, so "ABCD"-> ('D' << 24) + ('C' << 16) + ('B' << 8) + 'A').
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Understanding FFmpeg with source code: FFMPEG Fundementals»

Look at similar books to Understanding FFmpeg with source code: FFMPEG Fundementals. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Understanding FFmpeg with source code: FFMPEG Fundementals»

Discussion, reviews of the book Understanding FFmpeg with source code: FFMPEG Fundementals and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.