CN105141869A - Android system based segmented video data processing method - Google Patents
Android system based segmented video data processing method Download PDFInfo
- Publication number
- CN105141869A CN105141869A CN201510512429.3A CN201510512429A CN105141869A CN 105141869 A CN105141869 A CN 105141869A CN 201510512429 A CN201510512429 A CN 201510512429A CN 105141869 A CN105141869 A CN 105141869A
- Authority
- CN
- China
- Prior art keywords
- video
- multimedia file
- android system
- processing method
- frame
- 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
Links
Landscapes
- Television Signal Processing For Recording (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses an Android system based segmented video data processing method. The method comprises a first step of collecting video frame data and audio frame data synchronously; a second step of coding the data through a hardware encoder; a third step of transmitting the coded data and a timestamp thereof to a segmented video module; a fourth step of writing the video frame data and audio frame data corresponding to the timestamp in a multi-media file; a fifth step of judging whether the time of the multi-media file reaches a preset maximum time, if yes, saving the multi-media file, if not, maintaining the fourth step; and a sixth step of creating a new multi-media file, using the last video frame of the previous multi-media file as a first video frame, and skipping to the fourth step. Through adoption of the method, time is not lost in the process, each frame is controlled strictly in recording of an MP4 file, so that the last frame of the previous video is definitely the first frame of the next video, and the two video files are consecutive.
Description
Technical field
The present invention relates to the audio, video data collection of android system, particularly relate to a kind of segmentation Video data processing method based on android system.
Background technology
The API(application programming interfaces of android system) facilitate easy-to-use, but from reducing the degree of freedom of exploitation another aspect.Such as use android system API to develop segmentation recording function, first must open multi-media recording device record multimedia file, then close multi-media recording device, then reopen multi-media recording device and record next section of multimedia file.So, a period of time must be lost to reopening between multi-media recording device at closedown multi-media recording device, make two sections of multimedia files discontinuous, the time of losing between these two sections of multimedia files can reach 1 to 3 seconds more than, and this time of losing may be the key point that accident occurs, bring great inconvenience to follow-up solving a case.
Summary of the invention
For solving the problems of the technologies described above, the object of this invention is to provide a kind of segmentation Video data processing method based on android system.
The technical solution used in the present invention is:
Based on the segmentation Video data processing method of android system, comprise the following steps: (A) synchronous acquisition video requency frame data and audio frame number certificate; (B) by hardware coder, described video requency frame data and audio frame number certificate are encoded; (C) by coding after video requency frame data and audio frame number according to and timestamp be transferred to segmentation picture recording module; (D) by video requency frame data corresponding for timestamp and audio frame number according to write multimedia file; (E) judge the maximum the duration whether duration of described multimedia file reaches default, if reach maximum duration, preserve multimedia file and enter next step, otherwise keep step (D); (F) newly-built multimedia file, adopts last frame of video of last multimedia file as the first frame of video, jumps to step (D).
Further, in described step (A), video requency frame data and audio frame number certificate gather from android system intermediate layer.
Further, the video requency frame data form gathered in described step (A) is YV12, and the form in step (B) after hardware coder coding is H264 video requency frame data.
Further, the audio frame data format gathered in described step (A) is PCM, and the form in step (B) after hardware coder coding is AAC audio frame number certificate.
Wherein, described step multimedia file is MP4 multimedia file.
Beneficial effect of the present invention:
The segmentation Video data processing method that the present invention is based on android system can gather audio frequency and video always, can not drop-out time in its piecewise acquisition video process, then each frame of strict control in the process recording into MP4 multimedia file, making the last frame of video the last period must be the first frame of rear one section of video, be therefore continuous print between two sections of video files.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described further.
Fig. 1 is the hardware frame figure of segmentation Video data of the present invention process;
Fig. 2 is the fundamental diagram of video data acquiring and coding module;
Fig. 3 is the fundamental diagram of audio data collecting and coding module;
Fig. 4 is the specific embodiment flow chart of segmentation Video data processing method of the present invention.
Embodiment
As shown in Figure 1, for segmentation Video data processing method of the present invention based on the hardware frame of android system, comprise three modules: video data acquiring and coding module, audio data collecting and coding module, segmentation picture recording module.
Wherein, video data acquiring part gathers the video requency frame data of high frame per second from android system intermediate layer, video requency frame data form is YV12, then, be H264 video requency frame data video requency frame data by hardware coder hard coded, finally, H264 video requency frame data is passed to segmentation picture recording module, as Fig. 2 together with timestamp.
Video data acquiring part gathers audio frame number certificate from android system intermediate layer, audio frame data format is PCM(pulse code modulation), then, audio frame number according to being encoded to AAC(Advanced Audio Coding) audio frame number certificate, finally, AAC audio frame number according to passing to segmentation picture recording module, as Fig. 3 together with timestamp.
As shown in Figure 4, segmentation picture recording module mainly realizes a H264 frame of video and AAC audio frame number certificate, using the timestamp of frame of video as synchronously, records into the function of multistage continuous print MP4 multimedia file.
Segmentation picture recording module steps flow chart is as follows:
(1), judge whether segmentation video recording terminates.If terminate, then close the MP4 multimedia file handle opened, then perform (6).If do not terminate, then perform (2).
(2), data are received.If the data received are video requency frame datas, then perform (3).Otherwise the data received are audio frame number certificates, then audio frame number certificate is cached in audio frame data list.
(3), judge whether to there is the MP4 multimedia file handle opened.The MP4 multimedia file handle opened if do not exist, then open new MP4 multimedia file handle, then performs (4).If there is the MP4 multimedia file handle opened, then directly perform (4).
(4), video requency frame data be written in MP4 multimedia file, and the last frame of video be written in MP4 multimedia file is taken out to the audio frame data segment that the timestamp of this frame of video is corresponding from cache list, in write MP4 multimedia file.Then (5) are performed.
(5), judge that the duration of MP4 multimedia file has reached the maximum duration of setting.If reached maximum duration, then close MP4 multimedia file handle (preservation), reopen a new MP4 multimedia file handle, last frame of video in previous step (4) is write as the first frame of video in new MP4 multimedia file handle, then perform (1).If do not reach maximum duration, directly perform (1).
(6) segmentation video recording, is terminated.
As mentioned above, the segmentation Video data processing method that the present invention is based on android system can gather audio frequency and video always, can not drop-out time in its piecewise acquisition video process, then each frame of strict control in the process recording into MP4 multimedia file, making the last frame of video the last period must be the first frame of rear one section of video, be therefore continuous print between two sections of video files.
The foregoing is only preferred embodiments of the present invention, the present invention is not limited to above-mentioned execution mode, as long as the technical scheme realizing the object of the invention with basic same approach all belongs within protection scope of the present invention.
Claims (5)
1. based on the segmentation Video data processing method of android system, it is characterized in that, comprise the following steps: (A) synchronous acquisition video requency frame data and audio frame number certificate; (B) by hardware coder, described video requency frame data and audio frame number certificate are encoded; (C) by coding after video requency frame data and audio frame number according to and timestamp be transferred to segmentation picture recording module; (D) by video requency frame data corresponding for timestamp and audio frame number according to write multimedia file; (E) judge the maximum the duration whether duration of described multimedia file reaches default, if reach maximum duration, preserve multimedia file and enter next step, otherwise keep step (D); (F) newly-built multimedia file, adopts last frame of video of last multimedia file as the first frame of video, jumps to step (D).
2. the segmentation Video data processing method based on android system according to claim 1, is characterized in that: in described step (A), video requency frame data and audio frame number are according to gathering from android system intermediate layer.
3. the segmentation Video data processing method based on android system according to claim 1, it is characterized in that: the video requency frame data form gathered in described step (A) is YV12, the form in step (B) after hardware coder coding is H264 video requency frame data.
4. the segmentation Video data processing method based on android system according to claim 1, it is characterized in that: the audio frame data format gathered in described step (A) is PCM, the form in step (B) after hardware coder coding is AAC audio frame number certificate.
5. the segmentation Video data processing method based on android system according to claim 1, is characterized in that: described multimedia file is MP4 multimedia file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510512429.3A CN105141869B (en) | 2015-08-19 | 2015-08-19 | Segmentation Video data processing method based on android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510512429.3A CN105141869B (en) | 2015-08-19 | 2015-08-19 | Segmentation Video data processing method based on android system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105141869A true CN105141869A (en) | 2015-12-09 |
CN105141869B CN105141869B (en) | 2018-12-18 |
Family
ID=54727066
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510512429.3A Active CN105141869B (en) | 2015-08-19 | 2015-08-19 | Segmentation Video data processing method based on android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105141869B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106027935A (en) * | 2016-07-13 | 2016-10-12 | 深圳市爱培科技术股份有限公司 | Frame-missing-free segmental video-recording system and implementation method |
CN106131432A (en) * | 2016-08-10 | 2016-11-16 | 深圳市金立通信设备有限公司 | A kind of video capture method and terminal |
CN106341636A (en) * | 2016-09-29 | 2017-01-18 | 珠海全志科技股份有限公司 | Android system-based continuous recording system and method |
CN107147931A (en) * | 2017-04-28 | 2017-09-08 | 青岛海信电器股份有限公司 | The method for recording and device of audio, video data |
CN107800988A (en) * | 2017-11-08 | 2018-03-13 | 青岛海信移动通信技术股份有限公司 | A kind of method and device of video record, electronic equipment |
CN108184162A (en) * | 2017-12-07 | 2018-06-19 | 深圳微步信息股份有限公司 | A kind of automatic segmentation kinescope method and system based on Android system |
CN108521551A (en) * | 2018-05-14 | 2018-09-11 | 河北远东通信系统工程有限公司 | A kind of network real-time video recording and storing method and system and file access pattern method |
CN110784652A (en) * | 2019-11-15 | 2020-02-11 | 北京达佳互联信息技术有限公司 | Video shooting method and device, electronic equipment and storage medium |
CN111356003A (en) * | 2020-03-11 | 2020-06-30 | 北京文香信息技术有限公司 | Data writing method, system and terminal equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6351595B1 (en) * | 1997-04-25 | 2002-02-26 | Lg Electronics Inc. | Method for fine recording of video frames |
US20060140280A1 (en) * | 2003-06-12 | 2006-06-29 | Sony Corporation | Device for recording video data and audio data |
CN1812533A (en) * | 2006-01-10 | 2006-08-02 | 无敌科技(西安)有限公司 | Video recording method |
CN101184195A (en) * | 2007-12-25 | 2008-05-21 | 腾讯科技(深圳)有限公司 | Audio/video living broadcast system and method |
CN101742197A (en) * | 2008-11-18 | 2010-06-16 | 华为技术有限公司 | Front-end equipment, video file backup method and control method, device and system thereof |
CN101931775A (en) * | 2010-09-01 | 2010-12-29 | 中兴通讯股份有限公司 | Video recording method and device |
CN102655579A (en) * | 2012-04-09 | 2012-09-05 | 深圳一电科技有限公司 | Method and device for storing audio-video images |
CN102938829A (en) * | 2012-10-12 | 2013-02-20 | 天津市亚安科技股份有限公司 | Method for realizing prerecording of real-time audio/video stream |
CN103826159A (en) * | 2013-12-04 | 2014-05-28 | Tcl集团股份有限公司 | M3U8 format video local offline play method and terminal |
-
2015
- 2015-08-19 CN CN201510512429.3A patent/CN105141869B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6351595B1 (en) * | 1997-04-25 | 2002-02-26 | Lg Electronics Inc. | Method for fine recording of video frames |
US20060140280A1 (en) * | 2003-06-12 | 2006-06-29 | Sony Corporation | Device for recording video data and audio data |
CN1812533A (en) * | 2006-01-10 | 2006-08-02 | 无敌科技(西安)有限公司 | Video recording method |
CN101184195A (en) * | 2007-12-25 | 2008-05-21 | 腾讯科技(深圳)有限公司 | Audio/video living broadcast system and method |
CN101742197A (en) * | 2008-11-18 | 2010-06-16 | 华为技术有限公司 | Front-end equipment, video file backup method and control method, device and system thereof |
CN101931775A (en) * | 2010-09-01 | 2010-12-29 | 中兴通讯股份有限公司 | Video recording method and device |
CN102655579A (en) * | 2012-04-09 | 2012-09-05 | 深圳一电科技有限公司 | Method and device for storing audio-video images |
CN102938829A (en) * | 2012-10-12 | 2013-02-20 | 天津市亚安科技股份有限公司 | Method for realizing prerecording of real-time audio/video stream |
CN103826159A (en) * | 2013-12-04 | 2014-05-28 | Tcl集团股份有限公司 | M3U8 format video local offline play method and terminal |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106027935A (en) * | 2016-07-13 | 2016-10-12 | 深圳市爱培科技术股份有限公司 | Frame-missing-free segmental video-recording system and implementation method |
CN106131432A (en) * | 2016-08-10 | 2016-11-16 | 深圳市金立通信设备有限公司 | A kind of video capture method and terminal |
CN106341636A (en) * | 2016-09-29 | 2017-01-18 | 珠海全志科技股份有限公司 | Android system-based continuous recording system and method |
CN107147931A (en) * | 2017-04-28 | 2017-09-08 | 青岛海信电器股份有限公司 | The method for recording and device of audio, video data |
CN107800988A (en) * | 2017-11-08 | 2018-03-13 | 青岛海信移动通信技术股份有限公司 | A kind of method and device of video record, electronic equipment |
CN108184162A (en) * | 2017-12-07 | 2018-06-19 | 深圳微步信息股份有限公司 | A kind of automatic segmentation kinescope method and system based on Android system |
CN108521551A (en) * | 2018-05-14 | 2018-09-11 | 河北远东通信系统工程有限公司 | A kind of network real-time video recording and storing method and system and file access pattern method |
CN110784652A (en) * | 2019-11-15 | 2020-02-11 | 北京达佳互联信息技术有限公司 | Video shooting method and device, electronic equipment and storage medium |
US11165950B2 (en) | 2019-11-15 | 2021-11-02 | Beijing Dajia Internet Information Technology Co., Ltd. | Method and apparatus for shooting video, and storage medium |
CN111356003A (en) * | 2020-03-11 | 2020-06-30 | 北京文香信息技术有限公司 | Data writing method, system and terminal equipment |
CN111356003B (en) * | 2020-03-11 | 2022-03-29 | 安徽文香科技有限公司 | Data writing method, system and terminal equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105141869B (en) | 2018-12-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105141869A (en) | Android system based segmented video data processing method | |
MY145519A (en) | System and method for recording and reproducing multimedia based on an audio signal | |
GB201005913D0 (en) | Method for real-time data compression and transmission | |
CN102098304A (en) | Method for simultaneously recording and uploading audio/video of mobile phone | |
US10409491B2 (en) | Method of data analysis and extraction for embedded security devices | |
TW200512728A (en) | System and method for writing data to HDD in bands | |
TW200746752A (en) | Apparatus for generating and interpreting a data stream modified in accordance with the importance of the data | |
US8879895B1 (en) | System and method for processing ancillary data associated with a video stream | |
PT1687809E (en) | Device and method for reconstruction a multichannel audio signal and for generating a parameter data record therefor | |
US9324358B2 (en) | Controlling data writing of tape recording apparatus | |
EP4250726A4 (en) | Point cloud data encoding method, point cloud data decoding method, device, medium, and program product | |
CN105280205A (en) | Nonlinear editing software audio and video synchronization processing method and device | |
CN102243615B (en) | Memory buffer management method supporting audio/video frame storage | |
CN102098423B (en) | Seamless file collection method and system | |
CN111666446A (en) | Method and system for judging AI automatic editing video material | |
TW200506839A (en) | Recording medium, recording method, reproduction apparatus and method, and computer-readable program | |
CN103826078A (en) | Linear storage method, device and terminal for video data | |
MX2008001699A (en) | Video server, video editing system, and method for recording and reproducing video data of the video server. | |
CN102170528A (en) | Segmentation method of news program | |
CN106131506A (en) | A kind of visualization data tracking acquisition terminal | |
CN101762320B (en) | Method for drawing audio waveform under MAC desktop and system thereof | |
CN201577163U (en) | High-low code stream audio-video file processing device adopting 1394 | |
CN102647584A (en) | Video file generation method and system | |
EP4006789A4 (en) | Conversion device, conversion method, program, and information recording medium | |
CN102752400A (en) | Multiplicity speed security transmission method of inter-network audio file and system thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 528403 Hongyu Building 1, 2101 Zhongshan four road, East District, Zhongshan, Guangdong, 1 Applicant after: Zhongshan Apocalypse Intelligent Technology Co., Ltd. Address before: 528403 Hongyu Building 1, 2101 Zhongshan four road, East District, Zhongshan, Guangdong, 1 Applicant before: T-CHIP ELECTRONICS TECHNOLOGY CO., LTD. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |