In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to set Qt ffmpeg volume". In daily operation, I believe many people have doubts about how to set Qt ffmpeg volume. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to set Qt ffmpeg volume". Next, please follow the editor to study!
I. Preface
The basic functions of audio and video playback, shutdown, pause and continuation are easily handled by most people. With regard to volume adjustment, there is still a slight mercy on the bend. At first, I intend to use the api of each system to deal with it. I sit down and find that the support of the system is not good. For example, some api limits win7, but xp does not, and this thing controls the overall volume, which is not good. Most of the time, what needs to be controlled is the volume of the media currently playing. It is estimated that players such as vlc and mpv have also had such scene analysis when dealing with sound. Later, they have also tested the use of ffmpeg's filter filter code to control the decibel value of audio data, which is more tedious and has a large amount of code, which is not convenient for beginners to learn. finally, they have an idea to find the function of QAudioOutput to see if there is a function of volume. If there is really shit, it originally comes with it. Admiration for Qt has soared by dozens of points. It is important to note that the volume parameter of QAudioOutput is in the range of 0-1 double, rather than 0-100 in players such as vlc, so you need to convert it. If the volume control is done, of course, the mute setting is divided into minutes, just remember the previous volume, then set the volume to 0, and automatically set the volume to the last remembered volume value when you unmute.
II. Functional features
Multi-thread real-time playback video stream + local video + USB camera and so on.
Support windows+linux+mac, support ffmpeg3 and ffmpeg4, support 32-bit and 64-bit.
Multi-thread display image, do not card the main interface.
Automatically reconnect the webcam.
The border size can be set, that is, the offset and the border color.
You can set whether to draw OSD tags, that is, label text or pictures and label locations.
There are two OSD locations and styles that can be set.
You can set whether to save to a file and the file name.
You can drag the file directly to the ffmpegwidget control to play.
Supports h365 video streams + rtmp and other common video streams.
Playback can be paused and resumed.
Support for storing individual video files and storing video files at regular intervals.
Customize the top suspension bar and send click signal notification, which can be set whether it is enabled or not.
Can set screen stretch fill or proportional fill.
Programmable decoding is speed priority, quality priority and balanced processing.
You can take screenshots (original pictures) and screenshots of the video.
Video file storage supports naked streaming and MP4 files.
Perfect audio and video synchronization, using external clock synchronization strategy.
Seek is supported to locate the playback position.
Qsv, dxva2, d3d11va and other hard decoding are supported.
Support opengl to draw video data with very low CPU usage.
Support Android and embedded linux, just cross-compile.
Third, effect picture
4. Core code bool FFmpegThread::getMute () {return (getVolume () = = 0);} int volume = 0 void FFmpegThread::setMute (bool mute) {/ / remember the previous volume in order to reset if (mute) {volume = getVolume (); setVolume (0);} else {setVolume (volume) }} int FFmpegThread::getVolume () {if (this- > isRunning ()) {# if (QT_VERSION > QT_VERSION_CHECK) return audioOutput- > volume () * 100 else else {return 0 }} void FFmpegThread::setVolume (int volume) {if (this- > isRunning ()) {# if (QT_VERSION > QT_VERSION_CHECK) / / the manual says the range is 0.0-1.0 audioOutput- > setVolume ((float) volume / 100.0); # endif} at this point, the study on "how to set the Qt ffmpeg volume" is over, hoping to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.