WO2019114582A1 - Video image processing method and computer storage medium and terminal - Google Patents

Video image processing method and computer storage medium and terminal Download PDF

Info

Publication number
WO2019114582A1
WO2019114582A1 PCT/CN2018/119266 CN2018119266W WO2019114582A1 WO 2019114582 A1 WO2019114582 A1 WO 2019114582A1 CN 2018119266 W CN2018119266 W CN 2018119266W WO 2019114582 A1 WO2019114582 A1 WO 2019114582A1
Authority
WO
WIPO (PCT)
Prior art keywords
music
beat point
video
beat
point
Prior art date
Application number
PCT/CN2018/119266
Other languages
French (fr)
Chinese (zh)
Inventor
危文
袁少龙
周宇涛
丘智鉴
颜乐驹
魏启征
李敬
Original Assignee
广州市百果园信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201711353131.8A external-priority patent/CN108111909A/en
Priority claimed from CN201711481160.2A external-priority patent/CN108259925A/en
Priority claimed from CN201711476832.0A external-priority patent/CN108322802A/en
Priority claimed from CN201711474216.1A external-priority patent/CN108259983A/en
Priority claimed from CN201711481177.8A external-priority patent/CN108259984A/en
Application filed by 广州市百果园信息技术有限公司 filed Critical 广州市百果园信息技术有限公司
Publication of WO2019114582A1 publication Critical patent/WO2019114582A1/en

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • G10L25/57Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination for processing of video signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a video image processing method.
  • the music that can be selected can only be the music file in the terminal local or video application, and the video image in the playing video is often not related to the played music, and the music is simply added to the playing video.
  • the music played in the playing video is not sufficiently appealing in terms of hearing and visual, and the interactive way of simply selecting the music to play in the field of video live broadcasting cannot effectively improve the interaction enthusiasm between the viewer and the anchor, and is insufficient to satisfy the live video.
  • the demand which in turn affects the user's experience satisfaction.
  • the prior art texture application can usually simply add a user-selected texture to the video image, and the texture display mode is single, failing to fully mobilize the user.
  • the interaction with the application the user has less fun in the shooting process, and the user experience satisfaction is not high.
  • an embodiment of the present invention provides a video image processing method, including: acquiring a music signal of music to be played in a play video, detecting a beat point of the music according to the music signal; determining to play When playing music in the video, a beat point appears at the current play position; the special effect corresponding to the beat point is acquired; and the image in the play video is processed according to the special effect to obtain a video image including the special effect.
  • an embodiment of the present invention provides a video image processing method, including the steps of: identifying an audio feature of a sound in a play video; downloading, from a server, a music matching the audio feature and a beat point of the music The effect of playing the music in the play video, determining that a beat point occurs at a current play position of the music; processing the image in the play video according to the determined effect corresponding to the beat point, and obtaining the special effect Video image.
  • an embodiment of the present invention provides a video image processing method, including the steps of: acquiring a music signal of music to be played in a play video; determining whether a beat point and a music play for saving the music are pre-stored.
  • a beat point description file of the correspondence of the position if yes, acquiring the beat point description file; if not, detecting a beat point of the music according to the music signal, according to the detected beat point and the music play position Generating a beat point description file; determining, according to the beat point description file, that a beat point appears at a current play position when playing music in the play video; acquiring an effect corresponding to the beat point; and playing the video according to the special effect
  • the image is processed to obtain a video image containing the effect.
  • an embodiment of the present invention provides a music gift processing method in a live video broadcast, comprising: receiving a music gift sent by a viewer in a live video; the music gift includes music to be played in a live video; a music signal of the music, detecting a beat point of the music according to the music signal; determining to play a beat point in a current play position when playing the music in the music present in a live video; acquiring the beat point corresponding to The special effect; processing the image in the live video according to the special effect, and obtaining a live video of the video including the special effect.
  • an embodiment of the present invention provides a texture processing method for a video image, including the steps of: acquiring an image in a playback video, adding a texture to the image; and acquiring music of a music to be played in the played video. a signal, detecting a beat point of the music according to the music signal; determining that a beat point occurs at a current play position when playing music in the play video; acquiring a texture effect corresponding to the beat point; according to the map effect The texture in the image is processed to obtain a video image containing the texture effect.
  • an embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the program is executed by the processor, the first aspect, the second aspect, and the first The method of the third aspect, the fourth aspect or the fifth aspect.
  • an embodiment of the present invention provides a terminal, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory And configured to be executed by the one or more processors, the one or more programs configured to: the method of the first aspect, the second aspect, the third aspect, the fourth aspect, or the fifth aspect.
  • the invention has the following beneficial effects:
  • the video image processing method provided by the present invention performs beat point detection on music to be played in a play video, and displays the beat point corresponding to the beat point in the video image according to the detected beat point during the music playing process.
  • Special effects so that the special effects displayed on the video image are closely related to the beat point of the selected video playing music, thereby improving the audio and the visual appeal of the music played in the video, increasing the interest of the video application and improving User experience satisfaction.
  • the beat point of the selected video playing music is quickly and accurately detected; and the present invention can select the type of the desired beat point according to the type of the special effect required by the video and the type of the music.
  • the method of detecting the beat point to achieve an accurate beat point by using an appropriate method, and can reduce the amount of calculation, shorten the detection time, and further ensure that the special effect displayed on the video image is close to the beat point of the selected video playing music. Relevance.
  • the video image processing method provided by the present invention can know the music that the user wants to play by recognizing the sound in the playing video, and the music played by the user in the playing video is no longer limited to the existing music file, and can be hummed.
  • the song segment quickly acquires the corresponding music, and then displays the corresponding special effect in the video image according to the beat point of the music during the music playing process, thereby realizing playing the music in the playing video and obtaining the special effect corresponding to the music beat point.
  • Video image expands the way of acquiring music, and can quickly and conveniently obtain the music to be played, the interaction between the user and the video application is strong, and the special effect displayed on the video image is closely related to the beat point of the music obtained through the sound input.
  • the music to be played in the live video can be confirmed by recognizing the humming sound of the anchor or the viewer, which can meet the needs of the live broadcast, highlight the live atmosphere, promote the interaction between the anchor and the viewer, and further increase the video. The fun of the app.
  • the video image processing method, the computer readable storage medium, and the terminal provided by the present invention obtain the beat point corresponding to the beat point description file by acquiring the beat point description file of the music or intelligently generating the beat point description file according to the music signal.
  • the special effect is to make the special effects displayed on the video image closely related to the beat point of the selected video playing music, thereby improving the visual and visual appeal of the music played in the video, and increasing the interest of the video application.
  • the music gift processing method provided by the present invention performs beat point detection on music in a music gift sent by the viewer to the anchor, and displays the beat point corresponding to the beat point in the video image according to the detected beat point during the playing process.
  • Special effects so that the special effects displayed on the video image are closely related to the beat points of the music selected by the viewer, thereby improving the auditory and visual appeal of the music played in the live video; and by playing the music with the anchor and the viewer
  • the combination of gift giving behavior enriches the interaction between the viewer and the anchor in the live video broadcast, significantly improves the interaction enthusiasm between the viewer and the anchor, effectively highlights the live broadcast atmosphere, meets the demand for live video, and increases the interest of the live video application.
  • the texture processing method of the video image provided by the present invention by adding a texture to the video image, performing beat point detection on the music to be played in the played video, and according to the detected beat point during the music playing process Displaying the texture effect corresponding to the beat point in the video image, so that the texture effect displayed on the video image is closely related to the beat point of the selected video playing music, and the music played in the playing video and the displayed texture are improved.
  • Hearing and visual appeal; and users can express their own personality through custom-set music, texture and texture effects and can edit and play personalized video in real time. This method satisfies the user's personalized video design needs. To increase the fun of video applications and the interactivity of apps and users.
  • FIG. 1 is a flowchart of a method for processing a video image according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for processing a video image according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for processing a video image according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for processing a music gift according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for mapping a video image according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the embodiment of the invention provides a video image processing method. As shown in FIG. 1 , the method includes:
  • Step S101 Acquire a music signal of music to be played in the played video, and detect a beat point of the music according to the music signal.
  • the music to be played in the playing video may be the music selected from the pre-stored music of the video application, or the music loaded in the video application may be selected from the pre-stored music of the user terminal, and
  • the live music played by the other device is obtained by the microphone in the video application, and the source of the music is not limited in this embodiment.
  • the action of acquiring the music signal is performed after the user selects the music to be played in the playing video, and the action of selecting the music may be performed before the video is played, or may be performed in the playing video.
  • the music when applied to the field of video live broadcast, the music may be selected before the live broadcast of the video or in the live broadcast of the video, and the terminal may immediately acquire the music signal of the selected music, and detect the beat of the music according to the music signal. point.
  • the music is selected before the video is played, that is, before the video is recorded, and after the selected music, the terminal immediately acquires the music signal of the selected music, and according to the music signal. A beat point of the music is detected.
  • the beat point of the music detected according to the music signal may be implemented by using various beat point detection methods.
  • the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
  • the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
  • Step S102 When it is determined that the music is played in the playing video, a beat point appears at the current playing position.
  • each beat point detected in step S101 corresponds to a different play position of the music.
  • the music is played in the play video, if the current play position of the music corresponds to the beat point detected in step S101, it is determined. Whether the beat point is a strong beat point or a weak beat point.
  • Step S103 Acquire an effect corresponding to the beat point.
  • the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment.
  • Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment.
  • the beat point in a piece of music includes a strong beat point and a weak beat point
  • the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
  • Step S104 Processing an image in the played video according to the special effect to obtain a video image including the special effect.
  • the video in the effect is obtained by acquiring the material in the special effect and synthesizing the material and the image in the play video in a layer superposition manner to obtain a video image including the material in the special effect.
  • the video image including the special effect may be obtained by integrating data of the special effect with the image or modifying the image according to the shape characteristic parameter of the material in the special effect.
  • data of the effect data can be integrated with the image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video image containing the special effect.
  • the image may be scaled according to the parameter by obtaining the shape feature parameter of the material in the special effect to obtain a video image that can achieve the effect of the special effect.
  • the video image processing method provided by the embodiment performs beat point detection on the music to be played in the played video, and displays the special effect corresponding to the beat point in the video image according to the detected beat point during the music playing process.
  • the special effects displayed on the video image closely related to the beat point of the selected video playing music, thereby increasing the audio and visual appeal of the music played in the video, increasing the interest of the video application and improving the user experience. Satisfaction.
  • the video image processing method provided in this embodiment combines multiple beat point detection methods to quickly and accurately detect the beat point of the selected video playing music, further ensuring the special effects displayed on the video image and the selected video.
  • the beat points of playing music are closely related to further improve the satisfaction of the user experience.
  • Step S101 includes:
  • the candidate beat point is obtained according to the energy intensity value of the music signal, and the time interval between frames of each adjacent two candidate beat points is counted according to each candidate beat point, and the detection is performed according to the time interval. A strong beat point appears at the detection point corresponding to the candidate beat point;
  • the candidate beat point is obtained according to the energy variation difference of the music signal of the detection point, and according to the candidate beat point, two adjacent music beat signals are taken as the signal starting point of each adjacent two candidate beat points. According to the consistent result of the two pieces of music signals, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points;
  • the music signal is weighted to obtain a weighted music signal, and according to the energy intensity value of the weighted music signal, a strong beat point or a weak beat point is detected at the detection point;
  • the music signal is filtered, and after filtering, the short-time Fourier transform is performed to obtain a spectrum, and according to the spectrum, the energy change value of the detection point is determined, and according to the energy change value, the weak beat of the detection point is detected. Point or strong candidate beat points.
  • different beat point detection methods are corresponding for different types of required detection beat points and detection criteria.
  • the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
  • Get the type of special effect required for the video judge whether to detect strong beat points according to the type of special effects required by the video, or detect strong beat points and weak beat points;
  • the intensity value detection or the change value detection is used, including:
  • the type of the music is acquired, and whether the intensity value or the change value is used is determined according to the type;
  • the intensity value or the change value is detected, including:
  • the type of the music is acquired, and whether the intensity value or the change value is detected is determined according to the type.
  • the type of the desired beat point is determined by the type of the effect required for the acquired video.
  • the effect type required for the video is the default effect type selected by the user or the video application. For example, the user wants to have endless effects in the playing video, so it is judged according to the type of special effect required by the video that both the strong beat point and the weak beat point are detected.
  • the detection criteria are judged by the type of music acquired.
  • the type of music acquired is rock, and the music signal of the music type tends to have a high intensity value, but the change value is not obvious, so the beat point of the music is detected by detecting the intensity value according to the type thereof.
  • the type of the desired beat point can be selected according to the type of the special effect required by the video, and then the method of detecting the desired beat point can be selected according to the type of the music, so as to obtain an accurate beat point by using an appropriate method. Moreover, the amount of calculation can be reduced, the detection time is shortened, and the special effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby further improving the satisfaction of the user experience.
  • step S101 the method further includes: recording a correspondence between the music playing position and the beat point.
  • the beat point of the music is detected according to the music signal
  • the beat point is associated with the corresponding music play position, and the corresponding relationship is recorded.
  • the method for establishing the corresponding relationship is not limited in this embodiment, and may be a manner of adding label information.
  • the signal data of the music playing position corresponding to the beat point is added with tag information, and the tag information carries information indicating that the music playing position has a beat point and the beat point is a strong beat point or a weak beat point.
  • Step S102 includes: determining, according to the correspondence, that a beat point occurs at a current play position when playing music in the play video.
  • the correspondence record of the music play position and the beat point is acquired, and the corresponding relationship is extracted, and then according to the The correspondence determines that a beat point occurs at the current play position and determines that the beat point is a strong beat point or a weak beat point.
  • the embodiment by recording the correspondence between the music playing position and the beat point, it is possible to easily and quickly determine whether the current playing position has a beat point and whether the beat point is a strong beat point or a weak beat point.
  • the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
  • the method further includes:
  • Step S103 includes: obtaining an effect corresponding to the beat point from the obtained special effects group.
  • the material of the special effects of the special effect group is the same, but the shape characteristic parameters of the material are different.
  • the specified effect group may be specified by the anchor or user of the live broadcast, and the specified effect group corresponds to the anchor live broadcast feature of the anchor, for example, the live broadcast of the anchor is performed by an animation.
  • the theme, and the anchor pre-specifies the use of the animation effect-themed effect group, so the special effects displayed in the live video of the live broadcast are obtained from the specified effect group.
  • the scenario corresponding to the live broadcast may be determined by extracting scene features corresponding to the location, weather, and landscape, such as a cafe, a sunny outdoor, a seaside, etc., and is not performed in this embodiment. limited.
  • the effect group matching the scene has a correlation with the scene feature of the scene.
  • the preset number is a value greater than or equal to 2, which may be a value of 3, 5, 6, etc., which is not limited in this embodiment.
  • the type of music includes rock, pop, and the like, and the type of the music is determined according to the acquired beat point of the music.
  • step S104 the method further includes:
  • the video image processing method provided by the present invention is applied to the field of live video, by selecting special effects according to the anchor intention, the type of music, and the will of the viewer, the requirements of the live broadcast can be met, the live broadcast atmosphere can be enhanced, and the interaction between the anchor and the audience can be better promoted. Improve user satisfaction.
  • the embodiment of the invention provides a video image processing method. As shown in FIG. 2, the method includes:
  • Step S201 Identify an audio feature of the sound in the played video.
  • Step S202 Download, from the server, the music that matches the audio feature and the special effect corresponding to the beat point of the music.
  • the manner in which the user acquires the music to be played in the played video is no longer limited to selecting the existing music file in the terminal or the video application, but by identifying the sound in the played video, and then determining the matching.
  • the music corresponding to the sound is downloaded from the server to realize the acquisition of the music to be played.
  • the terminal captures the sound in the played video and extracts the audio feature of the sound, and then sends the audio feature to the server, so that the server performs the audio feature with the music in the preset music library that it holds.
  • the matching is traversed to determine the music corresponding to the audio characteristics of the sound.
  • the sound may be a sound emitted by the user in the playing video, or may be a sound emitted by other terminal devices.
  • the terminal before performing an action of recognizing the audio feature of the sound in the played video, it is also necessary to determine whether the user transmits the audio feature recognition request. For example, when the user triggers the listening song function key of the video application interface, the terminal begins to perform the action of recognizing the audio feature of the sound in the playing video.
  • the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment.
  • Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment.
  • the beat point in a piece of music includes a strong beat point and a weak beat point, and the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
  • the special effect corresponding to the beat point of the music downloaded from the server in step 202 refers to the material of the different shape feature parameters corresponding to the strong beat point and the weak beat point of the music respectively, wherein the special effect may be the user advance Setting the special effect corresponding to the music may also be a default effect corresponding to the music by the server.
  • Step S203 playing the music in the play video, and determining that a beat point occurs at a current play position of the music.
  • whether the beat point occurs in the current play position of the music may be determined according to the corresponding relationship, and the beat is determined. Whether the point is a strong beat or a weak beat.
  • Step S204 Processing an image in the played video according to the determined special effect corresponding to the beat point to obtain a video image including the special effect.
  • the material in the special effect corresponding to the beat point downloaded from the server in step S202 is acquired, and the material in the play video is synthesized in a layer superposition manner to obtain A video image containing the material in the effect.
  • the obtaining of the video image including the special effect may also be implemented by integrating the special effect with the image data or modifying the image according to the shape characteristic parameter of the material in the special effect.
  • data of the effect data can be integrated with the image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video image containing the special effect.
  • the image may be scaled according to the parameter by obtaining the shape feature parameter of the material in the special effect to obtain a video image that can achieve the effect of the special effect.
  • the video image processing method provided by the present invention can know the music that the user wants to play by recognizing the sound in the playing video, and the music played by the user in the playing video is no longer limited to the existing music file, and can be quickly sung by the sing song piece.
  • the corresponding music is obtained, and then the corresponding special effect is displayed in the video image according to the beat point of the music during the music playing, thereby realizing playing the music in the playing video and obtaining a video image containing the special effect corresponding to the music beat point.
  • the method expands the way of acquiring music, and can quickly and conveniently obtain the music to be played, the interaction between the user and the video application is strong, and the special effect displayed on the video image is closely related to the beat point of the music obtained through the sound input. This improves the visual and visual appeal of the music played in the video, significantly increasing the interest of the video application and increasing user experience satisfaction.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
  • the method further includes:
  • the determining that a beat point occurs at a current play position of the music includes:
  • the music play position and the beat point recorded in the beat point description file are acquired.
  • Corresponding relationship determines that a beat point occurs at a current play position of the music, and may also determine whether the beat point is a strong beat point or a weak beat point.
  • the use of the beat point description file can achieve the corresponding relationship quickly and conveniently, and the video image containing the special effect corresponding to the music beat point can be further obtained after a very short file loading time, thereby further improving the user experience satisfaction. degree.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
  • the method further includes:
  • the determining that a beat point occurs at a current play position of the music includes:
  • the beat point of the music detected according to the music signal may be implemented by using various beat point detection methods.
  • the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
  • the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
  • the correspondence between the music playing position and the beat point can be confirmed by detecting the beat point in real time, and the plurality of beat point detecting methods can quickly and accurately detect the beat point of the music corresponding to the sound in the played video, and then Obtaining a video image containing special effects corresponding to the music beat point can further improve user experience satisfaction.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
  • the strong beat point it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point.
  • two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
  • the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal.
  • the energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum.
  • the energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
  • different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
  • the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
  • the type of special effect required for the video judge whether to detect the strong beat point according to the type of special effect required by the video, or detect the strong beat point and the weak beat point; if the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used, including: Detecting a strong beat point, obtaining the type of the music, determining whether to use the intensity value detection or the change value detection according to the type; if detecting the strong beat point and the weak beat point, determining whether to use the intensity value detection or the change value detection, including: if detecting The strong beat point and the weak beat point acquire the type of the music, and determine whether to use the intensity value detection or the change value detection according to the type.
  • the type of the desired beat point can be determined by the type of the effect required for the acquired video.
  • the effect type required for the video is the default effect type selected by the user or the video application. For example, the user wants to have endless effects in the playing video, so it is judged according to the type of special effect required by the video that both the strong beat point and the weak beat point are detected.
  • the detection criteria can be determined by acquiring the type of music corresponding to the sound.
  • the type of music corresponding to the acquired sound is rock, and the music signal of the music type often has a high intensity value, but the change value is not obvious, so according to the type thereof, the beat of the music is detected by detecting the intensity value. point.
  • the type of the desired beat point and the method of detecting the beat point can be selected according to the type of the special effect required for the video and the type of the music, so as to obtain an accurate beat point by using an appropriate method, and the amount of calculation can be reduced. , shortening the detection time, further ensuring the close relationship between the special effects displayed on the video image and the music beat point, and further improving the satisfaction of the user experience.
  • the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
  • the step S201 includes:
  • the method further includes:
  • the interaction between the anchor and the viewer is added in the live video.
  • the viewer can send the audience to the live broadcast in addition to the common interactive behaviors such as speaking, praising and giving gifts.
  • Sing a song request After the anchor sings a song request by a certain viewer, the viewer client and the live terminal perform a connection, and the live broadcast end receives the singer voice of the viewer in the live video and extracts the audio feature of the voice, and then the The audio features are sent to the server to cause the server to traverse the audio features in the preset music library with which they are stored, thereby determining the music corresponding to the audio features of the viewer's humming sound.
  • the audience can obtain the opportunity for the audience to sing songs by paying.
  • the anchor can also give the sing-song opportunity as a gift to the audience in the live room.
  • the program can meet the needs of the live broadcast, highlight the live atmosphere, and significantly increase the anchor and The interaction between viewers further increases the fun of video applications.
  • the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
  • the step S201 includes:
  • the interactive song of the anchor and the viewer is added to the live video, and the anchor can quickly and easily acquire the music corresponding to the humming voice by humming after sending the humming download song command.
  • the live end receives the humming sound of the anchor in the live video and extracts the audio features of the sound, and then sends the audio feature to the server, so that the server matches the audio feature with the music in the preset music library A traversal match is made to determine the music corresponding to the audio characteristics of the anchor's humming sound.
  • the anchor can select the song with the highest audience voice during the live broadcast of the video according to the viewer's barrage information, so as to play the music in the live video and present the video image containing the special effect corresponding to the music beat point, the solution can satisfy the live broadcast.
  • Demand, highlighting the live broadcast atmosphere significantly increase the interaction between the anchor and the viewer, further increasing the fun of video applications.
  • the embodiment of the invention provides a video image processing method. As shown in FIG. 3, the method includes:
  • Step S301 Acquire a music signal of music to be played in the played video.
  • the music to be played in the playing video may be music selected from pre-stored music in the video application, or may be selected from the pre-stored music of the user terminal to be loaded into the video application, and may also be The live music played by the other device is obtained by the microphone in the video application, and the source of the music is not limited in this embodiment.
  • the action of acquiring the music signal is performed after the user selects the music to be played in the playing video, and the action of selecting the music may be performed before the video is played, or may be performed in the playing video.
  • the music when applied to the field of video live broadcast, the music may be selected before the live broadcast of the video or in the live broadcast of the video, and the terminal will immediately acquire the music signal of the selected music and perform subsequent preset steps.
  • the music is selected before the video is played, that is, before the video is recorded, and the terminal immediately acquires the music signal of the selected music after the selected music, and performs subsequent preset steps.
  • Step S302 determining whether a beat point description file for preserving a correspondence relationship between a beat point of the music and a music play position is prestored; if yes, acquiring the beat point description file; if not, detecting the sound according to the music signal The beat point of the music generates a beat point description file according to the corresponding relationship between the detected beat point and the music play position.
  • the present invention uses a beat point description file to determine the correspondence between the beat point of the music and the music play position.
  • determining whether a beat point description file for storing a correspondence relationship between a beat point of the music and a music play position is pre-stored; if yes, acquiring the beat point description file; comprising: determining whether a beat point is pre-stored in the local file a description file, if yes, obtaining the beat point description file from a local file; or determining whether the server pre-stores a beat point description file, and if so, downloading the beat point description file from the server; or determining whether the local file is pre-stored There is a beat point description file, and if so, the beat point description file is obtained from the local file; if not, it is determined whether the server pre-stores the beat point description file, and if so, the beat point description file is downloaded from the server.
  • the beat point description file may be obtained from a local file or may be obtained from a server, and the user may also try to obtain a beat point description file from the server after the local acquisition fails.
  • the existing beat point description file when the existing beat point description file is not obtained, it is necessary to intelligently generate a beat point description file according to the music signal, specifically, detecting a beat point of the music according to the music signal, according to the The corresponding relationship between the detected beat point and the music playback position generates a beat point description file.
  • the beat point description file After the beat point description file is intelligently generated, the beat point description file may also be uploaded to the server for each user to download and use.
  • the detecting a beat point of the music according to the music signal may be implemented by using a plurality of beat point detecting methods.
  • the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
  • the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
  • Step S303 Determine, according to the beat point description file, that a beat point appears in the current play position when playing music in the play video.
  • the beat point description file records the correspondence between the beat point of the music and the music play position by using the information symbol that the terminal can read and understand, and when the music is played, by loading the beat point description file
  • the data is analyzed and the data is analyzed. According to the data analysis result, whether the beat point of the current playing position of the music is known or not, and whether the beat point is a strong beat point or a weak beat point is determined.
  • Step S304 Acquire an effect corresponding to the beat point; process the image in the play video according to the special effect to obtain a video image including the special effect.
  • the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment.
  • Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment.
  • the beat point in a piece of music includes a strong beat point and a weak beat point
  • the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
  • the video in the effect is obtained by acquiring the material in the special effect and synthesizing the material and the image in the play video in a layer superposition manner to obtain a video image including the material in the special effect.
  • the video image including the special effect may be obtained by integrating data of the special effect with the image or modifying the image according to the shape characteristic parameter of the material in the special effect.
  • data of the effect can be integrated with the image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video image containing the special effect.
  • the image may be scaled according to the parameter by obtaining the shape feature parameter of the material in the special effect to obtain a video image that can achieve the effect of the special effect.
  • the video image processing method provided by the present invention obtains a beat point description file of the music or intelligently generates a beat point description file according to the music signal, and obtains an effect corresponding to the beat point determined according to the beat point description file, so as to enable the special effect displayed on the video image. It is closely related to the beat point of the selected video playing music, thereby improving the visual and visual appeal of the music played in the video, increasing the interest of the video application and increasing the satisfaction of the user experience.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
  • the method further includes:
  • beat point description file is a beat point description file downloaded from the server, detecting a beat point of the music according to the music signal, and correcting the beat point description file according to the detected beat point, in the local file
  • the proof point description file after the proofreading is saved.
  • the beat point description file downloaded from the server stores the corresponding relationship between the beat point of the music and the music play position, but there may be a corresponding music in the beat point description file and the current music to be played is incomplete.
  • the user can intercept the selected music and choose to play the intercepted music piece in the playing video, while the beat point description file downloaded from the server corresponds to the entire music.
  • the correspondence between the beat point and the music playback position Therefore, it is necessary to proof the beat point description file according to the detected beat point, and save the proofed beat point description file in the local file for use by the end user.
  • the accuracy of the beat point description file can be ensured, thereby ensuring the accuracy of the correspondence between the beat point and the music playing position, and further ensuring the video image.
  • the associated effect of the displayed effect is related to the beat point of the selected video playback music.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
  • the detecting, in the step S302, the beat point of the music according to the music signal comprising:
  • the strong beat point it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point.
  • two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
  • the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal.
  • the energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum.
  • the energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
  • different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
  • the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
  • the type of special effect required for the video judge whether to detect the strong beat point according to the type of special effect required by the video, or detect the strong beat point and the weak beat point; if the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used, including: Detecting a strong beat point, obtaining the type of the music, determining whether to use the intensity value detection or the change value detection according to the type; if detecting the strong beat point and the weak beat point, determining whether to use the intensity value detection or the change value detection, including: if detecting The strong beat point and the weak beat point acquire the type of the music, and determine whether to use the intensity value detection or the change value detection according to the type.
  • the type of the desired beat point can be determined by the type of the effect required for the acquired video.
  • the effect type required for the video is the default effect type selected by the user or the video application. For example, the user wants to have endless effects in the playing video, so it is judged according to the type of special effect required by the video that both the strong beat point and the weak beat point are detected.
  • the detection criteria can be judged by the type of music acquired.
  • the type of music acquired is rock, and the music signal of the music type tends to have a high intensity value, but the change value is not obvious, so the beat point of the music is detected by detecting the intensity value according to the type thereof.
  • the type of the desired beat point and the method of detecting the beat point can be selected according to the type of the special effect required for the video and the type of the music, so as to obtain an accurate beat point by using an appropriate method, and the amount of calculation can be reduced.
  • the detection time is shortened, and the special effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby further improving the satisfaction of the user experience.
  • the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
  • the method further includes:
  • step S304 Obtaining the special effect corresponding to the beat point in step S304, including:
  • the beat point description file not only stores the correspondence between the beat point and the music play position, but also stores the corresponding relationship between the two and the special effect information.
  • the special effect information carries the material information that is randomly selected or customized by the user, and the shape characteristic parameter set for the material.
  • the definition of the material and its shape characteristic parameter refer to the content of step S104 in the first embodiment, where not Let me repeat.
  • the special effect information may also be set by a user watching the live broadcast, and the user may send a special effect setting request to the live broadcast terminal to implement the special effect setting.
  • the video image processing method provided by the present invention is applied to the field of live broadcast, and the special effect corresponding to the beat point of the custom setting by the beat point description file can be realized, which can meet the requirement of the live broadcast and further increase the interest of the video application. .
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
  • the method further includes:
  • the anchor of the current live broadcast end interacts with the anchor of another live broadcast during the live broadcast of the live broadcast, and the user watching the current broadcast of the active broadcast can simultaneously view the live broadcast of the interactive anchor.
  • the live broadcast atmosphere can be effectively enhanced, and the popularity value of the live broadcasts of each interactive live end can be improved, which can meet the needs of the live broadcast and further increase the interest of the video application.
  • the music gift processing method provided by the invention is mainly applied to the field of video live broadcasting.
  • the anchor in order to activate the atmosphere and increase the interaction with the audience in the live broadcast, the anchor usually selects the music corresponding to the live broadcast theme of the live broadcast or the music with the highest audience in the live broadcast during the live broadcast. The audience will respond to the anchor by clicking, speaking or giving a gift.
  • the video image in the playing video is often not related to the played music.
  • the music is simply added to the playing video, and there is not enough appeal in the sense of hearing and visual, and the above interaction method is too single and cannot be effective. Increasing the enthusiasm of the audience and the anchor is not enough to meet the needs of live video.
  • the present invention combines the interactive behavior of the anchor playing music and the audience to give gifts, and provides a music gift processing method to achieve a significant improvement in the interaction between the viewer and the anchor and the satisfaction of the user experience.
  • the music gift processing method will be elaborated.
  • An embodiment of the present invention provides a music gift processing method. As shown in FIG. 4, the method includes:
  • Step S401 Receiving a music gift sent by a viewer in a live video broadcast; the music gift includes music to be played in a live video.
  • the viewer can interact with the anchor by sending a music gift to the anchor during the live video broadcast.
  • the music gift received by the live broadcast end carries music information, and the music corresponding to the music information is music selected by the viewer to be played by the anchor in the live video broadcast.
  • the music gift further includes special effect information corresponding to a beat point of the music.
  • the special effect information carries material information randomly set by the user terminal or user-defined, and shape characteristic parameters set for the material.
  • the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment.
  • Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment.
  • the beat point in a piece of music includes a strong beat point and a weak beat point, and the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
  • Step S402 Acquire a music signal of the music, and detect a beat point of the music according to the music signal.
  • the beat point is detected on the music, wherein the beat point of the music is detected according to the music signal. It can be implemented by a variety of beat point detection methods.
  • the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
  • the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
  • Step S403 When it is determined that the music in the music gift is played in the live video, a beat point appears at the current play position.
  • each beat point detected in step S402 corresponds to a different play position of the music.
  • the music is played in the live video, if the current play position of the music corresponds to the beat point detected in step S402, then it is determined. Whether the beat point is a strong beat point or a weak beat point.
  • Step S404 Acquire an effect corresponding to the beat point.
  • Step S405 Process the image in the live video broadcast according to the special effect, and obtain a live video of the video including the special effect.
  • the material of the different shape feature parameters of the special effect corresponding to the special effect information is obtained from the music gift, and the material is combined with the image in the live video broadcast in a layer overlay manner to obtain an inclusion A live video image of the special effects.
  • the method further includes: sending the processed live video of the video to the client.
  • the video live image including the special effect may be obtained by integrating data of the special effect with the image or modifying the image according to the shape characteristic parameter of the material in the special effect.
  • the data of the special effect can be integrated with the image data to obtain a live video image data package, and the data packet is sent to the client, so that the client displays the live video image of the video containing the special effect.
  • the image is scaled according to the parameter, and after the video live image that can achieve the special effect is obtained, the image is sent to the viewer client, so that the client displays the inclusion.
  • a live video of the effect is obtained.
  • the material corresponding to the random setting or the anchor custom setting of the live broadcast may be obtained as the special effect corresponding to the beat point.
  • the music gift processing method provided by the present invention performs beat point detection on the music in the music gift sent by the viewer to the anchor, and displays the special effect corresponding to the beat point in the video image according to the detected beat point during the playing process.
  • the special effects displayed on the live video of the video closely related to the beat points of the music in the music gift, thereby improving the auditory and visual appeal of the music played in the live video broadcast; and sending the gift to the audience by playing the music with the anchor.
  • the combination of behaviors enriches the interaction between the viewer and the anchor in the live video broadcast, significantly improves the interaction enthusiasm between the viewer and the anchor, effectively highlights the live broadcast atmosphere, meets the demand for live video, and increases the interest of the live video application, improving the user. Satisfaction of experience.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
  • the method further includes: generating a beat point description file according to the detected correspondence between the beat point and the music playing position.
  • step S403 includes: determining, according to the beat point description file, that a beat point occurs at a current play position when the music in the music gift is played in a live video.
  • a beat point description file is used to determine the correspondence between the beat point of the music and the music play position.
  • the beat point description file records the correspondence between the beat point of the music and the music play position by using the information symbol that the terminal can read and understand, and when the music is played, the data in the file is described by loading the beat point and the data is Perform analysis, according to the data analysis result, whether the beat point of the current playing position of the music is known, and whether the beat point is a strong beat point or a weak beat point.
  • the correspondence between the beat point and the music playing position can be quickly and conveniently obtained through the beat point description file after a very short file loading time, thereby satisfying the demand of the live video, and further improving the user experience satisfaction.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
  • the method further includes: acquiring the special effect information, and saving the corresponding relationship between the beat point and the music playing position and the special effect information to the beat In the point description file; generate a beat point description file containing the effect information.
  • the step S404 includes: acquiring, according to the beat point description file containing the special effect information, the special effect corresponding to the beat point from the music gift.
  • the beat point description file not only stores the correspondence between the beat point and the music play position, but also stores the corresponding relationship between the two and the special effect information.
  • the special effect information carries the material information that is randomly selected or customized by the user, and the shape characteristic parameter that is set for the material. For the specific definition, refer to the content of step S401 in the first embodiment, and details are not described herein again.
  • the beat point description file can quickly and conveniently obtain the special effect corresponding to the beat point of the current music playing position, which satisfies the requirement of the live video, and can further improve the user experience satisfaction. degree.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
  • the method further includes:
  • Determining whether the anchor of the live end performs a preset action of opening the music gift if yes, continuing the step of acquiring the music signal of the music, detecting a beat point of the music according to the music signal; and transmitting the The audience of the music gift feedbacks the anchor to open the information of the music gift.
  • the anchor in a live video application scenario, there are usually multiple viewers simultaneously sending music presents to the anchor, and since the live broadcast time is limited, the anchor often cannot open all the music gifts, so the music beat point detection is performed. Before the subsequent preset steps, you need to determine if the anchor wants to open the currently received music gift.
  • the preset action performed by the anchor may be that the preset password is spoken in the live video, or the preset expression or gesture may be made in the live video, and the displayed on the display may also be clicked. Music gift logo.
  • the music gift appears in the form of a list.
  • the anchor says the password of “opening the eighth music gift”
  • the live terminal performs voice recognition on the password, and obtains the corresponding correspondence in the music gift list according to the recognition result.
  • the music gift appears in the form of a barrage.
  • the live broadcast terminal determines the anchor instruction to open the currently popped music gift according to the gesture recognition result of the live video image. And then get the music signal in the music gift and perform subsequent preset steps.
  • the music gift appears in the form of gift rain at a preset time.
  • the live terminal receives the instruction of the anchor click terminal display to trigger one of the music gifts, the live terminal immediately acquires the music gift. Music signals and perform subsequent preset steps.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
  • the step S402 includes:
  • the strong beat point it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point.
  • two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
  • the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal.
  • the energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum.
  • the energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
  • different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
  • the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
  • the special effect information in the music gift determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point according to the special effect information; if detecting the strong beat point, determining whether to use the intensity value detection or the change value detection, including If the strong beat point is detected, the type of the music is obtained, and the intensity value detection or the change value detection is used according to the type judgment; if the strong beat point and the weak beat point are detected, whether the intensity value detection or the change value detection is used, including: If a strong beat point and a weak beat point are detected, the type of the music is acquired, and whether the intensity value detection or the change value detection is used is determined according to the type.
  • the type of the desired beat point can be determined by acquiring the special effect information in the music gift. For example, in the music gift sent to the live end, the viewer sets the shape feature parameters of the material for the strong beat point and the weak beat point respectively, and the user wants to see the corresponding beat point when the music gift is opened in the live video broadcast. Cool special effects, so according to the special effects information of the viewer's custom settings, it is judged that both the strong beat point and the weak beat point are detected.
  • the detection criteria can be judged by acquiring the type of music in the music gift. For example, the type of music in the acquired music gift is rock, and the music signal of the music type often has a high intensity value, but the change value is not obvious, so the music value is detected by detecting the intensity value according to the type selection. The beat point.
  • the type of the desired beat point and the method of detecting the beat point can be selected according to the special effect information and the type of the music in the music gift, so as to obtain an accurate beat point by using an appropriate method, and the operation can be reduced.
  • the quantity, shorten the detection time, further ensure the close relationship between the special effects displayed on the video image and the music beat point, and further improve the satisfaction of the user experience.
  • An embodiment of the present invention provides a mapping processing method for a video image. As shown in FIG. 5, the method includes:
  • Step S501 Acquire an image in the played video, and add a texture to the image.
  • the texture may be a two-dimensional model map based on AR augmented reality, or may be a three-dimensional model map based on AR augmented reality.
  • the AR is an augmented reality technology that combines and displays real world information and virtual world information. Through augmented reality technology, an image based on AR augmented reality is added to the image in the playing video, and the real world image and the computer virtual image in the playing video can be superimposed on the same screen to realize information integration of the real world and the virtual world. Interaction.
  • the texture may be a material such as a fireworks, a love, a snowflake, or the like used as a background-like texture, or may be a material such as a corner, a beard, or a glasses used as a face decoration type map, and the specific performance of the material.
  • the added map in the play video image can be user-defined settings, or it can be set by the video application by default. After determining the texture, the terminal performs scene recognition on the image in the played video, and then adds a texture to the corresponding position of the video image.
  • Step S502 Acquire a music signal of music to be played in the played video, and detect a beat point of the music according to the music signal.
  • the music to be played in the playing video may be music selected from pre-stored music in the video application, or may be selected from the pre-stored music of the user terminal to be loaded into the video application, and may also be The live music played by the other device is obtained by the microphone in the video application, and the source of the music is not limited in this embodiment.
  • the action of acquiring the music signal is performed after the user selects the music to be played in the playing video, and the action of selecting the music may be performed before the video is played, or may be performed in the playing video.
  • the music when applied to the field of video live broadcast, the music may be selected before the live broadcast of the video or in the live broadcast of the video, and the terminal may immediately acquire the music signal of the selected music, and detect the beat of the music according to the music signal. point.
  • the music is selected before the video is played, that is, before the video is recorded, and after the selected music, the terminal immediately acquires the music signal of the selected music, and according to the music signal. A beat point of the music is detected.
  • the beat point of the music detected according to the music signal may be implemented by using various beat point detection methods.
  • the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
  • the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
  • the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
  • Step S503 When it is determined that the music is played in the playing video, a beat point appears at the current playing position.
  • each beat point detected in step S502 corresponds to a different play position of the music.
  • the music is played in the live video, if the current play position of the music corresponds to the beat point detected in step S502, then it is determined. Whether the beat point is a strong beat point or a weak beat point.
  • Step S504 Acquire a texture effect corresponding to the beat point.
  • the texture effect refers to a texture state when the texture corresponds to different shape feature parameters.
  • the material in the map may be set with different shape feature parameters, and the shape feature parameters include a state parameter, a size parameter, a color parameter, and the like, which are not limited in this embodiment.
  • the beat point in a piece of music generally includes a strong beat point and a weak beat point, and the material in the texture effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
  • the texture selected by the user is a three-dimensional model of the bear, and different shape feature parameters are set for the strong beat point and the weak beat point for the texture.
  • the beat point is strong, the three-dimensional model of the bear dances in the video image has a large dance frequency. The dance frequency of dancing is lower at weak beats.
  • Step S505 Processing a texture in the image according to the texture effect to obtain a video image including the texture effect.
  • the material in which the shape parameter is set in the texture effect is obtained, and the material is combined with the image in the play video in a layer superposition manner to obtain the texture effect.
  • the video image including the texture effect may be obtained by integrating data of the texture effect with the image or modifying the image according to the shape characteristic parameter of the material in the texture effect.
  • data of the texture effect can be integrated with the live video image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video containing the texture effect. image.
  • the image may be scaled according to the shape feature parameter to obtain a video image that can achieve the effect of the special effect.
  • the method for mapping a video image adds a texture to a video image, performs beat point detection on the music to be played in the played video, and displays the video image according to the detected beat point during the music playing process.
  • the texture effect corresponding to the beat point is displayed, so that the texture effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby improving the music played in the playing video and the displayed texture in the auditory and visual
  • This method satisfies the user's personalized play video design needs and increases the video.
  • the interest of the app and the interactivity of the app and the user significantly increase the satisfaction of the user experience.
  • the method for mapping a video image provided by the present invention can quickly and accurately detect the beat point of the selected video playing music, further ensuring the texture effect and selected on the video image.
  • the beat of the video playback music is closely related to further improve the satisfaction of the user experience.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
  • the method further includes: recording a correspondence between the music playing position and the beat point.
  • the beat point of the music is detected according to the music signal
  • the beat point is associated with the corresponding music play position, and the corresponding relationship is recorded.
  • the method for establishing the corresponding relationship is not limited in this embodiment, and may be a manner of adding label information.
  • the signal data of the music playing position corresponding to the beat point is added with tag information, and the tag information carries information indicating that the music playing position has a beat point and the beat point is a strong beat point or a weak beat point.
  • the step S503 includes: determining, according to the correspondence, that a beat point occurs at a current play position when playing music in the play video.
  • the correspondence record of the music play position and the beat point is acquired, and the corresponding relationship is extracted, and then according to the The correspondence determines that a beat point occurs at the current play position and determines that the beat point is a strong beat point or a weak beat point.
  • the embodiment by recording the correspondence between the music playing position and the beat point, it is possible to easily and quickly determine whether the current playing position has a beat point and whether the beat point is a strong beat point or a weak beat point.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
  • the step S501 includes:
  • the texture is mainly a face decoration type map, such as a corner, a beard, a glasses, and the like, and the terminal performs face recognition on the image in the played video, thereby adding a map to the corresponding position of the face in the video image.
  • the face area selected in the play video is added with virtual ear, beard and other textures, and the texture will move along with the user's face to realize the combination and interaction of virtual and reality.
  • the user can express his own personality by custom setting texture and texture effect and can edit and play the video of the personalized image design in real time, satisfying the user's personalized image design requirement and increasing the interest of the video application. And the interaction of the application with the user, significantly improving the satisfaction of the user experience.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
  • the method further includes:
  • a texture switching instruction can be issued to the terminal to switch the texture to the texture material that he likes.
  • the manner of the indication map switching may be a voice indication, an action indication, and an input indication, which is not limited in this embodiment.
  • the terminal when the switching of the texture is indicated by voice, the terminal first acquires the sound in the played video, and recognizes the audio feature of the sound, and then switches the audio feature to the preset texture, such as “switching”, The audio features of the passwords such as "change” are matched. If the matching is consistent, it is confirmed that the texture switching instruction is received and the texture is switched.
  • the terminal when the switching of the map is instructed by the operation, the terminal first recognizes the person region in the image, and detects the motion of the person in the person region, and if a preset texture switching operation is detected in the person region, If the action of "hand waving” or “shaking the head” is performed, it is confirmed that the texture switching instruction is received and the texture is switched.
  • the user when inputting to indicate the switching of the texture, the user can switch the current texture by simply re-entering another image in the video application.
  • the user can switch the texture according to his or her own wishes conveniently and quickly, further increasing the interest of the video application and the interaction between the application and the user, and significantly improving the satisfaction of the user experience.
  • the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
  • the method further includes:
  • the anchor can obtain the live video of the video including the map by performing a preset add map request during the live broadcast of the video.
  • the manner in which the request is added to the map may be a voice request, an action request, and an input request, and is not limited in this embodiment.
  • the terminal when requesting to add a texture by voice, the terminal first acquires the sound in the played video, and recognizes the audio feature of the sound, and then adds the audio feature to the preset added texture password, such as “map”, “ The audio features of the passwords are matched, and if the matches are consistent, the texture is added to the image of the played video.
  • the preset added texture password such as “map”, “ The audio features of the passwords are matched, and if the matches are consistent, the texture is added to the image of the played video.
  • the terminal when an action is requested to add a map, the terminal first recognizes a person region in the image, and detects a person motion in the person region, and if a preset texture switching action is detected in the person region, such as Adding a map to the image of the played video, such as "being heart” and "flying kiss”.
  • the texture may also be selected by a viewer in the live video room, or the anchor may select the hottest texture according to the wishes of the viewer in the live video broadcast.
  • the method can meet the requirements of the live broadcast, highlight the live broadcast atmosphere, and better promote the interaction between the anchor and the audience, and further improve the satisfaction of the user experience.
  • Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
  • the step S502 includes:
  • the strong beat point it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point.
  • two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
  • the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal.
  • the energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum.
  • the energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
  • different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
  • the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
  • the type of texture effect required for the video judge whether to detect the strong beat point according to the type of texture effect required by the video, or detect the strong beat point and the weak beat point; if the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used, including If the strong beat point is detected, the type of the music is obtained, and the intensity value detection or the change value detection is used according to the type judgment; if the strong beat point and the weak beat point are detected, whether the intensity value detection or the change value detection is used, including: If a strong beat point and a weak beat point are detected, the type of the music is acquired, and whether the intensity value detection or the change value detection is used is determined according to the type.
  • the type of the desired beat point can be determined by the type of texture effect required for the acquired video.
  • the type of texture effect required for the video is the default effect type selected by the user or the video application. For example, the user wants to have an endless layer of texture effects in the playback video, so it is judged that the strong beat point is detected and the weak beat point is detected according to the type of texture effect required for the video.
  • the detection criteria are judged by the type of music acquired.
  • the type of music acquired is rock, and the music signal of the music type tends to have a high intensity value, but the change value is not obvious, so the beat point of the music is detected by detecting the intensity value according to the type thereof.
  • the type of the desired beat point and the method of detecting the beat point can be selected according to the type of the texture effect and the type of the music required by the video, so as to obtain an accurate beat point by using an appropriate method, and the operation can be reduced.
  • the amount, shorten the detection time, further ensure the close relationship between the texture effect displayed on the video image and the music beat point, and further improve the satisfaction of the user experience.
  • an embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the program is executed by the processor, the video image processing method according to the first embodiment is implemented, or an embodiment The video image processing method according to the second embodiment, or the video image processing method according to the third embodiment, or the music gift processing method in the live video broadcast according to the fourth embodiment, or the texture processing method of the video image according to the fifth embodiment .
  • the computer readable storage medium includes, but is not limited to, any type of disk (including a floppy disk, a hard disk, an optical disk, a CD-ROM, and a magneto-optical disk), a ROM (Read-Only Memory), and a RAM (Random Access).
  • the storage device includes any medium that stores or transmits information in a readable form by a device (eg, a computer, a mobile phone), and may be a read only memory, a magnetic disk, an optical disk, or the like.
  • a computer readable storage medium provided by the embodiment of the present invention can perform beat point detection on music to be played in a play video, and display the video image in the music image according to the detected beat point.
  • the effect corresponding to the beat point, so that the special effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby increasing the visual and visual appeal of the music played in the video, and increasing the video application.
  • the computer readable storage medium provided by the present invention can also implement a combination of multiple beat point detection methods to quickly and accurately detect the beat point of the selected video playing music; and can select the special effect type and music according to the video.
  • Type to select the type of beat point to be detected and the method of detecting the beat point, so as to achieve an accurate method to obtain accurate beat points, and reduce the amount of calculation, shorten the detection time, and further ensure the special effects and images displayed on the video image.
  • the beat points of the selected video playing music are closely related to further improve the satisfaction of the user experience.
  • the computer readable storage medium provided by the present invention is applied to the field of live video, it is also possible to select a special effect according to the anchor intention, the type of music, and the will of the viewer, thereby meeting the requirements of the live broadcast, highlighting the live broadcast atmosphere, and better promoting the anchor. Interact with the audience to further improve the satisfaction of the user experience.
  • the computer-readable storage medium provided by the embodiment of the present invention may implement the foregoing method embodiments.
  • the embodiment of the present invention further provides a terminal.
  • the terminal may include one or more processors 601, and further includes a memory 602, a WiFi (Wireless Fidelity) circuit 603, RF (Radio Frequency) circuit 604, audio circuit 605, sensor 606, output device 607, input device 604, power supply 609, and processor 601 are control centers of the terminals, and the above components are connected by various interfaces and lines.
  • WiFi Wireless Fidelity
  • RF Radio Frequency
  • audio circuit 605 sensor 606, output device 607, input device 604, power supply 609, and processor 601 are control centers of the terminals, and the above components are connected by various interfaces and lines.
  • the terminal structure shown in FIG. 6 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • the WiFi circuit 603 can provide the user with wireless local area network or internet access; it can include an antenna, a WiFi module, and the like.
  • the RF circuitry 604 can transmit and receive information, or receive and transmit signals during a call; it can include an antenna, at least one amplifier, a tuner, one or more oscillators, a coupler, a duplexer, and the like.
  • the audio circuit 605 can convert the received audio data into an electrical signal for transmission to a speaker, and can also convert the sound signal collected by the microphone into audio data for processing by the processor 601; it can set a speaker, a microphone, a headphone interface, and the like.
  • the sensor 606 can be used to sense an external signal and send it to the processor 601 for processing; it can include a motion sensor, a light sensor, and the like.
  • the output device 607 can be used to display various signals; the display panel can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • Input device 604 can be used to input information such as numbers and characters; it can be a physical button, a touch panel, or the like.
  • the power supply 609 can provide power to various portions of the terminal and is logically coupled to the processor 609 via a power management system; it can include one or more components such as a DC or AC power source, a charging system, a power status indicator, and the like.
  • the memory 602 can be used to store software programs and modules; it can be a computer readable storage medium, specifically a hard disk, a flash memory, or the like.
  • the processor is the control center of the terminal, and performs various functions of the terminal and processes the terminal data by running or executing software programs and/or modules stored in the memory 602, and calling data stored in the memory 602.
  • the terminal includes: one or more processors 601, a memory 602, one or more applications, wherein the one or more applications are stored in the memory 602 and configured to be configured by the one or
  • the plurality of processors 601 are configured to perform the video image processing method according to the first embodiment, or the video image processing method according to the second embodiment, or the video according to the third embodiment.
  • the terminal provided by the embodiment of the invention can perform the beat point detection on the music to be played in the played video, and display the beat point corresponding to the beat point in the video image according to the detected beat point during the music playing process.
  • Special effects so that the special effects displayed on the video image are closely related to the beat point of the selected video playing music, thereby improving the audio and the visual appeal of the music played in the video, increasing the interest of the video application and improving User experience satisfaction.
  • the terminal provided by the present invention can implement a combination of multiple beat point detection methods to quickly and accurately detect the beat point of the selected video playing music; and can select according to the type of special effect required by the video and the type of music.
  • the type of beat point and the method of detecting the beat point are detected to achieve an accurate beat point by using an appropriate method, and the amount of calculation can be reduced, the detection time is shortened, and the effect displayed on the video image and the selected video play are further ensured.
  • the beat points of the music are closely related to further improve the satisfaction of the user experience.
  • the terminal provided by the present invention when applied to the field of live video, it can realize the special effects according to the anchor intention, the type of music, and the will of the viewer, and can meet the requirements of the live broadcast, highlight the live broadcast atmosphere, and better promote the interaction between the anchor and the viewer. Further improve the satisfaction of the user experience.
  • the terminal provided by the embodiment of the present invention may implement the foregoing method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Studio Circuits (AREA)

