CN104079951B - Multimedia file processing method and electronic equipment - Google Patents
Multimedia file processing method and electronic equipment Download PDFInfo
- Publication number
- CN104079951B CN104079951B CN201310100470.0A CN201310100470A CN104079951B CN 104079951 B CN104079951 B CN 104079951B CN 201310100470 A CN201310100470 A CN 201310100470A CN 104079951 B CN104079951 B CN 104079951B
- Authority
- CN
- China
- Prior art keywords
- multimedia file
- media signal
- electronic equipment
- medium data
- coding
- 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.)
- Active
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of multimedia file processing method and using the electronic equipment of the multimedia file processing method, methods described includes:Obtain multi-media signal;The multi-media signal is encoded to generate the multi-medium data of coding;Create and be based on HTTP Live Streaming(HLS)The multimedia file of agreement;And the multi-medium data of the coding is write into the multimedia file.
Description
Technical field
The present invention relates to the field of file process, more particularly it relates to a kind of multimedia file processing method and
Use the electronic equipment of the multimedia file processing method.
Background technology
HTTP Live Streaming(Abbreviation HLS)It is that the Streaming Media Online Video that is used for that Apple Inc. releases is played
Technology, it supports live or non-live Online Video to play.HLS is one of W3C draft standards, is also the important of HTML5 standards
Part.Compared to traditional stream media technology such as Flash, HLS technologies are more advanced, especially more suitable for mobile device, therefore
Replace the conventional arts such as Flash into inexorable trend.
At present, generally all possesses the image that can shoot video based on Android smart mobile phone or other mobile devices
Sensor, while also possessing 3G or WiFi networking capabilities.The mobile device photographs such as smart mobile phone video except in the machine
Outside upper viewing or upload to is watched on PC, can also be uploaded onto the server by network on be shared with more people viewing, realize
The function of video acquisition is carried out using mobile devices such as mobile phones.The video file that is stored on mobile device is obtained from network
Video is shared with more people's viewings on can also being uploaded onto the server by network.However, Android does not support to be based at present
HLS video acquisition and sharing function, therefore existing Android device can not realize that video is adopted with reference to HLS video servers
Collect with share or video monitoring function so that existing Android device shoot video can only be watched in the machine or
Upload on PC and watch, it is impossible to be uploaded directly into server end and played for real-time online.
In consideration of it, desirable to provide the electronics of a kind of multimedia file processing method and use the multimedia file processing method
Equipment, it can be in the case where carrying out less modification to existing android system so that the electronic equipment based on Android
Video acquisition and sharing function based on HLS are realized, so as to extend the Consumer's Experience of the electronic equipment.
The content of the invention
In view of the above, the invention provides a kind of multimedia file processing method and using at the multimedia file
The electronic equipment of reason method.
According to one embodiment of present invention there is provided a kind of multimedia file processing method, it is based on applied to one
The electronic equipment of android system, methods described includes:Obtain multi-media signal;By the multi-media signal encoded with
Generate the multi-medium data of coding;Create and be based on HTTP Live Streaming(HLS)The multimedia file of agreement;And will
The multi-medium data of the coding writes the multimedia file.
In addition, multimedia file processing method according to an embodiment of the invention, in addition to:By many of the coding
Media data persistently writes the multimedia file so that during the multimedia file after a length of scheduled duration, pause write-in is more
Media data, and the multimedia file is sent to the server based on HLS protocol.
In addition, multimedia file processing method according to an embodiment of the invention, wherein the acquisition multimedia letter
Number include:Obtain the multi-media signal of local sensor capture.
In addition, multimedia file processing method according to an embodiment of the invention, wherein the acquisition multimedia letter
Number include:The existing multimedia file being locally stored is read, decodes the existing multimedia file to obtain multi-media signal.
In addition, multimedia file processing method according to an embodiment of the invention, wherein the acquisition multimedia letter
Number include:Via Network Capture online multimedia file, decode the online multimedia file to obtain multi-media signal.
According to another embodiment of the present invention there is provided a kind of electronic equipment, the electronic equipment is based on Android systems
System, the electronic equipment includes:Multi-media signal acquiring unit, for obtaining multi-media signal;And multi-media signal processing
Unit, for the multi-media signal to be encoded to generate the multi-medium data of coding, creates and is based on HTTP Live
Streaming(HLS)The multimedia file of agreement, and the multi-medium data of the coding is write into the multimedia file.
In addition, electronic equipment according to another embodiment of the invention, in addition to communication unit, wherein the multimedia
Signal processing unit is additionally operable to the multi-medium data of the coding persistently writing the multimedia file so that the multimedia
During file after a length of scheduled duration, pause writes multi-medium data, and the communication unit sends out the multimedia file
It is sent to the server based on HLS protocol.
In addition, electronic equipment according to another embodiment of the invention, wherein the multi-media signal acquiring unit is also
Including local sensor, and obtain the multi-media signal of the local sensor capture.
In addition, electronic equipment according to another embodiment of the invention, wherein the multi-media signal acquiring unit is read
The existing multimedia file being locally stored is taken, decodes the existing multimedia file to obtain multi-media signal.
In addition, electronic equipment according to another embodiment of the invention, wherein the multi-media signal acquiring unit is passed through
By Network Capture online multimedia file, decode the online multimedia file to obtain multi-media signal.
In addition, electronic equipment according to another embodiment of the invention, wherein the multi-media signal processing unit is
The MPEG2-TS generation modules of StageFright media engines.
In addition, electronic equipment according to another embodiment of the invention, wherein the multi-media signal processing unit is
FFmpeg modules.
Multimedia file processing method according to embodiments of the present invention and the electronics using the multimedia file processing method
Equipment, it can be in the case where carrying out less modification to existing android system so that the electronic equipment based on Android
Video acquisition and sharing function based on HLS are realized, so as to extend the Consumer's Experience of the electronic equipment.
It is to be understood that foregoing general description and following detailed description are both exemplary, and it is intended to
In further illustrating for the claimed technology of offer.
Brief description of the drawings
Fig. 1 is the block diagram for illustrating electronic equipment according to an embodiment of the invention;
Fig. 2 is the schematic block diagram for illustrating multi-media signal processing unit according to an embodiment of the invention;
Fig. 3 is the schematic block diagram for illustrating multi-media signal processing unit in accordance with another embodiment of the present invention;And
Fig. 4 is the flow chart for illustrating multimedia file processing method according to an embodiment of the invention.
Embodiment
Hereinafter, describe with reference to the accompanying drawings multiple embodiments, using and modification.In addition, the embodiments described below is excellent
The particular example of choosing, and technically preferred various limitations are provided with, but in the following description, the invention is not restricted to these
Embodiment.
First, reference picture 1 is described to electronic equipment according to embodiments of the present invention.The electronic equipment is preferably e.g.
Smart mobile phone, personal computer, tablet personal computer etc..
Fig. 1 is the block diagram of diagram electronic equipment according to embodiments of the present invention.As shown in figure 1, according to embodiments of the present invention
Electronic equipment 1 have multi-media signal acquiring unit 10, multi-media signal processing unit 20 and communication unit 30.It is readily appreciated that
, the component being closely related to simplify description only to show with the present invention in Fig. 1, electronics according to embodiments of the present invention sets
Standby 1 can also include other components, display unit, input block etc. certainly.
Specifically, multi-media signal acquiring unit 10 is used to obtain multi-media signal.In one embodiment of the invention,
Multi-media signal acquiring unit 10 includes local video sensor(Such as camera)And audio sensor(Such as microphone),
And obtain the signal captured by local video sensor and audio sensor and be used as multi-media signal.In the another of the present invention
In individual embodiment, multi-media signal acquiring unit 10 reads local storage(It is not shown)The existing multimedia file of middle storage,
And the existing multimedia file is decoded to obtain multi-media signal.In yet another embodiment of the present invention, many matchmakers
Body signal acquiring unit 10 decodes the online multimedia file to obtain multimedia via Network Capture online multimedia file
Signal.
Multi-media signal processing unit 20 is used for the multimedia that will be provided from the multi-media signal acquiring unit 10
Signal is encoded to generate the multi-medium data of coding, is created and is based on HTTP Live Streaming(HLS)Many matchmakers of agreement
Body file, and the multi-medium data of the coding is write into the multimedia file.Wherein, if the multi-media signal is obtained
Take unit 10 be from local storage read existing multimedia file, and this document just using H.264, AAC coded systems,
The decoding of execution and cataloged procedure needed for can then saving.
Communication unit 30 is communicatively coupled via network wired mode or wireless mode with server.The one of the present invention
In individual embodiment, the server is the server based on HLS protocol.The multi-media signal processing unit is by the coding
Multi-medium data persistently writes the multimedia file so that during the multimedia file after a length of scheduled duration, pause write-in
Multi-medium data.The scheduled duration can be, but not limited to as 5 seconds.As the communication unit 30 by described in scheduled duration
Multimedia file is sent to the server based on HLS protocol.Hereafter, continued by the multi-media signal processing unit 20 under generation
One multimedia file with scheduled duration.
More than, reference picture 1 outlines electronic equipment according to embodiments of the present invention.Hereinafter, reference picture 2 and Fig. 3 are described
The concrete configuration of the multi-media signal processing unit 20 of the electronic equipment 1.
Fig. 2 is the schematic block diagram for illustrating multi-media signal processing unit according to an embodiment of the invention.Such as Fig. 2 institutes
Show, the multi-media signal processing unit 20 illustrated in Fig. 1 is specially StageFright media engines 200.StageFright
Media engine 200 includes video encoder 21, audio coder 22 and MPEG2-TS generation modules 23.Wherein, the video
Encoder 21 and audio coder 22 are respectively used to many to the video and audio provided from the multi-media signal acquiring unit 10
Media signal is encoded, and is supplied to MPEG2-TS generation modules 23 to be based on to generate the multi-media signal of coding
HTTP Live Streaming(HLS)The multimedia file of agreement.More specifically, the MPEG2-TS generation modules 23 include
MPEG2-TS multiplexers 231 and MPEG2-TS makers 232.Wherein, the MPEG2-TS multiplexers 231 are multiplexed from the video
The video and voice data for the coding that encoder 21 and audio coder 22 are provided, and MPEG2-TS makers 232 are then used to give birth to
Into with scheduled duration based on HTTP Live Streaming(HLS)The multimedia file of agreement.
That is, the StageFright media engines as multi-media signal processing unit 20 as shown in Figure 2
200 be the improvement carried out to existing StageFright media engines, wherein have modified in existing StageFright
MPEG2-TS Writer, make it according to specified fractional time length(Such as 5 seconds)Multiple .ts files are continuously generated, and are changed
MediaRecorder calling interface adds the selection to generating .ts files using MPEG2-TS Writer.
Fig. 3 is the schematic block diagram for illustrating multi-media signal processing unit in accordance with another embodiment of the present invention.Such as Fig. 3
Shown, the multi-media signal processing unit 20 illustrated in Fig. 1 is specially FFmpeg modules 300.FFmpeg modules 300 include video
Encoder 31, audio coder 32, MPEG2-TS multiplexers 331 and MPEG2-TS makers 332.As it was previously stated, the video
Encoder 31 and audio coder 32 are respectively used to many to the video and audio provided from the multi-media signal acquiring unit 10
Media signal is encoded, and is supplied to MPEG2-TS multiplexers 331 to believe so as to multiplexed video the multi-media signal of coding
Number and audio signal.Hereafter, MPEG2-TS makers 332 receive the multiplexed signals provided from MPEG2-TS multiplexers 331, and
Generation is based on HTTP Live Streaming(HLS)The multimedia file of agreement.
That is, as shown in Figure 3 is integrated in basis as the FFmpeg modules 300 of multi-media signal processing unit 20
In the electronic equipment 1 of the present invention.FFmpeg modules 300 provide the video and audio coding of various common formats, can be fine
Ground is integrated into existing android system, realizes more rich audio and video playing or recording function.Compared to the implementation shown in Fig. 2
Example, the present embodiment need not change the StageFright media engines of existing android system, so that more flexible.
More than, electronic equipment and multi-media signal therein according to embodiments of the present invention is described referring to figs. 1 to Fig. 3
Processing unit.Hereinafter, reference picture 4 is described to multimedia file processing method according to embodiments of the present invention.
Fig. 4 is the flow chart for illustrating multimedia file processing method according to an embodiment of the invention.As shown in figure 4,
Multimedia file processing method according to an embodiment of the invention comprises the following steps:
In step S401, the multi-media signal acquiring unit 10 of electronic equipment 1 obtains multi-media signal.Above with reference to figure
Described in 1, multi-media signal acquiring unit 10 can be obtained to be made by the signal of local video sensor and audio sensor capture
For multi-media signal, or the existing multimedia file stored in local storage is read, and decode the existing multimedia
File additionally can decode the online multimedia text to obtain multi-media signal via Network Capture online multimedia file
Part is to obtain multi-media signal.Hereafter, processing enters step S402.
In step S402, multi-media signal processing unit 20 is encoded multi-media signal to generate many matchmakers of coding
Volume data.Hereafter, processing enters step S403.
In step S403, multi-media signal processing unit 20, which is created, is based on HTTP Live Streaming(HLS)Agreement
Multimedia file.Hereafter, processing enters step S404.
In step s 404, the multi-medium data of coding is write multimedia file by multi-media signal processing unit 20.This
Afterwards, processing enters step S405.
In step S405, judge whether multimedia file duration has reached scheduled duration.In the reality of the present invention
Apply in example, the scheduled duration can be set to 5 seconds.
If obtaining positive result in step S405, i.e. multimedia file duration has reached scheduled duration, then handles
Enter step S406.In step S406, the pause of multi-media signal processing unit 20 writes multi-medium data and multimedia is literary
Part is sent to the server based on HLS protocol.Hereafter, S403 is the processing returns to step, so that repeat step S403 is to step S406,
So as to generate and send next multimedia file for meeting HLS protocol to the server based on HLS protocol.
If on the contrary, obtaining negative decision in step S405, i.e., multimedia file duration is also not up to scheduled duration,
S404 is then the processing returns to step, to continue the multi-medium data that coding is write to multimedia file.
More than, describe electronic equipment according to embodiments of the present invention and its multimedia file processing side referring to figs. 1 to Fig. 4
Method, it can be in the case where carrying out less modification to existing android system so that the electronic equipment based on Android is real
Now video acquisition and sharing function based on HLS, so as to extend the Consumer's Experience of the electronic equipment.
It should be noted that in this manual, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Also there is other identical element in process, method, article or equipment including the key element.
Finally, in addition it is also necessary to explanation, a series of above-mentioned processing are not only included with order described here in temporal sequence
The processing of execution, and the processing including performing parallel or respectively rather than in chronological order.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by
Software adds the mode of required hardware platform to realize, naturally it is also possible to all implemented by hardware.Understood based on such,
What technical scheme contributed to background technology can be embodied in the form of software product in whole or in part,
The computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are to make
Obtain a computer equipment(Can be personal computer, server, or network equipment etc.)Perform each embodiment of the invention
Or the method described in some parts of embodiment.
The present invention is described in detail above, principle and embodiment party of the specific case used herein to the present invention
Formula is set forth, and the explanation of above example is only intended to the method and its core concept for helping to understand the present invention;Meanwhile, it is right
In those of ordinary skill in the art, according to the thought of the present invention, change is had in specific embodiments and applications
Part, in summary, this specification content should not be construed as limiting the invention.
Claims (10)
1. a kind of multimedia file processing method, applied to an electronic equipment based on android system, methods described includes:
Obtain multi-media signal;
The multi-media signal is encoded to generate the multi-medium data of coding;
Create the multimedia file based on HTTP Live Streaming (HLS) agreement;And
The multi-medium data of the coding is write into the multimedia file,
Wherein, the multi-medium data of the coding is persistently write into the multimedia file so that a length of during the multimedia file
After scheduled duration, pause write-in multi-medium data, and the multimedia file is sent to the service based on HLS protocol
Device.
2. multimedia file processing method as claimed in claim 1, wherein the acquisition multi-media signal includes:Obtain local
The multi-media signal of sensor capture.
3. multimedia file processing method as claimed in claim 1, wherein the acquisition multi-media signal includes:Read local
The existing multimedia file of storage, decodes the existing multimedia file to obtain multi-media signal.
4. multimedia file processing method as claimed in claim 1, wherein the acquisition multi-media signal includes:Via network
Online multimedia file is obtained, decodes the online multimedia file to obtain multi-media signal.
5. a kind of electronic equipment, the electronic equipment is based on android system, the electronic equipment includes:
Multi-media signal acquiring unit, for obtaining multi-media signal;
Multi-media signal processing unit, for the multi-media signal to be encoded to generate the multi-medium data of coding, is created
The multimedia file based on HTTP Live Streaming (HLS) agreement is built, and the multi-medium data of the coding is write
The multimedia file, and the multi-medium data of the coding is persistently being write into the multimedia file so that many matchmakers
During body file after a length of scheduled duration, pause write-in multi-medium data;And
Communication unit, for the multimedia file to be sent into the server based on HLS protocol.
6. electronic equipment as claimed in claim 5, wherein the multi-media signal acquiring unit also includes local sensor, and
And obtain the multi-media signal of the local sensor capture.
7. electronic equipment as claimed in claim 5, wherein the multi-media signal acquiring unit reads be locally stored existing
Multimedia file, decodes the existing multimedia file to obtain multi-media signal.
8. electronic equipment as claimed in claim 5, wherein the multi-media signal acquiring unit is more online via Network Capture
Media file, decodes the online multimedia file to obtain multi-media signal.
9. electronic equipment as claimed in claim 5, wherein the multi-media signal processing unit is StageFright multimedias
The MPEG2-TS generation modules of engine.
10. electronic equipment as claimed in claim 5, wherein the multi-media signal processing unit is FFmpeg modules.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310100470.0A CN104079951B (en) | 2013-03-26 | 2013-03-26 | Multimedia file processing method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310100470.0A CN104079951B (en) | 2013-03-26 | 2013-03-26 | Multimedia file processing method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104079951A CN104079951A (en) | 2014-10-01 |
CN104079951B true CN104079951B (en) | 2017-11-03 |
Family
ID=51600958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310100470.0A Active CN104079951B (en) | 2013-03-26 | 2013-03-26 | Multimedia file processing method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104079951B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108881770B (en) * | 2015-07-27 | 2021-01-05 | 青岛海信移动通信技术股份有限公司 | Method and device for recording multimedia file |
CN107396200A (en) * | 2017-08-22 | 2017-11-24 | 深圳市中青合创传媒科技有限公司 | The method that net cast is carried out based on social software |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101938483A (en) * | 2010-09-03 | 2011-01-05 | 中兴通讯股份有限公司 | Method and system for distributing live broadcast contents |
CN102271163A (en) * | 2011-08-19 | 2011-12-07 | 中兴通讯股份有限公司 | Method and system for realizing direct-broadcasting code stream distribution |
CN102811368A (en) * | 2012-07-16 | 2012-12-05 | 北京邮电大学 | Mobile video live broadcasting system |
CN103024528A (en) * | 2013-01-07 | 2013-04-03 | 杭州浦禾通信技术有限公司 | Mobile terminal and method for transmitting streaming media data on mobile terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8473558B2 (en) * | 2009-09-22 | 2013-06-25 | Thwapr, Inc. | Progressive registration for mobile media sharing |
-
2013
- 2013-03-26 CN CN201310100470.0A patent/CN104079951B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101938483A (en) * | 2010-09-03 | 2011-01-05 | 中兴通讯股份有限公司 | Method and system for distributing live broadcast contents |
CN102271163A (en) * | 2011-08-19 | 2011-12-07 | 中兴通讯股份有限公司 | Method and system for realizing direct-broadcasting code stream distribution |
CN102811368A (en) * | 2012-07-16 | 2012-12-05 | 北京邮电大学 | Mobile video live broadcasting system |
CN103024528A (en) * | 2013-01-07 | 2013-04-03 | 杭州浦禾通信技术有限公司 | Mobile terminal and method for transmitting streaming media data on mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN104079951A (en) | 2014-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9514783B2 (en) | Video editing with connected high-resolution video camera and video cloud server | |
CN105612753B (en) | Switching method and apparatus during media flow transmission between adaptation is gathered | |
US8515978B2 (en) | Method of interactive video blogging | |
KR101296059B1 (en) | System and method for storing multisource multimedia presentations | |
CN103039087A (en) | Signaling random access points for streaming video data | |
EP2754301A1 (en) | Streaming of multimedia data from multiple sources | |
WO2014079239A1 (en) | Method, apparatus and system for acquiring playback data stream of real-time video communication | |
WO2016002496A1 (en) | Information processing device and method | |
US9928876B2 (en) | Recording medium recorded with multi-track media file, method for editing multi-track media file, and apparatus for editing multi-track media file | |
US9900573B2 (en) | Image storage apparatus, image reproducing apparatus, method of storing image, method of reproducing an image, recording medium and photographing apparatus | |
CN101848367B (en) | File-based video live webcasting method | |
CN102790922A (en) | Multimedia player and method for sharing multimedia | |
CN103081488A (en) | Signaling video samples for trick mode video representations | |
CN106489270A (en) | Information processor and method | |
WO2018089096A1 (en) | Compressed media with still images selected from a video stream | |
CN109040818B (en) | Audio and video synchronization method, storage medium, electronic equipment and system during live broadcasting | |
WO2017196980A1 (en) | Real-time control interface for broadcast object streaming | |
CN104079951B (en) | Multimedia file processing method and electronic equipment | |
CN106604047A (en) | Multi-video-stream video direct broadcasting method and device | |
CN102969013A (en) | Data processing apparatus, method, and control program | |
JP6501127B2 (en) | INFORMATION PROCESSING APPARATUS AND METHOD | |
CN104780389B (en) | A kind of method for processing video frequency and device | |
CN1980368A (en) | Multi-media document generating method of media playing apparatus and apparatus thereof | |
KR102391755B1 (en) | Information processing device and information processing method | |
WO2008148930A1 (en) | System and method for storing multiparty vtoeo conferencing presentations |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |