Areas that are differentiated by skill have their own data structures and processes. Mastering an area of expertise means understanding its structure and processes (but much of that understanding can be translated), but that doesn’t mean starting with concepts is the best approach. Find a breakthrough point, complete a certain function in a certain professional field, and then do the understanding of the concept of the system at the appropriate time, this method is a good learning method. Most importantly, it’s an interesting process. That is, learning is driven by questions, and it would be best if we could combine learning with teaching.
Multimedia knowledge and skills are various, easy to get started but difficult to go deep.
“Media” is the elements of sound, image and text. Together, multiple elements are called “multimedia”. When these elements are transmitted by streaming protocol, they are called “streaming media”.
In the digital world, what you hear and see are all multimedia. When it comes to multimedia, the function that comes to mind most easily is playback. I will start with the function of “playback” and implement this function first, as little as possible in terms of concepts.
FFmpeg, an assembly that is often used in multimedia skills, is used here to implement the playback function.
This article describes how to use FFmpeg to achieve playback.
In the FFmpeg assembly, there is a program called FFPlay (player), which provides the function of playing.
(1) Installation of FFplay
I use a MAC, and installing FfPlay on a MAC is simple:
brew install ffmpeg –with-sdl2 –with-rtmpdump
Note that if you find that the install command no longer supports with-sdl2 or rtmpdump, install it yourself.
brew install sdl2
brew install rtmpdump
brew install ffmpeg
Once installed, you can run ffPlay from the command line: There are two different versions of FFPlay because I installed one on the system and then compiled another with FFmpeg source code.
(2) Play
With ffPlay installed, playing is a piece of cake.
Such as:
Ffplay ivi.bupt.edu.cn/hls/cctv1hd… “”
ffplay ~/Desktop/1.mp4
Ffplay can play audio and video files from the network as well as local files. As long as there is a path (or URL), it can be played with ffPlay.
So in addition to local resources, can you find some interesting urls to play?
You can usually search on the Internet, or pull out the address.
For example, go to “Cool Dog Live” on the PC web page, open a live broadcast room, and then use Charles to capture the package (or other tools), you can see the address like this:
Change to a studio (this one is on demand) :
For example, a live broadcast address of Tiger Teeth looks like this:
Alternatively, search the web for some available addresses such as (which may be out of date and available at the time of publication) :
CCTV1 hd: ivi.bupt.edu.cn/hls/cctv1hd…
CCTV3 hd: ivi.bupt.edu.cn/hls/cctv3hd…
CCTV5 + hd: ivi.bupt.edu.cn/hls/cctv5ph…
CCTV6 hd: ivi.bupt.edu.cn/hls/cctv6hd…
Let’s look at ffPlay again:
TV:
Studio:
There are some shortcuts you can use when playing with ffPlay, such as:
Q – exit
P/space — pause
W — Toggle cover, waveform and energy diagram
F – full screen
S — frame by frame display
Left and right, up and down — fast forward or backward
To sum up, this article introduces the use of FFplay in FFmpeg, which happily accomplishes the function of playing, and basically does not involve complex concepts. see you.