Movatterモバイル変換


[0]ホーム

URL:


CN105893012A - Method and device for generating video screenshot in Android system - Google Patents

Method and device for generating video screenshot in Android system
Download PDF

Info

Publication number
CN105893012A
CN105893012ACN201510869062.0ACN201510869062ACN105893012ACN 105893012 ACN105893012 ACN 105893012ACN 201510869062 ACN201510869062 ACN 201510869062ACN 105893012 ACN105893012 ACN 105893012A
Authority
CN
China
Prior art keywords
sectional drawing
information
video content
video
target
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
Application number
CN201510869062.0A
Other languages
Chinese (zh)
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.)
LeTV Information Technology Beijing Co Ltd
Original Assignee
LeTV Information Technology Beijing Co 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 LeTV Information Technology Beijing Co LtdfiledCriticalLeTV Information Technology Beijing Co Ltd
Priority to CN201510869062.0ApriorityCriticalpatent/CN105893012A/en
Publication of CN105893012ApublicationCriticalpatent/CN105893012A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The embodiment of the invention provides a method and a device for generating a video screenshot in an Android system. The method comprises the following steps: obtaining the information of video contents; obtaining the screenshot requirement information of the video contents, wherein the screenshot requirement information comprises the length and the width of a target screenshot, an initial screenshot time point, an end screenshot time point, a screenshot time interval and the information of a screenshot target catalogue; and taking the information of the video contents and the screenshot requirement information as parameters to call an Android native function to generate the screenshots of the plurality of video contents, and storing the generated screenshots into the screenshot target catalogue. The Android native function is called on the java layer of Android to continuously generate the screenshots of the plurality of video contents. The Android native function is called in one time to continuously generate a plurality of video screenshots having specified dimensions of the video contents, a screenshot function does not need to be called when each video screen is generated, so that screenshot operation efficiency is improved, and memory can be saved.

Description

For the method and apparatus generating video interception in Android system
Technical field
The present invention relates to technical field of video processing, particularly relate to a kind of for raw in Android systemThe method and apparatus becoming video interception.
Background technology
Preferably experiencing to be supplied to user, multimedia player in the market is many in processDuring media file, the thumbnail of multimedia file can be obtained and as multimedia document information displayingA part.
In the equipment using Android system, within causing multimedia because of start or the most slotting SD card etc.When holding change, Android system can call MediaScanner service and carry out background scanning, to new songThe information such as song, picture and video are indexed.In the process, system can automatically will scanVideo file generates thumbnail and preserves.If needing rapid extraction video thumbnails, then can be directAccess android.provider.MediaStore.Video.Thumbnails data base and inquire breviaryFigure.
Although this mode uses simple, but cannot ensure that the thumbnail that system automatically generates meetsThe demand of developer, must update media library just can see the thumbnail of up-to-date video simultaneously, because ofThis is in the exploitation higher to video invitation and inapplicable.
On the other hand, Android system additionally provides the API manually obtaining video thumbnails, i.e.ThumbnailUtils.createVideoThumbnail () function andThumbnailUtils.extractThumbnail () function.Can be manual by being applied in combination the two methodGround obtains the thumbnail of special time point in video.But, continuously acquiring in this way adoptingNeeding during video thumbnails repeatedly to call the method, the longest, internal memory uses the biggest, andAnd during intercepting continuously, various problem easily occurs.
Summary of the invention
It is an object of the invention to provide a kind of method for generating video interception in Android systemAnd device, with solve intercept occur during frame of video picture time-consuming internal memory uses big for a long time,And it is difficult to the problem intercepted continuously.
According to an aspect of the present invention, it is provided that a kind of for generating video interception in Android systemMethod, described method includes: obtain the information of video content;Obtain the sectional drawing of described video contentRequirement information, described sectional drawing requires when information includes the length and width of target sectional drawing, initial sectional drawingBetween point, terminate sectional drawing time point, sectional drawing time interval and the information of sectional drawing target directory;With instituteInformation and the described sectional drawing of stating video content require that information is the primary function of parameter call Android, withGenerate the sectional drawing of multiple described video content, and the sectional drawing of generation is stored in described sectional drawing target meshIn record.
Preferably, the primary function of described Android is native_startcutting function.
Preferably, the information of described video content includes the source file information of described video content.
Preferably, the sectional drawing of the described video content of described acquisition requires that the process of information includes: according toThe source file information of described video content reads described video content and metadata thereof;According to described unitVideo duration in data determines described initial sectional drawing time point and terminates sectional drawing time point.
Preferably, the sectional drawing of the described video content of described acquisition requires that the process of information also includes: fromConfiguration file reads the length and width of described target sectional drawing, sectional drawing time interval and/or describedThe data of sectional drawing target directory, or the length and width of the described target sectional drawing of acquisition user's input,Sectional drawing time interval and/or the data of described sectional drawing target directory.
According to a further aspect in the invention, it is provided that a kind of for generating video interception in Android systemDevice, described device includes: video content information acquiring unit, for obtaining video contentInformation;Sectional drawing requires information acquisition unit, requires information for obtaining the sectional drawing of described video content,Described sectional drawing requires that information includes the length and width of target sectional drawing, initial sectional drawing time point, endSectional drawing time point, sectional drawing time interval and the information of sectional drawing target directory;Sectional drawing signal generating unit,For requiring that information is primary for parameter call Android with the information of described video content and described sectional drawingFunction, to generate the sectional drawing of multiple described video content, and is stored in described cutting by the sectional drawing of generationIn figure target directory.
Preferably, the primary function of described Android is native_startcutting function.
Preferably, the information of described video content includes the source file information of described video content.
Preferably, described sectional drawing requires that information acquisition unit includes: digital independent subelement, is used forSource file information according to described video content reads described video content and metadata thereof;During sectional drawingBetween point determine subelement, for determining described initial sectional drawing according to the video duration in described metadataTime point and end sectional drawing time point.
Preferably, described sectional drawing requires that information acquisition unit also includes: target sectional drawing data acquisitionUnit, for reading the length and width of described target sectional drawing, sectional drawing time interval from configuration fileData and/or the data of described sectional drawing target directory, or obtain user input described meshThe mark length and width of sectional drawing, sectional drawing time interval and/or the data of described sectional drawing target directory.
The method and apparatus being used for generating video interception in Android system that the embodiment of the present invention provides,By the java layer in Android by the information of video content, the information of sectional drawing target directory and sectional drawingRequirement information passes to C/C++ layer as parameter, calls primary (native) function of Android, withIt is continuously generated the sectional drawing of multiple video content.Connect by disposably calling the primary function of AndroidGenerate the video interception of multiple given sizes of video content, without generating each regarding continuouslyFrequently call a sectional drawing function during sectional drawing, thus the operating efficiency of sectional drawing can be improved, and also can saveProvince's internal memory uses.
Accompanying drawing explanation
Fig. 1 be illustrate according to embodiments of the present invention one in Android system generate video interceptionThe flow chart of method;
Fig. 2 is the illustrative diagram illustrating the method for generating video interception in Android system;
Fig. 3 be illustrate according to embodiments of the present invention two in Android system generate video interceptionThe logic diagram of device;
Fig. 4 be illustrate according to embodiments of the present invention three in Android system generate video interceptionThe logic diagram of device.
Detailed description of the invention
Describe the exemplary embodiment of the present invention below in conjunction with the accompanying drawings in detail.
Embodiment one
Fig. 1 be illustrate according to embodiments of the present invention one in Android system generate video interceptionThe flow chart of method.
With reference to Fig. 1, in step S110, obtain the information of video content.
The information of above-mentioned video content can include, but not limited to the source file information of this video content,May also include the mark of video content, duration etc..Source file refers to record the literary composition of this video contentPart.
In step S120, obtain the sectional drawing in video and require information.
Sectional drawing requires that information is the operation requirement when picture carries out intercept operation, including, butIt is not limited to, sectional drawing parameter and sectional drawing storage data etc..Such as, the sectional drawing of a certain section of video is wantedAsk the information can be to the length of the picture of this video interception, width, initial sectional drawing time point (such as 0.00Second), terminate sectional drawing time point (such as 0.01 second) and sectional drawing time interval etc. makes requirement.
In the present embodiment, the length of picture can be 200 pixels or 20 pixels, and width is such as150 pixels or 15 pixels, it is possible to carry out choosing of intelligence according to the size of user computer display;Initial sectional drawing time point can be 0.00 second, terminate sectional drawing time point is 0.01 second, the now sectional drawing timeIt is spaced apart 0.01 second.By arranging different sectional drawing sizes and sectional drawing time interval, can be as requiredGenerate such as thumbnail or the video interception identical with video frame size, for different application programsUse.Such as, the thumbnail of intercepting can be as corresponding to the time migration on video playback progress barBreviary preview, and can use as video preview content with the video interception of frame of video formed objects.
In step S130, require that information is for parameter call Android with information and the sectional drawing of video contentPrimary function, to generate the sectional drawing of multiple video content, and is stored in sectional drawing mesh by the sectional drawing of generationIn heading record.
Further, sectional drawing requires that information also includes the information of sectional drawing target directory.Sectional drawing target meshRecord is the target storage position of the sectional drawing for preserving generation.User can preset a preservation and cutThe file of figure, and this document is associated.Process when a certain fragment of video is performed sectional drawingAfter, spontaneous being saved in this document folder of figure sector-meeting of intercepting, call for user.PreferablyGround, can arrange multiple file and optionally preserve different length, width and intercepting time intervalPicture, so that user searches the format picture wanted more easily.
In the present embodiment, the primary function of Android can be native_startcutting function.
Specifically, native_startcutting function/method for the video source file specified according toGiven requirement and sectional drawing parameter generate multiple video interception, and store to the destination folder specifiedIn.It is below the definition of this function/method:
public native int native_startcutting(String src_path,String dst_path,long begin_time,long end_time,long interval_time,int width,int height)
Wherein, src_pat represent video source file (mainly include video content source file catalogue andFile name etc.);Dst_path represents that thumbnail preserves file directory, i.e. sectional drawing target directory;Begin_time represents the time started, i.e. sectional drawing start time point;End_time represents the end time,I.e. sectional drawing end time point;Interval_time express time is spaced, phase between the most every twice sectional drawingEvery time span;Width represents sectional drawing picture width;Height represents sectional drawing picture height.
The method being used for generating video interception in Android system that the present embodiment provides, by regardingFrequently the source file information of content, the information of sectional drawing target directory, the length and width of target sectional drawing,Initial sectional drawing time point, the end information such as sectional drawing time point, sectional drawing time interval are as a parameter to adjustUse native_startcutting function, shot operation is passed to C++ layer and processes, to customize generationMultiple sectional drawings of video content are also stored in predetermined storage position.
Thus, by disposably calling the primary function of Android, to be continuously generated video content manyThe video interception of individual given size, calls a sectional drawing without when generating each video interceptionFunction, thus the operating efficiency of sectional drawing can be improved, and also internal memory use can be saved.
Fig. 2 is the illustrative diagram illustrating the method for generating video interception in Android system.A frame of video of one section video content is shown respectively in Fig. 2 upper end, lower end is shown respectively and regards from thisFrequently multiple video interception of contents interception.
With reference to Fig. 2, the sectional drawing obtaining video content requires that the process of information includes: according in videoThe source file information held reads video content and metadata thereof, and according to the video duration in metadataDetermine initial sectional drawing time point and terminate sectional drawing time point.
The data produced when the metadata of video is video file source file information creating, it is also possible to beThe compiled code of picture is generated from video.In the present embodiment, in same section of video, Ke YixuanSelect multiple section and carry out sectional drawing.Preferably, select to use according to the video duration in the metadata of videoThe picture of a certain section in this video intercepted is wanted at family, determines initial sectional drawing time point and terminates to cutFigure time point, thus shot operation can be customized further.Such as, a certain section of video of 3 minutes canCarry out the intercepting of 3 fragments synchronized, as at the 0.00th second to the 60.00th second, the 60.01st secondTo the 1200.00th second, three segment sync interceptings in the 120.01st second to the 180.00th second, with moreIntercept picture rapidly, save the time.
Further, the sectional drawing obtaining video content requires that the process of information also includes: from configuration literary compositionPart reads the length and width of target sectional drawing, sectional drawing time interval and/or sectional drawing target directoryData, or obtain user input the length and width of target sectional drawing, sectional drawing time interval and/Or the data of sectional drawing target directory.
Specifically, configuration file refers to different objects are carried out different configuration of file, in this enforcementIn example, configuration file is a file requiring form about sectional drawing of user's preset in advance.Such as,The sectional drawing obtaining video content requires that information specifically has two kinds of implementations: one, user sets in advanceFixed sectional drawing requirement, such as, the length and width of target sectional drawing, sectional drawing time interval and/orThe data of sectional drawing target directory, and in the way of the form preservation of configuration file;Its two, Yong HuyeThe on-the-spot form that sets can be carried out during sectional drawing, such as, the user interface provided can be passed through,Directly input the mark length and width of sectional drawing, sectional drawing time interval and/or sectional drawing target directoryThe mode of data.Utilize above two method can yet further customize shot operation, and can lead toCross amendment call parameters to use Same Way to generate repeatedly to meet the video of different sectional drawing requirement and cutFigure.
The multiple video interception generated according to abovementioned steps can be used for during video content is play,When the progress that video content is play by user checks (such as when playing slip in progress bar)Or when adjusting (such as when playing progress bar up and down by slip), it is shown that cut for corresponding time pointThe thumbnail taken, thus user can be visually known the actual development playing video.
Embodiment two
Fig. 3 be illustrate according to embodiments of the present invention two in Android system generate video interceptionThe logic diagram of device.
With reference to Fig. 3, this device includes that video content information acquiring unit 310, sectional drawing requirement information obtainTake unit 320 and sectional drawing signal generating unit 330.
Video content information acquiring unit 310 is for obtaining the information of video content.
Specifically, the information of video content includes the source file information of video content.
Sectional drawing requires that information acquisition unit 320 requires information for the sectional drawing obtaining video content.
The information of the sectional drawing signal generating unit 330 video content for obtaining with information acquisition unit 310And sectional drawing requires that the sectional drawing that information acquisition unit 320 obtains requires that information is that parameter call Android is formerRaw function, to generate the sectional drawing of multiple video content, and is stored in described sectional drawing by the sectional drawing of generationIn target directory.
Wherein, sectional drawing require information include the length and width of target sectional drawing, initial sectional drawing time point,Terminate sectional drawing time point, sectional drawing time interval and the information of sectional drawing target directory.
Specifically, the primary function of Android can be native_startcutting function.
Embodiment three
Fig. 4 be illustrate according to embodiments of the present invention three in Android system generate video interceptionThe logic diagram of device.
With reference to Fig. 4, this device includes that video content information acquiring unit 310, sectional drawing requirement information obtainTake unit 320 and sectional drawing signal generating unit 330.
Video content information acquiring unit 310 is for obtaining the information of video content.
Sectional drawing requires that information acquisition unit 320 requires information for the sectional drawing obtaining video content.
The information of the sectional drawing signal generating unit 330 video content for obtaining with information acquisition unit 310And sectional drawing requires that the sectional drawing that information acquisition unit 320 obtains requires that information is that parameter call Android is formerRaw function, to generate the sectional drawing of multiple video content, and is stored in described sectional drawing by the sectional drawing of generationIn target directory.
Further, sectional drawing require information acquisition unit 320 include digital independent subelement 321,Sectional drawing time point determines subelement 322 and target sectional drawing data acquisition subelement 323.
Digital independent subelement 321 reads video content for the source file information according to video contentAnd metadata.
Sectional drawing time point determines that subelement 322 is for the first number obtained with digital independent subelement 321Video duration according to determines initial sectional drawing time point and terminates sectional drawing time point.
Specifically, above-mentioned sectional drawing time point determines the initial sectional drawing time that subelement 322 will determineThe information of point and end sectional drawing time point passes to sectional drawing signal generating unit 330.
Target sectional drawing data acquisition subelement 323 for reading the length of target sectional drawing from configuration fileWith width, the data of sectional drawing time interval and/or the data of sectional drawing target directory, or it is used forObtain the length and width of target sectional drawing, sectional drawing time interval and/or the sectional drawing mesh of user's inputThe data of heading record.
Specifically, above-mentioned target sectional drawing data acquisition subelement 323 is by the length of the target sectional drawing of acquisitionThe data of degree and width and/or sectional drawing time interval pass to sectional drawing signal generating unit 330.
The method and apparatus being used for generating video interception in Android system that the embodiment of the present invention provides,By the java layer in Android by the information of video content, the information of sectional drawing target directory and sectional drawingRequirement information passes to C/C++ layer as parameter, calls primary (native) function of Android, withIt is continuously generated the sectional drawing of multiple video content.Connect by disposably calling the primary function of AndroidGenerate the video interception of multiple given sizes of video content, without generating each regarding continuouslyFrequently call a sectional drawing function during sectional drawing, thus the operating efficiency of sectional drawing can be improved, and also can saveProvince's internal memory uses.
It may be noted that according to the needs implemented, all parts/step described in this application can be torn openIt is divided into more components/steps, it is possible to by two or more components/steps or the part of components/stepsThe components/steps that operational group synthesis is new, to realize the purpose of the present invention.
Above-mentioned the method according to the invention can realize in hardware, firmware, or is implemented as depositingStore up the software in record medium (such as CD ROM, RAM, floppy disk, hard disk or magneto-optic disk)Or computer code, or be implemented through original storage that network downloads at remotely record medium orIn nonvolatile machine readable media and the computer code in local recording medium will be stored in, fromAnd method described here can be stored in use general purpose computer, application specific processor or able to programmeOr the such software processes on the record medium of specialized hardware (such as ASIC or FPGA).CanTo understand, computer, processor, microprocessor controller or programmable hardware include storing orReceive software or the storage assembly (such as, RAM, ROM, flash memory etc.) of computer code, whenWhen described software or computer code are by computer, processor or hardware access and execution, it is achievedThis processing method described.Additionally, when general purpose computer accesses for realizing the process being shown in whichCode time, general purpose computer is converted to for performing the process being shown in which by the execution of codeSpecial-purpose computer.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is notBe confined to this, any those familiar with the art in the technical scope that the invention discloses,Change can be readily occurred in or replace, all should contain within protection scope of the present invention.Therefore, originallyThe protection domain of invention should be as the criterion with described scope of the claims.

Claims (10)

CN201510869062.0A2015-12-012015-12-01Method and device for generating video screenshot in Android systemPendingCN105893012A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510869062.0ACN105893012A (en)2015-12-012015-12-01Method and device for generating video screenshot in Android system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510869062.0ACN105893012A (en)2015-12-012015-12-01Method and device for generating video screenshot in Android system

Publications (1)

Publication NumberPublication Date
CN105893012Atrue CN105893012A (en)2016-08-24

Family

ID=57002898

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510869062.0APendingCN105893012A (en)2015-12-012015-12-01Method and device for generating video screenshot in Android system

Country Status (1)

CountryLink
CN (1)CN105893012A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107153501A (en)*2017-06-052017-09-12深圳天珑无线科技有限公司Screenshot method, device, storage medium and electronic equipment
CN110162647A (en)*2019-04-052019-08-23三江学院A kind of acquisition of image big data and processing method of Java technology
CN110876069A (en)*2018-08-312020-03-10广州虎牙信息科技有限公司Method, device and equipment for acquiring video screenshot and storage medium
CN114116601A (en)*2020-08-252022-03-01深圳迈瑞生物医疗电子股份有限公司 File storage management method and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102006424A (en)*2010-11-222011-04-06亿览在线网络技术(北京)有限公司Video reviewing method and system
CN102779008A (en)*2012-06-262012-11-14奇智软件(北京)有限公司Screen screenshot method and system
CN103873916A (en)*2012-12-132014-06-18深圳市快播科技有限公司Video thumbnail processing method, video thumbnail processing system and video player
WO2015038338A1 (en)*2013-09-162015-03-19Thomson LicensingBrowsing videos by searching multiple user comments and overlaying those into the content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102006424A (en)*2010-11-222011-04-06亿览在线网络技术(北京)有限公司Video reviewing method and system
CN102779008A (en)*2012-06-262012-11-14奇智软件(北京)有限公司Screen screenshot method and system
CN103873916A (en)*2012-12-132014-06-18深圳市快播科技有限公司Video thumbnail processing method, video thumbnail processing system and video player
WO2015038338A1 (en)*2013-09-162015-03-19Thomson LicensingBrowsing videos by searching multiple user comments and overlaying those into the content

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIANGXIANGTAI: "按照一定的间隔,从视频中截图并保存(OpenCV)", 《HTTP://BLOG.SINA.COM.CN/S/BLOG_60281B700100Y8O2.HTML》*

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107153501A (en)*2017-06-052017-09-12深圳天珑无线科技有限公司Screenshot method, device, storage medium and electronic equipment
CN110876069A (en)*2018-08-312020-03-10广州虎牙信息科技有限公司Method, device and equipment for acquiring video screenshot and storage medium
CN110162647A (en)*2019-04-052019-08-23三江学院A kind of acquisition of image big data and processing method of Java technology
CN114116601A (en)*2020-08-252022-03-01深圳迈瑞生物医疗电子股份有限公司 File storage management method and related equipment