Abstract

The present invention provides a video image processing method, said method comprising: obtaining a music signal of music which is desired to be played in a playback video, and measuring a beat point of said music according to said music signal; determining that when music is played in the playback video, a beat point appears at a current playback position; obtaining a special effect corresponding to said beat point; processing an image in the playback video according to said special effect, and obtaining a video image containing the special effect. The video image processing method provided by the present invention achieves a close association between a special effect displayed on a video image and a beat point of a selected video playing music, and thus increases the aural and visual appeal of the music played in the video, thereby increasing the interestingness of a video application and raising the user's level of satisfaction with the experience.

Description

视频图像处理方法及计算机存储介质、终端Video image processing method and computer storage medium, terminal 技术领域Technical field
本发明涉及图像处理技术领域,具体而言,本发明涉及一种视频图像处理方法。The present invention relates to the field of image processing technologies, and in particular, to a video image processing method.
背景技术Background technique
随着互联网技术以及音频、图像处理技术的不断发展,在短视频、视频直播等视频应用领域中,通常会在播放视频中播放音乐,所播放的音乐可由用户选定,以给予用户在观看视频过程中的听觉享受,进而提高用户的体验满意度。With the continuous development of Internet technology and audio and image processing technologies, in video applications such as short video and live video, music is usually played in the played video, and the played music can be selected by the user to give the user a video. The auditory enjoyment in the process, thereby improving the user experience satisfaction.
然而,传统技术中,可选择的音乐通常只能是终端本地的或视频应用中的音乐文件,播放视频中的视频图像与所播放的音乐往往没有关联性,音乐仅是简单的加入到播放视频中,在播放视频中播放的音乐在听觉以及视觉上没有足够的感染力,且在视频直播领域中简单地选取音乐进行播放的互动方式无法有效提高观众与主播的互动积极性,不足于满足视频直播的需求,进而影响了用户的体验满意度。However, in the conventional technology, the music that can be selected can only be the music file in the terminal local or video application, and the video image in the playing video is often not related to the played music, and the music is simply added to the playing video. Among them, the music played in the playing video is not sufficiently appealing in terms of hearing and visual, and the interactive way of simply selecting the music to play in the field of video live broadcasting cannot effectively improve the interaction enthusiasm between the viewer and the anchor, and is insufficient to satisfy the live video. The demand, which in turn affects the user's experience satisfaction.
而相应于在视频拍摄时在视频图像中添加贴图的拍摄方式,现有技术的贴图应用,通常只能简单地在视频图像上添加用户选定的贴图,贴图展示方式单一,未能充分调动用户与应用之间的互动性,用户在拍摄过程中获得的乐趣较少,用户体验满意度不高。Corresponding to the shooting method of adding a texture to a video image during video shooting, the prior art texture application can usually simply add a user-selected texture to the video image, and the texture display mode is single, failing to fully mobilize the user. The interaction with the application, the user has less fun in the shooting process, and the user experience satisfaction is not high.
发明内容Summary of the invention
为克服以上技术问题,特别是现有技术无法实现播放视频中视频图像与所播放音乐紧密关联的问题,特提出以下技术方案:In order to overcome the above technical problems, in particular, the prior art cannot realize the problem that the video image in the playing video is closely related to the played music, and the following technical solutions are proposed:
第一方面,本发明的实施例提供了一种视频图像处理方法,包括:获取欲在播放视频中播放的音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点;确定在播放视频中播放音乐时,在当前播放位置出现节拍点;获取所述节拍点对应的特效;根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。In a first aspect, an embodiment of the present invention provides a video image processing method, including: acquiring a music signal of music to be played in a play video, detecting a beat point of the music according to the music signal; determining to play When playing music in the video, a beat point appears at the current play position; the special effect corresponding to the beat point is acquired; and the image in the play video is processed according to the special effect to obtain a video image including the special effect.
第二方面,本发明的实施例提供了一种视频图像处理方法,包括如下步骤:识别播放视频中声音的音频特征;从服务器下载与所述音频特征匹配的音乐和所述音乐的节拍点对应的特效;在所述播放视频中播放所述音乐,确定在所述音乐的当前播放位置出现节拍点;根据所确定的节拍点对应的特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。In a second aspect, an embodiment of the present invention provides a video image processing method, including the steps of: identifying an audio feature of a sound in a play video; downloading, from a server, a music matching the audio feature and a beat point of the music The effect of playing the music in the play video, determining that a beat point occurs at a current play position of the music; processing the image in the play video according to the determined effect corresponding to the beat point, and obtaining the special effect Video image.
第三方面,本发明的实施例提供了一种视频图像处理方法,包括如下步骤:获取欲在播放视频中播放的音乐的音乐信号;判断是否预存有用于保存所述音乐的节拍点与音乐播放位置的对应关系的节拍点描述文件;若是,获取所述节拍点描述文件;若否,根据所述音乐信号检测出所述音乐的节拍点,根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件;根据所述节拍点描述文件,确定在播放视频中播放音乐时,在当前播放位置出现节拍点;获取所述节拍点对应的特效;根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。In a third aspect, an embodiment of the present invention provides a video image processing method, including the steps of: acquiring a music signal of music to be played in a play video; determining whether a beat point and a music play for saving the music are pre-stored. a beat point description file of the correspondence of the position; if yes, acquiring the beat point description file; if not, detecting a beat point of the music according to the music signal, according to the detected beat point and the music play position Generating a beat point description file; determining, according to the beat point description file, that a beat point appears at a current play position when playing music in the play video; acquiring an effect corresponding to the beat point; and playing the video according to the special effect The image is processed to obtain a video image containing the effect.
第四方面,本发明的实施例提供了一种视频直播中的音乐礼物处理方法,包括:在视频直播中接收观众发送的音乐礼物;所述音乐礼物包括欲在视频直播中播放的音乐;获取所述音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点;确定在视频直播中播放所述音乐礼物中的音乐时,在当前播放位置出现节拍点;获取所述节拍点对应的特效;根据所述特效对视频直播中的图像进行处理,获得包含所 述特效的视频直播图像。In a fourth aspect, an embodiment of the present invention provides a music gift processing method in a live video broadcast, comprising: receiving a music gift sent by a viewer in a live video; the music gift includes music to be played in a live video; a music signal of the music, detecting a beat point of the music according to the music signal; determining to play a beat point in a current play position when playing the music in the music present in a live video; acquiring the beat point corresponding to The special effect; processing the image in the live video according to the special effect, and obtaining a live video of the video including the special effect.
第五方面,本发明的实施例提供了一种视频图像的贴图处理方法,包括如下步骤:获取播放视频中的图像,在所述图像中增加贴图;获取欲在播放视频中播放的音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点;确定在播放视频中播放音乐时,在当前播放位置出现节拍点;获取所述节拍点对应的贴图特效;根据所述贴图特效对所述图像中的贴图进行处理,获得包含所述贴图特效的视频图像。In a fifth aspect, an embodiment of the present invention provides a texture processing method for a video image, including the steps of: acquiring an image in a playback video, adding a texture to the image; and acquiring music of a music to be played in the played video. a signal, detecting a beat point of the music according to the music signal; determining that a beat point occurs at a current play position when playing music in the play video; acquiring a texture effect corresponding to the beat point; according to the map effect The texture in the image is processed to obtain a video image containing the texture effect.
第六方面,本发明的实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现上述第一方面、第二方面、第三方面、第四方面或第五方面所述的方法。In a sixth aspect, an embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the program is executed by the processor, the first aspect, the second aspect, and the first The method of the third aspect, the fourth aspect or the fifth aspect.
第七方面,本发明的实施例提供了一种终端,其包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于:第一方面、第二方面、第三方面、第四方面或第五方面所述的方法。In a seventh aspect, an embodiment of the present invention provides a terminal, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory And configured to be executed by the one or more processors, the one or more programs configured to: the method of the first aspect, the second aspect, the third aspect, the fourth aspect, or the fifth aspect.
本发明与现有技术相比,具有以下有益效果:Compared with the prior art, the invention has the following beneficial effects:
(1)本发明提供的视频图像处理方法,通过对欲在播放视频中播放的音乐进行节拍点检测,并在音乐播放过程中根据所检测到的节拍点在视频图像中显示该节拍点对应的特效,以使视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联,进而以提高在视频中播放的音乐在听觉以及视觉上的感染力,增加视频应用的趣味性并提高用户体验的满意度。进一步地,结合多个节拍点检测方法,实现快速、准确地检测出所选定视频播放音乐的节拍点;且本发明可根据视频所需特效类型和音乐的类型来选择所需检测节拍点的类型以及检测节拍点的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联性。(1) The video image processing method provided by the present invention performs beat point detection on music to be played in a play video, and displays the beat point corresponding to the beat point in the video image according to the detected beat point during the music playing process. Special effects, so that the special effects displayed on the video image are closely related to the beat point of the selected video playing music, thereby improving the audio and the visual appeal of the music played in the video, increasing the interest of the video application and improving User experience satisfaction. Further, in combination with a plurality of beat point detecting methods, the beat point of the selected video playing music is quickly and accurately detected; and the present invention can select the type of the desired beat point according to the type of the special effect required by the video and the type of the music. And the method of detecting the beat point to achieve an accurate beat point by using an appropriate method, and can reduce the amount of calculation, shorten the detection time, and further ensure that the special effect displayed on the video image is close to the beat point of the selected video playing music. Relevance.
(2)本发明提供的视频图像处理方法,通过识别播放视频中的声音,可获知用户欲播放的音乐,用户在播放视频中播放的音乐不再局限于现有的音乐文件,可通过哼唱歌曲片段快速获取对应的音乐,继而在音乐播放过程中根据音乐的节拍点在视频图像中显示相应的特效,进而实现在播放视频中播放该音乐并获得包含与所述音乐节拍点对应的特效的视频图像。该方法扩展了获取音乐的方式,可实现快速便捷地获取欲播放的音乐,用户与视频应用的互动性强,且视频图像上显示的特效与该通过声音输入获取的音乐的节拍点紧密关联,进而提高了在视频中播放的音乐在听觉以及视觉上的感染力,显著增加了视频应用的趣味性并提高了用户体验满意度。进一步地,在应用于直播领域时,可通过识别主播或观众的哼唱声音确认欲在直播视频中播放的音乐,能够满足直播的需求,烘托直播氛围,促进主播与观众的互动,进一步增加视频应用的趣味性。(2) The video image processing method provided by the present invention can know the music that the user wants to play by recognizing the sound in the playing video, and the music played by the user in the playing video is no longer limited to the existing music file, and can be hummed. The song segment quickly acquires the corresponding music, and then displays the corresponding special effect in the video image according to the beat point of the music during the music playing process, thereby realizing playing the music in the playing video and obtaining the special effect corresponding to the music beat point. Video image. The method expands the way of acquiring music, and can quickly and conveniently obtain the music to be played, the interaction between the user and the video application is strong, and the special effect displayed on the video image is closely related to the beat point of the music obtained through the sound input. This improves the visual and visual appeal of the music played in the video, significantly increasing the interest of the video application and increasing user experience satisfaction. Further, when applied to the real-time field, the music to be played in the live video can be confirmed by recognizing the humming sound of the anchor or the viewer, which can meet the needs of the live broadcast, highlight the live atmosphere, promote the interaction between the anchor and the viewer, and further increase the video. The fun of the app.
(3)本发明提供的视频图像处理方法、计算机可读存储介质及终端,通过获取音乐的节拍点描述文件或根据音乐信号智能生成节拍点描述文件,获得根据节拍点描述文件确定的节拍点对应的特效,以使视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联,进而提高在视频中播放的音乐在听觉及视觉上的感染力,增加视频应用的趣味性。(3) The video image processing method, the computer readable storage medium, and the terminal provided by the present invention obtain the beat point corresponding to the beat point description file by acquiring the beat point description file of the music or intelligently generating the beat point description file according to the music signal. The special effect is to make the special effects displayed on the video image closely related to the beat point of the selected video playing music, thereby improving the visual and visual appeal of the music played in the video, and increasing the interest of the video application.
(4)本发明提供的音乐礼物处理方法,通过对观众发送给主播的音乐礼物中 的音乐进行节拍点检测,并在播放过程中根据所检测到的节拍点在视频图像中显示该节拍点对应的特效,以使视频图像上显示的特效与观众选定的音乐的节拍点紧密关联,进而以提高在视频直播中播放的音乐在听觉以及视觉上的感染力;且通过将主播播放音乐与观众送礼物的行为相结合,丰富了视频直播中观众与主播的互动方式,显著提高了观众与主播的互动积极性,有效烘托直播氛围,满足视频直播的需求,并增加了视频直播应用的趣味性。(4) The music gift processing method provided by the present invention performs beat point detection on music in a music gift sent by the viewer to the anchor, and displays the beat point corresponding to the beat point in the video image according to the detected beat point during the playing process. Special effects, so that the special effects displayed on the video image are closely related to the beat points of the music selected by the viewer, thereby improving the auditory and visual appeal of the music played in the live video; and by playing the music with the anchor and the viewer The combination of gift giving behavior enriches the interaction between the viewer and the anchor in the live video broadcast, significantly improves the interaction enthusiasm between the viewer and the anchor, effectively highlights the live broadcast atmosphere, meets the demand for live video, and increases the interest of the live video application.
(5)本发明提供的视频图像的贴图处理方法,通过在视频图像中增加贴图,并对欲在播放视频中播放的音乐进行节拍点检测,并在音乐播放过程中根据所检测到的节拍点在视频图像中显示该节拍点对应的贴图特效,以使视频图像上显示的贴图特效与所选定的视频播放音乐的节拍点紧密关联,提高了在播放视频中播放的音乐与显示的贴图在听觉以及视觉上的感染力;且用户可通过自定义设置的音乐、贴图以及贴图特效来表达自己的个性并可实时编辑获得个性化的播放视频,本方法满足了用户的个性化播放视频设计需求,增加视频应用的趣味性及应用与用户的互动性。(5) The texture processing method of the video image provided by the present invention, by adding a texture to the video image, performing beat point detection on the music to be played in the played video, and according to the detected beat point during the music playing process Displaying the texture effect corresponding to the beat point in the video image, so that the texture effect displayed on the video image is closely related to the beat point of the selected video playing music, and the music played in the playing video and the displayed texture are improved. Hearing and visual appeal; and users can express their own personality through custom-set music, texture and texture effects and can edit and play personalized video in real time. This method satisfies the user's personalized video design needs. To increase the fun of video applications and the interactivity of apps and users.
本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。The additional aspects and advantages of the invention will be set forth in part in the description which follows.
附图说明DRAWINGS
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from
图1为本发明实施例的一种视频图像处理方法的方法流程图;1 is a flowchart of a method for processing a video image according to an embodiment of the present invention;
图2为本发明实施例的另一种视频图像处理方法的方法流程图;2 is a flowchart of a method for processing a video image according to an embodiment of the present invention;
图3为本发明实施例的另一种视频图像处理方法的方法流程图;3 is a flowchart of a method for processing a video image according to an embodiment of the present invention;
图4为本发明实施例的一种音乐礼物处理方法的方法流程图;4 is a flowchart of a method for processing a music gift according to an embodiment of the present invention;
图5为本发明实施例的一种视频图像的贴图处理方法的方法流程图;FIG. 5 is a flowchart of a method for mapping a video image according to an embodiment of the present invention; FIG.
图6为本发明实施例的一种终端的结构示意图。FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
实施例一Embodiment 1
本发明实施例提供了一种视频图像处理方法,如图1所示,该方法包括:The embodiment of the invention provides a video image processing method. As shown in FIG. 1 , the method includes:
步骤S101、获取欲在播放视频中播放的音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点。Step S101: Acquire a music signal of music to be played in the played video, and detect a beat point of the music according to the music signal.
对于本实施例,所述欲在播放视频中播放的音乐可以是从视频应用的预存音乐中选定的音乐,也可以是从用户终端的预存音乐中选定加载于视频应用的音乐,还可以是在视频应用中通过麦克风获取的采用其他设备播放的现场音乐,所述音乐的来源在本实施例中不做限定。For the embodiment, the music to be played in the playing video may be the music selected from the pre-stored music of the video application, or the music loaded in the video application may be selected from the pre-stored music of the user terminal, and The live music played by the other device is obtained by the microphone in the video application, and the source of the music is not limited in this embodiment.
对于本实施例,所述获取音乐信号的动作执行于用户选定欲在播放视频中播放的音乐之后,而选定所述音乐的动作可在播放视频前执行,也可在播放视频中执行。For the embodiment, the action of acquiring the music signal is performed after the user selects the music to be played in the playing video, and the action of selecting the music may be performed before the video is played, or may be performed in the playing video.
例如,应用于视频直播领域时,所述音乐可在视频直播前或视频直播中选定, 终端会随即获取所选定的音乐的音乐信号,并根据所述音乐信号检测出所述音乐的节拍点。For example, when applied to the field of video live broadcast, the music may be selected before the live broadcast of the video or in the live broadcast of the video, and the terminal may immediately acquire the music signal of the selected music, and detect the beat of the music according to the music signal. point.
又例如,应用于短视频的录制时,所述音乐在播放视频前,即视频录制前选定,在选定音乐后终端会立刻获取所选定的音乐的音乐信号,并根据所述音乐信号检测出所述音乐的节拍点。For another example, when applied to recording of a short video, the music is selected before the video is played, that is, before the video is recorded, and after the selected music, the terminal immediately acquires the music signal of the selected music, and according to the music signal. A beat point of the music is detected.
对于本实施例,所述根据所述音乐信号检测出所述音乐的节拍点可采用多种节拍点检测方法实现。For the embodiment, the beat point of the music detected according to the music signal may be implemented by using various beat point detection methods.
例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱;根据所述频谱,确定检测点的能量变化值;根据能量变化值,检测出检测点出现强节拍点或弱节拍点。For example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
又例如,对于节拍点检测本方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行加权处理,获得加权后的音乐信号;根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点。For another example, for the beat point detection method, the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据所述音乐信号的能量强度值获得候选节拍点;根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔;根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
再例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据检测点的音乐信号的能量变化差值,获得候选节拍点;根据所述候选节拍点,以各相邻两个候选节拍点作为信号起始点截取两段音乐信号;根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
步骤S102、确定在播放视频中播放音乐时,在当前播放位置出现节拍点。Step S102: When it is determined that the music is played in the playing video, a beat point appears at the current playing position.
对于本实施例,在步骤S101中检测到的各节拍点对应于所述音乐的不同播放位置,在播放视频中播放音乐时,若音乐当前播放位置对应有步骤S101检测出的节拍点,则确定该节拍点为强节拍点还是弱节拍点。For the present embodiment, each beat point detected in step S101 corresponds to a different play position of the music. When the music is played in the play video, if the current play position of the music corresponds to the beat point detected in step S101, it is determined. Whether the beat point is a strong beat point or a weak beat point.
步骤S103、获取所述节拍点对应的特效。Step S103: Acquire an effect corresponding to the beat point.
对于本实施例,所述特效可以为烟花、爱心、雪花等素材,所述素材的具体表现形式在本实施例中不做限定。同一素材可设置不同的外形特征参数,所述外形特征参数包括尺寸参数、颜色参数等,在本实施例中不做限定。For the embodiment, the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment. Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment.
对于本实施例,一首音乐中所述节拍点包括强节拍点和弱节拍点,所述强节拍点和弱节拍点对应的特效中的所述素材相同,但素材的外形特征参数不相同。For the embodiment, the beat point in a piece of music includes a strong beat point and a weak beat point, and the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
步骤S104、根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。Step S104: Processing an image in the played video according to the special effect to obtain a video image including the special effect.
对于本实施例,通过获取所述特效中的素材,并以图层叠加方式将所述素材与所述播放视频中的图像进行合成,得到包含所述特效中的素材的视频图像。在其他实施方式中,还可以采用将特效与图像进行数据整合或根据特效中素材的外形特征参数修改图像等其他方式实现获得所述包含所述特效的视频图像。For the embodiment, the video in the effect is obtained by acquiring the material in the special effect and synthesizing the material and the image in the play video in a layer superposition manner to obtain a video image including the material in the special effect. In other embodiments, the video image including the special effect may be obtained by integrating data of the special effect with the image or modifying the image according to the shape characteristic parameter of the material in the special effect.
例如,在视频直播领域中,可以将特效的数据与图像数据进行数据整合得到视频图像数据包,并将所述数据包发送至客户端,以使客户端显示包含该特效的视频图像。For example, in the field of live video broadcasting, data of the effect data can be integrated with the image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video image containing the special effect.
又例如,可以通过获取特效中素材的外形特征参数,根据所述参数对图像进行缩放处理,以获得可实现特效效果凸显的视频图像。For another example, the image may be scaled according to the parameter by obtaining the shape feature parameter of the material in the special effect to obtain a video image that can achieve the effect of the special effect.
本实施例提供的视频图像处理方法,通过对欲在播放视频中播放的音乐进行节拍点检测,并在音乐播放过程中根据所检测到的节拍点在视频图像中显示该节拍点对应的特效,以使视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联,进而以提高在视频中播放的音乐在听觉以及视觉上的感染力,增加视频应用的趣味性并提高用户体验的满意度。The video image processing method provided by the embodiment performs beat point detection on the music to be played in the played video, and displays the special effect corresponding to the beat point in the video image according to the detected beat point during the music playing process. In order to make the special effects displayed on the video image closely related to the beat point of the selected video playing music, thereby increasing the audio and visual appeal of the music played in the video, increasing the interest of the video application and improving the user experience. Satisfaction.
此外,本实施例提供的视频图像处理方法,结合多个节拍点检测方法,实现快速、准确地检测出所选定视频播放音乐的节拍点,进一步保证视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联性,进一步提高用户体验的满意度。In addition, the video image processing method provided in this embodiment combines multiple beat point detection methods to quickly and accurately detect the beat point of the selected video playing music, further ensuring the special effects displayed on the video image and the selected video. The beat points of playing music are closely related to further improve the satisfaction of the user experience.
本发明实施例的另一种可能的实现方式,在上述内容的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention, further comprising the following steps, where
步骤S101包括:Step S101 includes:
获取欲在播放视频中播放的音乐的音乐信号,判断检测强节拍点,还是检测强节拍点和弱节拍点;Obtaining a music signal of music to be played in the played video, determining whether to detect a strong beat point, or detecting a strong beat point and a weak beat point;
若检测强节拍点,判断采用强度值检测还是变化值检测;If the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used;
若采用强度值检测,根据所述音乐信号的能量强度值获得候选节拍点,根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔,根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点;If the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and the time interval between frames of each adjacent two candidate beat points is counted according to each candidate beat point, and the detection is performed according to the time interval. A strong beat point appears at the detection point corresponding to the candidate beat point;
若采用变化值检测,根据检测点的音乐信号的能量变化差值,获得候选节拍点,根据所述候选节拍点,以各相邻两个所述候选节拍点作为信号起始点截取两段音乐信号,根据两段音乐信号的对比一致结果,检测出候选节拍点对应检测点出现强节拍点;If the change value detection is used, the candidate beat point is obtained according to the energy variation difference of the music signal of the detection point, and according to the candidate beat point, two adjacent music beat signals are taken as the signal starting point of each adjacent two candidate beat points. According to the consistent result of the two pieces of music signals, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points;
若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测;If the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used;
若采用强度值检测,对所述音乐信号进行加权处理,获得加权后的音乐信号,根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点;If the intensity value detection is used, the music signal is weighted to obtain a weighted music signal, and according to the energy intensity value of the weighted music signal, a strong beat point or a weak beat point is detected at the detection point;
若采用变化值检测,对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱,根据所述频谱,确定检测点的能量变化值,根据能量变化值,检测出检测点出现弱节拍点或强候选节拍点。If the change value detection is used, the music signal is filtered, and after filtering, the short-time Fourier transform is performed to obtain a spectrum, and according to the spectrum, the energy change value of the detection point is determined, and according to the energy change value, the weak beat of the detection point is detected. Point or strong candidate beat points.
对于本实施例,针对不同的所需检测节拍点的类型以及检测标准,对应有不同的节拍点检测方法。For the present embodiment, different beat point detection methods are corresponding for different types of required detection beat points and detection criteria.
其中,所述判断检测强节拍点,还是检测强节拍点和弱节拍点,包括:Wherein, the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
获取视频所需特效类型,根据视频所需特效类型判断检测强节拍点,还是检测强节拍点和弱节拍点;Get the type of special effect required for the video, judge whether to detect strong beat points according to the type of special effects required by the video, or detect strong beat points and weak beat points;
所述若检测强节拍点,判断采用强度值检测还是变化值检测,包括:If the strong beat point is detected, it is determined whether the intensity value detection or the change value detection is used, including:
若检测强节拍点,获取所述音乐的类型,根据类型判断采用强度值还是变化值检测;If a strong beat point is detected, the type of the music is acquired, and whether the intensity value or the change value is used is determined according to the type;
所述若检测强节拍点和弱节拍点,判断采用强度值还是变化值检测,包括:If the strong beat point and the weak beat point are detected, it is determined whether the intensity value or the change value is detected, including:
若检测强节拍点和弱节拍点,获取所述音乐的类型,根据类型判断采用强度值还是变化值检测。If a strong beat point and a weak beat point are detected, the type of the music is acquired, and whether the intensity value or the change value is detected is determined according to the type.
对于本实施例,是通过获取的视频所需特效类型来判断所需检测节拍点的类型。所述视频所需特效类型为用户选择的或视频应用默认的特效类型。例如,用户希望在播放视频中有层出不穷的特效,故根据其视频所需特效类型判断出既要检测强节拍点,也要检测弱节拍点。For the present embodiment, the type of the desired beat point is determined by the type of the effect required for the acquired video. The effect type required for the video is the default effect type selected by the user or the video application. For example, the user wants to have endless effects in the playing video, so it is judged according to the type of special effect required by the video that both the strong beat point and the weak beat point are detected.
对于本实施例,是通过获取的音乐的类型来判断检测标准。例如,所获取的音乐的类型为摇滚,该音乐类型的音乐信号往往都有很高的强度值,但其变化值不明显,故根据其类型选择通过检测强度值来检测该音乐的节拍点。For the present embodiment, the detection criteria are judged by the type of music acquired. For example, the type of music acquired is rock, and the music signal of the music type tends to have a high intensity value, but the change value is not obvious, so the beat point of the music is detected by detecting the intensity value according to the type thereof.
对于本实施例,可根据视频所需特效类型来选择所需检测节拍点的类型,进而根据音乐的类型来选择所需节拍点检测的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联性,进一步提高用户体验的满意度。For the present embodiment, the type of the desired beat point can be selected according to the type of the special effect required by the video, and then the method of detecting the desired beat point can be selected according to the type of the music, so as to obtain an accurate beat point by using an appropriate method. Moreover, the amount of calculation can be reduced, the detection time is shortened, and the special effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby further improving the satisfaction of the user experience.
本发明实施例的另一种可能的实现方式,在上述内容的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention, further comprising the following steps, where
在步骤S101之后,还包括:记录所述音乐播放位置与节拍点的对应关系。After step S101, the method further includes: recording a correspondence between the music playing position and the beat point.
对于本实施例,在根据所述音乐信号检测出所述音乐的节拍点之后,将所述节拍点与其对应的音乐播放位置建立对应关系,并记录所述对应关系。所述对应关系的建立方法在本实施例中不做限定,其可以是添加标签信息的方式。For the embodiment, after the beat point of the music is detected according to the music signal, the beat point is associated with the corresponding music play position, and the corresponding relationship is recorded. The method for establishing the corresponding relationship is not limited in this embodiment, and may be a manner of adding label information.
例如,在所述节拍点对应的音乐播放位置的信号数据添加标签信息,该标签信息携带有表示该音乐播放位置有节拍点且该节拍点为强节拍点或弱节拍点的信息。For example, the signal data of the music playing position corresponding to the beat point is added with tag information, and the tag information carries information indicating that the music playing position has a beat point and the beat point is a strong beat point or a weak beat point.
步骤S102包括:根据所述对应关系,确定在播放视频中播放音乐时,在当前播放位置出现节拍点。Step S102 includes: determining, according to the correspondence, that a beat point occurs at a current play position when playing music in the play video.
对于本实施例,在播放视频中播放音乐时在当前播放位置存在有与节拍点对应的记录时,获取所述音乐播放位置与节拍点的对应关系记录,提取所述对应关系,进而根据所述对应关系确定当前播放位置出现节拍点并确定该节拍点为强节拍点或弱节拍点。For the embodiment, when there is a record corresponding to the beat point in the current play position when the music is played in the play video, the correspondence record of the music play position and the beat point is acquired, and the corresponding relationship is extracted, and then according to the The correspondence determines that a beat point occurs at the current play position and determines that the beat point is a strong beat point or a weak beat point.
对于本实施例,通过记录所述音乐播放位置与节拍点的对应关系,可实现简单、快速地确定当前播放位置是否出现节拍点以及节拍点为强节拍点还是弱节拍点。For the embodiment, by recording the correspondence between the music playing position and the beat point, it is possible to easily and quickly determine whether the current playing position has a beat point and whether the beat point is a strong beat point or a weak beat point.
对于本实施例,所述视频为直播视频,即本实施例中的方法主要应用于视频直播领域。For the embodiment, the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
本发明实施例的另一种可能的实现方式,在上述内容的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention, further comprising the following steps, where
在步骤S103之前,还包括:Before step S103, the method further includes:
判断所述直播视频的直播间是否指定特效组;若是,获得指定的特效组;否则,获取直播间对应的场景,从直播服务器获取与所述场景匹配的当前直播服务器中热度最高的预置数量的特效组;Determining whether the special effect group is specified in the live broadcast of the live video; if yes, obtaining the specified effect group; otherwise, obtaining the scene corresponding to the live broadcast, and obtaining the preset number of the hottest server in the current live server matching the scene from the live server Special effects group;
判断所述直播间是否开启音乐类型自动适配特效功能;若是,识别出所述音乐的类型,从所述预置数量的特效组中获得所述类型适配的一个特效组;否则,向客户端发送从所述预置数量的特效组中选择特效组的请求;Determining whether the music type automatic adaptation special effect function is enabled in the live broadcast; if yes, identifying the type of the music, obtaining an effect group of the type adaptation from the preset number of special effect groups; otherwise, to the client Sending a request for selecting an effect group from the preset number of effect groups;
判断是否收到从客户端根据所述请求反馈的选择信息;若是,根据所述选择信息从所述预置数量的特效组中获得一个特效组,否则,从所述预置数量的特效组中随机获得一个特效组。Determining whether the selection information received from the client according to the request is received; if yes, obtaining an effect group from the preset number of effect groups according to the selection information, otherwise, from the preset number of special effect groups Randomly get a special effects group.
步骤S103包括:从所述获得的特效组中获取节拍点对应的特效。Step S103 includes: obtaining an effect corresponding to the beat point from the obtained special effects group.
对于本实施例,所述特效组的特效的素材相同,但素材的外形特征参数不相同。For the embodiment, the material of the special effects of the special effect group is the same, but the shape characteristic parameters of the material are different.
对于本实施例,所述指定的特效组可以由所述直播间的主播或用户指定,所述指定的特效组与所述主播的主播直播特征相对应,例如该主播的直播以某一动漫为主题,且该主播预先指定使用以该动漫为主题的特效组,故在该直播间的直播视频中显示的特效从该指定的特效组中获取。For the embodiment, the specified effect group may be specified by the anchor or user of the live broadcast, and the specified effect group corresponds to the anchor live broadcast feature of the anchor, for example, the live broadcast of the anchor is performed by an animation. The theme, and the anchor pre-specifies the use of the animation effect-themed effect group, so the special effects displayed in the live video of the live broadcast are obtained from the specified effect group.
对于本实施例,所述直播间对应的场景可以通过提取直播间对应的地点、天气、景观等场景特征确定,所述场景可以是咖啡馆、晴朗室外、海边等,在本实施例中不做限定。与所述场景匹配的特效组与所述场景的场景特征有相关性。For the embodiment, the scenario corresponding to the live broadcast may be determined by extracting scene features corresponding to the location, weather, and landscape, such as a cafe, a sunny outdoor, a seaside, etc., and is not performed in this embodiment. limited. The effect group matching the scene has a correlation with the scene feature of the scene.
对于本实施例,所述预置数量为大于等于2的数值,其可以是3、5、6等数值,在本实施例中不做限定。For the present embodiment, the preset number is a value greater than or equal to 2, which may be a value of 3, 5, 6, etc., which is not limited in this embodiment.
对于本实施例,所述音乐的类型包括摇滚、流行等,所述音乐的类型根据所获取的所述音乐的节拍点确定。For the present embodiment, the type of music includes rock, pop, and the like, and the type of the music is determined according to the acquired beat point of the music.
步骤S104之后,还包括:After step S104, the method further includes:
向客户端发送处理后的直播视频。Send the processed live video to the client.
本发明提供的视频图像处理方法应用于直播视频领域时,通过依次根据主播意愿、音乐类型、观众意愿选择特效,能够满足直播的要求,烘托直播氛围,且更好促进主播与观众的互动,进一步提高用户体验的满意度。When the video image processing method provided by the present invention is applied to the field of live video, by selecting special effects according to the anchor intention, the type of music, and the will of the viewer, the requirements of the live broadcast can be met, the live broadcast atmosphere can be enhanced, and the interaction between the anchor and the audience can be better promoted. Improve user satisfaction.
实施例二Embodiment 2
本发明实施例提供了一种视频图像处理方法,如图2所示,该方法包括:The embodiment of the invention provides a video image processing method. As shown in FIG. 2, the method includes:
步骤S201、识别播放视频中声音的音频特征。Step S201: Identify an audio feature of the sound in the played video.
步骤S202、从服务器下载与所述音频特征匹配的音乐和所述音乐的节拍点对应的特效。Step S202: Download, from the server, the music that matches the audio feature and the special effect corresponding to the beat point of the music.
对于本实施例,用户获取欲在播放视频中播放的音乐的方式不再局限于选取终端或视频应用中现有的音乐文件,而是通过对播放视频中的声音进行识别,进而匹配确定所述声音对应的音乐并从服务器中下载所述音乐,实现欲播放音乐的获取。具体地,终端录取播放视频中的声音并提取所述声音的音频特征,随后将所述音频特征发送至服务器,以使服务器把所述音频特征跟其保存有的预置音乐库中的音乐进行遍历匹配,进而确定所述声音的音频特征对应的音乐。其中,所述声音可以是用户在播放视频中发出的声音,也可以是其他终端设备外放的声音。For the embodiment, the manner in which the user acquires the music to be played in the played video is no longer limited to selecting the existing music file in the terminal or the video application, but by identifying the sound in the played video, and then determining the matching. The music corresponding to the sound is downloaded from the server to realize the acquisition of the music to be played. Specifically, the terminal captures the sound in the played video and extracts the audio feature of the sound, and then sends the audio feature to the server, so that the server performs the audio feature with the music in the preset music library that it holds. The matching is traversed to determine the music corresponding to the audio characteristics of the sound. The sound may be a sound emitted by the user in the playing video, or may be a sound emitted by other terminal devices.
对于本实施例,在进行识别播放视频中声音的音频特征的动作之前,还需要判断用户是否发送音频特征识别请求。例如,当用户触发视频应用界面的听歌识曲功能键时,终端才开始执行所述识别播放视频中声音的音频特征的动作。For the present embodiment, before performing an action of recognizing the audio feature of the sound in the played video, it is also necessary to determine whether the user transmits the audio feature recognition request. For example, when the user triggers the listening song function key of the video application interface, the terminal begins to perform the action of recognizing the audio feature of the sound in the playing video.
对于本实施例,所述特效可以为烟花、爱心、雪花等素材,所述素材的具体表现形式在本实施例中不做限定。同一素材可设置不同的外形特征参数,所述外形特征参数包括尺寸参数、颜色参数等,在本实施例中不做限定。此外,一首音乐中的所述节拍点包括强节拍点和弱节拍点,所述强节拍点和弱节拍点对应的特效中的所述素材相同,但素材的外形特征参数不相同。在步骤202中从服务器下载的所述音乐的节拍点对应的特效指的是所述音乐的强节拍点和弱节拍点分别对应的不同外形特征参数的素材,其中,所述特效可以是用户预先设置与所述音乐对应的特效,也可以是服务器默认的与所述音乐对应的特效。For the embodiment, the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment. Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment. In addition, the beat point in a piece of music includes a strong beat point and a weak beat point, and the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different. The special effect corresponding to the beat point of the music downloaded from the server in step 202 refers to the material of the different shape feature parameters corresponding to the strong beat point and the weak beat point of the music respectively, wherein the special effect may be the user advance Setting the special effect corresponding to the music may also be a default effect corresponding to the music by the server.
步骤S203、在所述播放视频中播放所述音乐,确定在所述音乐的当前播放位置出现节拍点。Step S203: playing the music in the play video, and determining that a beat point occurs at a current play position of the music.
对于本实施例,通过预先获取所述音乐播放位置与节拍点的对应关系,在播放视频中播放所述音乐时,可根据所述对应关系判断音乐当前播放位置是否出现节拍点,并确定该节拍点为强节拍点还是弱节拍点。For the present embodiment, when the music is played in the play video by pre-acquiring the corresponding relationship between the music play position and the beat point, whether the beat point occurs in the current play position of the music may be determined according to the corresponding relationship, and the beat is determined. Whether the point is a strong beat or a weak beat.
步骤S204、根据所确定的节拍点对应的特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。Step S204: Processing an image in the played video according to the determined special effect corresponding to the beat point to obtain a video image including the special effect.
对于本实施例,通过获取在步骤S202中从服务器下载的与该节拍点对应的所述特效中的素材,并以图层叠加方式将所述素材与所述播放视频中的图像进行合成,得到包含所述特效中的素材的视频图像。在其他实施方式中,还可以采用将特效与图像进行数据整合或根据特效中素材的外形特征参数修改图像等其他方式实现所述获得包含所述特效的视频图像。For the present embodiment, the material in the special effect corresponding to the beat point downloaded from the server in step S202 is acquired, and the material in the play video is synthesized in a layer superposition manner to obtain A video image containing the material in the effect. In other embodiments, the obtaining of the video image including the special effect may also be implemented by integrating the special effect with the image data or modifying the image according to the shape characteristic parameter of the material in the special effect.
例如,在视频直播领域中,可以将特效的数据与图像数据进行数据整合得到视频图像数据包,并将所述数据包发送至客户端,以使客户端显示包含该特效的视频图像。For example, in the field of live video broadcasting, data of the effect data can be integrated with the image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video image containing the special effect.
又例如,可以通过获取特效中素材的外形特征参数,根据所述参数对图像进行缩放处理,以获得可实现特效效果凸显的视频图像。For another example, the image may be scaled according to the parameter by obtaining the shape feature parameter of the material in the special effect to obtain a video image that can achieve the effect of the special effect.
本发明提供的视频图像处理方法,通过识别播放视频中的声音,可获知用户欲播放的音乐,用户在播放视频中播放的音乐不再局限于现有的音乐文件,可通过哼唱歌曲片段快速获取对应的音乐,继而在音乐播放过程中根据音乐的节拍点在视频图像中显示相应的特效,进而实现在播放视频中播放该音乐并获得包含与所述音乐节拍点对应的特效的视频图像。该方法扩展了获取音乐的方式,可实现快速便捷地获取欲播放的音乐,用户与视频应用的互动性强,且视频图像上显示的特效与该通过声音输入获取的音乐的节拍点紧密关联,进而提高了在视频中播放的音乐在听觉以及视觉上的感染力,显著增加了视频应用的趣味性并提高了用户体验满意度。The video image processing method provided by the present invention can know the music that the user wants to play by recognizing the sound in the playing video, and the music played by the user in the playing video is no longer limited to the existing music file, and can be quickly sung by the sing song piece. The corresponding music is obtained, and then the corresponding special effect is displayed in the video image according to the beat point of the music during the music playing, thereby realizing playing the music in the playing video and obtaining a video image containing the special effect corresponding to the music beat point. The method expands the way of acquiring music, and can quickly and conveniently obtain the music to be played, the interaction between the user and the video application is strong, and the special effect displayed on the video image is closely related to the beat point of the music obtained through the sound input. This improves the visual and visual appeal of the music played in the video, significantly increasing the interest of the video application and increasing user experience satisfaction.
本发明实施例的另一种可能的实现方式,在实施例二所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
所述步骤S203之前,还包括:Before the step S203, the method further includes:
从服务器下载记录所述音乐的音乐播放位置与节拍点的对应关系的节拍点描述文件;Downloading, from the server, a beat point description file that records a correspondence between a music playing position of the music and a beat point;
所述确定在所述音乐的当前播放位置出现节拍点,包括:The determining that a beat point occurs at a current play position of the music includes:
根据所述节拍点描述文件中的对应关系,确定在所述音乐的当前播放位置出现节拍点。Determining that a beat point occurs at a current play position of the music according to the correspondence in the beat point description file.
对于本实施例,通过从服务器下载预置的与所述音乐对应的节拍点描述文件,可在播放视频中播放音乐时,通过获取所述节拍点描述文件中记录的音乐播放位置与节拍点的对应关系来确定所述音乐的当前播放位置出现节拍点,且还可确定所述节拍点为强节拍点还是弱节拍点。采用节拍点描述文件可实现快速便捷地获得所述对应关系,只需在极短暂的文件加载时间后便可进一步获得包含与所述音乐节拍点对应的特效的视频图像,可进一步提高用户体验满意度。For the embodiment, by downloading the preset beat point description file corresponding to the music from the server, when the music is played in the play video, the music play position and the beat point recorded in the beat point description file are acquired. Corresponding relationship determines that a beat point occurs at a current play position of the music, and may also determine whether the beat point is a strong beat point or a weak beat point. The use of the beat point description file can achieve the corresponding relationship quickly and conveniently, and the video image containing the special effect corresponding to the music beat point can be further obtained after a very short file loading time, thereby further improving the user experience satisfaction. degree.
本发明实施例的另一种可能的实现方式,在实施例二所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
所述步骤S203之前,还包括:Before the step S203, the method further includes:
获取所述音乐的音乐信号;根据所述音乐信号检测出所述音乐的节拍点;记录所述音乐播放位置与节拍点的对应关系;Acquiring a music signal of the music; detecting a beat point of the music according to the music signal; recording a correspondence relationship between the music playing position and a beat point;
所述确定在所述音乐的当前播放位置出现节拍点,包括:The determining that a beat point occurs at a current play position of the music includes:
根据所述对应关系,确定在所述音乐的当前播放位置出现节拍点。Based on the correspondence, it is determined that a beat point occurs at a current play position of the music.
对于本实施例,所述根据所述音乐信号检测出所述音乐的节拍点可采用多种节拍点检测方法实现。For the embodiment, the beat point of the music detected according to the music signal may be implemented by using various beat point detection methods.
例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱;根据所述频谱,确定检测点的能量变化值;根据能量变化值,检测出检测点出现强节拍点或弱节拍点。For example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行加权处理,获得加权后的音乐信号;根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据所述音乐信号的能量强度值获得候选节拍点;根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔;根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
再例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据检测点的音乐信号的能量变化差值,获得候选节拍点;根据所述候选节拍点,以各相邻两个候选节拍点作为信号起始点截取两段音乐信号;根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
对于本实施例,可通过实时检测节拍点来确认音乐播放位置与节拍点的对应关系,多个节拍点检测方法均可实现快速、准确地检测出播放视频中声音对应的音乐的节拍点,继而获得包含与所述音乐节拍点对应的特效的视频图像,可进一步提高用户体验满意度。For the embodiment, the correspondence between the music playing position and the beat point can be confirmed by detecting the beat point in real time, and the plurality of beat point detecting methods can quickly and accurately detect the beat point of the music corresponding to the sound in the played video, and then Obtaining a video image containing special effects corresponding to the music beat point can further improve user experience satisfaction.
本发明实施例的另一种可能的实现方式,在实施例二所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
获取所述音乐信号,判断检测强节拍点,还是检测强节拍点和弱节拍点;Obtaining the music signal, determining whether to detect a strong beat point, or detecting a strong beat point and a weak beat point;
若检测强节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,根据所述音乐信号的能量强度值获得候选节拍点,根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔,根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点;若采用变化值检测,根据检测点的音乐信号的能量变化差值,获得候选节拍点,根据所述候选节拍点,以各相邻两个所述候选节拍点作为信号起始点截取两段音乐信号,根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点;If the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point. The time interval between the frames in which the points are located, according to the time interval, detecting that the candidate beat points corresponding to the detected points have strong beat points; if the change value detection is used, the candidate beat points are obtained according to the energy variation difference of the music signals of the detected points. According to the candidate beat point, two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,对所述音乐信号进行加权处理,获得加权后的音乐信号,根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点;若采用变化值检测,对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱,根据所述频谱,确定检测点的能量变化值,根据能量变化值,检测出检测点出现弱节拍 点或强候选节拍点;If the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal. The energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum. The energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
对于本实施例,针对不同的所需检测节拍点的类型以及检测标准,对应有不同的节拍检测方法。For the present embodiment, different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
其中,所述判断检测强节拍点,还是检测强节拍点和弱节拍点,包括:Wherein, the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
获取视频所需特效类型,根据视频所需特效类型判断检测强节拍点,还是检测强节拍点和弱节拍点;所述若检测强节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测;所述若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点和弱节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测。Obtain the type of special effect required for the video, judge whether to detect the strong beat point according to the type of special effect required by the video, or detect the strong beat point and the weak beat point; if the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used, including: Detecting a strong beat point, obtaining the type of the music, determining whether to use the intensity value detection or the change value detection according to the type; if detecting the strong beat point and the weak beat point, determining whether to use the intensity value detection or the change value detection, including: if detecting The strong beat point and the weak beat point acquire the type of the music, and determine whether to use the intensity value detection or the change value detection according to the type.
对于本实施例,可通过获取的视频所需特效类型来判断所需检测节拍点的类型的。所述视频所需特效类型为用户选择的或视频应用默认的特效类型。例如,用户希望在播放视频中有层出不穷的特效,故根据其视频所需特效类型判断出既要检测强节拍点,也要检测弱节拍点。For the present embodiment, the type of the desired beat point can be determined by the type of the effect required for the acquired video. The effect type required for the video is the default effect type selected by the user or the video application. For example, the user wants to have endless effects in the playing video, so it is judged according to the type of special effect required by the video that both the strong beat point and the weak beat point are detected.
对于本实施例,可通过获取声音对应的音乐的类型来判断检测标准的。例如,所获取声音对应的音乐的类型为摇滚,该音乐类型的音乐信号往往都有很高的强度值,但其变化值不明显,故根据其类型选择通过检测强度值来检测该音乐的节拍点。For the present embodiment, the detection criteria can be determined by acquiring the type of music corresponding to the sound. For example, the type of music corresponding to the acquired sound is rock, and the music signal of the music type often has a high intensity value, but the change value is not obvious, so according to the type thereof, the beat of the music is detected by detecting the intensity value. point.
对于本实施例,可根据视频所需特效类型和音乐的类型来选择所需检测节拍点的类型以及检测节拍点的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的特效与音乐节拍点的紧密关联性,进一步提高用户体验的满意度。For the present embodiment, the type of the desired beat point and the method of detecting the beat point can be selected according to the type of the special effect required for the video and the type of the music, so as to obtain an accurate beat point by using an appropriate method, and the amount of calculation can be reduced. , shortening the detection time, further ensuring the close relationship between the special effects displayed on the video image and the music beat point, and further improving the satisfaction of the user experience.
对于本实施例,所述视频为直播视频,即本实施例中的方法主要应用于视频直播领域。For the embodiment, the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
本发明实施例的另一种可能的实现方式,在实施例二所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
所述步骤S201,包括:The step S201 includes:
在直播视频中接收客户端发送的观众哼唱点歌请求;接收客户端发送的观众哼唱声音;识别所述观众哼唱声音的音频特征;Receiving, in the live video, a singer song request sent by the client; receiving a singer voice sent by the client; and identifying an audio feature of the singer voice of the viewer;
所述步骤S204之后,还包括:After the step S204, the method further includes:
向客户端发送处理后的视频图像。Send the processed video image to the client.
对于本实施例,在直播视频中增加了主播与观众的点歌互动环节,观众在观看直播视频过程中,除了发言、点赞和送礼物等常见互动行为以外,还可以向直播端发送观众哼唱点歌请求。在主播通过某一位观众的哼唱点歌请求后,该观众客户端与直播端进行连麦,直播端接收观众在视频直播中的哼唱声音并提取该声音的音频特征,随后将所述音频特征发送至服务器,以使服务器把所述音频特征跟其保存有的预置音乐库中的音乐进行遍历匹配,进而确定与观众的哼唱声音的音频特征对应的音乐。观众可通过付费来获得该观众哼唱点歌机会,主播也可将该哼唱点歌机会作为礼物赠送给直播间内的观众,该方案能够满足直播的需求,烘托直播氛围,显著增加主播与观众之间的互动,进一步增加视频应用的趣味性。For the embodiment, the interaction between the anchor and the viewer is added in the live video. In the process of watching the live video, the viewer can send the audience to the live broadcast in addition to the common interactive behaviors such as speaking, praising and giving gifts. Sing a song request. After the anchor sings a song request by a certain viewer, the viewer client and the live terminal perform a connection, and the live broadcast end receives the singer voice of the viewer in the live video and extracts the audio feature of the voice, and then the The audio features are sent to the server to cause the server to traverse the audio features in the preset music library with which they are stored, thereby determining the music corresponding to the audio features of the viewer's humming sound. The audience can obtain the opportunity for the audience to sing songs by paying. The anchor can also give the sing-song opportunity as a gift to the audience in the live room. The program can meet the needs of the live broadcast, highlight the live atmosphere, and significantly increase the anchor and The interaction between viewers further increases the fun of video applications.
对于本实施例,所述视频为直播视频,即本实施例中的方法主要应用于视频直播领域。For the embodiment, the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
本发明实施例的另一种可能的实现方式,在实施例二所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the second embodiment, where
所述步骤S201,包括:The step S201 includes:
在直播视频中接收主播发送的哼唱下载歌曲指令;接收主播发送的主播哼唱声音;识别所述主播哼唱声音的音频特征。Receiving a humming download song command sent by the anchor in the live video; receiving an anchor humming sound sent by the anchor; and identifying an audio feature of the anchor humming sound.
对于本实施例,在直播视频中增加了主播与观众的点歌互动环节,主播可以在发送哼唱下载歌曲指令之后通过哼唱方便快速地获取到与哼唱声音对应的音乐。直播端接收主播在视频直播中的哼唱声音并提取该声音的音频特征,随后将所述音频特征发送至服务器,以使服务器把所述音频特征跟其保存有的预置音乐库中的音乐进行遍历匹配,进而确定与主播的哼唱声音的音频特征对应的音乐。主播可以根据观众的弹幕信息选择哼唱视频直播期间观众呼声最高的歌曲,以实现在直播视频中播放该音乐并呈现包含所述音乐节拍点对应的特效的视频图像,该方案能够满足直播的需求,烘托直播氛围,显著增加主播与观众之间的互动,进一步增加视频应用的趣味性。For the embodiment, the interactive song of the anchor and the viewer is added to the live video, and the anchor can quickly and easily acquire the music corresponding to the humming voice by humming after sending the humming download song command. The live end receives the humming sound of the anchor in the live video and extracts the audio features of the sound, and then sends the audio feature to the server, so that the server matches the audio feature with the music in the preset music library A traversal match is made to determine the music corresponding to the audio characteristics of the anchor's humming sound. The anchor can select the song with the highest audience voice during the live broadcast of the video according to the viewer's barrage information, so as to play the music in the live video and present the video image containing the special effect corresponding to the music beat point, the solution can satisfy the live broadcast. Demand, highlighting the live broadcast atmosphere, significantly increase the interaction between the anchor and the viewer, further increasing the fun of video applications.
实施例三Embodiment 3
本发明实施例提供了一种视频图像处理方法,如图3所示,该方法包括:The embodiment of the invention provides a video image processing method. As shown in FIG. 3, the method includes:
步骤S301:获取欲在播放视频中播放的音乐的音乐信号。Step S301: Acquire a music signal of music to be played in the played video.
对于本实施例,所述欲在播放视频中播放的音乐可以是从视频应用中的预存音乐选定的音乐,也可以是从用户终端的预存音乐选定加载于视频应用中的音乐,还可以是在视频应用中通过麦克风获取的采用其他设备播放的现场音乐,所述音乐的来源在本实施例中不做限定。For the embodiment, the music to be played in the playing video may be music selected from pre-stored music in the video application, or may be selected from the pre-stored music of the user terminal to be loaded into the video application, and may also be The live music played by the other device is obtained by the microphone in the video application, and the source of the music is not limited in this embodiment.
对于本实施例,所述获取音乐信号的动作执行于用户选定欲在播放视频中播放的音乐之后,而选定所述音乐的动作可在播放视频前执行,也可在播放视频中执行。For the embodiment, the action of acquiring the music signal is performed after the user selects the music to be played in the playing video, and the action of selecting the music may be performed before the video is played, or may be performed in the playing video.
例如,应用于视频直播领域时,所述音乐可在视频直播前或视频直播中选定,终端会随即获取所选定的音乐的音乐信号,并执行后续预置步骤。For example, when applied to the field of video live broadcast, the music may be selected before the live broadcast of the video or in the live broadcast of the video, and the terminal will immediately acquire the music signal of the selected music and perform subsequent preset steps.
又例如,应用于短视频的录制时,所述音乐在播放视频前,即视频录制前选定,在选定音乐后终端会立刻获取所选定的音乐的音乐信号,并执行后续预置步骤。For another example, when applied to recording of a short video, the music is selected before the video is played, that is, before the video is recorded, and the terminal immediately acquires the music signal of the selected music after the selected music, and performs subsequent preset steps. .
步骤S302:判断是否预存有用于保存所述音乐的节拍点与音乐播放位置的对应关系的节拍点描述文件;若是,获取所述节拍点描述文件;若否,根据所述音乐信号检测出所述音乐的节拍点,根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件。Step S302: determining whether a beat point description file for preserving a correspondence relationship between a beat point of the music and a music play position is prestored; if yes, acquiring the beat point description file; if not, detecting the sound according to the music signal The beat point of the music generates a beat point description file according to the corresponding relationship between the detected beat point and the music play position.
对于本实施例,为实现在音乐播放时在播放视频中对应音乐各节拍点添加特效,需明确在音乐当前播放位置是否出现节拍点。本发明采用节拍点描述文件确定音乐的节拍点与音乐播放位置的对应关系。For the embodiment, in order to realize adding special effects to each beat point of the corresponding music in the playing video during music playing, it is necessary to determine whether a beat point appears at the current playing position of the music. The present invention uses a beat point description file to determine the correspondence between the beat point of the music and the music play position.
其中,所述判断是否预存有用于保存所述音乐的节拍点与音乐播放位置的对应关系的节拍点描述文件;若是,获取所述节拍点描述文件;包括:判断本地文件中是否预存有节拍点描述文件,若是,从本地文件中获取所述节拍点描述文件;或,判断服务器是否预存有节拍点描述文件,若是,从服务器中下载所述节拍点描述文件;或,判断本地文件中是否预存有节拍点描述文件,若是,从本地文件中获取所述节拍点描述文件;若否,判断服务器是否预存有节拍点描述文件,若是,从服务器中下载所述节拍点描述文件。Wherein, determining whether a beat point description file for storing a correspondence relationship between a beat point of the music and a music play position is pre-stored; if yes, acquiring the beat point description file; comprising: determining whether a beat point is pre-stored in the local file a description file, if yes, obtaining the beat point description file from a local file; or determining whether the server pre-stores a beat point description file, and if so, downloading the beat point description file from the server; or determining whether the local file is pre-stored There is a beat point description file, and if so, the beat point description file is obtained from the local file; if not, it is determined whether the server pre-stores the beat point description file, and if so, the beat point description file is downloaded from the server.
对于本实施例,所述节拍点描述文件可以从本地文件中获取,也可以从服务器中获取,用户也可以在本地获取失败后尝试从服务器中获取节拍点描述文件。For the embodiment, the beat point description file may be obtained from a local file or may be obtained from a server, and the user may also try to obtain a beat point description file from the server after the local acquisition fails.
对于本实施例,在未能获取到现有的节拍点描述文件时,则需要根据音乐信号智能生成节拍点描述文件,具体地,根据所述音乐信号检测出所述音乐的节拍点,根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件。在智能生成所述节拍点描述文件之后,还可将所述节拍点描述文件上传到服务器,以便于各用户下载使用。其中,所述根据所述音乐信号检测出所述音乐的节拍点可采用多种节拍点检测方法实现。For the present embodiment, when the existing beat point description file is not obtained, it is necessary to intelligently generate a beat point description file according to the music signal, specifically, detecting a beat point of the music according to the music signal, according to the The corresponding relationship between the detected beat point and the music playback position generates a beat point description file. After the beat point description file is intelligently generated, the beat point description file may also be uploaded to the server for each user to download and use. The detecting a beat point of the music according to the music signal may be implemented by using a plurality of beat point detecting methods.
例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱;根据所述频谱,确定检测点的能量变化值;根据能量变化值,检测出检测点出现强节拍点或弱节拍点。For example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行加权处理,获得加权后的音乐信号;根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据所述音乐信号的能量强度值获得候选节拍点;根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔;根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
再例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据检测点的音乐信号的能量变化差值,获得候选节拍点;根据所述候选节拍点,以各相邻两个候选节拍点作为信号起始点截取两段音乐信号;根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
步骤S303:根据所述节拍点描述文件,确定在播放视频中播放音乐时,在当前播放位置出现节拍点。Step S303: Determine, according to the beat point description file, that a beat point appears in the current play position when playing music in the play video.
对于本实施例,所述节拍点描述文件采用终端能够读取并理解的信息符号对音乐的节拍点与音乐播放位置的对应关系进行记录,在播放音乐时,通过加载所述节拍点描述文件中的数据并对数据进行分析,根据数据分析结果可以获知音乐当前播放位置是否出现节拍点,并确定该节拍点为强节拍点还是弱节拍点。For the embodiment, the beat point description file records the correspondence between the beat point of the music and the music play position by using the information symbol that the terminal can read and understand, and when the music is played, by loading the beat point description file The data is analyzed and the data is analyzed. According to the data analysis result, whether the beat point of the current playing position of the music is known or not, and whether the beat point is a strong beat point or a weak beat point is determined.
步骤S304:获取所述节拍点对应的特效;根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。Step S304: Acquire an effect corresponding to the beat point; process the image in the play video according to the special effect to obtain a video image including the special effect.
对于本实施例,所述特效可以为烟花、爱心、雪花等素材,所述素材的具体表现形式在本实施例中不做限定。同一素材可设置不同的外形特征参数,所述外形特征参数包括尺寸参数、颜色参数等,在本实施例中不做限定。For the embodiment, the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment. Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment.
对于本实施例,一首音乐中所述节拍点包括强节拍点和弱节拍点,所述强节拍点和弱节拍点对应的特效中的所述素材相同,但素材的外形特征参数不相同。For the embodiment, the beat point in a piece of music includes a strong beat point and a weak beat point, and the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
对于本实施例,通过获取所述特效中的素材,并以图层叠加方式将所述素材与所述播放视频中的图像进行合成,得到包含所述特效中的素材的视频图像。在其他实施方式中,还可以采用将特效与图像进行数据整合或根据特效中素材的外形特征参数修改图像等其他方式实现获得所述包含所述特效的视频图像。For the embodiment, the video in the effect is obtained by acquiring the material in the special effect and synthesizing the material and the image in the play video in a layer superposition manner to obtain a video image including the material in the special effect. In other embodiments, the video image including the special effect may be obtained by integrating data of the special effect with the image or modifying the image according to the shape characteristic parameter of the material in the special effect.
例如,在视频直播领域中,可以将特效的数据与图像数据进行数据整合得到视 频图像数据包,并将所述数据包发送至客户端,以使客户端显示包含该特效的视频图像。For example, in the field of live video, data of the effect can be integrated with the image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video image containing the special effect.
又例如,可以通过获取特效中素材的外形特征参数,根据所述参数对图像进行缩放处理,以获得可实现特效效果凸显的视频图像。For another example, the image may be scaled according to the parameter by obtaining the shape feature parameter of the material in the special effect to obtain a video image that can achieve the effect of the special effect.
本发明提供的视频图像处理方法,通过获取音乐的节拍点描述文件或根据音乐信号智能生成节拍点描述文件,获得根据节拍点描述文件确定的节拍点对应的特效,以使视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联,进而提高在视频中播放的音乐在听觉及视觉上的感染力,增加视频应用的趣味性并提高用户体验的满意度。The video image processing method provided by the present invention obtains a beat point description file of the music or intelligently generates a beat point description file according to the music signal, and obtains an effect corresponding to the beat point determined according to the beat point description file, so as to enable the special effect displayed on the video image. It is closely related to the beat point of the selected video playing music, thereby improving the visual and visual appeal of the music played in the video, increasing the interest of the video application and increasing the satisfaction of the user experience.
本发明实施例的另一种可能的实现方式,在实施例三所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
步骤S302中所述获取所述节拍点描述文件之后,还包括:After the acquiring the beat point description file in step S302, the method further includes:
若所述节拍点描述文件为从服务器下载的节拍点描述文件,根据所述音乐信号检测出所述音乐的节拍点,根据检测出的节拍点对所述节拍点描述文件进行校对,在本地文件中保存所述校对后的节拍点描述文件。If the beat point description file is a beat point description file downloaded from the server, detecting a beat point of the music according to the music signal, and correcting the beat point description file according to the detected beat point, in the local file The proof point description file after the proofreading is saved.
对于本实施例,从服务器中下载的节拍点描述文件保存有所述音乐的节拍点与音乐播放位置的对应关系,但可能存在该节拍点描述文件中对应的音乐与当前欲播放的音乐不完全一致的问题,例如,在视频应用中,用户可以对选定的音乐进行截取并选择在播放视频中播放截取后的音乐片段,而从服务器中下载的节拍点描述文件对应的是整首音乐的节拍点与音乐播放位置的对应关系。因此需要根据检测出的节拍点对节拍点描述文件进行校对,并在本地文件中保存所述校对后的节拍点描述文件以便终端用户使用。For the embodiment, the beat point description file downloaded from the server stores the corresponding relationship between the beat point of the music and the music play position, but there may be a corresponding music in the beat point description file and the current music to be played is incomplete. Consistent issues, for example, in a video application, the user can intercept the selected music and choose to play the intercepted music piece in the playing video, while the beat point description file downloaded from the server corresponds to the entire music. The correspondence between the beat point and the music playback position. Therefore, it is necessary to proof the beat point description file according to the detected beat point, and save the proofed beat point description file in the local file for use by the end user.
对于本实施例,通过对从服务器获取的节拍点描述文件进行校对,可确保所述节拍点描述文件的准确性,进而确保节拍点与音乐播放位置的对应关系的准确性,进一步保证视频图像上显示的特效与所选定的视频播放音乐的节拍点的关联性。For the embodiment, by correcting the beat point description file acquired from the server, the accuracy of the beat point description file can be ensured, thereby ensuring the accuracy of the correspondence between the beat point and the music playing position, and further ensuring the video image. The associated effect of the displayed effect is related to the beat point of the selected video playback music.
本发明实施例的另一种可能的实现方式,在实施例三所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
所述步骤S302中所述根据所述音乐信号检测出所述音乐的节拍点,包括:The detecting, in the step S302, the beat point of the music according to the music signal, comprising:
根据获取的所述音乐信号,判断检测强节拍点,还是检测强节拍点和弱节拍点;Determining whether to detect a strong beat point or a strong beat point and a weak beat point according to the acquired music signal;
若检测强节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,根据所述音乐信号的能量强度值获得候选节拍点,根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔,根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点;若采用变化值检测,根据检测点的音乐信号的能量变化差值,获得候选节拍点,根据所述候选节拍点,以各相邻两个所述候选节拍点作为信号起始点截取两段音乐信号,根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点;If the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point. The time interval between the frames in which the points are located, according to the time interval, detecting that the candidate beat points corresponding to the detected points have strong beat points; if the change value detection is used, the candidate beat points are obtained according to the energy variation difference of the music signals of the detected points. According to the candidate beat point, two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,对所述音乐信号进行加权处理,获得加权后的音乐信号,根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点;若采用变化值检测,对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱,根据所述频谱,确定检测点的能量变化值,根据能量变化值,检测出检测点出现弱节拍 点或强候选节拍点;If the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal. The energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum. The energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
对于本实施例,针对不同的所需检测节拍点的类型以及检测标准,对应有不同的节拍检测方法。For the present embodiment, different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
其中,所述判断检测强节拍点,还是检测强节拍点和弱节拍点,包括:Wherein, the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
获取视频所需特效类型,根据视频所需特效类型判断检测强节拍点,还是检测强节拍点和弱节拍点;所述若检测强节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测;所述若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点和弱节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测。Obtain the type of special effect required for the video, judge whether to detect the strong beat point according to the type of special effect required by the video, or detect the strong beat point and the weak beat point; if the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used, including: Detecting a strong beat point, obtaining the type of the music, determining whether to use the intensity value detection or the change value detection according to the type; if detecting the strong beat point and the weak beat point, determining whether to use the intensity value detection or the change value detection, including: if detecting The strong beat point and the weak beat point acquire the type of the music, and determine whether to use the intensity value detection or the change value detection according to the type.
对于本实施例,可通过获取的视频所需特效类型来判断所需检测节拍点的类型的。所述视频所需特效类型为用户选择的或视频应用默认的特效类型。例如,用户希望在播放视频中有层出不穷的特效,故根据其视频所需特效类型判断出既要检测强节拍点,也要检测弱节拍点。For the present embodiment, the type of the desired beat point can be determined by the type of the effect required for the acquired video. The effect type required for the video is the default effect type selected by the user or the video application. For example, the user wants to have endless effects in the playing video, so it is judged according to the type of special effect required by the video that both the strong beat point and the weak beat point are detected.
对于本实施例,可通过获取的音乐的类型来判断检测标准的。例如,所获取的音乐的类型为摇滚,该音乐类型的音乐信号往往都有很高的强度值,但其变化值不明显,故根据其类型选择通过检测强度值来检测该音乐的节拍点。For the present embodiment, the detection criteria can be judged by the type of music acquired. For example, the type of music acquired is rock, and the music signal of the music type tends to have a high intensity value, but the change value is not obvious, so the beat point of the music is detected by detecting the intensity value according to the type thereof.
对于本实施例,可根据视频所需特效类型和音乐的类型来选择所需检测节拍点的类型以及检测节拍点的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联性,进一步提高用户体验的满意度。For the present embodiment, the type of the desired beat point and the method of detecting the beat point can be selected according to the type of the special effect required for the video and the type of the music, so as to obtain an accurate beat point by using an appropriate method, and the amount of calculation can be reduced. The detection time is shortened, and the special effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby further improving the satisfaction of the user experience.
对于本实施例,所述视频为直播视频,即本实施例中的方法主要应用于视频直播领域。For the embodiment, the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
本发明实施例的另一种可能的实现方式,在实施例三所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
步骤S304之前,还包括:Before step S304, the method further includes:
获取直播端的主播设置的所述音乐的节拍点对应的特效信息,将节拍点与音乐播放位置与特效信息的对应关系保存到所述节拍点描述文件中;生成包含特效信息的节拍点描述文件;Obtaining the special effect information corresponding to the beat point of the music set by the anchor of the live end, saving the correspondence between the beat point and the music play position and the special effect information into the beat point description file; generating a beat point description file containing the special effect information;
步骤S304中所述获取所述节拍点对应的特效,包括:Obtaining the special effect corresponding to the beat point in step S304, including:
根据所述包含特效信息的节拍点描述文件,获取所述节拍点对应的特效。Obtaining an effect corresponding to the beat point according to the beat point description file containing the special effect information.
对于本实施例,所述节拍点描述文件不仅保存有节拍点与音乐播放位置的对应关系,还保存有两者与特效信息的对应关系。所述特效信息携带有用户随机选择或自定义设置的素材信息,以及针对素材设置的外形特征参数,所述素材及其外形特征参数的定义参见实施例一中步骤S104所述内容,此处不再赘述。For the embodiment, the beat point description file not only stores the correspondence between the beat point and the music play position, but also stores the corresponding relationship between the two and the special effect information. The special effect information carries the material information that is randomly selected or customized by the user, and the shape characteristic parameter set for the material. For the definition of the material and its shape characteristic parameter, refer to the content of step S104 in the first embodiment, where not Let me repeat.
在其他实施例中,所述特效信息还可以由观看直播的用户设置,用户可向直播端发送特效设置请求以实现特效设置。In other embodiments, the special effect information may also be set by a user watching the live broadcast, and the user may send a special effect setting request to the live broadcast terminal to implement the special effect setting.
对于本实施例,将本发明提供的视频图像处理方法应用于直播领域,可实现通过节拍点描述文件记录自定义设置的节拍点对应的特效,能够满足直播的需求,进一步增加视频应用的趣味性。For the present embodiment, the video image processing method provided by the present invention is applied to the field of live broadcast, and the special effect corresponding to the beat point of the custom setting by the beat point description file can be realized, which can meet the requirement of the live broadcast and further increase the interest of the video application. .
本发明实施例的另一种可能的实现方式,在实施例三所示的基础上,还包括下 述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the third embodiment, where
所述生成包含特效信息的节拍点描述文件之后,还包括:After the generating the beat point description file containing the special effect information, the method further includes:
向连麦的另一直播端发送所述音乐、所述包含特效信息的节拍点描述文件、所述节拍点对应的特效,以使另一直播端在播放所述音乐时显示与本直播端相同特效。Sending the music, the beat point description file containing the special effect information, and the special effect corresponding to the beat point to another live end of the continuous wheat, so that another live broadcast end displays the same as the live broadcast end when playing the music Special effects.
对于本实施例,所述连麦指当前直播端的主播在视频直播期间,还与另一直播端的主播进行互动,而观看当前主播直播的用户可同时观看到互动主播的视频直播画面。通过实现节拍点对应的特效在多端直播端中共享,可有效烘托直播氛围,提高各互动直播端的直播间人气值,能够满足直播的需求,进一步增加视频应用的趣味性。For the embodiment, the anchor of the current live broadcast end interacts with the anchor of another live broadcast during the live broadcast of the live broadcast, and the user watching the current broadcast of the active broadcast can simultaneously view the live broadcast of the interactive anchor. By realizing the effect corresponding to the beat point in the multi-end live broadcast, the live broadcast atmosphere can be effectively enhanced, and the popularity value of the live broadcasts of each interactive live end can be improved, which can meet the needs of the live broadcast and further increase the interest of the video application.
实施例四Embodiment 4
本发明提供的音乐礼物处理方法主要应用于视频直播领域。在现有的视频直播中,主播为了活跃气氛并增加与直播间内观众的互动,通常会选取与视频直播的直播主题相对应的、或直播间内观众热度最高的音乐在直播过程中播放,而观众也会通过点赞、发言或送礼物来响应主播。然而,播放视频中的视频图像与所播放的音乐往往没有关联性,音乐仅是简单的加入到播放视频中,在听觉以及视觉上没有足够的感染力,且上述的互动方式过于单一,无法有效提高观众与主播的互动积极性,不足以满足视频直播的需求。针对上述问题,本发明将主播播放音乐和观众送礼物的互动行为相结合,提供了一种音乐礼物处理方法,以实现观众与主播互动积极性及用户体验满意度的显著提高,以下结合实施例四对所述音乐礼物处理方法做详细阐述。The music gift processing method provided by the invention is mainly applied to the field of video live broadcasting. In the existing live video broadcast, in order to activate the atmosphere and increase the interaction with the audience in the live broadcast, the anchor usually selects the music corresponding to the live broadcast theme of the live broadcast or the music with the highest audience in the live broadcast during the live broadcast. The audience will respond to the anchor by clicking, speaking or giving a gift. However, the video image in the playing video is often not related to the played music. The music is simply added to the playing video, and there is not enough appeal in the sense of hearing and visual, and the above interaction method is too single and cannot be effective. Increasing the enthusiasm of the audience and the anchor is not enough to meet the needs of live video. In view of the above problems, the present invention combines the interactive behavior of the anchor playing music and the audience to give gifts, and provides a music gift processing method to achieve a significant improvement in the interaction between the viewer and the anchor and the satisfaction of the user experience. The music gift processing method will be elaborated.
本发明实施例提供了一种音乐礼物处理方法,如图4所示,该方法包括:An embodiment of the present invention provides a music gift processing method. As shown in FIG. 4, the method includes:
步骤S401:在视频直播中接收观众发送的音乐礼物;所述音乐礼物包括欲在视频直播中播放的音乐。Step S401: Receiving a music gift sent by a viewer in a live video broadcast; the music gift includes music to be played in a live video.
对于本实施例,在视频直播过程中观众可通过向主播发送音乐礼物来与主播进行互动。直播端所接收到的音乐礼物携带有音乐信息,所述音乐信息对应的音乐为观众选定的欲让主播在视频直播中播放的音乐。For the present embodiment, the viewer can interact with the anchor by sending a music gift to the anchor during the live video broadcast. The music gift received by the live broadcast end carries music information, and the music corresponding to the music information is music selected by the viewer to be played by the anchor in the live video broadcast.
其中,作为一个优选实施例,所述音乐礼物还包括所述音乐的节拍点对应的特效信息。所述特效信息携带有用户终端随机设置或用户自定义设置的素材信息,以及针对素材设置的外形特征参数。Wherein, as a preferred embodiment, the music gift further includes special effect information corresponding to a beat point of the music. The special effect information carries material information randomly set by the user terminal or user-defined, and shape characteristic parameters set for the material.
对于本实施例,所述特效可以为烟花、爱心、雪花等素材,所述素材的具体表现形式在本实施例中不做限定。同一素材可设置不同的外形特征参数,所述外形特征参数包括尺寸参数、颜色参数等,在本实施例中不做限定。此外,一首音乐中所述节拍点包括强节拍点和弱节拍点,所述强节拍点和弱节拍点对应的特效中的所述素材相同,但素材的外形特征参数不相同。For the embodiment, the special effect may be a material such as a fireworks, a love, a snowflake, etc., and the specific expression of the material is not limited in this embodiment. Different shape feature parameters may be set for the same material, and the shape feature parameters include a size parameter, a color parameter, and the like, which are not limited in this embodiment. In addition, the beat point in a piece of music includes a strong beat point and a weak beat point, and the material in the special effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different.
步骤S402:获取所述音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点。Step S402: Acquire a music signal of the music, and detect a beat point of the music according to the music signal.
对于本实施例,从所述音乐礼物中获取欲在视频直播中播放的音乐的音乐信号之后,随即对所述音乐进行节拍点检测,其中,根据所述音乐信号检测出所述音乐的节拍点可采用多种节拍点检测方法实现。For the present embodiment, after the music signal of the music to be played in the live video is obtained from the music gift, the beat point is detected on the music, wherein the beat point of the music is detected according to the music signal. It can be implemented by a variety of beat point detection methods.
例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法 包括:对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱;根据所述频谱,确定检测点的能量变化值;根据能量变化值,检测出检测点出现强节拍点或弱节拍点。For example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行加权处理,获得加权后的音乐信号;根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据所述音乐信号的能量强度值获得候选节拍点;根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔;根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
再例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据检测点的音乐信号的能量变化差值,获得候选节拍点;根据所述候选节拍点,以各相邻两个候选节拍点作为信号起始点截取两段音乐信号;根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
步骤S403:确定在视频直播中播放所述音乐礼物中的音乐时,在当前播放位置出现节拍点。Step S403: When it is determined that the music in the music gift is played in the live video, a beat point appears at the current play position.
对于本实施例,在步骤S402中检测到的各节拍点对应于所述音乐的不同播放位置,在视频直播中播放音乐时,若音乐当前播放位置对应有步骤S402检测出的节拍点,则确定该节拍点为强节拍点还是弱节拍点。For the present embodiment, each beat point detected in step S402 corresponds to a different play position of the music. When the music is played in the live video, if the current play position of the music corresponds to the beat point detected in step S402, then it is determined. Whether the beat point is a strong beat point or a weak beat point.
步骤S404:获取所述节拍点对应的特效。Step S404: Acquire an effect corresponding to the beat point.
步骤S405:根据所述特效对视频直播中的图像进行处理,获得包含所述特效的视频直播图像。Step S405: Process the image in the live video broadcast according to the special effect, and obtain a live video of the video including the special effect.
对于本实施例,通过从音乐礼物中获取与所述特效信息对应的所述特效的不同外形特征参数的素材,以图层叠加方式把素材与所述视频直播中的图像进行合成,获得包含所述特效的视频直播图像。其中,所述步骤S405之后,还包括向客户端发送处理后的视频直播图像。在其他实施方式中,还可以采用将特效与图像进行数据整合或根据特效中素材的外形特征参数修改图像等其他方式实现获得所述包含所述特效的视频直播图像。For the embodiment, the material of the different shape feature parameters of the special effect corresponding to the special effect information is obtained from the music gift, and the material is combined with the image in the live video broadcast in a layer overlay manner to obtain an inclusion A live video image of the special effects. After the step S405, the method further includes: sending the processed live video of the video to the client. In other embodiments, the video live image including the special effect may be obtained by integrating data of the special effect with the image or modifying the image according to the shape characteristic parameter of the material in the special effect.
例如,可以将特效的数据与图像数据进行数据整合得到视频直播图像数据包,并将所述数据包发送至客户端,以使客户端显示包含该特效的视频直播图像。For example, the data of the special effect can be integrated with the image data to obtain a live video image data package, and the data packet is sent to the client, so that the client displays the live video image of the video containing the special effect.
又例如,可以通过获取特效中素材的外形特征参数,根据所述参数对图像进行缩放处理,在获得可实现特效效果凸显的视频直播图像后将其发送到观众客户端,以使客户端显示包含该特效的视频直播图像。For example, by acquiring the shape feature parameter of the material in the special effect, the image is scaled according to the parameter, and after the video live image that can achieve the special effect is obtained, the image is sent to the viewer client, so that the client displays the inclusion. A live video of the effect.
在其他实施例中,若所述音乐礼物中未携带有所述音乐的节拍点对应的特效信息,则还可通过获取直播端随机设置的或主播自定义设置的素材来作为节拍点对应的特效。In other embodiments, if the music gift does not carry the special effect information corresponding to the beat point of the music, the material corresponding to the random setting or the anchor custom setting of the live broadcast may be obtained as the special effect corresponding to the beat point. .
本发明提供的音乐礼物处理方法,通过对观众发送给主播的音乐礼物中的音乐进行节拍点检测,并在播放过程中根据所检测到的节拍点在视频图像中显示该节拍点对应的特效,以使视频直播图像上显示的特效与音乐礼物中音乐的节拍点紧密关联,进而以提高在视频直播中播放的音乐在听觉以及视觉上的感染力;且通过将主播播放音乐与观众送礼物的行为相结合,丰富了视频直播中观众与主播的互动方 式,显著提高了观众与主播的互动积极性,有效烘托直播氛围,满足视频直播的需求,并增加了视频直播应用的趣味性,提高了用户体验的满意度。The music gift processing method provided by the present invention performs beat point detection on the music in the music gift sent by the viewer to the anchor, and displays the special effect corresponding to the beat point in the video image according to the detected beat point during the playing process. In order to make the special effects displayed on the live video of the video closely related to the beat points of the music in the music gift, thereby improving the auditory and visual appeal of the music played in the live video broadcast; and sending the gift to the audience by playing the music with the anchor. The combination of behaviors enriches the interaction between the viewer and the anchor in the live video broadcast, significantly improves the interaction enthusiasm between the viewer and the anchor, effectively highlights the live broadcast atmosphere, meets the demand for live video, and increases the interest of the live video application, improving the user. Satisfaction of experience.
本发明实施例的另一种可能的实现方式,在实施例四所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
所述步骤S402之后,还包括:根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件。After the step S402, the method further includes: generating a beat point description file according to the detected correspondence between the beat point and the music playing position.
进一步地,所述步骤S403包括:根据所述节拍点描述文件,确定在视频直播中播放所述音乐礼物中的音乐时,在当前播放位置出现节拍点。Further, the step S403 includes: determining, according to the beat point description file, that a beat point occurs at a current play position when the music in the music gift is played in a live video.
对于本实施例,为实现在音乐播放时在视频直播图像中对应音乐各节拍点添加特效,需明确在音乐当前播放位置是否出现节拍点。本实施例采用节拍点描述文件来确定音乐的节拍点与音乐播放位置的对应关系。所述节拍点描述文件采用终端能够读取并理解的信息符号对音乐的节拍点与音乐播放位置的对应关系进行记录,在播放音乐时,通过加载所述节拍点描述文件中的数据并对数据进行分析,根据数据分析结果可以获知音乐当前播放位置是否出现节拍点,并确定该节拍点为强节拍点还是弱节拍点。For the embodiment, in order to realize adding special effects to each beat point of the corresponding music in the live video of the video during music playing, it is necessary to determine whether a beat point appears at the current playing position of the music. In this embodiment, a beat point description file is used to determine the correspondence between the beat point of the music and the music play position. The beat point description file records the correspondence between the beat point of the music and the music play position by using the information symbol that the terminal can read and understand, and when the music is played, the data in the file is described by loading the beat point and the data is Perform analysis, according to the data analysis result, whether the beat point of the current playing position of the music is known, and whether the beat point is a strong beat point or a weak beat point.
对于本实施例,只需在极短暂的文件加载时间后,便能通过节拍点描述文件快速便捷地获得节拍点与音乐播放位置的对应关系,满足视频直播的需求,可进一步提高用户体验满意度。For this embodiment, the correspondence between the beat point and the music playing position can be quickly and conveniently obtained through the beat point description file after a very short file loading time, thereby satisfying the demand of the live video, and further improving the user experience satisfaction. .
本发明实施例的另一种可能的实现方式,在实施例四所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
所述根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件之后,还包括:获取所述特效信息,将节拍点与音乐播放位置与特效信息的对应关系保存到所述节拍点描述文件中;生成包含特效信息的节拍点描述文件。After the generating a beat point description file according to the detected relationship between the beat point and the music playing position, the method further includes: acquiring the special effect information, and saving the corresponding relationship between the beat point and the music playing position and the special effect information to the beat In the point description file; generate a beat point description file containing the effect information.
进一步地,所述步骤S404,包括:根据所述包含特效信息的节拍点描述文件,从所述音乐礼物中获取所述节拍点对应的特效。Further, the step S404 includes: acquiring, according to the beat point description file containing the special effect information, the special effect corresponding to the beat point from the music gift.
对于本实施例,所述节拍点描述文件不仅保存有节拍点与音乐播放位置的对应关系,还保存有两者与特效信息的对应关系。所述特效信息携带有用户随机选择或自定义设置的素材信息,以及针对素材设置的外形特征参数,其具体定义参见实施例一中步骤S401所述内容,此处不再赘述。For the embodiment, the beat point description file not only stores the correspondence between the beat point and the music play position, but also stores the corresponding relationship between the two and the special effect information. The special effect information carries the material information that is randomly selected or customized by the user, and the shape characteristic parameter that is set for the material. For the specific definition, refer to the content of step S401 in the first embodiment, and details are not described herein again.
对于本实施例,只需在极短暂的文件加载时间后,便能通过节拍点描述文件快速便捷地获得当前音乐播放位置的节拍点对应的特效,满足视频直播的需求,可进一步提高用户体验满意度。For the embodiment, after a very short file loading time, the beat point description file can quickly and conveniently obtain the special effect corresponding to the beat point of the current music playing position, which satisfies the requirement of the live video, and can further improve the user experience satisfaction. degree.
本发明实施例的另一种可能的实现方式,在实施例四所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
所述步骤S401之后,还包括:After the step S401, the method further includes:
判断直播端的主播是否执行打开所述音乐礼物的预设动作;若是,继续所述获取所述音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点的步骤;并向发送所述音乐礼物的观众反馈主播打开音乐礼物的信息。Determining whether the anchor of the live end performs a preset action of opening the music gift; if yes, continuing the step of acquiring the music signal of the music, detecting a beat point of the music according to the music signal; and transmitting the The audience of the music gift feedbacks the anchor to open the information of the music gift.
对于本实施例,在视频直播应用场景中,通常存在有多个观众同时向主播发送音乐礼物的情况,且由于直播时间有限,主播往往无法打开所有的音乐礼物,因此在进行音乐节拍点检测等后续预置步骤之前,需要确定主播是否要打开当前接收的 音乐礼物。For the present embodiment, in a live video application scenario, there are usually multiple viewers simultaneously sending music presents to the anchor, and since the live broadcast time is limited, the anchor often cannot open all the music gifts, so the music beat point detection is performed. Before the subsequent preset steps, you need to determine if the anchor wants to open the currently received music gift.
对于本实施例,主播所执行的所述预设动作可以是在视频直播中说出预设口令,也可以是在视频直播中做出预设表情或手势,还可以在显示屏上点击所显示的音乐礼物标识。For the embodiment, the preset action performed by the anchor may be that the preset password is spoken in the live video, or the preset expression or gesture may be made in the live video, and the displayed on the display may also be clicked. Music gift logo.
例如,在视频直播中,音乐礼物以列表的形式出现,当主播说出“打开第八个音乐礼物”的口令时,直播终端对所述口令进行语音识别,根据识别结果获取音乐礼物列表中对应的音乐礼物中的音乐信号并执行后续预置步骤。For example, in the live video broadcast, the music gift appears in the form of a list. When the anchor says the password of “opening the eighth music gift”, the live terminal performs voice recognition on the password, and obtains the corresponding correspondence in the music gift list according to the recognition result. The music signal in the music gift and perform subsequent preset steps.
又例如,在视频直播中,音乐礼物以弹幕的形式出现,当主播做出“比心”的手势时,直播终端依据其对视频直播图像的手势识别结果判定主播指示打开当前弹出的音乐礼物,并随即获取该音乐礼物中的音乐信号并执行后续预置步骤。For example, in the live video broadcast, the music gift appears in the form of a barrage. When the anchor makes a "birth" gesture, the live broadcast terminal determines the anchor instruction to open the currently popped music gift according to the gesture recognition result of the live video image. And then get the music signal in the music gift and perform subsequent preset steps.
再例如,在视频直播中,音乐礼物在预置时间以礼物雨的形式出现,当直播终端接收到主播点击终端显示屏以触发其中一个音乐礼物的指令时,直播终端随即获取该音乐礼物中的音乐信号并执行后续预置步骤。For another example, in the live video broadcast, the music gift appears in the form of gift rain at a preset time. When the live terminal receives the instruction of the anchor click terminal display to trigger one of the music gifts, the live terminal immediately acquires the music gift. Music signals and perform subsequent preset steps.
本发明实施例的另一种可能的实现方式,在实施例四所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps on the basis of the fourth embodiment, where
所述步骤S402,包括:The step S402 includes:
获取所述音乐信号,判断检测强节拍点,还是检测强节拍点和弱节拍点;Obtaining the music signal, determining whether to detect a strong beat point, or detecting a strong beat point and a weak beat point;
若检测强节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,根据所述音乐信号的能量强度值获得候选节拍点,根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔,根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点;若采用变化值检测,根据检测点的音乐信号的能量变化差值,获得候选节拍点,根据所述候选节拍点,以各相邻两个所述候选节拍点作为信号起始点截取两段音乐信号,根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点;If the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point. The time interval between the frames in which the points are located, according to the time interval, detecting that the candidate beat points corresponding to the detected points have strong beat points; if the change value detection is used, the candidate beat points are obtained according to the energy variation difference of the music signals of the detected points. According to the candidate beat point, two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,对所述音乐信号进行加权处理,获得加权后的音乐信号,根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点;若采用变化值检测,对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱,根据所述频谱,确定检测点的能量变化值,根据能量变化值,检测出检测点出现弱节拍点或强候选节拍点;If the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal. The energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum. The energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
对于本实施例,针对不同的所需检测节拍点的类型以及检测标准,对应有不同的节拍检测方法。For the present embodiment, different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
其中,所述判断检测强节拍点,还是检测强节拍点和弱节拍点,包括:Wherein, the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
获取所述音乐礼物中的特效信息,根据所述特效信息判断检测强节拍点,还是检测强节拍点和弱节拍点;所述若检测强节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测;所述若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点和弱节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测。Obtaining the special effect information in the music gift, determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point according to the special effect information; if detecting the strong beat point, determining whether to use the intensity value detection or the change value detection, including If the strong beat point is detected, the type of the music is obtained, and the intensity value detection or the change value detection is used according to the type judgment; if the strong beat point and the weak beat point are detected, whether the intensity value detection or the change value detection is used, including: If a strong beat point and a weak beat point are detected, the type of the music is acquired, and whether the intensity value detection or the change value detection is used is determined according to the type.
对于本实施例,可通过获取音乐礼物中的特效信息来判断所需检测节拍点的类型。例如,观众在发送给直播端的音乐礼物中,分别针对强节拍点和弱节拍点设置 了素材的外形特征参数,则用户希望在视频直播中开启该音乐礼物时,可以看到各个节拍点对应的炫酷特效,故根据观众自定义设置的特效信息判断出既要检测强节拍点,也要检测弱节拍点。对于本实施例,可通过获取音乐礼物中的音乐的类型来判断检测标准的。例如,所获取音乐礼物中的的音乐的类型为摇滚,该音乐类型的音乐信号往往都有很高的强度值,但其变化值不明显,故根据其类型选择通过检测强度值来检测该音乐的节拍点。For the present embodiment, the type of the desired beat point can be determined by acquiring the special effect information in the music gift. For example, in the music gift sent to the live end, the viewer sets the shape feature parameters of the material for the strong beat point and the weak beat point respectively, and the user wants to see the corresponding beat point when the music gift is opened in the live video broadcast. Cool special effects, so according to the special effects information of the viewer's custom settings, it is judged that both the strong beat point and the weak beat point are detected. For the present embodiment, the detection criteria can be judged by acquiring the type of music in the music gift. For example, the type of music in the acquired music gift is rock, and the music signal of the music type often has a high intensity value, but the change value is not obvious, so the music value is detected by detecting the intensity value according to the type selection. The beat point.
对于本实施例,可根据音乐礼物中的特效信息和音乐的类型来选择所需检测节拍点的类型以及检测节拍点的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的特效与音乐节拍点的紧密关联性,进一步提高用户体验的满意度。For the embodiment, the type of the desired beat point and the method of detecting the beat point can be selected according to the special effect information and the type of the music in the music gift, so as to obtain an accurate beat point by using an appropriate method, and the operation can be reduced. The quantity, shorten the detection time, further ensure the close relationship between the special effects displayed on the video image and the music beat point, and further improve the satisfaction of the user experience.
实施例五Embodiment 5
本发明实施例提供了一种视频图像的贴图处理方法,如图5所示,该方法包括:An embodiment of the present invention provides a mapping processing method for a video image. As shown in FIG. 5, the method includes:
步骤S501、获取播放视频中的图像,在所述图像中增加贴图。Step S501: Acquire an image in the played video, and add a texture to the image.
对于本实施例,所述贴图可以是基于AR增强现实的二维模型贴图,也可以是基于AR增强现实的三维模型贴图。所述AR(Augmented Reality),是一种将真实世界信息和虚拟世界信息结合并展示的增强现实技术。通过增强现实技术,在播放视频中的图像中增加基于AR增强现实的贴图,可将播放视频中真实世界的图像与计算机虚拟图像叠加在同一画面中,以实现真实世界和虚拟世界的信息集成及交互。For the embodiment, the texture may be a two-dimensional model map based on AR augmented reality, or may be a three-dimensional model map based on AR augmented reality. The AR (Augmented Reality) is an augmented reality technology that combines and displays real world information and virtual world information. Through augmented reality technology, an image based on AR augmented reality is added to the image in the playing video, and the real world image and the computer virtual image in the playing video can be superimposed on the same screen to realize information integration of the real world and the virtual world. Interaction.
对于本实施例,所述贴图具体可以是用作背景类贴图的烟花、爱心、雪花等素材,也可以是用作人脸装饰类贴图的犄角、胡子、眼镜等素材,所述素材的具体表现形式在本实施例中不做限定。其中,在播放视频图像中增加的贴图可以是用户自定义设置的,也可以是视频应用默认设置的。在确定贴图后,终端对播放视频中的图像进行场景识别,进而在视频图像的相应位置增加贴图。For the embodiment, the texture may be a material such as a fireworks, a love, a snowflake, or the like used as a background-like texture, or may be a material such as a corner, a beard, or a glasses used as a face decoration type map, and the specific performance of the material. The form is not limited in this embodiment. Among them, the added map in the play video image can be user-defined settings, or it can be set by the video application by default. After determining the texture, the terminal performs scene recognition on the image in the played video, and then adds a texture to the corresponding position of the video image.
步骤S502、获取欲在播放视频中播放的音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点。Step S502: Acquire a music signal of music to be played in the played video, and detect a beat point of the music according to the music signal.
对于本实施例,所述欲在播放视频中播放的音乐可以是从视频应用中的预存音乐选定的音乐,也可以是从用户终端的预存音乐选定加载于视频应用中的音乐,还可以是在视频应用中通过麦克风获取的采用其他设备播放的现场音乐,所述音乐的来源在本实施例中不做限定。For the embodiment, the music to be played in the playing video may be music selected from pre-stored music in the video application, or may be selected from the pre-stored music of the user terminal to be loaded into the video application, and may also be The live music played by the other device is obtained by the microphone in the video application, and the source of the music is not limited in this embodiment.
对于本实施例,所述获取音乐信号的动作执行于用户选定欲在播放视频中播放的音乐之后,而选定所述音乐的动作可在播放视频前执行,也可在播放视频中执行。For the embodiment, the action of acquiring the music signal is performed after the user selects the music to be played in the playing video, and the action of selecting the music may be performed before the video is played, or may be performed in the playing video.
例如,应用于视频直播领域时,所述音乐可在视频直播前或视频直播中选定,终端会随即获取所选定的音乐的音乐信号,并根据所述音乐信号检测出所述音乐的节拍点。For example, when applied to the field of video live broadcast, the music may be selected before the live broadcast of the video or in the live broadcast of the video, and the terminal may immediately acquire the music signal of the selected music, and detect the beat of the music according to the music signal. point.
又例如,应用于短视频的录制时,所述音乐在播放视频前,即视频录制前选定,在选定音乐后终端会立刻获取所选定的音乐的音乐信号,并根据所述音乐信号检测出所述音乐的节拍点。For another example, when applied to recording of a short video, the music is selected before the video is played, that is, before the video is recorded, and after the selected music, the terminal immediately acquires the music signal of the selected music, and according to the music signal. A beat point of the music is detected.
对于本实施例,所述根据所述音乐信号检测出所述音乐的节拍点可采用多种节拍点检测方法实现。For the embodiment, the beat point of the music detected according to the music signal may be implemented by using various beat point detection methods.
例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法 包括:对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱;根据所述频谱,确定检测点的能量变化值;根据能量变化值,检测出检测点出现强节拍点或弱节拍点。For example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum; according to the spectrum, The energy change value of the detection point is determined; according to the energy change value, a strong beat point or a weak beat point is detected at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点和弱节拍点;该方法包括:对所述音乐信号进行加权处理,获得加权后的音乐信号;根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point and a weak beat point; the method includes: performing weighting processing on the music signal to obtain a weighted music signal; and according to the weighted music The energy intensity value of the signal detects a strong beat point or a weak beat point at the detection point.
又例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据所述音乐信号的能量强度值获得候选节拍点;根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔;根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy intensity value of the music signal; and counting each adjacent two candidates according to each candidate beat point The time interval between the frames in which the beat points are located; according to the time interval, it is detected that the candidate beat points correspond to strong beat points corresponding to the detected points.
再例如,对于本节拍点检测方法,所述节拍点包括强节拍点;该方法包括:根据检测点的音乐信号的能量变化差值,获得候选节拍点;根据所述候选节拍点,以各相邻两个候选节拍点作为信号起始点截取两段音乐信号;根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点。For another example, for the beat detecting method, the beat point includes a strong beat point; the method includes: obtaining a candidate beat point according to the energy variation difference of the music signal of the detected point; and according to the candidate beat point, each phase Two adjacent candidate beat points are taken as the signal starting point to intercept two pieces of music signals; according to the comparison result of the two pieces of music signals, it is detected that the candidate beat points corresponding to the detected points have strong beat points.
步骤S503、确定在播放视频中播放音乐时,在当前播放位置出现节拍点。Step S503: When it is determined that the music is played in the playing video, a beat point appears at the current playing position.
对于本实施例,在步骤S502中检测到的各节拍点对应于所述音乐的不同播放位置,在视频直播中播放音乐时,若音乐当前播放位置对应有步骤S502检测出的节拍点,则确定该节拍点为强节拍点还是弱节拍点。For the present embodiment, each beat point detected in step S502 corresponds to a different play position of the music. When the music is played in the live video, if the current play position of the music corresponds to the beat point detected in step S502, then it is determined. Whether the beat point is a strong beat point or a weak beat point.
步骤S504、获取所述节拍点对应的贴图特效。Step S504: Acquire a texture effect corresponding to the beat point.
对于本实施例,所述贴图特效指的是贴图对应不同外形特征参数时的贴图状态。所述贴图中的素材可设置不同的外形特征参数,所述外形特征参数包括状态参数、尺寸参数、颜色参数等,在本实施例中不做限定。此外,一首音乐中的所述节拍点通常包括强节拍点和弱节拍点,所述强节拍点和弱节拍点对应的贴图特效中的所述素材相同,但素材的外形特征参数不相同。例如,用户选取的贴图为小熊三维模型,并针对该贴图在强节拍点和弱节拍点时设置不同的外形特征参数,在强节拍点时小熊三维模型在视频图像中跳舞的舞步频率较大,在弱节拍点时其跳舞的舞步频率则较低。For the embodiment, the texture effect refers to a texture state when the texture corresponds to different shape feature parameters. The material in the map may be set with different shape feature parameters, and the shape feature parameters include a state parameter, a size parameter, a color parameter, and the like, which are not limited in this embodiment. In addition, the beat point in a piece of music generally includes a strong beat point and a weak beat point, and the material in the texture effect corresponding to the strong beat point and the weak beat point is the same, but the shape characteristic parameters of the material are different. For example, the texture selected by the user is a three-dimensional model of the bear, and different shape feature parameters are set for the strong beat point and the weak beat point for the texture. When the beat point is strong, the three-dimensional model of the bear dances in the video image has a large dance frequency. The dance frequency of dancing is lower at weak beats.
步骤S505、根据所述贴图特效对所述图像中的贴图进行处理,获得包含所述贴图特效的视频图像。Step S505: Processing a texture in the image according to the texture effect to obtain a video image including the texture effect.
对于本实施例,通过获取所述贴图特效中的设置有某一外形特征参数的素材,并以图层叠加方式将所述素材与所述播放视频中的图像进行合成,得到包含所述贴图特效中的素材的视频图像。在其他实施方式中,还可以采用将贴图特效与图像进行数据整合或根据贴图特效中素材的外形特征参数修改图像等其他方式实现获得所述包含所述贴图特效的视频图像。For the embodiment, the material in which the shape parameter is set in the texture effect is obtained, and the material is combined with the image in the play video in a layer superposition manner to obtain the texture effect. Video image of the material in it. In other embodiments, the video image including the texture effect may be obtained by integrating data of the texture effect with the image or modifying the image according to the shape characteristic parameter of the material in the texture effect.
例如,在视频直播领域中,可以将贴图特效的数据与视频直播图像数据进行数据整合得到视频图像数据包,并将所述数据包发送至客户端,以使客户端显示包含该贴图特效的视频图像。For example, in the field of video live broadcast, data of the texture effect can be integrated with the live video image data to obtain a video image data packet, and the data packet is sent to the client, so that the client displays the video containing the texture effect. image.
又例如,可以通过获取贴图特效中素材的外形特征参数,根据所述外形特征参数对图像进行缩放处理,以获得可实现特效效果凸显的视频图像。For example, by acquiring the shape feature parameter of the material in the texture effect, the image may be scaled according to the shape feature parameter to obtain a video image that can achieve the effect of the special effect.
本发明提供的视频图像的贴图处理方法,通过在视频图像中增加贴图,并对欲在播放视频中播放的音乐进行节拍点检测,并在音乐播放过程中根据所检测到的节 拍点在视频图像中显示该节拍点对应的贴图特效,以使视频图像上显示的贴图特效与所选定的视频播放音乐的节拍点紧密关联,提高了在播放视频中播放的音乐与显示的贴图在听觉以及视觉上的感染力;且用户可通过自定义设置的音乐、贴图以及贴图特效来表达自己的个性并可实时编辑获得个性化的播放视频,本方法满足了用户的个性化播放视频设计需求,增加视频应用的趣味性及应用与用户的互动性,显著提高用户体验的满意度。The method for mapping a video image provided by the present invention adds a texture to a video image, performs beat point detection on the music to be played in the played video, and displays the video image according to the detected beat point during the music playing process. The texture effect corresponding to the beat point is displayed, so that the texture effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby improving the music played in the playing video and the displayed texture in the auditory and visual The appeal of the user; and the user can express their own personality through custom-set music, texture and texture effects and can edit and obtain personalized play video in real time. This method satisfies the user's personalized play video design needs and increases the video. The interest of the app and the interactivity of the app and the user significantly increase the satisfaction of the user experience.
此外,本发明提供的视频图像的贴图处理方法,结合多个节拍点检测方法,实现快速、准确地检测出所选定视频播放音乐的节拍点,进一步保证视频图像上显示的贴图特效与所选定的视频播放音乐的节拍点紧密关联性,进一步提高用户体验的满意度。In addition, the method for mapping a video image provided by the present invention, combined with a plurality of beat point detection methods, can quickly and accurately detect the beat point of the selected video playing music, further ensuring the texture effect and selected on the video image. The beat of the video playback music is closely related to further improve the satisfaction of the user experience.
本发明实施例的另一种可能的实现方式,在实施例五所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
所述步骤S502之后,还包括,记录所述音乐播放位置与节拍点的对应关系。After the step S502, the method further includes: recording a correspondence between the music playing position and the beat point.
对于本实施例,在根据所述音乐信号检测出所述音乐的节拍点之后,将所述节拍点与其对应的音乐播放位置建立对应关系,并记录所述对应关系。所述对应关系的建立方法在本实施例中不做限定,其可以是添加标签信息的方式。For the embodiment, after the beat point of the music is detected according to the music signal, the beat point is associated with the corresponding music play position, and the corresponding relationship is recorded. The method for establishing the corresponding relationship is not limited in this embodiment, and may be a manner of adding label information.
例如,在所述节拍点对应的音乐播放位置的信号数据添加标签信息,该标签信息携带有表示该音乐播放位置有节拍点且该节拍点为强节拍点或弱节拍点的信息。For example, the signal data of the music playing position corresponding to the beat point is added with tag information, and the tag information carries information indicating that the music playing position has a beat point and the beat point is a strong beat point or a weak beat point.
所述步骤S503,包括:根据所述对应关系,确定在播放视频中播放音乐时,在当前播放位置出现节拍点。The step S503 includes: determining, according to the correspondence, that a beat point occurs at a current play position when playing music in the play video.
对于本实施例,在播放视频中播放音乐时在当前播放位置存在有与节拍点对应的记录时,获取所述音乐播放位置与节拍点的对应关系记录,提取所述对应关系,进而根据所述对应关系确定当前播放位置出现节拍点并确定该节拍点为强节拍点或弱节拍点。For the embodiment, when there is a record corresponding to the beat point in the current play position when the music is played in the play video, the correspondence record of the music play position and the beat point is acquired, and the corresponding relationship is extracted, and then according to the The correspondence determines that a beat point occurs at the current play position and determines that the beat point is a strong beat point or a weak beat point.
对于本实施例,通过记录所述音乐播放位置与节拍点的对应关系,可实现简单、快速地确定当前播放位置是否出现节拍点以及节拍点为强节拍点还是弱节拍点。For the embodiment, by recording the correspondence between the music playing position and the beat point, it is possible to easily and quickly determine whether the current playing position has a beat point and whether the beat point is a strong beat point or a weak beat point.
本发明实施例的另一种可能的实现方式,在实施例五所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
所述步骤S501,包括:The step S501 includes:
获取播放视频中的图像,识别所述图像中的人脸区域,在所述人脸区域增加贴图。Acquiring an image in the played video, identifying a face region in the image, and adding a map to the face region.
对于本实施例,所述贴图主要为人脸装饰类贴图,例如犄角、胡子、眼镜等素材,终端通过对播放视频中的图像进行人脸识别,进而在视频图像中人脸的相应位置增加贴图。例如,选定在播放视频中的人脸区域增加虚拟的耳朵、胡须等贴图,贴图会随着用户的脸一起移动,实现虚拟与现实的结合与互动。For the embodiment, the texture is mainly a face decoration type map, such as a corner, a beard, a glasses, and the like, and the terminal performs face recognition on the image in the played video, thereby adding a map to the corresponding position of the face in the video image. For example, the face area selected in the play video is added with virtual ear, beard and other textures, and the texture will move along with the user's face to realize the combination and interaction of virtual and reality.
对于本实施例,用户可通过自定义设置贴图及贴图特效来表达自己的个性并可实时编辑获得其个性化形象设计的播放视频,满足了用户的个性化形象设计需求,增加视频应用的趣味性及应用与用户的互动性,显著提高用户体验的满意度。For this embodiment, the user can express his own personality by custom setting texture and texture effect and can edit and play the video of the personalized image design in real time, satisfying the user's personalized image design requirement and increasing the interest of the video application. And the interaction of the application with the user, significantly improving the satisfaction of the user experience.
本发明实施例的另一种可能的实现方式,在实施例五所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
所述步骤S501之后,还包括:After the step S501, the method further includes:
确认接收到贴图切换指令;切换在所述图像中增加的贴图。Confirm that the texture switching instruction is received; switch the map added in the image.
对于本实施例,当用户对在视频图像中增加的贴图不满意时,可向终端发出贴图切换指令以将贴图切换为自己喜欢的贴图素材。所述指示贴图切换的方式可以是语音指示、动作指示和输入指示等方式,本实施例对此不做限定。For the present embodiment, when the user is dissatisfied with the texture added in the video image, a texture switching instruction can be issued to the terminal to switch the texture to the texture material that he likes. The manner of the indication map switching may be a voice indication, an action indication, and an input indication, which is not limited in this embodiment.
例如,通过语音来指示贴图的切换时,终端首先获取所述播放视频中的声音,并识别所述声音的音频特征,随后将所述音频特征与预置的贴图切换口令,如“切换”、“变”等口令的音频特征进行匹配,若匹配一致,则确认接收到所述贴图切换指令,并对贴图进行切换。For example, when the switching of the texture is indicated by voice, the terminal first acquires the sound in the played video, and recognizes the audio feature of the sound, and then switches the audio feature to the preset texture, such as “switching”, The audio features of the passwords such as "change" are matched. If the matching is consistent, it is confirmed that the texture switching instruction is received and the texture is switched.
又例如,通过动作来指示贴图的切换时,终端首先识别出所述图像中的人物区域,并对人物区域内的人物动作进行检测,若在所述人物区域检测到预置的贴图切换动作,如“摆手”、“摇头”等动作,则确认接收到所述贴图切换指令,并对贴图进行切换。Further, for example, when the switching of the map is instructed by the operation, the terminal first recognizes the person region in the image, and detects the motion of the person in the person region, and if a preset texture switching operation is detected in the person region, If the action of "hand waving" or "shaking the head" is performed, it is confirmed that the texture switching instruction is received and the texture is switched.
再例如,通过输入来指示贴图的切换时,用户只需在视频应用中重新输入选择另一贴图,即可对当前贴图进行切换。For another example, when inputting to indicate the switching of the texture, the user can switch the current texture by simply re-entering another image in the video application.
对于本实施例,用户可通过方便快捷地根据自己的意愿对贴图进行切换,进一步增加了视频应用的趣味性及应用与用户的互动性,显著提高了用户体验的满意度。For this embodiment, the user can switch the texture according to his or her own wishes conveniently and quickly, further increasing the interest of the video application and the interaction between the application and the user, and significantly improving the satisfaction of the user experience.
对于本实施例,所述视频为直播视频,即本实施例中的方法主要应用于视频直播领域。For the embodiment, the video is a live video, that is, the method in this embodiment is mainly applied to the field of video live broadcast.
本发明实施例的另一种可能的实现方式,在实施例五所示的基础上,还包括下述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
所述步骤S501之前,还包括:Before the step S501, the method further includes:
判断直播端的主播是否执行预置的增加贴图请求动作;Determining whether the anchor of the live broadcast end performs a preset increase map request action;
若是,获取所述主播预置的贴图;进行所述获取播放视频中的图像,在所述图像中增加贴图的步骤。If yes, acquiring a map of the anchor preset; performing the step of acquiring an image in the played video, and adding a map to the image.
对于本实施例,主播可在视频直播过程中通过执行预置的增加贴图请求来获取包含贴图的视频直播图像。所述请求增加贴图的方式可以是语音请求、动作请求和输入请求等方式,本实施例对此不做限定。For the embodiment, the anchor can obtain the live video of the video including the map by performing a preset add map request during the live broadcast of the video. The manner in which the request is added to the map may be a voice request, an action request, and an input request, and is not limited in this embodiment.
例如,通过语音来请求增加贴图时,终端首先获取所述播放视频中的声音,并识别所述声音的音频特征,随后将所述音频特征与预置的增加贴图口令,如“贴图”、“变身”等口令的音频特征进行匹配,若匹配一致,便在播放视频的图像中增加贴图。For example, when requesting to add a texture by voice, the terminal first acquires the sound in the played video, and recognizes the audio feature of the sound, and then adds the audio feature to the preset added texture password, such as “map”, “ The audio features of the passwords are matched, and if the matches are consistent, the texture is added to the image of the played video.
又例如,通过动作来请求增加贴图时,终端首先识别出所述图像中的人物区域,并对人物区域内的人物动作进行检测,若在所述人物区域检测到预置的贴图切换动作,如“比心”、“飞吻”等动作,便在播放视频的图像中增加贴图。For another example, when an action is requested to add a map, the terminal first recognizes a person region in the image, and detects a person motion in the person region, and if a preset texture switching action is detected in the person region, such as Adding a map to the image of the played video, such as "being heart" and "flying kiss".
再例如,通过输入来请求增加贴图时,用户只需在视频应用中点击选择一个贴图,便在播放视频的图像中增加该贴图。For another example, when an input is requested to add a texture, the user simply clicks on a texture in the video application to add the texture to the image of the played video.
在其他实施例中,所述贴图还可以由视频直播间内的观众选定,也可以由主播依据视频直播间观众的意愿选择热度最高的贴图。该方法能够满足直播的要求,烘托直播氛围,且更好促进主播与观众的互动,进一步提高用户体验的满意度。In other embodiments, the texture may also be selected by a viewer in the live video room, or the anchor may select the hottest texture according to the wishes of the viewer in the live video broadcast. The method can meet the requirements of the live broadcast, highlight the live broadcast atmosphere, and better promote the interaction between the anchor and the audience, and further improve the satisfaction of the user experience.
本发明实施例的另一种可能的实现方式,在实施例五所示的基础上,还包括下 述步骤,其中,Another possible implementation manner of the embodiment of the present invention further includes the following steps, where
所述步骤S502,包括:The step S502 includes:
获取欲在播放视频中播放的音乐的音乐信号,判断检测强节拍点,还是检测强节拍点和弱节拍点;Obtaining a music signal of music to be played in the played video, determining whether to detect a strong beat point, or detecting a strong beat point and a weak beat point;
若检测强节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,根据所述音乐信号的能量强度值获得候选节拍点,根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔,根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点;若采用变化值检测,根据检测点的音乐信号的能量变化差值,获得候选节拍点,根据所述候选节拍点,以各相邻两个所述候选节拍点作为信号起始点截取两段音乐信号,根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点;If the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and each adjacent two candidate beats are counted according to each candidate beat point. The time interval between the frames in which the points are located, according to the time interval, detecting that the candidate beat points corresponding to the detected points have strong beat points; if the change value detection is used, the candidate beat points are obtained according to the energy variation difference of the music signals of the detected points. According to the candidate beat point, two adjacent music beat signals are taken as starting points of the two adjacent candidate beat points, and according to the comparison result of the two pieces of music signals, a strong beat point corresponding to the candidate beat point detection point is detected. ;
若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测;若采用强度值检测,对所述音乐信号进行加权处理,获得加权后的音乐信号,根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点;若采用变化值检测,对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱,根据所述频谱,确定检测点的能量变化值,根据能量变化值,检测出检测点出现弱节拍点或强候选节拍点;If the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used; if the intensity value detection is used, the music signal is weighted to obtain the weighted music signal, according to the weighted music signal. The energy intensity value is detected as a strong beat point or a weak beat point at the detection point; if the change value detection is used, the music signal is filtered, and then subjected to short-time Fourier transform to obtain a spectrum, and the detection is determined according to the spectrum. The energy change value of the point is detected according to the energy change value, and a weak beat point or a strong candidate beat point is detected at the detection point;
对于本实施例,针对不同的所需检测节拍点的类型以及检测标准,对应有不同的节拍检测方法。For the present embodiment, different beat detection methods are corresponding for different types of required detection beat points and detection criteria.
其中,所述判断检测强节拍点,还是检测强节拍点和弱节拍点,包括:Wherein, the determining whether to detect a strong beat point or detecting a strong beat point and a weak beat point comprises:
获取视频所需贴图特效类型,根据视频所需贴图特效类型判断检测强节拍点,还是检测强节拍点和弱节拍点;所述若检测强节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测;所述若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测,包括:若检测强节拍点和弱节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测。Obtain the type of texture effect required for the video, judge whether to detect the strong beat point according to the type of texture effect required by the video, or detect the strong beat point and the weak beat point; if the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used, including If the strong beat point is detected, the type of the music is obtained, and the intensity value detection or the change value detection is used according to the type judgment; if the strong beat point and the weak beat point are detected, whether the intensity value detection or the change value detection is used, including: If a strong beat point and a weak beat point are detected, the type of the music is acquired, and whether the intensity value detection or the change value detection is used is determined according to the type.
对于本实施例,可通过获取的视频所需贴图特效类型来判断所需检测节拍点的类型的。所述视频所需贴图特效类型为用户选择的或视频应用默认的贴图特效类型。例如,用户希望在播放视频中有层出不穷的贴图特效,故根据其视频所需贴图特效类型判断出既要检测强节拍点,也要检测弱节拍点。For the present embodiment, the type of the desired beat point can be determined by the type of texture effect required for the acquired video. The type of texture effect required for the video is the default effect type selected by the user or the video application. For example, the user wants to have an endless layer of texture effects in the playback video, so it is judged that the strong beat point is detected and the weak beat point is detected according to the type of texture effect required for the video.
对于本实施例,是通过获取的音乐的类型来判断检测标准的。例如,所获取的音乐的类型为摇滚,该音乐类型的音乐信号往往都有很高的强度值,但其变化值不明显,故根据其类型选择通过检测强度值来检测该音乐的节拍点。For the present embodiment, the detection criteria are judged by the type of music acquired. For example, the type of music acquired is rock, and the music signal of the music type tends to have a high intensity value, but the change value is not obvious, so the beat point of the music is detected by detecting the intensity value according to the type thereof.
对于本实施例,可根据视频所需贴图特效类型和音乐的类型来选择所需检测节拍点的类型以及检测节拍点的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的贴图特效与音乐节拍点的紧密关联性,进一步提高用户体验的满意度。For the embodiment, the type of the desired beat point and the method of detecting the beat point can be selected according to the type of the texture effect and the type of the music required by the video, so as to obtain an accurate beat point by using an appropriate method, and the operation can be reduced. The amount, shorten the detection time, further ensure the close relationship between the texture effect displayed on the video image and the music beat point, and further improve the satisfaction of the user experience.
此外,本发明实施例提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现以上实施例一所述的视频图像处理方法,或实施例二所述的视频图像处理方法,或实施例三所述的视频图像处理方法,或实施例四所述的视频直播中的音乐礼物处理方法,或实施例五所述的视频图像的 贴图处理方法。其中,所述计算机可读存储介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,存储设备包括由设备(例如,计算机、手机)以能够读的形式存储或传输信息的任何介质,可以是只读存储器,磁盘或光盘等。In addition, an embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the program is executed by the processor, the video image processing method according to the first embodiment is implemented, or an embodiment The video image processing method according to the second embodiment, or the video image processing method according to the third embodiment, or the music gift processing method in the live video broadcast according to the fourth embodiment, or the texture processing method of the video image according to the fifth embodiment . The computer readable storage medium includes, but is not limited to, any type of disk (including a floppy disk, a hard disk, an optical disk, a CD-ROM, and a magneto-optical disk), a ROM (Read-Only Memory), and a RAM (Random Access). Memory, RAM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or Light card. That is, the storage device includes any medium that stores or transmits information in a readable form by a device (eg, a computer, a mobile phone), and may be a read only memory, a magnetic disk, an optical disk, or the like.
本发明实施例提供的一种计算机可读存储介质,可实现通过对欲在播放视频中播放的音乐进行节拍点检测,并在音乐播放过程中根据所检测到的节拍点在视频图像中显示该节拍点对应的特效,以使视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联,进而以提高在视频中播放的音乐在听觉以及视觉上的感染力,增加视频应用的趣味性并提高用户体验的满意度。此外,本发明提供的计算机可读存储介质,还可实现结合多个节拍点检测方法,实现快速、准确地检测出所选定视频播放音乐的节拍点;且可根据视频所需特效类型和音乐的类型来选择所需检测节拍点的类型以及检测节拍点的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联性,进一步提高用户体验的满意度。另外,本发明提供的计算机可读存储介质应用于直播视频领域时,还可实现通过依次根据主播意愿、音乐类型、观众意愿选择特效,能够满足直播的要求,烘托直播氛围,且更好促进主播与观众的互动,进一步提高用户体验的满意度。A computer readable storage medium provided by the embodiment of the present invention can perform beat point detection on music to be played in a play video, and display the video image in the music image according to the detected beat point. The effect corresponding to the beat point, so that the special effect displayed on the video image is closely related to the beat point of the selected video playing music, thereby increasing the visual and visual appeal of the music played in the video, and increasing the video application. Fun and increase the satisfaction of the user experience. In addition, the computer readable storage medium provided by the present invention can also implement a combination of multiple beat point detection methods to quickly and accurately detect the beat point of the selected video playing music; and can select the special effect type and music according to the video. Type to select the type of beat point to be detected and the method of detecting the beat point, so as to achieve an accurate method to obtain accurate beat points, and reduce the amount of calculation, shorten the detection time, and further ensure the special effects and images displayed on the video image. The beat points of the selected video playing music are closely related to further improve the satisfaction of the user experience. In addition, when the computer readable storage medium provided by the present invention is applied to the field of live video, it is also possible to select a special effect according to the anchor intention, the type of music, and the will of the viewer, thereby meeting the requirements of the live broadcast, highlighting the live broadcast atmosphere, and better promoting the anchor. Interact with the audience to further improve the satisfaction of the user experience.
本发明实施例提供的计算机可读存储介质可以实现上述提供的方法实施例,具体功能实现请参见方法实施例中的说明,在此不再赘述。The computer-readable storage medium provided by the embodiment of the present invention may implement the foregoing method embodiments. For the specific function implementation, refer to the description in the method embodiment, and details are not described herein again.
此外,本发明实施例还提供了一种终端,如图6所示,所述终端可以包括一个或者一个以上的处理器601,还包括存储器602、WiFi(wireless fidelity,无线保真)电路603、RF(Radio Frequency,射频)电路604、音频电路605、传感器606、输出设备607、输入设备604、电源609,处理器601是终端的控制中心,利用各种接口和线路连接以上各部分。本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。In addition, the embodiment of the present invention further provides a terminal. As shown in FIG. 6, the terminal may include one or more processors 601, and further includes a memory 602, a WiFi (Wireless Fidelity) circuit 603, RF (Radio Frequency) circuit 604, audio circuit 605, sensor 606, output device 607, input device 604, power supply 609, and processor 601 are control centers of the terminals, and the above components are connected by various interfaces and lines. It will be understood by those skilled in the art that the terminal structure shown in FIG. 6 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
WiFi电路603可为用户提供无线局域网或互联网访问;其可包括天线、WiFi模块等。RF电路604可收发信息,或在通话过程中信号的接收和发送;其可包括天线、至少一个放大器、调谐器、一个或多个振荡器、耦合器、双工器等。音频电路605可将接收到的音频数据转换成电信号,传输到扬声器,也可将传声器收集的声音信号转换为音频数据,发给处理器601处理;其可设置扬声器、传声器、耳机接口等。传感器606可用于感应外界信号,并发给处理器601处理;其可包括运动传感器、光传感器等。输出设备607可用于显示各种信号;其可为采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板。输入设备604可用于输入数字和字符等信息;其可为物理按键、触控面板等。电源609可为终端各部分供电,通过电源管理系统与处理器609逻辑连接;其可包括一个或一个以上的直流或交流电源、充电系统、电源状态指示器等组件。存储器602可用于存储软件程序以及模块;其可为计算机可读存储介质, 具体的为硬盘、闪存等。处理器是终端的控制中心,通过运行或执行存储在存储器602内的软件程序和/或模块,以及调用存储在存储器602的数据,执行终端各种功能、处理终端数据。The WiFi circuit 603 can provide the user with wireless local area network or internet access; it can include an antenna, a WiFi module, and the like. The RF circuitry 604 can transmit and receive information, or receive and transmit signals during a call; it can include an antenna, at least one amplifier, a tuner, one or more oscillators, a coupler, a duplexer, and the like. The audio circuit 605 can convert the received audio data into an electrical signal for transmission to a speaker, and can also convert the sound signal collected by the microphone into audio data for processing by the processor 601; it can set a speaker, a microphone, a headphone interface, and the like. The sensor 606 can be used to sense an external signal and send it to the processor 601 for processing; it can include a motion sensor, a light sensor, and the like. The output device 607 can be used to display various signals; the display panel can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Input device 604 can be used to input information such as numbers and characters; it can be a physical button, a touch panel, or the like. The power supply 609 can provide power to various portions of the terminal and is logically coupled to the processor 609 via a power management system; it can include one or more components such as a DC or AC power source, a charging system, a power status indicator, and the like. The memory 602 can be used to store software programs and modules; it can be a computer readable storage medium, specifically a hard disk, a flash memory, or the like. The processor is the control center of the terminal, and performs various functions of the terminal and processes the terminal data by running or executing software programs and/or modules stored in the memory 602, and calling data stored in the memory 602.
作为一个实施例,终端包括:一个或多个处理器601,存储器602,一个或多个应用程序,其中所述一个或多个应用程序被存储在存储器602中并被配置为由所述一个或多个处理器601执行,所述一个或多个程序配置用于执行以上实施例一所述的视频图像处理方法,或实施例二所述的视频图像处理方法,或实施例三所述的视频图像处理方法,或实施例四所述的视频直播中的音乐礼物处理方法,或实施例五所述的视频图像的贴图处理方法。As an embodiment, the terminal includes: one or more processors 601, a memory 602, one or more applications, wherein the one or more applications are stored in the memory 602 and configured to be configured by the one or The plurality of processors 601 are configured to perform the video image processing method according to the first embodiment, or the video image processing method according to the second embodiment, or the video according to the third embodiment. The image processing method, or the music gift processing method in the live video broadcast described in the fourth embodiment, or the texture processing method of the video image described in the fifth embodiment.
本发明实施例提供的一种终端,可实现通过对欲在播放视频中播放的音乐进行节拍点检测,并在音乐播放过程中根据所检测到的节拍点在视频图像中显示该节拍点对应的特效,以使视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联,进而以提高在视频中播放的音乐在听觉以及视觉上的感染力,增加视频应用的趣味性并提高用户体验的满意度。此外,本发明提供的终端,可实现结合多个节拍点检测方法,实现快速、准确地检测出所选定视频播放音乐的节拍点;且可根据视频所需特效类型和音乐的类型来选择所需检测节拍点的类型以及检测节拍点的方法,以实现采用合适的方法来得到准确的节拍点,且可减少运算量,缩短检测时长,进一步保证视频图像上显示的特效与所选定的视频播放音乐的节拍点紧密关联性,进一步提高用户体验的满意度。另外,本发明提供的终端应用于直播视频领域时,可实现通过依次根据主播意愿、音乐类型、观众意愿选择特效,能够满足直播的要求,烘托直播氛围,且更好促进主播与观众的互动,进一步提高用户体验的满意度。The terminal provided by the embodiment of the invention can perform the beat point detection on the music to be played in the played video, and display the beat point corresponding to the beat point in the video image according to the detected beat point during the music playing process. Special effects, so that the special effects displayed on the video image are closely related to the beat point of the selected video playing music, thereby improving the audio and the visual appeal of the music played in the video, increasing the interest of the video application and improving User experience satisfaction. In addition, the terminal provided by the present invention can implement a combination of multiple beat point detection methods to quickly and accurately detect the beat point of the selected video playing music; and can select according to the type of special effect required by the video and the type of music. The type of beat point and the method of detecting the beat point are detected to achieve an accurate beat point by using an appropriate method, and the amount of calculation can be reduced, the detection time is shortened, and the effect displayed on the video image and the selected video play are further ensured. The beat points of the music are closely related to further improve the satisfaction of the user experience. In addition, when the terminal provided by the present invention is applied to the field of live video, it can realize the special effects according to the anchor intention, the type of music, and the will of the viewer, and can meet the requirements of the live broadcast, highlight the live broadcast atmosphere, and better promote the interaction between the anchor and the viewer. Further improve the satisfaction of the user experience.
本发明实施例提供的终端可以实现上述提供的方法实施例,具体功能实现请参见方法实施例中的说明,在此不再赘述。The terminal provided by the embodiment of the present invention may implement the foregoing method embodiment. For the specific function implementation, refer to the description in the method embodiment, and details are not described herein again.
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above is only a part of the embodiments of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.

Claims (35)

  1. 一种视频图像处理方法,其特征在于,包括如下步骤:A video image processing method, comprising the steps of:
    获取欲在播放视频中播放的音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点;Acquiring a music signal of music to be played in the played video, detecting a beat point of the music according to the music signal;
    确定在播放视频中播放音乐时,在当前播放位置出现节拍点;Determining that a beat point occurs at the current playback position when playing music in the played video;
    获取所述节拍点对应的特效;Obtaining an effect corresponding to the beat point;
    根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。The image in the played video is processed according to the special effect to obtain a video image including the special effect.
  2. 根据权利要求1所述的视频图像处理方法,其特征在于,所述视频为直播视频;The video image processing method according to claim 1, wherein the video is a live video;
    所述获取所述节拍点对应的特效之前,还包括:Before the obtaining the special effect corresponding to the beat point, the method further includes:
    判断所述直播视频的直播间是否指定特效组;若是,获得指定的特效组;否则,获取直播间对应的场景,从直播服务器获取与所述场景匹配的当前直播服务器中热度最高的预置数量的特效组;Determining whether the special effect group is specified in the live broadcast of the live video; if yes, obtaining the specified effect group; otherwise, obtaining the scene corresponding to the live broadcast, and obtaining the preset number of the hottest server in the current live server matching the scene from the live server Special effects group;
    判断所述直播间是否开启音乐类型自动适配特效功能;若是,识别出所述音乐的类型,从所述预置数量的特效组中获得所述类型适配的一个特效组;否则,向客户端发送从所述预置数量的特效组中选择特效组的请求;Determining whether the music type automatic adaptation special effect function is enabled in the live broadcast; if yes, identifying the type of the music, obtaining an effect group of the type adaptation from the preset number of special effect groups; otherwise, to the client Sending a request for selecting an effect group from the preset number of effect groups;
    判断是否收到从客户端根据所述请求反馈的选择信息;若是,根据所述选择信息从所述预置数量的特效组中获得一个特效组,否则,从所述预置数量的特效组中随机获得一个特效组;Determining whether the selection information received from the client according to the request is received; if yes, obtaining an effect group from the preset number of effect groups according to the selection information, otherwise, from the preset number of special effect groups Randomly obtain a special effects group;
    所述获取所述节拍点对应的特效,包括:The obtaining the special effect corresponding to the beat point includes:
    从所述获得的特效组中获取节拍点对应的特效;Obtaining an effect corresponding to a beat point from the obtained effect group;
    根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像之后,还包括:After processing the image in the playing video according to the special effect to obtain the video image including the special effect, the method further includes:
    向客户端发送处理后的直播视频。Send the processed live video to the client.
  3. 一种视频图像处理方法,其特征在于,包括如下步骤:A video image processing method, comprising the steps of:
    识别播放视频中声音的音频特征;Identifying audio features of the sound in the played video;
    从服务器下载与所述音频特征匹配的音乐和所述音乐的节拍点对应的特效;Downloading, from the server, a music that matches the audio feature and an effect corresponding to a beat point of the music;
    在所述播放视频中播放所述音乐,确定在所述音乐的当前播放位置出现节拍点;Playing the music in the play video, determining that a beat point occurs at a current play position of the music;
    根据所确定的节拍点对应的特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。The image in the played video is processed according to the determined effect corresponding to the beat point to obtain a video image including the special effect.
  4. 根据权利要求3所述的视频图像处理方法,其特征在于,所述在所述播放视频中播放所述音乐,确定在所述音乐的当前播放位置出现节拍点之前,还包括:The video image processing method according to claim 3, wherein the playing the music in the play video, determining that a beat point occurs in a current play position of the music, further comprising:
    从服务器下载记录所述音乐的音乐播放位置与节拍点的对应关系的节拍点描述文件;Downloading, from the server, a beat point description file that records a correspondence between a music playing position of the music and a beat point;
    所述确定在所述音乐的当前播放位置出现节拍点,包括:The determining that a beat point occurs at a current play position of the music includes:
    根据所述节拍点描述文件中的对应关系,确定在所述音乐的当前播放位置出现节拍点。Determining that a beat point occurs at a current play position of the music according to the correspondence in the beat point description file.
  5. 根据权利要求3所述的视频图像处理方法,其特征在于,所述在所述播放视频中播放所述音乐,确定在所述音乐的当前播放位置出现节拍点之前,还包括:The video image processing method according to claim 3, wherein the playing the music in the play video, determining that a beat point occurs in a current play position of the music, further comprising:
    获取所述音乐的音乐信号;根据所述音乐信号检测出所述音乐的节拍点;记录 所述音乐的当前播放位置与节拍点的对应关系;Acquiring a music signal of the music; detecting a beat point of the music according to the music signal; recording a correspondence between a current play position of the music and a beat point;
    所述确定在所述音乐的当前播放位置出现节拍点,包括:The determining that a beat point occurs at a current play position of the music includes:
    根据所述对应关系,确定在所述音乐的当前播放位置出现节拍点。Based on the correspondence, it is determined that a beat point occurs at a current play position of the music.
  6. 根据权利要求3所述的视频图像处理方法,其特征在于,所述视频为直播视频;The video image processing method according to claim 3, wherein the video is a live video;
    所述识别播放视频中声音的音频特征,包括:The identifying audio features of the sound in the played video includes:
    在直播视频中接收客户端发送的观众哼唱点歌请求;Receiving a request from the client to sing a song in the live video;
    接收客户端发送的观众哼唱声音;Receiving a singer voice sent by the client;
    识别所述观众哼唱声音的音频特征;Identifying an audio feature of the viewer's humming sound;
    获得包含所述特效的视频图像之后,还包括:After obtaining the video image containing the special effect, the method further includes:
    向客户端发送处理后的视频图像。Send the processed video image to the client.
  7. 根据权利要求3所述的视频图像处理方法,其特征在于,所述视频为直播视频;The video image processing method according to claim 3, wherein the video is a live video;
    所述识别播放视频中声音的音频特征,包括:The identifying audio features of the sound in the played video includes:
    在直播视频中接收主播发送的哼唱下载歌曲指令;Receiving a humming download song command sent by the anchor in the live video;
    接收主播发送的主播哼唱声音;Receiving the anchor humming sound sent by the anchor;
    识别所述主播哼唱声音的音频特征。An audio feature of the anchor humming sound is identified.
  8. 一种视频图像处理方法,其特征在于,包括如下步骤:A video image processing method, comprising the steps of:
    获取欲在播放视频中播放的音乐的音乐信号;Acquiring a music signal of music to be played in the played video;
    判断是否预存有用于保存所述音乐的节拍点与音乐播放位置的对应关系的节拍点描述文件;若是,获取所述节拍点描述文件;若否,根据所述音乐信号检测出所述音乐的节拍点,根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件;Determining whether a beat point description file for storing a correspondence relationship between a beat point of the music and a music play position is prestored; if yes, acquiring the beat point description file; if not, detecting a beat of the music according to the music signal Point, generating a beat point description file according to the detected correspondence between the beat point and the music playing position;
    根据所述节拍点描述文件,确定在播放视频中播放音乐时,在当前播放位置出现节拍点;Determining, according to the beat point description file, that a beat point occurs at a current play position when playing music in the play video;
    获取所述节拍点对应的特效;根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像。Obtaining an effect corresponding to the beat point; processing an image in the played video according to the special effect to obtain a video image including the special effect.
  9. 根据权利要求8所述的视频图像处理方法,其特征在于,所述判断是否预存有用于保存所述音乐的节拍点与音乐播放位置的对应关系的节拍点描述文件;若是,获取所述节拍点描述文件;包括:The video image processing method according to claim 8, wherein the determining whether a beat point description file for storing a correspondence relationship between a beat point of the music and a music play position is prestored; if yes, acquiring the beat point Description file; includes:
    判断本地文件中是否预存有节拍点描述文件,若是,从本地文件中获取所述节拍点描述文件;或Determining whether a beat point description file is pre-stored in the local file, and if so, obtaining the beat point description file from the local file; or
    判断服务器是否预存有节拍点描述文件,若是,从服务器中下载所述节拍点描述文件;或Determining whether the server pre-stores a beat point description file, and if so, downloading the beat point description file from the server; or
    判断本地文件中是否预存有节拍点描述文件,若是,从本地文件中获取所述节拍点描述文件;若否,判断服务器是否预存有节拍点描述文件,若是,从服务器中下载所述节拍点描述文件。Determining whether a beat point description file is pre-stored in the local file, and if so, obtaining the beat point description file from the local file; if not, determining whether the server pre-stores the beat point description file, and if so, downloading the beat point description from the server file.
  10. 根据权利要求8所述的视频图像处理方法,其特征在于,所述获取所述节拍点描述文件之后,还包括:The video image processing method according to claim 8, wherein after the acquiring the beat point description file, the method further comprises:
    若所述节拍点描述文件为从服务器下载的节拍点描述文件,根据所述音乐信号检测出所述音乐的节拍点,根据检测出的节拍点对所述节拍点描述文件进行校对, 在本地文件中保存校对后的节拍点描述文件。If the beat point description file is a beat point description file downloaded from the server, detecting a beat point of the music according to the music signal, and correcting the beat point description file according to the detected beat point, in the local file Save the beat point description file after proofreading.
  11. 根据权利要求8所述的视频图像处理方法,其特征在于,所述根据所述音乐信号检测出所述音乐的节拍点,根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件之后,还包括:The video image processing method according to claim 8, wherein the detecting a beat point of the music according to the music signal, and generating a beat point description according to the detected correspondence relationship between the beat point and the music play position After the file, it also includes:
    将所述节拍点描述文件上传到服务器。Upload the beat point description file to the server.
  12. 根据权利要求8所述的视频图像处理方法,其特征在于,所述视频为直播视频;The video image processing method according to claim 8, wherein the video is a live video;
    所述获取所述节拍点对应的特效之前,还包括:Before the obtaining the special effect corresponding to the beat point, the method further includes:
    获取直播端的主播设置的所述音乐的节拍点对应的特效信息,将节拍点与音乐播放位置与特效信息的对应关系保存到所述节拍点描述文件中;生成包含特效信息的节拍点描述文件;Obtaining the special effect information corresponding to the beat point of the music set by the anchor of the live end, saving the correspondence between the beat point and the music play position and the special effect information into the beat point description file; generating a beat point description file containing the special effect information;
    所述获取所述节拍点对应的特效,包括:The obtaining the special effect corresponding to the beat point includes:
    根据所述包含特效信息的节拍点描述文件,获取所述节拍点对应的特效。Obtaining an effect corresponding to the beat point according to the beat point description file containing the special effect information.
  13. 根据权利要求12所述的视频图像处理方法,其特征在于,所述生成包含特效信息的节拍点描述文件之后,还包括:The video image processing method according to claim 12, wherein after the generating a beat point description file containing the special effect information, the method further comprises:
    向连麦的另一直播端发送所述音乐、所述包含特效信息的节拍点描述文件、所述节拍点对应的特效,以使另一直播端在播放所述音乐时显示与本直播端相同特效。Sending the music, the beat point description file containing the special effect information, and the special effect corresponding to the beat point to another live end of the continuous wheat, so that another live broadcast end displays the same as the live broadcast end when playing the music Special effects.
  14. 根据权利要求1、3或8所述的视频图像处理方法,其特征在于,根据所述特效对播放视频中的图像进行处理,获得包含所述特效的视频图像,包括:The video image processing method according to claim 1, 3 or 8, wherein the processing of the image in the played video according to the special effect to obtain the video image including the special effect comprises:
    获取所述特效中的素材,以图层叠加方式把素材与所述播放视频中的图像进行合成,获得包含所述特效的视频图像。Obtaining the material in the special effect, synthesizing the material with the image in the playing video in a layer superposition manner, and obtaining a video image including the special effect.
  15. 一种视频直播中的音乐礼物处理方法,其特征在于,包括:A music gift processing method in a live video broadcast, characterized in that it comprises:
    在视频直播中接收观众发送的音乐礼物;所述音乐礼物包括欲在视频直播中播放的音乐;Receiving a music gift sent by a viewer in a live video; the music gift includes music to be played in a live video;
    获取所述音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点;Acquiring a music signal of the music, and detecting a beat point of the music according to the music signal;
    确定在视频直播中播放所述音乐礼物中的音乐时,在当前播放位置出现节拍点;Determining that when playing the music in the music gift in the live video, a beat point appears at the current play position;
    获取所述节拍点对应的特效;Obtaining an effect corresponding to the beat point;
    根据所述特效对视频直播中的图像进行处理,获得包含所述特效的视频直播图像。The image in the live video is processed according to the special effect, and a live video of the video including the special effect is obtained.
  16. 根据权利要求15所述的音乐礼物处理方法,其特征在于,所述音乐礼物还包括所述音乐的节拍点对应的特效信息;The music gift processing method according to claim 15, wherein the music gift further includes special effect information corresponding to a beat point of the music;
    所述获取所述节拍点对应的特效,包括:The obtaining the special effect corresponding to the beat point includes:
    根据所述特效信息,从所述音乐礼物中获取所述节拍点对应的特效。Obtaining an effect corresponding to the beat point from the music gift according to the special effect information.
  17. 根据权利要求15或16所述的音乐礼物处理方法,其特征在于,根据所述特效对视频直播中的图像进行处理,获得包含所述特效的视频直播图像之后,还包括:The music gift processing method according to claim 15 or 16, wherein after the image in the live video is processed according to the special effect to obtain the live video image of the special effect, the method further includes:
    向客户端发送处理后的视频直播图像。Send the processed live video image to the client.
  18. 根据权利要求16所述的音乐礼物处理方法,其特征在于,所述获取所述音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点之后,还包括:The music gift processing method according to claim 16, wherein the acquiring the music signal of the music, after detecting the beat point of the music according to the music signal, further comprising:
    根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件;所述确定在视频直播中播放所述音乐礼物中的音乐时,在当前播放位置出现节拍点包括:Generating a beat point description file according to the detected correspondence between the beat point and the music play position; and determining to play the music in the music gift in the live video broadcast, the beat point appearing at the current play position includes:
    根据所述节拍点描述文件,确定在视频直播中播放所述音乐礼物中的音乐时,在当前播放位置出现节拍点。According to the beat point description file, when it is determined that the music in the music gift is played in the live video, a beat point appears at the current play position.
  19. 根据权利要求18所述的音乐礼物处理方法,其特征在于,所述根据所检测出的节拍点与音乐播放位置的对应关系生成节拍点描述文件之后,还包括:The music gift processing method according to claim 18, wherein the generating a beat point description file according to the corresponding relationship between the detected beat point and the music play position, further comprising:
    获取所述特效信息,将节拍点与音乐播放位置与特效信息的对应关系保存到所述节拍点描述文件中;生成包含特效信息的节拍点描述文件;Obtaining the special effect information, saving a correspondence relationship between the beat point and the music playing position and the special effect information to the beat point description file; generating a beat point description file containing the special effect information;
    所述根据所述特效信息,从所述音乐礼物中获取所述节拍点对应的特效,包括:And obtaining, according to the special effect information, the special effects corresponding to the beat point from the music gift, including:
    根据所述包含特效信息的节拍点描述文件,从所述音乐礼物中获取所述节拍点对应的特效。Obtaining an effect corresponding to the beat point from the music gift according to the beat point description file containing the special effect information.
  20. 根据权利要求15或16所述的音乐礼物处理方法,其特征在于,所述在视频直播中接收观众发送的音乐礼物之后,还包括:The music gift processing method according to claim 15 or 16, wherein after receiving the music gift sent by the viewer in the live video broadcast, the method further comprises:
    判断直播端的主播是否执行打开所述音乐礼物的预设动作;Determining whether the anchor of the live broadcast end performs a preset action of opening the music gift;
    若是,继续所述获取所述音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点的步骤;并向发送所述音乐礼物的观众反馈主播打开音乐礼物的信息。If so, continuing the step of acquiring the music signal of the music, detecting a beat point of the music according to the music signal; and feeding back to the viewer who sent the music gift the information that the anchor opens the music gift.
  21. 根据权利要求15或16所述的音乐礼物处理方法,其特征在于,所述根据所述特效对视频直播中的图像进行处理,获得包含所述特效的视频直播图像,包括:The music gift processing method according to claim 15 or 16, wherein the processing the image in the live video according to the special effect to obtain the live video image including the special effect comprises:
    获取所述特效中的素材,以图层叠加方式把素材与所述视频直播中的图像进行合成,获得包含所述特效的视频直播图像。The material in the special effect is obtained, and the material is combined with the image in the live video broadcast in a layer superposition manner to obtain a live video image including the special effect.
  22. 一种视频图像的贴图处理方法,其特征在于,包括如下步骤:A texture processing method for a video image, comprising the steps of:
    获取播放视频中的图像,在所述图像中增加贴图;Obtaining an image in a play video, adding a texture to the image;
    获取欲在播放视频中播放的音乐的音乐信号,根据所述音乐信号检测出所述音乐的节拍点;Acquiring a music signal of music to be played in the played video, detecting a beat point of the music according to the music signal;
    确定在播放视频中播放音乐时,在当前播放位置出现节拍点;Determining that a beat point occurs at the current playback position when playing music in the played video;
    获取所述节拍点对应的贴图特效;Obtaining a texture effect corresponding to the beat point;
    根据所述贴图特效对所述图像中的贴图进行处理,获得包含所述贴图特效的视频图像。The texture in the image is processed according to the texture effect to obtain a video image including the texture effect.
  23. 根据权利要求22所述的贴图处理方法,其特征在于,所述贴图包括:基于AR增强现实的二维模型贴图和/或三维模型贴图。The map processing method according to claim 22, wherein the map comprises: a two-dimensional model map and/or a three-dimensional model map based on AR augmented reality.
  24. 根据权利要求22所述的贴图处理方法,其特征在于,所述获取播放视频中的图像,在所述图像中增加贴图,包括:The map processing method according to claim 22, wherein the acquiring an image in the played video and adding a texture to the image comprises:
    获取播放视频中的图像,识别所述图像中的人脸区域,在所述人脸区域增加贴图。Acquiring an image in the played video, identifying a face region in the image, and adding a map to the face region.
  25. 根据权利要求22所述的贴图处理方法,其特征在于,所述获取播放视频中的图像,在所述图像中增加贴图之后,还包括:The map processing method according to claim 22, wherein the acquiring the image in the play video, adding the map to the image further comprises:
    确认接收到贴图切换指令;切换在所述图像中增加的贴图。Confirm that the texture switching instruction is received; switch the map added in the image.
  26. 根据权利要求25所述的贴图处理方法,其特征在于,所述确认接收到贴图切换指令,包括:The map processing method according to claim 25, wherein the confirming receipt of the map switching instruction comprises:
    获取所述播放视频中的声音,识别所述声音的音频特征;若所述音频特征与预 置的贴图切换口令的音频特征匹配一致,确认接收到所述贴图切换指令;或Obtaining a sound in the played video, identifying an audio feature of the sound; if the audio feature matches an audio feature of a preset texture switching password, confirming receipt of the texture switching instruction; or
    识别所述图像中的人物区域,若在所述人物区域检测到预置的贴图切换动作,确认接收到所述贴图切换指令。The person area in the image is identified, and if a preset texture switching operation is detected in the person area, it is confirmed that the texture switching instruction is received.
  27. 根据权利要求22所述的贴图处理方法,其特征在于,所述视频为直播视频;The mapping processing method according to claim 22, wherein the video is a live video;
    所述获取播放视频中的图像,在所述图像中增加贴图之前,还包括:The obtaining the image in the played video, before adding the map to the image, further includes:
    判断直播端的主播是否执行预置的增加贴图请求动作;Determining whether the anchor of the live broadcast end performs a preset increase map request action;
    若是,获取所述主播预置的贴图;进行所述获取播放视频中的图像,在所述图像中增加贴图的步骤。If yes, acquiring a map of the anchor preset; performing the step of acquiring an image in the played video, and adding a map to the image.
  28. 根据权利要求1、5或8所述的视频图像处理方法,或根据权利要求15或16所述的音乐礼物处理方法,或根据权利要求22所述的贴图处理方法,其特征在于,所述节拍点包括强节拍点和弱节拍点;The video image processing method according to claim 1, 5 or 8, or the music gift processing method according to claim 15 or 16, or the texture processing method according to claim 22, wherein the beat Points include strong beat points and weak beat points;
    所述根据所述音乐信号检测出所述音乐的节拍点,包括:The detecting a beat point of the music according to the music signal includes:
    对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱;Filtering the music signal, filtering and performing short-time Fourier transform to obtain a spectrum;
    根据所述频谱,确定检测点的能量变化值;Determining an energy change value of the detection point according to the spectrum;
    根据能量变化值,检测出检测点出现强节拍点或弱节拍点。According to the energy change value, it is detected that a strong beat point or a weak beat point appears at the detection point.
  29. 根据权利要求1、5或8所述的视频图像处理方法,或根据权利要求15或16所述的音乐礼物处理方法,或根据权利要求22所述的贴图处理方法,其特征在于,所述节拍点包括强节拍点和弱节拍点;The video image processing method according to claim 1, 5 or 8, or the music gift processing method according to claim 15 or 16, or the texture processing method according to claim 22, wherein the beat Points include strong beat points and weak beat points;
    所述根据所述音乐信号检测出所述音乐的节拍点,包括:The detecting a beat point of the music according to the music signal includes:
    对所述音乐信号进行加权处理,获得加权后的音乐信号;Performing weighting processing on the music signal to obtain a weighted music signal;
    根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点。According to the energy intensity value of the weighted music signal, it is detected that a strong beat point or a weak beat point occurs at the detection point.
  30. 根据权利要求1、5或8所述的视频图像处理方法,或根据权利要求15或16所述的音乐礼物处理方法,或根据权利要求22所述的贴图处理方法,其特征在于,所述节拍点包括强节拍点;The video image processing method according to claim 1, 5 or 8, or the music gift processing method according to claim 15 or 16, or the texture processing method according to claim 22, wherein the beat Points include strong beat points;
    所述根据所述音乐信号检测出所述音乐的节拍点,包括:The detecting a beat point of the music according to the music signal includes:
    根据所述音乐信号的能量强度值获得候选节拍点;Obtaining a candidate beat point according to the energy intensity value of the music signal;
    根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔;Calculating a time interval between frames of each adjacent two candidate beat points according to each candidate beat point;
    根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点。According to the time interval, it is detected that a candidate beat point corresponds to a strong beat point corresponding to the detected point.
  31. 根据权利要求1、5或8所述的视频图像处理方法,或根据权利要求15或16所述的音乐礼物处理方法,或根据权利要求22所述的贴图处理方法,其特征在于,所述节拍点包括强节拍点;The video image processing method according to claim 1, 5 or 8, or the music gift processing method according to claim 15 or 16, or the texture processing method according to claim 22, wherein the beat Points include strong beat points;
    所述根据所述音乐信号检测出所述音乐的节拍点,包括:The detecting a beat point of the music according to the music signal includes:
    根据检测点的音乐信号的能量变化差值,获得候选节拍点;Obtaining a beat point according to a difference in energy of the music signal of the detected point;
    根据所述候选节拍点,以各相邻两个候选节拍点作为信号起始点截取两段音乐信号;Obtaining two pieces of music signals according to the candidate beat points, using each adjacent two candidate beat points as a signal starting point;
    根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点。According to the comparison result of the two pieces of music signals, it is detected that the candidate beat points have strong beat points corresponding to the detected points.
  32. 根据权利要求1、5或8所述的视频图像处理方法,或根据权利要求15或16所述的音乐礼物处理方法,或根据权利要求22所述的贴图处理方法,其特征在于,根据所述音乐信号检测出所述音乐的节拍点,包括:The video image processing method according to claim 1, 5 or 8, or the music gift processing method according to claim 15 or 16, or the texture processing method according to claim 22, wherein The music signal detects the beat point of the music, including:
    获取所述音乐信号,判断检测强节拍点,还是检测强节拍点和弱节拍点;Obtaining the music signal, determining whether to detect a strong beat point, or detecting a strong beat point and a weak beat point;
    若检测强节拍点,判断采用强度值检测还是变化值检测;If the strong beat point is detected, it is judged whether the intensity value detection or the change value detection is used;
    若采用强度值检测,根据所述音乐信号的能量强度值获得候选节拍点,根据各候选节拍点,统计各相邻两个候选节拍点所在帧之间的时间间隔,根据所述时间间隔,检测出候选节拍点对应检测点出现强节拍点;If the intensity value detection is used, the candidate beat point is obtained according to the energy intensity value of the music signal, and the time interval between frames of each adjacent two candidate beat points is counted according to each candidate beat point, and the detection is performed according to the time interval. A strong beat point appears at the detection point corresponding to the candidate beat point;
    若采用变化值检测,根据检测点的音乐信号的能量变化差值,获得候选节拍点,根据所述候选节拍点,以各相邻两个所述候选节拍点作为信号起始点截取两段音乐信号,根据两段音乐信号的对比结果,检测出候选节拍点对应检测点出现强节拍点;If the change value detection is used, the candidate beat point is obtained according to the energy variation difference of the music signal of the detection point, and according to the candidate beat point, two adjacent music beat signals are taken as the signal starting point of each adjacent two candidate beat points. According to the comparison result of the two pieces of music signals, it is detected that a candidate beat point corresponds to a strong beat point corresponding to the detected point;
    若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测;If the strong beat point and the weak beat point are detected, it is judged whether the intensity value detection or the change value detection is used;
    若采用强度值检测,对所述音乐信号进行加权处理,获得加权后的音乐信号,根据所述加权后的音乐信号的能量强度值,检测出检测点出现强节拍点或弱节拍点;If the intensity value detection is used, the music signal is weighted to obtain a weighted music signal, and according to the energy intensity value of the weighted music signal, a strong beat point or a weak beat point is detected at the detection point;
    若采用变化值检测,对所述音乐信号进行滤波,滤波后进行短时傅立叶变换,获得频谱,根据所述频谱,确定检测点的能量变化值,根据能量变化值,检测出检测点出现弱节拍点或强候选节拍点;If the change value detection is used, the music signal is filtered, and after filtering, the short-time Fourier transform is performed to obtain a spectrum, and according to the spectrum, the energy change value of the detection point is determined, and according to the energy change value, the weak beat of the detection point is detected. Point or strong candidate beat point;
    所述判断检测强节拍点,还是检测强节拍点和弱节拍点,包括:The determination detects a strong beat point, or detects a strong beat point and a weak beat point, including:
    获取视频所需贴图特效类型,根据视频所需贴图特效类型判断检测强节拍点,还是检测强节拍点和弱节拍点;Get the type of texture effect required for the video, judge whether to detect strong beat points according to the type of texture effect required by the video, or detect strong beat points and weak beat points;
    所述若检测强节拍点,判断采用强度值检测还是变化值检测,包括:If the strong beat point is detected, it is determined whether the intensity value detection or the change value detection is used, including:
    若检测强节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测;If a strong beat point is detected, the type of the music is acquired, and whether the intensity value detection or the change value detection is used according to the type judgment;
    所述若检测强节拍点和弱节拍点,判断采用强度值检测还是变化值检测,包括:If the strong beat point and the weak beat point are detected, it is determined whether the intensity value detection or the change value detection is used, including:
    若检测强节拍点和弱节拍点,获取所述音乐的类型,根据类型判断采用强度值检测还是变化值检测。If a strong beat point and a weak beat point are detected, the type of the music is acquired, and whether the intensity value detection or the change value detection is used is determined according to the type.
  33. 根据权利要求1所述的视频图像处理方法,或根据权利要求22所述的贴图处理方法,其特征在于,所述根据所述音乐信号检测出所述音乐的节拍点之后,还包括,记录所述音乐的播放位置与节拍点的对应关系;The video image processing method according to claim 1, or the texture processing method according to claim 22, wherein the detecting the beat point of the music according to the music signal further comprises: recording a location Corresponding relationship between the playing position of the music and the beat point;
    所述确定在播放视频中播放音乐时,在当前播放位置出现节拍点,包括:Determining that when playing music in the playing video, a beat point appears at the current playing position, including:
    根据所述对应关系,确定在播放视频中播放音乐时,在当前播放位置出现节拍点。According to the correspondence, it is determined that when playing music in the playing video, a beat point appears at the current playing position.
  34. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现:A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which is implemented by a processor to:
    权利要求1-14、28至33中任一项所述的视频图像处理方法;A video image processing method according to any one of claims 1-14, 28 to 33;
    或权利要求15-21、28至32中任一项所述的音乐礼物处理方法;Or the music gift processing method according to any one of claims 15-21, 28 to 32;
    或权利要求22至33任一项所述的贴图处理方法。Or the texture processing method according to any one of claims 22 to 33.
  35. 一种终端,其特征在于,其包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于:A terminal, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be Executed by one or more processors, the one or more programs configured to:
    执行根据权利要求1-14、28至33中任一项所述的视频图像处理方法;Performing a video image processing method according to any one of claims 1-14, 28 to 33;
    或执行根据权利要求15-21、28至32中任一项所述的音乐礼物处理方法;Or the music gift processing method according to any one of claims 15-21, 28 to 32;
    或执行根据权利要求22至33任一项所述的贴图处理方法。Or the texture processing method according to any one of claims 22 to 33.
