CN109451168A - Generate the method, apparatus and storage medium of ring signal file - Google Patents
Generate the method, apparatus and storage medium of ring signal file Download PDFInfo
- Publication number
- CN109451168A CN109451168A CN201811453488.8A CN201811453488A CN109451168A CN 109451168 A CN109451168 A CN 109451168A CN 201811453488 A CN201811453488 A CN 201811453488A CN 109451168 A CN109451168 A CN 109451168A
- Authority
- CN
- China
- Prior art keywords
- file
- audio
- video file
- interface
- resource information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72442—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The invention discloses a kind of method, apparatus and storage medium for generating ring signal file, belong to electronic technology field.The described method includes: obtaining video file;According to the audio data in the video file, the first audio file of the first format is generated;The second audio file that playing duration is preset duration is intercepted from first audio file;Second audio file is converted to the ring signal file of the second format.The audio data in video file can be extracted and be intercepted in the present invention, the generating mode of Lai Shengcheng ring signal file, ring signal file is flexible, the audio in the video watched quickly can be fabricated to the tinkle of bells in order to user, can satisfy user demand.
Description
Technical field
The present invention relates to electronic technology field, in particular to a kind of method, apparatus and storage medium for generating ring signal file.
Background technique
With the development of electronic technology, the equipment such as mobile phone are more more and more universal.User when using equipment, often for
The tinkle of bells is arranged in equipment, so that equipment can in time remind user when receiving information, can such as come for mobile phone setting
Electric bell sound, so that user being capable of timely incoming call answering.
In the related technology, multiple ring signal files can be stored in advance in equipment, user can select from multiple ring signal file
A ring signal file is selected to be set as the tinkle of bells.Alternatively, user, which can download the audio file oneself liked, is directly set as the tinkle of bells.
However, user can only select the tinkle of bells in pre-stored multiple ring signal files from the device in aforesaid way, or
Can only be by the audio file of downloading directly as the tinkle of bells, thus the tinkle of bells range of choice compares limitation, flexibility is lower.
Summary of the invention
The embodiment of the invention provides a kind of method, apparatus and storage medium for generating ring signal file, can solve correlation
The tinkle of bells range of choice compares limitation and the lower problem of flexibility in technology.The technical solution is as follows:
On the one hand, a kind of method for generating ring signal file is provided, which comprises
Obtain video file;
According to the audio data in the video file, the first audio file of the first format is generated;
The second audio file that playing duration is preset duration is intercepted from first audio file;
Second audio file is converted to the ring signal file of the second format.
Optionally, the acquisition video file, comprising:
The corresponding resource set of stored all resources is obtained, includes each money in all resources in the resource set
The corresponding resource information in source;
Target resource information corresponding with stored video file is obtained from the resource set;
Storage address is obtained from the target resource information;
Video file corresponding with the target resource information is obtained according to the storage address.
It is optionally, described to obtain the corresponding resource set of stored all resources, comprising:
It calls first interface to read stored all resources, obtains the corresponding resource set of all resources;
Correspondingly, described that target resource information corresponding with stored video file, packet are obtained from the resource set
It includes:
It calls second interface to screen the resource information in the resource set, obtains and stored video file pair
The target resource information answered.
Optionally, the audio data according in the video file generates the first audio file of the first format, packet
It includes:
The video file is parsed, with the audio data in the determination video file;
Third interface is called to extract the audio data in the video file;
Call the 4th interface that the audio data extracted is converted to the first audio file of the first format.
It is optionally, described that the second audio file that playing duration is preset duration is intercepted from first audio file,
Include:
It obtaining audio and intercepts range, the audio interception range is including beginning cutting time point and terminates cutting time point,
It is described to start cutting time point and the when a length of preset duration terminated between cutting time point apart;
The audio file in the first audio file described in the 5th interface intercepts in audio interception range is called, is obtained
To the second audio file.
Second aspect, provides a kind of device for generating ring signal file, and described device includes:
Module is obtained, for obtaining video file;
Generation module, for generating the first audio file of the first format according to the audio data in the video file;
Interception module, for intercepting the second audio text that playing duration is preset duration from first audio file
Part;
Conversion module, for second audio file to be converted to the ring signal file of the second format.
Optionally, the acquisition module includes:
First acquisition unit includes institute in the resource set for obtaining stored all resources corresponding resource set
State the corresponding resource information of each resource in all resources;
Second acquisition unit, for obtaining target resource letter corresponding with stored video file from the resource set
Breath;
Third acquiring unit, for obtaining storage address from the target resource information;
4th acquiring unit, for obtaining video text corresponding with the target resource information according to the storage address
Part.
Optionally, the first acquisition unit is used for:
It calls first interface to read stored all resources, obtains the corresponding resource set of all resources;
Correspondingly, the second acquisition unit is used for:
It calls second interface to screen the resource information in the resource set, obtains and stored video file pair
The target resource information answered.
Optionally, the generation module includes:
Resolution unit, for being parsed to the video file, with the audio data in the determination video file;
Extraction unit, for calling third interface to extract the audio data in the video file;
Converting unit, the first audio for calling the 4th interface that the audio data extracted is converted to the first format are literary
Part.
Optionally, the interception module includes:
5th acquiring unit, for obtaining audio interception range, the audio interception range includes starting cutting time point
With terminate cutting time point, it is described start cutting time point and it is described terminate cutting time point between apart when it is a length of default when
It is long;
Interception unit, for calling in the first audio file described in the 5th interface intercepts in audio interception range
Audio file, obtain the second audio file.
The third aspect provides a kind of device for generating ring signal file, and described device includes processor, memory and storage
On the memory and the program code that can run on the processor, the processor execute real when said program code
The method of ring signal file is generated described in existing above-mentioned first aspect.
Fourth aspect provides a kind of computer readable storage medium, and instruction, the finger are stored on the storage medium
Enable the step of method that ring signal file is generated described in above-mentioned first aspect is realized when being executed by processor.
Technical solution provided in an embodiment of the present invention can at least bring it is following the utility model has the advantages that
Video file is obtained, later, first according to the audio data in the video file, generates the first audio of the first format
File, then the second audio file that playing duration is preset duration is intercepted from the first audio file.Finally, by the second audio text
Part is converted to the ring signal file of the second format.In this way, the audio data in video file can be extracted and be intercepted,
Ring signal file is generated, the generating mode of ring signal file is flexible, can be in order to which user is quickly by the audio in the video watched
It is fabricated to the tinkle of bells, can satisfy user demand.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of flow chart of method for generating ring signal file provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another method for generating ring signal file provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of device for generating ring signal file provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of another device for generating ring signal file provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Before to the embodiment of the present invention carrying out that explanation is explained in detail, the application scenarios of the embodiment of the present invention are said
It is bright.
With the development of electronic technology, video is watched using equipment has become a kind of amusement work that people enjoy a lot
It is dynamic.During watching video, people often think that certain a segment of audio in video (is such as dubbed in background music, background music, dialogue
Deng) very pleasing to the ear, and the ringing sound of cell phone using this section audio as oneself is wanted to, in this case, people can only want to do
Method knows the title of this section audio, is then downloaded this section audio by means such as internet hunts according to the title of this section audio
Into the mobile phone of oneself, then this section audio can be just set to ringing sound of cell phone, whole process is extremely complex cumbersome.For this purpose,
The embodiment of the invention provides a kind of methods for generating ring signal file, can directly extract the audio data in video file
Come and is intercepted, Lai Shengcheng ring signal file, to meet user demand.
Fig. 1 is a kind of flow chart of method for generating ring signal file provided in an embodiment of the present invention.Referring to Fig. 1, this method
Include:
Step 101: obtaining video file.
Step 102: according to the audio data in video file, generating the first audio file of the first format.
Step 103: the second audio file that playing duration is preset duration is intercepted from the first audio file.
Step 104: the second audio file is converted to the ring signal file of the second format.
In embodiments of the present invention, video file is obtained, later, first according to the audio data in the video file, is generated
First audio file of the first format, then the second audio text that playing duration is preset duration is intercepted from the first audio file
Part.Finally, the second audio file to be converted to the ring signal file of the second format.In this way, can be by the audio number in video file
According to extracting and being intercepted, the generating mode of Lai Shengcheng ring signal file, ring signal file is flexible, can quickly will in order to user
The audio in video watched is fabricated to the tinkle of bells, can satisfy user demand.
Optionally, video file is obtained, comprising:
Obtain the corresponding resource set of stored all resources, include in resource set in all resources each resource it is corresponding
Resource information;
Target resource information corresponding with stored video file is obtained from resource set;
Storage address is obtained from target resource information;
Video file corresponding with target resource information is obtained according to storage address.
Optionally, the corresponding resource set of stored all resources is obtained, comprising:
It calls first interface to read stored all resources, obtains the corresponding resource set of all resources;
Correspondingly, target resource information corresponding with stored video file is obtained from resource set, comprising:
It calls second interface to screen the resource information in resource set, obtains corresponding with stored video file
Target resource information.
Optionally, according to the audio data in video file, the first audio file of the first format is generated, comprising:
Video file is parsed, to determine the audio data in video file;
Third interface is called to extract the audio data in video file;
Call the 4th interface that the audio data extracted is converted to the first audio file of the first format.
Optionally, the second audio file that playing duration is preset duration is intercepted from the first audio file, comprising:
It obtains audio and intercepts range, it includes starting cutting time point and terminating cutting time point that audio, which intercepts range, is started
Cutting time point and terminate the when a length of preset duration between cutting time point apart;
The audio file in the 5th the first audio file of interface intercepts in audio interception range is called, the second sound is obtained
Frequency file.
All the above alternatives, can form alternative embodiment of the invention according to any combination, and the present invention is real
It applies example and this is no longer repeated one by one.
Fig. 2 is a kind of flow chart of method for generating ring signal file provided in an embodiment of the present invention.Referring to fig. 2, this method
Include:
Step 201: obtaining video file.
It should be noted that may include video data and audio data in the video file.For example, the video file can
Think MV (Music Video, music short-movie), film, TV play, small video of recording etc., the embodiment of the present invention does not make this
It limits.
Specifically, video file can be obtained by the following two kinds mode, it is of course also possible to obtain otherwise
Video file is taken, as long as guaranteeing that the video file got is the video file for needing to carry out the tinkle of bells extraction.
First way: the mark of each video file in the stored multiple video files of display;It is selected when receiving
When instruction, obtains one that the selection instruction is selected from the mark of multiple video file and identify identified video file.
It should be noted that stored multiple video files can be video file all in system photograph album, certainly,
It may be other stored video files, the embodiment of the present invention is not construed as limiting this.
In addition, the mark of video file is used for the unique identification video file, if the mark of video file can be the view
Title, thumbnail of frequency file etc..
Furthermore selection instruction is used to select a mark from the mark of multiple video files, which can be by
User's triggering, user can be triggered by operations such as clicking operation, slide, voice operating, gesture operations.
For example, stored multiple video files are video file 1, video file 2 and video file 3, and video file 1
Be identified as mark 1, video file 2 is identified as mark 2, and video file 3 is identified as mark 3, then can show mark 1,
Mark 2 and mark 3.Later, when receiving selection instruction, it is assumed that the selection instruction is selected from these shown marks
Mark 3, the then video file 3 that available mark 3 is identified.
The second way: the corresponding resource set of stored all resources is obtained;It obtains and has stored from the resource set
The corresponding target resource information of video file;Storage address is obtained from target resource information;It is obtained according to the storage address
Video file corresponding with target resource information.
It should be noted that stored all resources may include photo, video etc., stored all resources can be with
For resource all in system photograph album, it is of course also possible to be other stored resources, the embodiment of the present invention does not limit this
It is fixed.
In addition, including the corresponding resource information of resource each in stored all resources, some resource in the resource set
It include the relevant information of the corresponding resource of this resource information in information, as may include the corresponding resource of this resource information
The information such as storage address, type, creation time.For example, the resource set can be ALAssetsGroup object, the resource information
It can be ALAssets object.
Furthermore the storage address for including in resource information is used to indicate the storage location of the corresponding resource of the resource information,
If the storage address for including in resource information can be url (Uniform Resource Locator, uniform resource locator)
Address etc..
Wherein, when obtaining the corresponding resource set of stored all resources, first interface can be called to read stored
All resources obtain the corresponding resource set of all resources.Correspondingly, it is obtained and stored video file pair from the resource set
When the target resource information answered, second interface can be called to screen the resource information in the resource set, obtain and deposited
The corresponding target resource information of the video file of storage.It is of course also possible to otherwise, obtain stored all resources pair
The resource set answered, and target resource information corresponding with stored video file is obtained from the resource set, the present invention is implemented
Example is not construed as limiting this.
It should be noted that first interface can be configured in advance, first interface is for reading stored all moneys
After reading all resources, the corresponding resource information of each resource in all resources is can be obtained to form resource set in source.For example,
First interface can be the interface under ALAssetsLibrary class.
In addition, second interface can be configured in advance, second interface is for sieving the resource information in resource set
Choosing, after screening to resource information, the type that can reject corresponding resource is not the resource information of video type, is left
The type of corresponding resource is the resource information of video type as target resource information.For example, second interface can be
Interface under ALAssetsLibrary class.
Step 202: according to the audio data in the video file, generating the first audio file of the first format.
It should be noted that the first format can be configured in advance, the first format can be with the format of the video file
It is identical, such as the first format can be m4a format.
Specifically, which can be parsed, to determine the audio data in the video file;Call third
Interface extracts the audio data in the video file;Call the 4th interface that the audio data extracted is converted to the first format
First audio file.It is of course also possible to generate the first format otherwise according to the audio data in the video file
First audio file, the embodiment of the present invention are not construed as limiting this.
It should be noted that the audio data in the video file can be distinguished after parsing to the video file
And video data, the audio data in the video file are the audio track (audio track) of the video file.To the view
The operation that frequency file is parsed can refer to the relevant technologies, and the embodiment of the present invention is to this without elaborating.
In addition, third interface can be configured in advance, third interface is used to extract the audio data in video file.Example
Such as, third interface can be tracksWithMediaType etc..
Furthermore the 4th interface can be configured in advance, and the 4th interface is used to audio data being converted to the first format
First audio file.For example, the 4th interface can be AVAssetExportSession etc..
Step 203: the second audio file that playing duration is preset duration is intercepted from the first audio file.
It should be noted that preset duration can be configured in advance, for example, preset duration can be 60 seconds, 70 seconds etc..
Specifically, available audio intercepts range;It calls in the 5th the first audio file of interface intercepts in the audio
The audio file in range is intercepted, the second audio file is obtained.It is of course also possible to otherwise from the first audio file
The second audio file that playing duration is preset duration is intercepted, the embodiment of the present invention is not construed as limiting this.
It should be noted that audio interception range includes starting cutting time point and terminating cutting time point, start to intercept
Time point and terminate the when a length of preset duration between cutting time point apart.Audio interception range can be set in advance
It sets, audio interception range can be is specified by user, when being also possible to the broadcasting according to preset duration and the first audio file
Length automatically determines, and the embodiment of the present invention is not construed as limiting this.For example, preset duration is the 60th second, then user can specify beginning
Cutting time point is the 1st second, and the specified cutting time point that terminates is 60 seconds, to obtain audio interception range.In another example default
Shi Changwei 60 seconds, the playing duration of the first audio file was 120 seconds, then can be by any one 60 seconds time in 120 seconds
Range intercepts range as audio, can will such as start cutting time point and be set as the 51st second, and be set as cutting time point is terminated
110th second, to obtain audio interception range.
In addition, the 5th interface can be configured in advance, the 5th interface is used to cut in the first audio file in audio
The audio file in range is taken to be intercepted.For example, the 5th interface can be AVMutableComposition etc..
Step 204: the second audio file is converted to the ring signal file of the second format.
It should be noted that the second format can be configured in advance, the second format can be used according to subsequent needs should
The model of the equipment of ring signal file determines, so that the ring signal file can be adapted to the equipment, that is, guarantees the ring signal file energy
It is enough to carry out normal play on the device.For example, the second format can be m4r format etc..
In addition, the second audio file is converted to the operation of the ring signal file of the second format and in the related technology by a lattice
The operation that the audio file of formula is converted to the audio file of another format is similar, and the embodiment of the present invention is to this without explaining in detail
It states.
Furthermore after the ring signal file that the second audio file is converted to the second format, which can be protected
It deposits, and the ring signal file can be shared, so that the ring signal file can be used as the tinkle of bells in equipment.
In embodiments of the present invention, video file is obtained, later, first according to the audio data in the video file, is generated
First audio file of the first format, then the second audio text that playing duration is preset duration is intercepted from the first audio file
Part.Finally, the second audio file to be converted to the ring signal file of the second format.In this way, can be by the audio number in video file
According to extracting and being intercepted, the generating mode of Lai Shengcheng ring signal file, ring signal file is flexible, can quickly will in order to user
The audio in video watched is fabricated to the tinkle of bells, can satisfy user demand.
Fig. 3 is a kind of structural schematic diagram of device for generating ring signal file provided in an embodiment of the present invention.It, should referring to Fig. 3
Device includes: to obtain module 301, generation module 302, interception module 303 and conversion module 304.
Module 301 is obtained, for obtaining video file;
Generation module 302, for generating the first audio file of the first format according to the audio data in video file;
Interception module 303, for intercepting the second audio file that playing duration is preset duration from the first audio file;
Conversion module 304, for the second audio file to be converted to the ring signal file of the second format.
Optionally, obtaining module 301 includes:
First acquisition unit includes all moneys in resource set for obtaining stored all resources corresponding resource set
The corresponding resource information of each resource in source;
Second acquisition unit, for obtaining target resource information corresponding with stored video file from resource set;
Third acquiring unit, for obtaining storage address from target resource information;
4th acquiring unit, for obtaining video file corresponding with target resource information according to storage address.
Optionally, first acquisition unit is used for:
It calls first interface to read stored all resources, obtains the corresponding resource set of all resources;
Correspondingly, second acquisition unit is used for:
It calls second interface to screen the resource information in resource set, obtains corresponding with stored video file
Target resource information.
Optionally, generation module 302 includes:
Resolution unit, for being parsed to video file, to determine the audio data in video file;
Extraction unit, for calling third interface to extract the audio data in video file;
Converting unit, the first audio for calling the 4th interface that the audio data extracted is converted to the first format are literary
Part.
Optionally, interception module 303 includes:
5th acquiring unit, for obtaining audio interception range, it includes starting cutting time point and knot that audio, which intercepts range,
Beam cutting time point starts cutting time point and terminates the when a length of preset duration between cutting time point apart;
Interception unit, for calling the audio text in the 5th the first audio file of interface intercepts in audio interception range
Part obtains the second audio file.
In embodiments of the present invention, video file is obtained, later, first according to the audio data in the video file, is generated
First audio file of the first format, then the second audio text that playing duration is preset duration is intercepted from the first audio file
Part.Finally, the second audio file to be converted to the ring signal file of the second format.In this way, can be by the audio number in video file
According to extracting and being intercepted, the generating mode of Lai Shengcheng ring signal file, ring signal file is flexible, can quickly will in order to user
The audio in video watched is fabricated to the tinkle of bells, can satisfy user demand.
It should be understood that it is provided by the above embodiment generate ring signal file device when generating ring signal file, only with
The division progress of above-mentioned each functional module can according to need and for example, in practical application by above-mentioned function distribution by not
Same functional module is completed, i.e., the internal structure of device is divided into different functional modules, to complete whole described above
Or partial function.In addition, the device provided by the above embodiment for generating ring signal file and the method for generating ring signal file are implemented
Example belongs to same design, and specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Fig. 4 is a kind of structural schematic diagram of device for generating ring signal file provided in an embodiment of the present invention.Referring to fig. 4, should
Device can be terminal 400, and terminal 400 may is that smart phone, tablet computer, MP3 player (Moving Picture
Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving
Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) player, pen
Remember this computer or desktop computer.Terminal 400 is also possible to referred to as user equipment, portable terminal, laptop terminal, terminal console
Deng other titles.
In general, terminal 400 includes: processor 401 and memory 402.
Processor 401 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place
Reason device 401 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field-
Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed
Logic array) at least one of example, in hardware realize.Processor 401 also may include primary processor and coprocessor, master
Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing
Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.?
In some embodiments, processor 401 can integrate GPU (Graphics Processing Unit, image processor), GPU
For being responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 401 can also include AI
(Artificial Intelligence, artificial intelligence) processor, the AI processor is for handling the calculating in relation to machine learning
Operation.
Memory 402 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 402 may also include high-speed random access memory and nonvolatile memory, for example, one or
Multiple disk storage equipments, flash memory device.In some embodiments, non-transient computer-readable in memory 402
Storage medium for storing at least one instruction, at least one instruction for performed by processor 401 to realize the application
The method for the generation ring signal file that middle embodiment of the method provides.
In some embodiments, terminal 400 is also optional includes: peripheral device interface 403 and at least one peripheral equipment.
It can be connected by bus or signal wire between processor 401, memory 402 and peripheral device interface 403.Each peripheral equipment
It can be connected by bus, signal wire or circuit board with peripheral device interface 403.Specifically, peripheral equipment includes: radio circuit
404, at least one of touch display screen 405, camera 406, voicefrequency circuit 407, positioning component 408 and power supply 409.
Peripheral device interface 403 can be used for I/O (Input/Output, input/output) is relevant outside at least one
Peripheral equipment is connected to processor 401 and memory 402.In some embodiments, processor 401, memory 402 and peripheral equipment
Interface 403 is integrated on same chip or circuit board;In some other embodiments, processor 401, memory 402 and outer
Any one or two in peripheral equipment interface 403 can realize that this is not added in the application on individual chip or circuit board
To limit.
Radio circuit 404 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates
Frequency circuit 404 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 404 turns electric signal
It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 404 wraps
It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip
Group, user identity module card etc..Radio circuit 404 can be led to by least one wireless communication protocol with other terminals
Letter.The wireless communication protocol includes but is not limited to: Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), wireless local area
Net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 404 can be with
Including the related circuit of NFC (Near Field Communication, wireless near field communication), the application does not limit this
It is fixed.
Display screen 405 is for showing UI (User Interface, user interface).The UI may include figure, text, figure
Mark, video and its their any combination.When display screen 405 is touch display screen, display screen 405 also there is acquisition to show
The ability of the touch signal on the surface or surface of screen 405.The touch signal can be used as control signal and be input to processor
401 are handled.At this point, display screen 405 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or
Soft keyboard.In some embodiments, display screen 405 can be one, and the front panel of terminal 400 is arranged in;In other implementations
In example, display screen 405 can be at least two, be separately positioned on the different surfaces of terminal 400 or in foldover design;Still other
In embodiment, display screen 405 can be flexible display screen, be arranged on the curved surface of terminal 400 or on fold plane.Even,
Display screen 405 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 405 can use LCD
(Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, You Jifa
Optical diode) etc. materials preparation.
CCD camera assembly 406 is for acquiring image or video.Optionally, CCD camera assembly 406 include front camera and
Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One
In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively
Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle
Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped
Camera shooting function.In some embodiments, CCD camera assembly 406 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp,
It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not
With the light compensation under colour temperature.
Voicefrequency circuit 407 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will
Sound wave, which is converted to electric signal and is input to processor 401, to be handled, or is input to radio circuit 404 to realize voice communication.
For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 400 to be multiple.Mike
Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 401 or radio circuit will to be come from
404 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When
When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications
Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 407 can also include
Earphone jack.
Positioning component 408 is used for the current geographic position of positioning terminal 400, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 408 can be the GPS (Global based on the U.S.
Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union
The positioning component of Galileo system.
Power supply 409 is used to be powered for the various components in terminal 400.Power supply 409 can be alternating current, direct current,
Disposable battery or rechargeable battery.When power supply 409 includes rechargeable battery, which can support wired charging
Or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 400 further includes having one or more sensors 410.The one or more sensors
410 include but is not limited to: acceleration transducer 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414,
Optical sensor 415 and proximity sensor 416.
The acceleration that acceleration transducer 411 can detecte in three reference axis of the coordinate system established with terminal 400 is big
It is small.For example, acceleration transducer 411 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 401 can
With the acceleration of gravity signal acquired according to acceleration transducer 411, touch display screen 405 is controlled with transverse views or longitudinal view
Figure carries out the display of user interface.Acceleration transducer 411 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 412 can detecte body direction and the rotational angle of terminal 400, and gyro sensor 412 can
To cooperate with acquisition user to act the 3D of terminal 400 with acceleration transducer 411.Processor 401 is according to gyro sensor 412
Following function may be implemented in the data of acquisition: when action induction (for example changing UI according to the tilt operation of user), shooting
Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 405 in terminal 400 can be set in pressure sensor 413.Work as pressure
When the side frame of terminal 400 is arranged in sensor 413, user can detecte to the gripping signal of terminal 400, by processor 401
Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 413 acquires.When the setting of pressure sensor 413 exists
When the lower layer of touch display screen 405, the pressure operation of touch display screen 405 is realized to UI circle according to user by processor 401
Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu
At least one of control.
Fingerprint sensor 414 is used to acquire the fingerprint of user, collected according to fingerprint sensor 414 by processor 401
The identity of fingerprint recognition user, alternatively, by fingerprint sensor 414 according to the identity of collected fingerprint recognition user.It is identifying
When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 401
Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Fingerprint sensor 414 can be arranged on end
Front, the back side or the side at end 400.When being provided with physical button or manufacturer Logo in terminal 400, fingerprint sensor 414 can
To be integrated with physical button or manufacturer Logo.
Optical sensor 415 is for acquiring ambient light intensity.In one embodiment, processor 401 can be according to optics
The ambient light intensity that sensor 415 acquires controls the display brightness of touch display screen 405.Specifically, when ambient light intensity is higher
When, the display brightness of touch display screen 405 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 405 is bright
Degree.In another embodiment, the ambient light intensity that processor 401 can also be acquired according to optical sensor 415, dynamic adjust
The acquisition parameters of CCD camera assembly 406.
Proximity sensor 416 is also referred to as range sensor, is generally arranged at the front panel of terminal 400.Proximity sensor 416 is used
In the distance between the front of acquisition user and terminal 400.In one embodiment, when proximity sensor 416 detects user
When the distance between front of terminal 400 gradually becomes smaller, touch display screen 405 is controlled by processor 401 and is cut from bright screen state
It is changed to breath screen state;When proximity sensor 416 detects user and the distance between the front of terminal 400 becomes larger, by
Processor 401 controls touch display screen 405 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 400 of structure shown in Fig. 4, can wrap
It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (11)
1. a kind of method for generating ring signal file, which is characterized in that the described method includes:
Obtain video file;
According to the audio data in the video file, the first audio file of the first format is generated;
The second audio file that playing duration is preset duration is intercepted from first audio file;
Second audio file is converted to the ring signal file of the second format.
2. the method as described in claim 1, which is characterized in that the acquisition video file, comprising:
The corresponding resource set of stored all resources is obtained, includes each resource pair in all resources in the resource set
The resource information answered;
Target resource information corresponding with stored video file is obtained from the resource set;
Storage address is obtained from the target resource information;
Video file corresponding with the target resource information is obtained according to the storage address.
3. method according to claim 2, which is characterized in that it is described to obtain the corresponding resource set of stored all resources,
Include:
It calls first interface to read stored all resources, obtains the corresponding resource set of all resources;
It is correspondingly, described that target resource information corresponding with stored video file is obtained from the resource set, comprising:
It calls second interface to screen the resource information in the resource set, obtains corresponding with stored video file
Target resource information.
4. method a method according to any one of claims 1-3, which is characterized in that the audio number according in the video file
According to the first audio file of the first format of generation, comprising:
The video file is parsed, with the audio data in the determination video file;
Third interface is called to extract the audio data in the video file;
Call the 4th interface that the audio data extracted is converted to the first audio file of the first format.
5. method a method according to any one of claims 1-3, which is characterized in that described intercept from first audio file plays
Second audio file of Shi Changwei preset duration, comprising:
It obtains audio and intercepts range, the audio interception range includes starting cutting time point and terminating cutting time point, described
Start cutting time point and the when a length of preset duration terminated between cutting time point apart;
The audio file in the first audio file described in the 5th interface intercepts in audio interception range is called, obtains the
Two audio files.
6. a kind of device for generating ring signal file, which is characterized in that described device includes:
Module is obtained, for obtaining video file;
Generation module, for generating the first audio file of the first format according to the audio data in the video file;
Interception module, for intercepting the second audio file that playing duration is preset duration from first audio file;
Conversion module, for second audio file to be converted to the ring signal file of the second format.
7. device as claimed in claim 6, which is characterized in that the acquisition module includes:
First acquisition unit includes the institute in the resource set for obtaining stored all resources corresponding resource set
There is the corresponding resource information of each resource in resource;
Second acquisition unit, for obtaining target resource information corresponding with stored video file from the resource set;
Third acquiring unit, for obtaining storage address from the target resource information;
4th acquiring unit, for obtaining video file corresponding with the target resource information according to the storage address.
8. device as claimed in claim 7, which is characterized in that the first acquisition unit is used for:
It calls first interface to read stored all resources, obtains the corresponding resource set of all resources;
Correspondingly, the second acquisition unit is used for:
It calls second interface to screen the resource information in the resource set, obtains corresponding with stored video file
Target resource information.
9. such as device as claimed in claim 6 to 8, which is characterized in that the generation module includes:
Resolution unit, for being parsed to the video file, with the audio data in the determination video file;
Extraction unit, for calling third interface to extract the audio data in the video file;
Converting unit, for calling the 4th interface that the audio data extracted is converted to the first audio file of the first format.
10. such as device as claimed in claim 6 to 8, which is characterized in that the interception module includes:
5th acquiring unit, for obtaining audio interception range, the audio interception range includes starting cutting time point and knot
Beam cutting time point, it is described to start cutting time point and the when a length of preset duration terminated between cutting time point apart;
Interception unit, for calling the sound in the first audio file described in the 5th interface intercepts in audio interception range
Frequency file obtains the second audio file.
11. a kind of computer readable storage medium, instruction is stored on the storage medium, which is characterized in that described instruction quilt
The step of any one method described in claim 1-5 is realized when processor executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811453488.8A CN109451168A (en) | 2018-11-30 | 2018-11-30 | Generate the method, apparatus and storage medium of ring signal file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811453488.8A CN109451168A (en) | 2018-11-30 | 2018-11-30 | Generate the method, apparatus and storage medium of ring signal file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109451168A true CN109451168A (en) | 2019-03-08 |
Family
ID=65555982
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811453488.8A Pending CN109451168A (en) | 2018-11-30 | 2018-11-30 | Generate the method, apparatus and storage medium of ring signal file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109451168A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116366762A (en) * | 2023-04-06 | 2023-06-30 | 广州酷狗计算机科技有限公司 | Method, device, equipment and storage medium for setting beautifying materials |
CN116894012A (en) * | 2023-07-19 | 2023-10-17 | 天翼爱音乐文化科技有限公司 | Method, system, equipment and storage medium for warehousing audio color ring back tone |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106412687A (en) * | 2015-07-27 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Interception method and device of audio and video clips |
CN107911739A (en) * | 2017-10-25 | 2018-04-13 | 北京川上科技有限公司 | A kind of video acquiring method, device, terminal device and storage medium |
-
2018
- 2018-11-30 CN CN201811453488.8A patent/CN109451168A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106412687A (en) * | 2015-07-27 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Interception method and device of audio and video clips |
CN107911739A (en) * | 2017-10-25 | 2018-04-13 | 北京川上科技有限公司 | A kind of video acquiring method, device, terminal device and storage medium |
Non-Patent Citations (1)
Title |
---|
团团: "视频音乐变成你的手机铃声", 《电脑爱好者普及版》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116366762A (en) * | 2023-04-06 | 2023-06-30 | 广州酷狗计算机科技有限公司 | Method, device, equipment and storage medium for setting beautifying materials |
CN116894012A (en) * | 2023-07-19 | 2023-10-17 | 天翼爱音乐文化科技有限公司 | Method, system, equipment and storage medium for warehousing audio color ring back tone |
CN116894012B (en) * | 2023-07-19 | 2024-08-20 | 天翼爱音乐文化科技有限公司 | Method, system, equipment and storage medium for warehousing audio color ring back tone |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110061900B (en) | Message display method, device, terminal and computer readable storage medium | |
CN109982102A (en) | The interface display method and system and direct broadcast server of direct broadcasting room and main broadcaster end | |
CN109327608B (en) | Song sharing method, terminal, server and system | |
CN109618212A (en) | Information display method, device, terminal and storage medium | |
CN109451343A (en) | Video sharing method, apparatus, terminal and storage medium | |
CN109729297A (en) | The method and apparatus of special efficacy are added in video | |
CN109068008A (en) | The tinkle of bells setting method, device, terminal and storage medium | |
CN108897597B (en) | Method and device for guiding configuration of live broadcast template | |
CN109348247A (en) | Determine the method, apparatus and storage medium of audio and video playing timestamp | |
CN109192218B (en) | Method and apparatus for audio processing | |
CN108965922A (en) | Video cover generation method, device and storage medium | |
CN109168073A (en) | The method and apparatus that direct broadcasting room cover is shown | |
CN110798327B (en) | Message processing method, device and storage medium | |
CN109922356A (en) | Video recommendation method, device and computer readable storage medium | |
CN110418152A (en) | It is broadcast live the method and device of prompt | |
CN109525900A (en) | Method, apparatus, terminal and the storage medium of watermark are added in video | |
CN109684278A (en) | File acquisition method, device, terminal and storage medium | |
CN109982129A (en) | Control method for playing back, device and the storage medium of short-sighted frequency | |
CN109800003A (en) | Using method for down loading, device, terminal and storage medium | |
CN111276122A (en) | Audio generation method and device and storage medium | |
CN110377200A (en) | Sharing data generation method, device and storage medium | |
CN111031394B (en) | Video production method, device, equipment and storage medium | |
CN108509620A (en) | Song recognition method and device, storage medium | |
CN110234036A (en) | A kind of method, apparatus and system playing multimedia file | |
CN110244999A (en) | Control method, apparatus, equipment and the storage medium of destination application operation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190308 |
|
RJ01 | Rejection of invention patent application after publication |