Similar Documents

PublicationPublication DateTitle
CN105493512B (en) A video processing method, video processing device and display device
USRE48430E1 (en)Two-dimensional code processing method and terminal
US20240265602A1 (en)Systems and methods for template image edits
EP2051173A2 (en)System and method for dynamic content insertion from the internet into a multimedia work
WO2017107441A1 (en)Method and device for capturing continuous video pictures
US20140219633A1 (en)Systems and Methods for Performing Selective Video Rendering
CN110248116B (en)Picture processing method and device, computer equipment and storage medium
US7904798B2 (en)Method of generating a presentation with background music and related system
JP6182609B2 (en) Subtitle processing method, apparatus, system, and storage medium
CN105893012A (en)Method and device for generating video screenshot in Android system
WO2018076174A1 (en)Multimedia editing method and device, and smart terminal
CN108241461A (en) A method and device for online production of audio presentations
CN101276299A (en) Information processing system and information processing method
CN113518187B (en)Video editing method and device
CN102346696B (en)A kind of file access pattern method and device
EP3467830B1 (en)Information processing method for displaying images, information processing apparatus, and program
CN109213879A (en)A kind of document presentation method and device
CN102346771B (en) Information display method and device
US20140244697A1 (en)Method and device for displaying files
WO2016184193A1 (en)Method and apparatus for generating media files
US11895350B2 (en)Techniques for providing a content stream based on a delivered stream of content
CN102426581A (en)Method and device for generating file preview
US9456191B2 (en)Reproduction apparatus and reproduction method
US12445669B2 (en)Techniques for providing a content stream based on a delivered stream of content
CN102932477A (en)Network storage client and synchronization method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication

Application publication date:20160824

WD01Invention patent application deemed withdrawn after publication

[8]ページ先頭

©2009-2025 Movatter.jp