FFmpeg series article directory
[FFmpeg] Windows builds an FFmpeg command line running environment
[FFmpeg] Introduction to FFmpeg related terms (container | media stream | data frame | data packet | codec | multiplexing | demultiplexing)
[FFmpeg] Introduction to FFmpeg related terms II
[FFmpeg] use of FFmpeg help document
[ffmpeg] ffmpeg command query 1 (version | compilation configuration | multiplexing format | codec)
[ffmpeg] ffmpeg command query 2 (bitstream filter | available protocol | filter | pixel format | standard channel layout | audio sampling format | color name)
[ffmpeg] ffmpeg command query III (query parameters supported by ffmpeg command classification)
1, Basic commands for playing video with ffplay
Basic commands for playing video with ffplay:
ffplay Video path
Play the "D:\ffmpeg\yuanshen.mp4" video, enter the "D:\ffmpeg \" directory, and execute the following commands:
ffplay yuanshen.mp4
Command line output:
D:\ffmpeg>ffplay yuanshen.mp4 ffplay version n4.4-19-g8d172d9409 Copyright (c) 2003-2021 the FFmpeg developers built with gcc 10-win32 (GCC) 20210408 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'yuanshen.mp4': 0B f=0/0 Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.29.100 Duration: 00:06:13.10, start: 0.000000, bitrate: 2623 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 2489 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] 13.74 A-V: 0.009 fd= 4 aq= 22KB vq= 354KB sq= 0B f=0/0 D:\ffmpeg>
Execution process:
2, Control commands during ffplay playback
Playback control:
- Play frame by frame: S;
- Drag backward / forward for 10 seconds: Left / Right arrow button;
- Drag backward / forward for 1 minute: Down / Up arrow button;
- Pause playback: P, space; Press P or spacebar to pause playback;
- Stop playing: Q, Esc; After starting playing, press the Q or Esc key to exit playing;
Full screen switching: press key F to switch the full screen; Double clicking with the left mouse button can also switch to full screen;
Volume control:
- Mute: M key can switch mute / non mute state;
- Reduce the volume: press 9 or / key to reduce the volume;
- Increase the volume: press 0 or * key to increase the volume;
Cyclic switching: for multiple audio streams and video streams, such as TV program TS stream, multiple TV station signals in one stream, you can select different TV station signals for viewing by switching audio stream / video stream / program, etc;
- Cycle switching audio stream: a; ( Audio )
- Cyclic switching video stream: V; ( Vedio )
- Cycle switching subtitle stream: T;
- Cyclic switching program: C;
- Cycle switching filter or display mode: W;
3, Test TS stream cycle switching audio stream / video stream / subtitle stream / program
TS stream file CCTV TS, which contains the following stream information. This file contains 7 7 7 video streams, 7 7 7 audio streams;
use
ffplay cctv.ts
The command playback includes a plurality of video streams / audio streams;
If the sound is too loud, you can use the - volume option to control the sound:
ffplay -volume 3 cctv.ts
After the playback starts, press A to switch the audio stream, V to switch the video stream, and T to switch the subtitle stream,
Press C to switch the complete program, that is, switch the audio stream, video stream and caption stream at the same time;