### Capture JACK Audio Input Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates capturing audio from a JACK audio server. It involves creating a JACK client, starting a source client (jack_metro), listing clients, and connecting them. ```bash # Create a JACK writable client with name "ffmpeg". $ ffmpeg -f jack -i ffmpeg -y out.wav # Start the sample jack_metro readable client. $ jack_metro -b 120 -d 0.2 -f 4000 # List the current JACK clients. $ jack_lsp -c system:capture_1 system:capture_2 system:playback_1 system:playback_2 ffmpeg:input_1 metro:120_bpm # Connect metro to the ffmpeg writable client. $ jack_connect metro:120_bpm ffmpeg:input_1 ``` -------------------------------- ### DASH Adaptation Sets Configuration Example 2 Source: https://ffmpeg.org/ffmpeg-all.html Example of configuring adaptation sets for DASH muxing, including trick mode streams. ```text id=0,seg_duration=2,frag_type=none,streams=0 id=1,seg_duration=10,frag_type=none,trick_id=0,streams=1 ``` -------------------------------- ### FFmpeg Loopback Decoder Example Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates reading an input video, encoding it at low quality, decoding the encoded stream using a loopback decoder, placing it side-by-side with the original video, and then losslessly encoding the combined video. ```bash ffmpeg -i INPUT \ -map 0:v:0 -c:v libx264 -crf 45 -f null - \ -threads 3 -dec 0:0 \ -filter_complex '[0:v][dec:0]hstack[stack]' \ -map '[stack]' -c:v ffv1 OUTPUT ``` -------------------------------- ### FFmetadata File Example Source: https://ffmpeg.org/ffmpeg-all.html An example of the ffmetadata file format, including global tags, chapter sections, and stream sections. Special characters and comments are demonstrated. ```text ;FFMETADATA1 title=bike\\shed ;this is a comment artist=FFmpeg troll team [CHAPTER] TIMEBASE=1/1000 START=0 #chapter ends at 0:01:00 END=60000 title=chapter \#1 [STREAM] title=multi\\nline ``` -------------------------------- ### WebM Live Chunk Muxer Example Source: https://ffmpeg.org/ffmpeg-all.html Configures FFmpeg to use the WebM Live Chunk Muxer for both video and audio streams. This example demonstrates setting up separate headers and chunk files for live DASH consumption. ```bash ffmpeg -f v4l2 -i /dev/video0 \ -f alsa -i hw:0 \ -map 0:0 \ -c:v libvpx-vp9 \ -s 640x360 -keyint_min 30 -g 30 \ -f webm_chunk \ -header webm_live_video_360.hdr \ -chunk_start_index 1 \ webm_live_video_360_%d.chk \ -map 1:0 \ -c:a libvorbis \ -b:a 128k \ -f webm_chunk \ -header webm_live_audio_128.hdr \ -chunk_start_index 1 \ -audio_chunk_duration 1000 \ webm_live_audio_128_%d.chk ``` -------------------------------- ### FFmpeg Per-Stream AVOptions Example Source: https://ffmpeg.org/ffmpeg-all.html Configure per-stream AVOptions, such as codec and bitrate, using stream specifiers. This example encodes audio streams differently. ```bash ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0 -map 0:a:0 -c:a:0 ac3 -b:a:0 640k -ac:a:1 2 -c:a:1 aac -b:2 128k out.mp4 ``` -------------------------------- ### FFmpeg mpegts muxer example with custom IDs and PIDs Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates how to use the mpegts muxer with custom network, transport stream, and service IDs, as well as specific PMT and elementary stream PIDs. It also shows how to set metadata for service provider and service name. ```bash ffmpeg -i file.mpg -c copy \ -mpegts_original_network_id 0x1122 \ -mpegts_transport_stream_id 0x3344 \ -mpegts_service_id 0x5566 \ -mpegts_pmt_start_pid 0x1500 \ -mpegts_start_pid 0x150 \ -metadata service_provider="Some provider" \ -metadata service_name="Some Channel" \ out.ts ``` -------------------------------- ### DASH Adaptation Sets Configuration Example 1 Source: https://ffmpeg.org/ffmpeg-all.html Example of configuring adaptation sets for DASH muxing, specifying segment and fragment durations and types. ```text id=0,seg_duration=2,frag_duration=1,frag_type=duration,streams=v id=1,seg_duration=2,frag_type=none,streams=a ``` -------------------------------- ### xstack_qsv filter example Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates the usage of the xstack_qsv filter for custom video stacking with specified input counts and layouts. Ensure the QSV device is correctly set up. ```ffmpeg xstack_qsv=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080 ``` -------------------------------- ### Colorspace Conversion Example Source: https://ffmpeg.org/ffmpeg-all.html Converts the input video to SMPTE-240M colorspace. Ensure input color properties are set correctly. ```bash colorspace=smpte240m ``` -------------------------------- ### Create Video from Image Sequence Starting at Specific Number Source: https://ffmpeg.org/ffmpeg-all.html Create a video from an image sequence, beginning with a file that has a specific index number (e.g., starting from img-100.jpeg). ```bash ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv ``` -------------------------------- ### FFmpeg DTLS Server Example Source: https://ffmpeg.org/ffmpeg-all.html Command to configure FFmpeg as a DTLS server, listening for incoming connections on a specified host and port. ```shell ffmpeg -listen 1 -i dtls://hostname:port output ``` -------------------------------- ### Capture Audio with ALSA Source: https://ffmpeg.org/ffmpeg-all.html Example command to capture audio from an ALSA device with card ID 0 and save it to alsaout.wav. ```bash ffmpeg -f alsa -i hw:0 alsaout.wav ``` -------------------------------- ### Generate Solid Color Video Source: https://ffmpeg.org/ffmpeg-all.html This example uses the lavfi 'color' source to generate a 5-second video of a solid red color. ```bash ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv ``` -------------------------------- ### Set hue in radians and saturation to 1.0 Source: https://ffmpeg.org/ffmpeg-all.html This example shows how to express the hue in radians instead of degrees while setting saturation. ```ffmpeg hue=H=PI/2:s=1 ``` -------------------------------- ### Set hue to 90 degrees and saturation to 1.0 Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates setting the hue to a specific degree value and saturation to a fixed level. ```ffmpeg hue=h=90:s=1 ``` -------------------------------- ### Create Single Image File from Video Start Source: https://ffmpeg.org/ffmpeg-all.html Generate a single image file from the beginning of an input video using the image2 muxer. ```bash ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg ``` -------------------------------- ### Initialize Vulkan device with instance extensions Source: https://ffmpeg.org/ffmpeg-all.html Selects the first Vulkan device and enables specified instance extensions. ```bash -init_hw_device vulkan:0,instance_extensions=VK_KHR_wayland_surface+VK_KHR_xcb_surface ``` -------------------------------- ### 3:1 compression starting at -15dB Source: https://ffmpeg.org/ffmpeg-all.html Applies 3:1 audio compression starting at -15dB. This example specifically sets the transfer function points. ```ffmpeg compand=points=-80/-80|-15/-15|0/-10.8|20/-5.2 ``` -------------------------------- ### 2:1 compression starting at -18dB Source: https://ffmpeg.org/ffmpeg-all.html Applies 2:1 audio compression starting at -18dB. This example specifically sets the transfer function points. ```ffmpeg compand=points=-80/-80|-18/-18|0/-9.8|20/0.7 ``` -------------------------------- ### Initialize QSV device on Linux Source: https://ffmpeg.org/ffmpeg-all.html Creates a QSV device with MFX_IMPL_HARDWARE on a specified DRM render node. ```bash -init_hw_device qsv:hw,child_device=/dev/dri/renderD129 ``` -------------------------------- ### 2:1 compression starting at -12dB Source: https://ffmpeg.org/ffmpeg-all.html Applies 2:1 audio compression starting at -12dB. This example specifically sets the transfer function points. ```ffmpeg compand=points=-80/-80|-12/-12|0/-6.8|20/1.9 ``` -------------------------------- ### Initialize QSV device on Windows Source: https://ffmpeg.org/ffmpeg-all.html Creates a QSV device with MFX_IMPL_HARDWARE on a specified DirectX adapter. ```bash -init_hw_device qsv:hw,child_device=1 ``` -------------------------------- ### 2:1 compression starting at -9dB Source: https://ffmpeg.org/ffmpeg-all.html Applies 2:1 audio compression starting at -9dB. This example specifically sets the transfer function points. ```ffmpeg compand=points=-80/-80|-9/-9|0/-5.3|20/2.9 ``` -------------------------------- ### Initialize new hardware device from existing Source: https://ffmpeg.org/ffmpeg-all.html Initializes a new hardware device of a specified type and name, deriving it from an existing device. ```bash -init_hw_device type[=name]@source ``` -------------------------------- ### 2:1 compression starting at -6dB Source: https://ffmpeg.org/ffmpeg-all.html Applies 2:1 audio compression starting at -6dB. This example specifically sets the transfer function points. ```ffmpeg compand=points=-80/-80|-6/-6|0/-3.8|20/3.5 ``` -------------------------------- ### FFmpeg DTLS Client Example Source: https://ffmpeg.org/ffmpeg-all.html Command to configure FFmpeg as a DTLS client, sending input data to a specified DTLS server address. ```shell ffmpeg -i input -f format dtls://hostname:port ``` -------------------------------- ### Initialize OpenCL Device and Use avgblur_opencl Filter Source: https://ffmpeg.org/ffmpeg-all.html Example of initializing an OpenCL device and applying the avgblur_opencl filter. Requires uploading frames to hardware surfaces before filtering and downloading them afterward. ```bash -init_hw_device opencl=gpu:1.0 -filter_hw_device gpu -i INPUT -vf "hwupload, avgblur_opencl, hwdownload" OUTPUT ``` -------------------------------- ### Apply saturation fade-out effect Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates applying a saturation fade-out effect over a specified duration, starting at a particular time. ```ffmpeg hue="s=max(0\, min(1\, (8-t)/3))" ``` -------------------------------- ### FFmpeg fieldhint Hint File Example Source: https://ffmpeg.org/ffmpeg-all.html Specifies frame numbers for extracting top and bottom fields using relative mode. Lines starting with '#' or ';' are ignored. ```text 0,0 - # first frame 1,0 - # second frame, use third's frame top field and second's frame bottom field 1,0 - # third frame, use fourth's frame top field and third's frame bottom field 1,0 - 0,0 - 0,0 - 1,0 - 1,0 - 1,0 - 0,0 - 0,0 - 1,0 - 1,0 - 1,0 - 0,0 - ``` -------------------------------- ### Initialize Vulkan device by index Source: https://ffmpeg.org/ffmpeg-all.html Selects the second Vulkan device on the system. ```bash -init_hw_device vulkan:1 ``` -------------------------------- ### Initialize VAAPI and derive QSV device Source: https://ffmpeg.org/ffmpeg-all.html Creates a VAAPI device and then derives a QSV device from it. ```bash -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device qsv=hw1@va ``` -------------------------------- ### FFmpeg silenceremove: Start recording without initial delay Source: https://ffmpeg.org/ffmpeg-all.html Use this to start a recording that omits the typical delay between pressing record and the actual performance start. ```bash silenceremove=start_periods=1:start_duration=5:start_threshold=0.02 ``` -------------------------------- ### Segment Start Time Accuracy Source: https://ffmpeg.org/ffmpeg-all.html Specify the accuracy for selecting segment start times. This is useful for aligning segment starts with keyframes, especially when combined with `force_key_frames`. ```ffmpeg segment_time_delta 1/(2*frame_rate) ``` -------------------------------- ### Initialize QSV Hardware Device (Auto Any) Source: https://ffmpeg.org/ffmpeg-all.html Initializes a QSV hardware device, attempting to use any available implementation (hardware or software). ```ffmpeg -init_hw_device qsv=auto_any ``` -------------------------------- ### Two-Pass Video Encoding (Windows) Source: https://ffmpeg.org/ffmpeg-all.html Example for the first pass of a two-pass video encoding process on Windows. Audio is deactivated and output is set to null. ```bash ffmpeg -i foo.mov -c:v libxvid -pass 1 -an -f rawvideo -y NUL ``` -------------------------------- ### DASH Descriptor Example Source: https://ffmpeg.org/ffmpeg-all.html Example of defining a descriptor for DASH adaptation sets using SupplementalProperty. ```xml ``` -------------------------------- ### Initialize Vulkan device by name substring Source: https://ffmpeg.org/ffmpeg-all.html Selects the first Vulkan device with a name containing the specified substring. ```bash -init_hw_device vulkan:RADV_ ``` -------------------------------- ### Dehazing with guided filter using a guidance image Source: https://ffmpeg.org/ffmpeg-all.html Performs dehazing, structure-transferring filtering, or detail enhancement using the guided filter with a separate guidance image. Refer to the paper 'Guided Image Filtering' for guidance image generation. ```bash ffmpeg -i in.png -i guidance.png -filter_complex guided=guidance=on out.png ``` -------------------------------- ### Initialize QSV Hardware Device (Software) Source: https://ffmpeg.org/ffmpeg-all.html Initializes a QSV hardware device, forcing the use of software implementation. ```ffmpeg -init_hw_device qsv=sw ``` -------------------------------- ### Example filtergraph description for scale filter Source: https://ffmpeg.org/ffmpeg-all.html This is an example of a GRAPH_DESCRIPTION string for the scale filter, showing how to define inputs and outputs explicitly. ```text nullsrc,scale=640:360,nullsink ``` -------------------------------- ### Initialize OpenCL device by index Source: https://ffmpeg.org/ffmpeg-all.html Selects the second device on the first OpenCL platform. ```bash -init_hw_device opencl:0.1 ``` -------------------------------- ### Edge-preserving smoothing with guided filter Source: https://ffmpeg.org/ffmpeg-all.html Applies the guided filter for edge-preserving smoothing to an input image. No additional guidance image is required. ```bash ffmpeg -i in.png -vf guided out.png ``` -------------------------------- ### Initialize OpenCL GPU device with extension Source: https://ffmpeg.org/ffmpeg-all.html Selects a GPU device on the second platform that supports a specific OpenCL extension. ```bash -init_hw_device opencl:1,device_type=gpu,device_extensions=cl_khr_fp16 ``` -------------------------------- ### FFmpeg setpts: Start PTS from zero Source: https://ffmpeg.org/ffmpeg-all.html Resets the presentation timestamps (PTS) to start from zero for video frames. Useful for re-synchronizing timestamps. ```bash setpts=PTS-STARTPTS ``` -------------------------------- ### Initialize QSV device on Windows with specific subdevice type Source: https://ffmpeg.org/ffmpeg-all.html Creates a QSV device with MFX_IMPL_HARDWARE on a specified DirectX adapter and subdevice type. ```bash -init_hw_device qsv:hw,child_device=1,child_device_type=d3d11va ``` -------------------------------- ### FFmpeg Sobel Operator Example Source: https://ffmpeg.org/ffmpeg-all.html Applies the Sobel operator to the input video stream. This example demonstrates setting the scale to 2 and delta to 10. ```bash -i INPUT -vf "hwupload, sobel_opencl=scale=2:delta=10, hwdownload" OUTPUT ``` -------------------------------- ### Show FFmpeg Build Configuration Source: https://ffmpeg.org/ffmpeg-all.html Displays the build configuration details of FFmpeg, with each option on a new line. ```bash ffmpeg -buildconf ``` -------------------------------- ### FFmpeg blackframe filter example Source: https://ffmpeg.org/ffmpeg-all.html The blackframe filter detects frames that are almost completely black. This example uses default values for amount and threshold. ```bash blackframe ``` -------------------------------- ### Initialize QSV Hardware Device (Hardware) Source: https://ffmpeg.org/ffmpeg-all.html Initializes a QSV hardware device, forcing the use of hardware acceleration. ```ffmpeg -init_hw_device qsv=hw ``` -------------------------------- ### Initialize OpenCL device by name Source: https://ffmpeg.org/ffmpeg-all.html Selects an OpenCL device with a name containing the specified string. ```bash -init_hw_device opencl:,device_name=Foo9000 ``` -------------------------------- ### FFmpeg Roberts Operator Example Source: https://ffmpeg.org/ffmpeg-all.html Applies the Roberts cross operator to the input video stream. This example demonstrates setting the scale to 2 and delta to 10. ```bash -i INPUT -vf "hwupload, roberts_opencl=scale=2:delta=10, hwdownload" OUTPUT ``` -------------------------------- ### Display Video Input with FFmpeg Source: https://ffmpeg.org/ffmpeg-all.html This example decodes, displays, and encodes video input simultaneously using the xv output device. The output is directed to a display named 'display'. ```bash ffmpeg -i INPUT OUTPUT -f xv display ``` -------------------------------- ### FFmpeg paletteuse Example Source: https://ffmpeg.org/ffmpeg-all.html Use a palette to downsample an input video stream. The palette must be a 256-pixel image. This example shows how to use a pre-generated palette with ffmpeg. ```bash ffmpeg -i input.mkv -i palette.png -lavfi paletteuse output.gif ``` -------------------------------- ### Setup TLS/SSL Server with FFmpeg Source: https://ffmpeg.org/ffmpeg-all.html Creates a TLS/SSL server using FFmpeg to securely serve an input stream. Requires specifying certificate and key files for the handshake. ```ffmpeg ffmpeg -i input -f format tls://hostname:port?listen&cert=server.crt&key=server.key ``` -------------------------------- ### Show Available FFmpeg Sample Formats Source: https://ffmpeg.org/ffmpeg-all.html Lists all supported sample formats for audio data. ```bash ffmpeg -sample_fmts ``` -------------------------------- ### Initialize CUDA Hardware Device (First Device with Primary Context) Source: https://ffmpeg.org/ffmpeg-all.html Initializes a CUDA hardware device, selecting the first device (index 0) and utilizing its primary device context. ```ffmpeg -init_hw_device cuda:0,primary_ctx=1 ``` -------------------------------- ### FFmpeg drawtext filter parameter example Source: https://ffmpeg.org/ffmpeg-all.html Example of setting drawtext filter parameters, including fontsize, fontcolor, and text. Note the escaping required for colons and spaces within the text. ```ffmpeg fontsize=56:fontcolor=green:text='Hello World' ``` -------------------------------- ### FFmpeg blackdetect filter example Source: https://ffmpeg.org/ffmpeg-all.html Use the blackdetect filter to find black segments in a video. This example sets the minimum black duration to 2 seconds and the pixel black threshold to 0.00. ```bash blackdetect=d=2:pix_th=0.00 ``` -------------------------------- ### FFmpeg volumedetect Filter Output Example Source: https://ffmpeg.org/ffmpeg-all.html This snippet shows an example of the output generated by the volumedetect filter. It includes statistics like mean volume, maximum volume, and a histogram of volume values in decibels. ```text [Parsed_volumedetect_0 0xa23120] mean_volume: -27 dB [Parsed_volumedetect_0 0xa23120] max_volume: -4 dB [Parsed_volumedetect_0 0xa23120] histogram_4db: 6 [Parsed_volumedetect_0 0xa23120] histogram_5db: 62 [Parsed_volumedetect_0 0xa23120] histogram_6db: 286 [Parsed_volumedetect_0 0xa23120] histogram_7db: 1042 [Parsed_volumedetect_0 0xa23120] histogram_8db: 2551 [Parsed_volumedetect_0 0xa23120] histogram_9db: 4609 [Parsed_volumedetect_0 0xa23120] histogram_10db: 8409 ``` -------------------------------- ### FFplay Filtergraph with ZMQ Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates a filtergraph generated by ffplay that includes the zmq filter. It shows how to name specific filter instances for targeted command control. ```bash ffplay -dumpgraph 1 -f lavfi " color=s=100x100:c=red [l]; color=s=100x100:c=blue [r]; nullsrc=s=200x100, zmq [bg]; [bg][l] overlay [bg+l]; [bg+l][r] overlay@my=x=100 " ``` -------------------------------- ### Connect to ZMQ Stream with FFplay Source: https://ffmpeg.org/ffmpeg-all.html Demonstrates how multiple clients can connect to an existing ZeroMQ stream using FFplay. ```shell ffplay zmq:tcp://127.0.0.1:5555 ``` -------------------------------- ### FFmpeg silenceremove: Trim silence with start and stop silence retention Source: https://ffmpeg.org/ffmpeg-all.html Combines trimming every second silence period with retaining up to 0.5 seconds of silence from trimmed periods and up to 1.5 seconds from the start of the audio. ```bash silenceremove=stop_periods=-2:stop_duration=1:stop_threshold=-90dB:stop_silence=0.5:start_periods=1:start_duration=1:start_silence=1.5:stop_threshold=-90dB ``` -------------------------------- ### Initialize D3D11VA Hardware Device (Vendor ID) Source: https://ffmpeg.org/ffmpeg-all.html Initializes a D3D11VA hardware device, selecting the first adapter whose hardware VendorId matches the specified value. ```ffmpeg -init_hw_device d3d11va:,vendor_id=0x8086 ``` -------------------------------- ### Analyze Harmonics with Spectrum Visualization (showcqt) Source: https://ffmpeg.org/ffmpeg-all.html Generate audio with specific harmonics and visualize its spectrum. The 'timeclamp' option can be used for increased frequency domain accuracy. ```bash ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t), asplit[a][out1]; [a] showcqt [out0]' ``` ```bash ffplay -f lavfi 'aevalsrc=0.1*sin(2*PI*55*t)+0.1*sin(4*PI*55*t)+0.1*sin(6*PI*55*t)+0.1*sin(8*PI*55*t), asplit[a][out1]; [a] showcqt=timeclamp=0.5 [out0]' ``` -------------------------------- ### FFmpeg HLS Single File Example Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates how to use the 'single_file' HLS flag to store all segments in a single MPEG-TS file and use byte ranges in the playlist. This results in HLS playlists with version 4. ```bash ffmpeg -i in.nut -hls_flags single_file out.m3u8 ``` -------------------------------- ### Initialize Vulkan Hardware Device and Use Filter Source: https://ffmpeg.org/ffmpeg-all.html Initializes a Vulkan hardware device and applies the nlmeans_vulkan filter. Remember to upload frames to hardware surfaces before use and download them back to normal memory afterwards, potentially using format filters. ```bash -init_hw_device vulkan=vk:0 -filter_hw_device vk -i INPUT -vf "hwupload,nlmeans_vulkan,hwdownload" OUTPUT ``` -------------------------------- ### FFmpeg Sidechain Compression Example Source: https://ffmpeg.org/ffmpeg-all.html This example demonstrates using the sidechaincompress filter to compress the first audio input based on the signal from the second audio input, and then merging the compressed signal with the second input. Ensure both input files (main.flac and sidechain.flac) exist. ```bash ffmpeg -i main.flac -i sidechain.flac -filter_complex "[1:a]asplit=2[sc][mix];[0:a][sc]sidechaincompress[compr];[compr][mix]amerge" ``` -------------------------------- ### Play Audio with Spectrum Visualization (showcqt) Source: https://ffmpeg.org/ffmpeg-all.html Use this command to play an audio file while simultaneously displaying its frequency spectrum. Adjust parameters like fps and s for desired output. ```bash ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt [out0]' ``` ```bash ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=fps=30:count=5 [out0]' ``` ```bash ffplay -f lavfi 'amovie=a.mp3, asplit [a][out1]; [a] showcqt=s=1280x720:count=4 [out0]' ``` -------------------------------- ### List OpenAL Supported Devices Source: https://ffmpeg.org/ffmpeg-all.html Use this command to print a list of all supported audio capture devices available through OpenAL. The 'dummy' input is used as a placeholder. ```bash $ ffmpeg -list_devices true -f openal -i dummy out.ogg ``` -------------------------------- ### Play RTMP Stream with ffplay Source: https://ffmpeg.org/ffmpeg-all.html Example command to play an RTMP stream from a server using ffplay. ```bash ffplay "rtmp://myserver/live/mystream live=1" ``` -------------------------------- ### HTTP Protocol Options Source: https://ffmpeg.org/ffmpeg-all.html Demonstrates setting various options for the HTTP protocol, such as proxy, headers, user agent, and referer. These options allow for customization of HTTP requests. ```bash http_proxy=http://example.com:1234 ``` ```bash headers="Content-Type: application/json\r\nAuthorization: Bearer token" ``` ```bash user_agent="MyCustomAgent/1.0" ``` ```bash referer="http://example.com/previous_page" ``` -------------------------------- ### Play RTMP Stream with ffplay Source: https://ffmpeg.org/ffmpeg-all.html Example of how to play a multimedia resource from an RTMP server using ffplay. ```bash ffplay rtmp://myserver/vod/sample ``` -------------------------------- ### Compressor/Gate configuration Source: https://ffmpeg.org/ffmpeg-all.html A configuration for a combined compressor and gate effect. This example uses specific transfer function points. ```ffmpeg compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6 ``` -------------------------------- ### Configure tile filter with mixed options Source: https://ffmpeg.org/ffmpeg-all.html This example shows how to configure the 'tile' filter using a mix of positional and named options for layout, frame count, padding, and margin. ```ffmpeg tile=3x2:nb_frames=5:padding=7:margin=2 ``` -------------------------------- ### Filter Option Escaping Example Source: https://ffmpeg.org/ffmpeg-all.html Demonstrates escaping special characters like ' and : within a filter option value. ```text this is a 'string': may contain one, or more, special characters ``` ```text text=this is a \'string\': may contain one, or more, special characters ``` -------------------------------- ### Record Audio and Video with AVFoundation Source: https://ffmpeg.org/ffmpeg-all.html Record video from device 0 and audio from device 0 into an AVI file. Ensure the correct device indices are used. ```bash $ ffmpeg -f avfoundation -i "0:0" out.avi ``` -------------------------------- ### Initialize D3D11VA Hardware Device (Default) Source: https://ffmpeg.org/ffmpeg-all.html Initializes a D3D11VA hardware device using the default Direct3D 11 display adapter. ```ffmpeg -init_hw_device d3d11va: ``` -------------------------------- ### Benchmark Selective Color Filter Source: https://ffmpeg.org/ffmpeg-all.html This snippet demonstrates how to benchmark the 'selectivecolor' filter by starting and stopping a timer around its application. ```ffmpeg bench=start,selectivecolor=reds=-.2 .12 -.49,bench=stop ``` -------------------------------- ### Create Localhost ZMQ Stream with FFmpeg Source: https://ffmpeg.org/ffmpeg-all.html Example of creating a ZeroMQ stream on localhost port 5555 using FFmpeg. Ensure FFmpeg is compiled with --enable-libzmq. ```shell ffmpeg -re -i input -f mpegts zmq:tcp://127.0.0.1:5555 ``` -------------------------------- ### Read Specific Playlist and Chapter from BluRay Source: https://ffmpeg.org/ffmpeg-all.html Specify a particular playlist, angle, and starting chapter to read from a Blu-ray disc. ```bash -playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray ```