Skip to content

Latest commit

 

History

History
324 lines (162 loc) · 7.04 KB

README.md

File metadata and controls

324 lines (162 loc) · 7.04 KB

Samples - C++ / Linux

Getting Started

simple_converter

Transcodes an H.264/AVC video to H.265/HEVC.

See simple_converter for build and run instructions.

simple_audio_upsample

Upsamples an MP3 audio clip from 44.1 KHz to 48 KHz.

See simple_audio_upsample for build and run instructions.

simple_video_crop

Crops a 16:9 video to 4:3.

See simple_video_crop for build and run instructions.

simple_video_pad

Fits a 16:9 video into a 4:3 frame by resizing and padding the picture.

See simple_video_pad for build and run instructions.

simple_video_upscale

Scales a 480p video up to Full HD 1080p.

See simple_video_upscale for build and run instructions.

Media Info

info_metadata_file

Extract metadata information from a media file.

See info_metadata_file for details.

info_stream_file

Extract audio / video stream information from a media file.

See info_stream_file for details.


Demuxing

MP4

MPEG-4 Part 14 / MPEG-4 Part 1

demux_mp4_file

Extract the first audio and video elementary stream from an MP4 container and save each stream into a separate MP4 file.

See demux_mp4_file for details.

AVC / H.264

Advanced Video Coding

dump_avc_au

Split an H.264 (AVC) elementary stream into access units (AU). Each access unit is saved as a separate file. The sample also displays the NAL units within each access unit.

See dump_avc_au for details.

HEVC / H.265

High Efficiency Video Coding

dump_hevc_au

Split an H.265 (HEVC) elementary stream into access units (AU). Each access unit is saved as a separate file. The sample also displays the NAL units within each access unit.

See dump_hevc_au for details.


Muxing

MP4

MPEG-4 Part 1

mux_mp4_file

Multiplex two single-stream MP4 files containing AAC (audio) and H.264 (video) streams into an MP4 (container) file.

See mux_mp4_file for details.

mux_mp4_fs_file

Multiplex AAC (audio) and H.264 (video) streams into an MP4 (container) file, or remux an existing MP4 file. Optionally enable fast start, which moves the moov atom before the mdat atom so the file can be played while it is downloading.

See mux_mp4_fs_file for details.


Decoding

AAC

Advanced Audio Coding

dec_aac_adts_file

Decode AAC file in Audio Data Transport Stream (ADTS) format and save the output to WAV file.

See dec_aac_adts_file for details.

dec_aac_adts_pull

Decode AAC file in Audio Data Transport Stream (ADTS) format using Transcoder::pull and save output to WAV file.

See dec_aac_adts_pull for details.

AVC / H.264

Advanced Video Coding

dec_avc_au

Decode an AVC / H.264 stream. Use a sequence of .h264 files to simulate a stream of H.264 Access Units (AUs) and a Transcoder object to decode the AUs to raw YUV video frames.

See dec_avc_au for details.

dec_avc_file

Decode a compressed AVC / H.264 file to raw uncompressed YUV video file.

See dec_avc_file for details.

HEVC / H.265

High Efficiency Video Coding

dec_hevc_au

Decode HEVC / H.265 stream. The sample uses a sequence of files to simulate a stream of H.265 Access Units (AUs) and a Transcoder object to decode the AUs to raw YUV video frames.

See dec_hevc_au for details.

dec_hevc_file

Decode a compressed HEVC / H.265 Annex B file to raw uncompressed YUV video file.

See dec_hevc_file for details.

G.711

dec_g711_alaw_file

Decode G.711 A-law WAV file to PCM WAV file.

See dec_g711_alaw_file for details.

dec_g711_ulaw_file

Decode G.711 μ-law WAV file to PCM WAV file.

See dec_g711_ulaw_file for details.

MP3

MPEG-1 Layer 3 Audio

dec_mp3_file

Decode MP3 file and save output to WAV file.

See dec_mp3_file for details.


Encoding

AAC

Advanced Audio Coding

enc_aac_adts_file

Encode WAV file to AAC file in Audio Data Transport Stream (ADTS) format.

See enc_aac_adts_file for details.

enc_aac_adts_pull

Encode WAV file to AAC file in Audio Data Transport Stream (ADTS) format using Transcoder::pull.

See enc_aac_adts_pull for details.

enc_aac_adts_push

Encode WAV file to AAC file in Audio Data Transport Stream (ADTS) format using Transcoder::push.

See enc_aac_adts_push for details.

AVC / H.264

Advanced Video Coding

enc_avc_file

Encode a raw YUV video file into a compressed AVC / H.264 video file.

See enc_avc_file for details.

enc_avc_pull

Encode raw YUV video file to AVC / H.264 Annex B video file using Transcoder::pull.

See enc_avc_pull for details.

HEVC / H.265

High Efficiency Video Coding

enc_hevc_file

Encode raw YUV video file to HEVC / H.265 Annex B video file using Transcoder::run.

See enc_hevc_file for details.

enc_hevc_pull

Encode raw YUV video file to HEVC / H.265 Annex B video file using Transcoder::pull.

See enc_hevc_pull for details.

G.711

enc_g711_alaw_file

Encode WAV file to G.711 A-law WAV file.

See enc_g711_alaw_file for details.

enc_g711_ulaw_file

Encode WAV file to G.711 μ-law WAV file.

See enc_g711_ulaw_file for details.

MP3

MPEG-1 Layer 3 Audio

enc_mp3_file

Encode WAV file to MP3 file.

See enc_mp3_file for details.

enc_mp3_pull

Encode WAV file to MP3 file using Transcoder::pull.

See enc_mp3_pull for details.

enc_mp3_push

How to encode WAV file to MP3 file using Transcoder::push.

See enc_mp3_push for details.

Other

enc_preset_file

Convert a raw YUV video file to a compressed video file. The format of the output is configured with an AVBlocks preset.

See enc_preset_file for details.


Video Processing

video_framerate

Change the frame rate of a video from 24 fps to 30 fps.

See video_framerate for details.

video_pad

Apply padding to video frames by adding black borders on all sides.

See video_pad for details.

video_crop

Crop a video by removing pixels from the edges (left, right, top, bottom).

See video_crop for details.

video_upscale

Upscale a video to Full HD (1920x1080) using bicubic interpolation method.

See video_upscale for details.


Misc

re-encode

Take an MP4 input and re-encodes the audio and video streams back into an MP4 output.

See re-encode for details.

slideshow

Create a video from a sequence of images.

See slideshow for details.