CN104079951A - Method of processing multimedia file and electronic equipment - Google Patents

Method of processing multimedia file and electronic equipment Download PDF

Info

Publication number
CN104079951A
CN104079951A CN201310100470.0A CN201310100470A CN104079951A CN 104079951 A CN104079951 A CN 104079951A CN 201310100470 A CN201310100470 A CN 201310100470A CN 104079951 A CN104079951 A CN 104079951A
Authority
CN
China
Prior art keywords
multimedia file
media signal
electronic equipment
multimedia
medium data
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.)
Granted
Application number
CN201310100470.0A
Other languages
Chinese (zh)
Other versions
CN104079951B (en
Inventor
庄渭峰
高锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
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
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201310100470.0A priority Critical patent/CN104079951B/en
Publication of CN104079951A publication Critical patent/CN104079951A/en
Application granted granted Critical
Publication of CN104079951B publication Critical patent/CN104079951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method of processing a multimedia file and electronic equipment using the method of processing the multimedia file. The method comprises the following steps of: obtaining a multimedia signal; encoding the multimedia signal to generate encoded multimedia data; constructing the multimedia file based on an HTTP Live Streaming (HLS) protocol; and writing the encoded multimedia data into the multimedia file.

Description

Multimedia file processing method and electronic equipment
Technical field
The present invention relates to the field of file process, more specifically, the present invention relates to a kind of multimedia file processing method and use the electronic equipment of this multimedia file processing method.
Background technology
HTTP Live Streaming(is called for short HLS) be the technology of playing for Streaming Media Online Video that Apple releases, it supports live or non-live Online Video to play.HLS is one of W3C draft standard, is also the important component part of HTML5 standard.Compare the conventional flow medium techniques such as Flash, HLS technology is more advanced, is especially more suitable in mobile device, therefore replaces the conventional arts such as Flash and has become inexorable trend.
At present, the smart mobile phone based on Android or other mobile devices all possess imageing sensor that can capture video conventionally, also possess 3G or WiFi online ability simultaneously., except watching in the machine or upload to and watching on PC, on can also uploading onto the server by network, be shared with more people and watch at the video of the mobile device photographs such as smart mobile phone, realize and utilize the mobile devices such as mobile phone to carry out the function of video acquisition.The video file of storing on mobile device or the video that obtains from network also can be uploaded onto the server and are shared with more people and watch by network.But, Android does not support video acquisition and the sharing function based on HLS at present, therefore existing Android equipment cannot be realized video acquisition and share or the function of video monitoring in conjunction with HLS video server, thereby the video that existing Android equipment is taken can only be watched or upload on PC and watch in the machine, the end of cannot directly uploading onto the server is play for real-time online.
Given this, be desirable to provide a kind of multimedia file processing method and use the electronic equipment of this multimedia file processing method, it can be in the situation that carrying out less amendment to existing Android system, make to realize video acquisition and the sharing function based on HLS based on the electronic equipment of Android, thus expand this electronic equipment user experience.
Summary of the invention
Because above-mentioned situation the invention provides a kind of multimedia file processing method and the electronic equipment that uses this multimedia file processing method.
According to one embodiment of present invention, provide a kind of multimedia file processing method, be applied to an electronic equipment based on Android system, described method comprises: obtain multi-media signal; Described multi-media signal is encoded to generate to the multi-medium data of coding; Create based on HTTP Live Streaming(HLS) multimedia file of agreement; And the multi-medium data of described coding is write to described multimedia file.
In addition, multimedia file processing method according to an embodiment of the invention, also comprise: the multi-medium data of described coding is continued to write described multimedia file, and to make described multimedia file duration be after scheduled duration, suspend and write multi-medium data, and described multimedia file is sent to the server based on HLS agreement.
In addition, multimedia file processing method according to an embodiment of the invention, the wherein said multi-media signal that obtains comprises: obtain the multi-media signal that local sensor is caught.
In addition, multimedia file processing method according to an embodiment of the invention, the wherein said multi-media signal that obtains comprises: read the existing multimedia file of local storage, the described existing multimedia file of decoding is to obtain multi-media signal.
In addition, multimedia file processing method according to an embodiment of the invention, the wherein said multi-media signal that obtains comprises: via Network Capture online multimedia file, the described online multimedia file of decoding is to obtain multi-media signal.
According to another embodiment of the present invention, provide a kind of electronic equipment, described electronic equipment is based on Android system, and described electronic equipment comprises: multi-media signal acquiring unit, for obtaining multi-media signal; And multimedia signal dispose unit, for described multi-media signal being encoded to generate the multi-medium data of coding, create based on HTTP Live Streaming(HLS) multimedia file of agreement, and the multi-medium data of described coding is write to described multimedia file.
In addition, electronic equipment according to another embodiment of the invention, also comprise communication unit, also for the multi-medium data of described coding being continued to write described multimedia file, to make described multimedia file duration be after scheduled duration in wherein said multimedia signal dispose unit, suspend and write multi-medium data, and described multimedia file is sent to the server based on HLS agreement by described communication unit.
In addition, electronic equipment according to another embodiment of the invention, wherein said multi-media signal acquiring unit also comprises local sensor, and obtains the multi-media signal that described local sensor is caught.
In addition, electronic equipment according to another embodiment of the invention, wherein said multi-media signal acquiring unit reads the existing multimedia file of local storage, and the described existing multimedia file of decoding is to obtain multi-media signal.
In addition, electronic equipment according to another embodiment of the invention, wherein said multi-media signal acquiring unit is via Network Capture online multimedia file, and the described online multimedia file of decoding is to obtain multi-media signal.
In addition, electronic equipment according to another embodiment of the invention, wherein said multimedia signal dispose unit is the MPEG2-TS generation module of StageFright media engine.
In addition, electronic equipment according to another embodiment of the invention, wherein said multimedia signal dispose unit is FFmpeg module.
According to the multimedia file processing method of the embodiment of the present invention and use the electronic equipment of this multimedia file processing method, it can be in the situation that carrying out less amendment to existing Android system, make to realize video acquisition and the sharing function based on HLS based on the electronic equipment of Android, thus expand this electronic equipment user experience.
It being understood that general description above and detailed description are below both exemplary, and the further illustrating of the intention technology that is to provide claimed.
Brief description of the drawings
Fig. 1 illustrates the block diagram of electronic equipment according to an embodiment of the invention;
Fig. 2 illustrates the schematic block diagram of multimedia signal dispose unit according to an embodiment of the invention;
Fig. 3 illustrates the schematic block diagram of multimedia signal dispose unit in accordance with another embodiment of the present invention; And
Fig. 4 illustrates the flow chart of multimedia file processing method according to an embodiment of the invention.
Embodiment
Hereinafter, multiple embodiment, application and amendment are described with reference to the accompanying drawings.In addition, embodiment described below is preferred particular example, and is provided with technical preferred various restrictions, but in the following description, the invention is not restricted to these embodiment.
First, describe according to the electronic equipment of the embodiment of the present invention with reference to Fig. 1.Described electronic equipment is for example preferably smart mobile phone, personal computer, panel computer etc.
Fig. 1 is that diagram is according to the block diagram of the electronic equipment of the embodiment of the present invention.As shown in Figure 1, there is multi-media signal acquiring unit 10, multimedia signal dispose unit 20 and communication unit 30 according to the electronic equipment 1 of the embodiment of the present invention.Hold intelligiblely, in Fig. 1, for simplified characterization only illustrates the assembly being closely related with the present invention, certainly can also comprise other assembly according to the electronic equipment 1 of the embodiment of the present invention, such as display unit, input unit etc.
Particularly, multi-media signal acquiring unit 10 is for obtaining multi-media signal.In one embodiment of the invention, multi-media signal acquiring unit 10 comprises local video sensor (such as camera) and audio sensor (such as microphone), and obtains the signal of being caught by local video sensor and audio sensor as multi-media signal.In another embodiment of the present invention, multi-media signal acquiring unit 10 reads the existing multimedia file of storing in local storage (not shown), and the described existing multimedia file of decoding is to obtain multi-media signal.In yet another embodiment of the present invention, described multi-media signal acquiring unit 10 is via Network Capture online multimedia file, and the described online multimedia file of decoding is to obtain multi-media signal.
Multimedia signal dispose unit 20 is for encoding the described multi-media signal providing from described multi-media signal acquiring unit 10 to generate the multi-medium data of coding, create based on HTTP Live Streaming(HLS) multimedia file of agreement, and the multi-medium data of described coding is write to described multimedia file.Wherein, if described multi-media signal acquiring unit 10 is the existing multimedia files that read from local storage, and H.264 this file adopts just, AAC coded system, can save decoding and the cataloged procedure of required execution.
Communication unit 30 communicates and is connected with server via network wired mode or wireless mode.In one embodiment of the invention, described server is the server based on HLS agreement.Described multimedia signal dispose unit continues to write described multimedia file by the multi-medium data of described coding, and to make described multimedia file duration be after scheduled duration, suspends and write multi-medium data.It is 5 seconds that described scheduled duration can be, but not limited to.By described communication unit 30, the described multimedia file with scheduled duration is sent to the server based on HLS agreement.After this, continue to generate the next multimedia file with scheduled duration by described multimedia signal dispose unit 20.
Above, summarized the electronic equipment according to the embodiment of the present invention with reference to Fig. 1.The concrete configuration of the multimedia signal dispose unit 20 of described electronic equipment 1 is described with reference to Fig. 2 and Fig. 3 below.
Fig. 2 illustrates the schematic block diagram of multimedia signal dispose unit according to an embodiment of the invention.As shown in Figure 2, in Fig. 1, illustrated multimedia signal dispose unit 20 is specially StageFright media engine 200.StageFright media engine 200 comprises video encoder 21, audio coder 22 and MPEG2-TS generation module 23.Wherein, the Audio and Video multi-media signal that described video encoder 21 and audio coder 22 are respectively used to providing from described multi-media signal acquiring unit 10 is encoded, and the multi-media signal of coding is offered to MPEG2-TS generation module 23 to generate based on HTTP Live Streaming(HLS) multimedia file of agreement.More specifically, described MPEG2-TS generation module 23 comprises MPEG2-TS multiplexer 231 and MPEG2-TS maker 232.Wherein, the Audio and Video data of the multiplexing coding providing from described video encoder 21 and audio coder 22 of described MPEG2-TS multiplexer 231, MPEG2-TS maker 232 for generate have scheduled duration based on HTTP Live Streaming(HLS) multimedia file of agreement.
That is to say, the StageFright media engine 200 as multimedia signal dispose unit 20 is as shown in Figure 2 improvement that existing StageFright media engine is carried out, wherein revise the MPEG2-TS Writer in existing StageFright, make it for example, generate continuously multiple .ts files according to the fragment time span (5 seconds) of specifying, and the calling interface of having revised MediaRecorder increase using MPEG2-TS Writer to generate the selection of .ts file.
Fig. 3 illustrates the schematic block diagram of multimedia signal dispose unit in accordance with another embodiment of the present invention.As shown in Figure 3, in Fig. 1, illustrated multimedia signal dispose unit 20 is specially FFmpeg module 300.FFmpeg module 300 comprises video encoder 31, audio coder 32, MPEG2-TS multiplexer 331 and MPEG2-TS maker 332.As previously mentioned, the Audio and Video multi-media signal that described video encoder 31 and audio coder 32 are respectively used to providing from described multi-media signal acquiring unit 10 is encoded, and the multi-media signal of coding is offered to MPEG2-TS multiplexer 331 so that multiplexed video signal and audio signal.After this, the multiplexed signals providing from MPEG2-TS multiplexer 331 is provided MPEG2-TS maker 332, and generates based on HTTP Live Streaming(HLS) multimedia file of agreement.
That is to say, the FFmpeg module 300 as multimedia signal dispose unit 20 is as shown in Figure 3 integrated in according in electronic equipment 1 of the present invention.FFmpeg module 300 provides the video and audio coding of various common forms, can be integrated into well in existing Android system, realizes abundanter audio frequency and video and plays or recording function.Compare the embodiment shown in Fig. 2, the present embodiment without amendment existing Android system StageFright media engine, thereby more flexible.
Above, described according to the electronic equipment of the embodiment of the present invention and multimedia signal dispose unit wherein referring to figs. 1 through Fig. 3.Below, describe according to the multimedia file processing method of the embodiment of the present invention with reference to Fig. 4.
Fig. 4 illustrates the flow chart of multimedia file processing method according to an embodiment of the invention.As shown in Figure 4, multimedia file processing method comprises the following steps according to an embodiment of the invention:
In step S401, the multi-media signal acquiring unit 10 of electronic equipment 1 obtains multi-media signal.Described in Fig. 1, multi-media signal acquiring unit 10 can obtain the signal of being caught by local video sensor and audio sensor as multi-media signal, or read the existing multimedia file of storing in local storage, and the described existing multimedia file of decoding is to obtain multi-media signal, in addition can be via Network Capture online multimedia file, the described online multimedia file of decoding is to obtain multi-media signal.After this, process and enter step S402.
In step S402, multimedia signal dispose unit 20 is encoded multi-media signal to generate the multi-medium data of coding.After this, process and enter step S403.
In step S403, multimedia signal dispose unit 20 creates the Streaming(HLS based on HTTP Live) multimedia file of agreement.After this, process and enter step S404.
In step S404, the multi-medium data of coding is write multimedia file by multimedia signal dispose unit 20.After this, process and enter step S405.
In step S405, judge whether multimedia file duration has reached scheduled duration.In one embodiment of the invention, described scheduled duration can be made as 5 seconds.
If obtain positive result in step S405, multimedia file duration has reached scheduled duration, processes and enters step S406.In step S406, multimedia signal dispose unit 20 time-outs write multi-medium data and multimedia file are sent to the server based on HLS agreement.After this, process and return to step S403, so that repeating step S403 arrives step S406, thereby generate and send the next multimedia file that meets HLS agreement to the server based on HLS agreement.
On the contrary, if obtain negative decision in step S405, multimedia file duration does not also reach scheduled duration, processes and returns to step S404, to continue to write to multimedia file the multi-medium data of coding.
Above, describe according to the electronic equipment of the embodiment of the present invention and multimedia file processing method thereof referring to figs. 1 through Fig. 4, it can be in the situation that carrying out less amendment to existing Android system, make to realize video acquisition and the sharing function based on HLS based on the electronic equipment of Android, thus expand this electronic equipment user experience.
It should be noted that, in this manual, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Finally, also it should be noted that, above-mentioned a series of processing not only comprise the processing of carrying out by time series with order described here, and comprise processing parallel or that carry out respectively instead of in chronological order.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential hardware platform by software and realize, and can certainly all implement by hardware.Based on such understanding, what technical scheme of the present invention contributed to background technology can embody with the form of software product in whole or in part, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions (can be personal computers in order to make a computer equipment, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Above the present invention is described in detail, has applied specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.

Claims (12)

1. a multimedia file processing method, is applied to an electronic equipment based on Android system, and described method comprises:
Obtain multi-media signal;
Described multi-media signal is encoded to generate to the multi-medium data of coding;
Create based on HTTP Live Streaming(HLS) multimedia file of agreement; And
The multi-medium data of described coding is write to described multimedia file.
2. multimedia file processing method as claimed in claim 1, also comprises:
The multi-medium data of described coding is continued to write described multimedia file, and to make described multimedia file duration be after scheduled duration, suspends and write multi-medium data, and described multimedia file is sent to the server based on HLS agreement.
3. multimedia file processing method as claimed in claim 1 or 2, the wherein said multi-media signal that obtains comprises: obtain the multi-media signal that local sensor is caught.
4. multimedia file processing method as claimed in claim 1 or 2, the wherein said multi-media signal that obtains comprises: read the existing multimedia file of local storage, the described existing multimedia file of decoding is to obtain multi-media signal.
5. multimedia file processing method as claimed in claim 1 or 2, the wherein said multi-media signal that obtains comprises: via Network Capture online multimedia file, the described online multimedia file of decoding is to obtain multi-media signal.
6. an electronic equipment, described electronic equipment is based on Android system, and described electronic equipment comprises:
Multi-media signal acquiring unit, for obtaining multi-media signal; And
Multimedia signal dispose unit, for described multi-media signal being encoded to generate the multi-medium data of coding, create based on HTTP Live Streaming(HLS) multimedia file of agreement, and the multi-medium data of described coding is write to described multimedia file.
7. electronic equipment as claimed in claim 6, also comprises communication unit,
Also for the multi-medium data of described coding being continued to write described multimedia file, to make described multimedia file duration be after scheduled duration in wherein said multimedia signal dispose unit, suspend and write multi-medium data, and
Described multimedia file is sent to the server based on HLS agreement by described communication unit.
8. the electronic equipment as described in claim 6 or 7, wherein said multi-media signal acquiring unit also comprises local sensor, and obtains the multi-media signal that described local sensor is caught.
9. the electronic equipment as described in claim 6 or 7, wherein said multi-media signal acquiring unit reads the existing multimedia file of local storage, and the described existing multimedia file of decoding is to obtain multi-media signal.
10. the electronic equipment as described in claim 6 or 7, wherein said multi-media signal acquiring unit is via Network Capture online multimedia file, and the described online multimedia file of decoding is to obtain multi-media signal.
11. electronic equipments as described in claim 6 or 7, wherein said multimedia signal dispose unit is the MPEG2-TS generation module of StageFright media engine.
12. electronic equipments as described in claim 6 or 7, wherein said multimedia signal dispose unit is FFmpeg module.
CN201310100470.0A 2013-03-26 2013-03-26 Multimedia file processing method and electronic equipment Active CN104079951B (en)

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 true CN104079951A (en) 2014-10-01
CN104079951B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107396200A (en) * 2017-08-22 2017-11-24 深圳市中青合创传媒科技有限公司 The method that net cast is carried out based on social software
CN108881770A (en) * 2015-07-27 2018-11-23 青岛海信移动通信技术股份有限公司 A kind of method for recording and device of multimedia file

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101938483A (en) * 2010-09-03 2011-01-05 中兴通讯股份有限公司 Method and system for distributing live broadcast contents
US20110072106A1 (en) * 2009-09-22 2011-03-24 Thwapr, Inc. Hybrid transcoding for mobile media sharing
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110072106A1 (en) * 2009-09-22 2011-03-24 Thwapr, Inc. Hybrid transcoding for mobile media sharing
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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881770A (en) * 2015-07-27 2018-11-23 青岛海信移动通信技术股份有限公司 A kind of method for recording and device of multimedia file
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

Also Published As

Publication number Publication date
CN104079951B (en) 2017-11-03

Similar Documents

Publication Publication Date Title
US9514783B2 (en) Video editing with connected high-resolution video camera and video cloud server
US20150062353A1 (en) Audio video playback synchronization for encoded media
CN102685597B (en) Device, mobile terminal and method of content reappearing
CN110784718B (en) Video data encoding method, apparatus, device and storage medium
CN104093067A (en) Device and method for sharing and playing audio and visual fragments in terminal
US20200021889A1 (en) Extending playing time of a video playing session by adding an increment of time to the video playing session after initiation of the video playing session
CN106603503B (en) The treating method and apparatus of live data
CN108322775A (en) Switching method and apparatus during media flow transmission between adaptation is gathered
US10356379B2 (en) Image storage apparatus, image reproducing apparatus, method of storing image, method of reproducing an image, recording medium and photographing apparatus
CN105827484B (en) A kind of test pictures synchronous display method and system
KR101296059B1 (en) System and method for storing multi­source multimedia presentations
US9472239B1 (en) Concurrent transcoding of streaming video for immediate download
US8719437B1 (en) Enabling streaming to a media player without native streaming support
CN111866603B (en) Video file production method based on SRS, background server and system
EP3007449B1 (en) Protected storage of content with two complementary memories
CN109376254A (en) Processing method, device, electronic equipment and the readable storage medium storing program for executing of data flow
CN109040818B (en) Audio and video synchronization method, storage medium, electronic equipment and system during live broadcasting
US9571790B2 (en) Reception apparatus, reception method, and program thereof, image capturing apparatus, image capturing method, and program thereof, and transmission apparatus, transmission method, and program thereof
CN104836961A (en) Implementation method of real-time filter shooting based on Android system and system thereof
CN104079951A (en) Method of processing multimedia file and electronic equipment
CN102904891A (en) Multimedia data sharing method and device and multimedia playing equipment
CN201663666U (en) Network video device
CN104780389A (en) Video processing method and device
US8503985B1 (en) Real-time remote storage
CN102646433B (en) Method, device and system for generating stream media real-time record file of digital court

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