PCT/CN2018/119266 2017-12-15 2018-12-05 Video image processing method and computer storage medium and terminal WO2019114582A1 (en)

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
CN201711353131.8A CN108111909A (en) 2017-12-15 2017-12-15 Method of video image processing and computer storage media, terminal
CN201711353131.8 2017-12-15
CN201711481177.8 2017-12-29
CN201711481160.2A CN108259925A (en) 2017-12-29 2017-12-29 Music gifts processing method, storage medium and terminal in net cast
CN201711481160.2 2017-12-29
CN201711476832.0A CN108322802A (en) 2017-12-29 2017-12-29 Stick picture disposing method, computer readable storage medium and the terminal of video image
CN201711474216.1A CN108259983A (en) 2017-12-29 2017-12-29 A kind of method of video image processing, computer readable storage medium and terminal
CN201711476832.0 2017-12-29
CN201711474216.1 2017-12-29
CN201711481177.8A CN108259984A (en) 2017-12-29 2017-12-29 Method of video image processing, computer readable storage medium and terminal

Publications (1)

Publication Number Publication Date
WO2019114582A1 true WO2019114582A1 (en) 2019-06-20

Family

ID=66819948

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119266 WO2019114582A1 (en) 2017-12-15 2018-12-05 Video image processing method and computer storage medium and terminal

Country Status (1)

Country Link
WO (1) WO2019114582A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688496A (en) * 2019-09-26 2020-01-14 联想(北京)有限公司 Method and device for processing multimedia file
CN112118482A (en) * 2020-09-17 2020-12-22 广州酷狗计算机科技有限公司 Audio file playing method and device, terminal and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593541A (en) * 2008-05-28 2009-12-02 深圳华为通信技术有限公司 A kind of method and media player of and audio file synchronously playing images
US20100312559A1 (en) * 2007-12-21 2010-12-09 Koninklijke Philips Electronics N.V. Method and apparatus for playing pictures
CN104219570A (en) * 2014-09-17 2014-12-17 百度在线网络技术(北京)有限公司 Audio signal playing method and device
CN105430494A (en) * 2015-12-02 2016-03-23 百度在线网络技术(北京)有限公司 Method and device for identifying audio from video in video playback equipment
CN105872838A (en) * 2016-04-28 2016-08-17 徐文波 Sending method and device of special media effects of real-time videos
CN108111909A (en) * 2017-12-15 2018-06-01 广州市百果园信息技术有限公司 Method of video image processing and computer storage media, terminal
CN108259984A (en) * 2017-12-29 2018-07-06 广州市百果园信息技术有限公司 Method of video image processing, computer readable storage medium and terminal
CN108259925A (en) * 2017-12-29 2018-07-06 广州市百果园信息技术有限公司 Music gifts processing method, storage medium and terminal in net cast
CN108259983A (en) * 2017-12-29 2018-07-06 广州市百果园信息技术有限公司 A kind of method of video image processing, computer readable storage medium and terminal
CN108322802A (en) * 2017-12-29 2018-07-24 广州市百果园信息技术有限公司 Stick picture disposing method, computer readable storage medium and the terminal of video image

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100312559A1 (en) * 2007-12-21 2010-12-09 Koninklijke Philips Electronics N.V. Method and apparatus for playing pictures
CN101593541A (en) * 2008-05-28 2009-12-02 深圳华为通信技术有限公司 A kind of method and media player of and audio file synchronously playing images
CN104219570A (en) * 2014-09-17 2014-12-17 百度在线网络技术(北京)有限公司 Audio signal playing method and device
CN105430494A (en) * 2015-12-02 2016-03-23 百度在线网络技术(北京)有限公司 Method and device for identifying audio from video in video playback equipment
CN105872838A (en) * 2016-04-28 2016-08-17 徐文波 Sending method and device of special media effects of real-time videos
CN108111909A (en) * 2017-12-15 2018-06-01 广州市百果园信息技术有限公司 Method of video image processing and computer storage media, terminal
CN108259984A (en) * 2017-12-29 2018-07-06 广州市百果园信息技术有限公司 Method of video image processing, computer readable storage medium and terminal
CN108259925A (en) * 2017-12-29 2018-07-06 广州市百果园信息技术有限公司 Music gifts processing method, storage medium and terminal in net cast
CN108259983A (en) * 2017-12-29 2018-07-06 广州市百果园信息技术有限公司 A kind of method of video image processing, computer readable storage medium and terminal
CN108322802A (en) * 2017-12-29 2018-07-24 广州市百果园信息技术有限公司 Stick picture disposing method, computer readable storage medium and the terminal of video image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110688496A (en) * 2019-09-26 2020-01-14 联想(北京)有限公司 Method and device for processing multimedia file
CN112118482A (en) * 2020-09-17 2020-12-22 广州酷狗计算机科技有限公司 Audio file playing method and device, terminal and storage medium

Similar Documents

Publication Publication Date Title
US11030987B2 (en) Method for selecting background music and capturing video, device, terminal apparatus, and medium
CN110267055B (en) Method, device and system for recommending live broadcast room, server, terminal and medium
CN105159639B (en) Audio cover display methods and device
CN108322802A (en) Stick picture disposing method, computer readable storage medium and the terminal of video image
WO2019114514A1 (en) Method and apparatus for displaying pitch information in live broadcast room, and storage medium
TWI574256B (en) Interactive beat effect system and method for processing interactive beat effect
CN110740262A (en) Background music adding method and device and electronic equipment
CN110267067A (en) Method, apparatus, equipment and the storage medium that direct broadcasting room is recommended
CN108259925A (en) Music gifts processing method, storage medium and terminal in net cast
CN108259983A (en) A kind of method of video image processing, computer readable storage medium and terminal
CN105117102B (en) Audio interface display methods and device
CN106531201B (en) Song recording method and device
CN109302538A (en) Method for playing music, device, terminal and storage medium
CN108111909A (en) Method of video image processing and computer storage media, terminal
CN110691633B (en) Method and system for determining reaction time of response and synchronizing user interface with content being rendered
CN108259984A (en) Method of video image processing, computer readable storage medium and terminal
CN109587549B (en) Video recording method, device, terminal and storage medium
CN108090140A (en) A kind of playback of songs method and mobile terminal
CN109660855A (en) Paster display methods, device, terminal and storage medium
CN111711838B (en) Video switching method, device, terminal, server and storage medium
CN108922506A (en) Song audio generation method, device and computer readable storage medium
CN110087149A (en) A kind of video image sharing method, device and mobile terminal
CN110209871A (en) Song comments on dissemination method and device
CN108922562A (en) Sing evaluation result display methods and device
CN110290392A (en) Live information display methods, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18889596

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18889596

Country of ref document: EP

Kind code of ref document: A1