CN107820124A - Format conversion method, device and server - Google Patents

Format conversion method, device and server Download PDF

Info

Publication number
CN107820124A
CN107820124A CN201711107143.2A CN201711107143A CN107820124A CN 107820124 A CN107820124 A CN 107820124A CN 201711107143 A CN201711107143 A CN 201711107143A CN 107820124 A CN107820124 A CN 107820124A
Authority
CN
China
Prior art keywords
file
frame
source file
bhd
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.)
Pending
Application number
CN201711107143.2A
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.)
Storm Group Ltd By Share Ltd
Original Assignee
Storm Group Ltd By Share 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 Storm Group Ltd By Share Ltd filed Critical Storm Group Ltd By Share Ltd
Priority to CN201711107143.2A priority Critical patent/CN107820124A/en
Publication of CN107820124A publication Critical patent/CN107820124A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/01Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of format conversion method, device and server, this method includes:By FFmpeg, the fileinfo of source file is obtained;Read the data and its relevant information of each frame in the source file;According to the data and relevant information of the fileinfo of the source file, each frame, the BHD files that and form identical with the content of the source file is BHD are generated.The technical scheme can be based on FFmpeg according to fileinfo, each frame data and relevant information, the form for changing source file is BHD, realizes FFmpeg and the extended formatting of file is converted into BHD forms.

Description

Format conversion method, device and server
Technical field
The present invention relates to the technical field of video playback, especially a kind of format conversion method, device and server.
Background technology
BHD forms, are a kind of exclusive multimedia file formats of MPC player, the entitled .bhd of its file extent, It is optimized for video image quality, video size, video frame number, code check, mobile phone power saving etc., and the one kind developed is specialized in cruelly The data format that wind audio and video player plays.
The form of multimedia file has many kinds, can enter row format conversion between each other.FFmpeg can realize more matchmakers The form conversion of body file, but can not realize that BHD form conversion, such as AVI format can not be converted into BHD forms.
The content of the invention
In view of this, the technical problems to be solved by the invention be how to provide a kind of format conversion method, device and Server, it is possible to achieve the extended formatting of file is converted into BHD forms by FFmpeg.Technical scheme is as follows:
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of format conversion method, including:
By FFmpeg, the fileinfo of source file is obtained;
Read the data and its relevant information of each frame in the source file;
According to the data and relevant information of the fileinfo of the source file, each frame, generate interior with the source file Hold the BHD files that identical and form is BHD.
The technical scheme provided by this disclosed embodiment can include the following benefits:FFmpeg can be based on according to text Part information, the data and relevant information of each frame, the form for changing source file is BHD, realize FFmpeg by file other Form is converted into BHD forms.
Optionally, the relevant information includes timestamp;
The fileinfo according to the source file, the data and relevant information of each frame, generation and the source file The BHD files that content is identical and form is BHD, including:
Form is established as BHD new file and the file header of the new file;
The DECODER information of the fileinfo and predetermined BHD forms is write into the file header;
The data of each frame of the source file and relevant information are write in the data field of the new file, and recorded every The document misregistration amount of individual key frame;
The timestamp of each key frame is obtained from the timestamp of each frame;
The index information of document misregistration amount and the timestamp key frame as corresponding to of each key frame is write into institute State file header;
Using the new file after write-in as the BHD files.
Optionally, described by FFmpeg, before the fileinfo for obtaining source file, methods described also includes:
Receive the conversion instruction for the form of source file to be converted to BHD;
According to the conversion instruction, obtained by the FFmpeg and open the source file.
Optionally, it is described to be obtained by the FFmpeg and open the source file, including:
The FormatCtx objects of the source file are obtained by avformat_open_input functions in the FFmpeg;
Accordingly, it is described by FFmpeg, the fileinfo of source file is obtained, including:
Pass through the fileinfo of source file described in the FormatCtx object acquisitions.
Optionally, the data and its relevant information for reading each frame in the source file, including:
The data and its correlation of each frame of the source file are read by av_read_frame functions in the FFmpeg Information.
Optionally, the fileinfo comprises at least one of following:Video track, total playing duration, audio track quantity, coding Mode and crucial number of frames;
The relevant information at least also includes one of following:Data volume and characterize whether be key frame status information.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of format conversion apparatus, including:
First acquisition module, for by FFmpeg, obtaining the fileinfo of source file;
Read module, read the data and its relevant information of each frame in the source file;
Generation module, for the data and relevant information of the fileinfo according to the source file, each frame, generation and institute State the BHD files that content is identical and form is BHD of source file.
Optionally, the relevant information includes timestamp;The generation module includes:
Setting up submodule, for establishing form as BHD new file and the file header of the new file;
First write-in submodule, for by described in the write-in of the DECODER information of the fileinfo and predetermined BHD forms File header;
Second write-in submodule, for the data of each frame of the source file and relevant information to be write into the new file Data field in, and record the document misregistration amount of each key frame;
First acquisition submodule, for obtaining the timestamp of each key frame from the timestamp of each frame;
3rd write-in submodule, for the key as corresponding to using the document misregistration amount of each key frame and timestamp The index information of frame writes the file header;Using the new file after write-in as the BHD files.
Optionally, described device also includes:
Receiving module, for receiving the conversion instruction for being used for that the form of source file to be converted to BHD;
Second acquisition module, for according to the conversion instruction, being obtained by the FFmpeg and opening the source file.
Optionally, second acquisition module includes:
Second acquisition submodule, for obtaining the source by avformat_open_input functions in the FFmpeg The FormatCtx objects of file;
Accordingly, first acquisition module includes:
3rd acquisition submodule, for the fileinfo by source file described in the FormatCtx object acquisitions.
Optionally, the read module includes:
Reading submodule, for reading each of the source file by av_read_frame functions in the FFmpeg The data and its relevant information of frame.
Optionally, the fileinfo comprises at least one of following:Video track, total playing duration, audio track quantity, coding Mode and crucial number of frames;
The relevant information at least also includes one of following:Data volume and characterize whether be key frame status information.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of server, including above-mentioned format conversion apparatus.
Below by drawings and examples, technical scheme is described in further detail.
Brief description of the drawings
The accompanying drawing of a part for constitution instruction describes embodiments of the invention, and is used to explain together with description The principle of the present invention.
Referring to the drawings, according to following detailed description, the present invention can be more clearly understood, wherein:
Fig. 1 is the flow chart of the format conversion method according to an exemplary embodiment.
Fig. 2 is the flow chart of the format conversion method according to an exemplary embodiment.
Fig. 3 is the flow chart of the format conversion method according to an exemplary embodiment.
Fig. 4 is the flow chart of the format conversion method according to an exemplary embodiment.
Fig. 5 is the flow chart of the format conversion method according to an exemplary embodiment.
Fig. 6 is the block diagram of the format conversion apparatus according to an exemplary embodiment.
Fig. 7 is the block diagram of the format conversion apparatus according to an exemplary embodiment.
Fig. 8 is the block diagram of the format conversion apparatus according to an exemplary embodiment.
Fig. 9 is the block diagram of the format conversion apparatus according to an exemplary embodiment.
Figure 10 is the block diagram of the format conversion apparatus according to an exemplary embodiment.
Embodiment
The various exemplary embodiments of the present invention are described in detail now with reference to accompanying drawing.It should be noted that:Unless have in addition Body illustrates that the unlimited system of part and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally The scope of invention.
The description only actually at least one exemplary embodiment is illustrative to be never used as to the present invention below And its application or any restrictions that use.
It may be not discussed in detail for technology, method and apparatus known to person of ordinary skill in the relevant, but suitable In the case of, the technology, method and apparatus should be considered as part for specification.
It should be noted that:Similar label and letter represents similar terms in following accompanying drawing, therefore, once a certain Xiang Yi It is defined, then it need not be further discussed in subsequent accompanying drawing in individual accompanying drawing.
The embodiment of the present invention can apply to computer system/server, and it can be with numerous other universal or special calculating System environments or configuration operate together.Suitable for be used together with computer system/server well-known computing system, ring The example of border and/or configuration includes but is not limited to:Personal computer system, server computer system, thin client, thick client Machine, hand-held or laptop devices, the system based on microprocessor, set top box, programmable consumer electronics, NetPC Network PC, Little types Ji calculates machine Xi Tong ﹑ large computer systems and the distributed cloud computing technology environment including any of the above described system, etc..
Computer system/server can be in computer system executable instruction (such as journey performed by computer system Sequence module) general linguistic context under describe.Generally, program module can include routine, program, target program, component, logic, number According to structure etc., they perform specific task or realize specific abstract data type.Computer system/server can be with Implement in distributed cloud computing environment, in distributed cloud computing environment, task is by by the long-range of communication network links Manage what equipment performed.In distributed cloud computing environment, program module can be located at the Local or Remote meter for including storage device In calculation system storage medium.
FFmpeg be it is a set of can be used for recording, converted digital audio, video, and the calculating of increasing income of stream can be translated into Machine program.It includes audio/video code database leading at present.FFmpeg is developed under Linux (a kind of operating system) Come, but it can be compiled in most of operating systems including Windows.FFmpeg can realize a variety of easily Mutual conversion between video format, such as video AVI (a kind of video format) form under can shooting with video-corder are changed into and regarded now FLV forms used by frequency website.
FFmpeg can carry out video format conversion at present, but because BHD forms are that MPC player is privately owned Form, therefore, it is impossible to by extended formatting, such as AVI format, it is converted into BHD forms.
The present embodiment provides a kind of format conversion method, wherein, Fig. 1 is a kind of lattice according to an exemplary embodiment The flow chart of formula conversion method, as shown in figure 1, format conversion method is used in format conversion apparatus, the device is applied to service Device, particularly Linux server, this method comprise the following steps 101 to 103:
In a step 101, by FFmpeg, the fileinfo of source file is obtained.
The FFmpeg that the present embodiment provides adds the corresponding module for the file to form BHD forms.
Fileinfo is the content of displaying needed for non-source file, but the parameter that the record display content is related, these ginsengs Number needs to be placed in file header, for example, video track, audio track quantity, coded system, total playing duration, crucial number of frames etc..Part Head is one section of data for undertaking certain task positioned at file beginning, typically all in the part of beginning.Here, header file is as one The bearer documents that kind is stated comprising power function, data-interface, for the statement of save routine, and define file and be used to preserve journey The realization of sequence.
In a step 102, the data and its relevant information of each frame in source file are read.
The data and relevant information of each frame are different from, and relevant information is to record the frame to show the related ginseng of content Number.For example, characterize the status information, the timestamp of the frame etc. that the frame is key frame.
Being read in the present embodiment is read according to the playing sequence of source file, that is, the order of frame.
In step 103, according to the data and relevant information of the fileinfo of source file, each frame, generation and source file The BHD files that content is identical and form is BHD.
Every kind of form of file is the equal of the container for laying file, and the advantage and disadvantage of each container are different, but the mesh of container Be exactly in order to lay be exactly each frame data and relevant information, and ensure to play in suitable player.
In the present embodiment, fileinfo and part relevant information are needed as file header, ensure that BHD files can be opened up Show, the data and relevant information of each frame ensure that the content of BHD displayings is errorless.
What deserves to be explained is the relevant parameter for establishing BHD formatted files needs to pre-save FFmpeg.
In one embodiment, relevant information includes timestamp;Step 103, i.e., according to the fileinfo of source file, each The data and relevant information of frame, BHD file of the and form identical with the content of source file for BHD is generated, as shown in Fig. 2 can be with Including:
In step 1031, form is established as BHD new file and the file header of new file.
Here, the title of new file can be identical with source file title.So, user is just without subsequently again repairing filename Change back source filename.The new file is an empty file.The empty file includes file header and data field, wherein, data field is empty 's.
Current embodiment require that the mode for establishing the file that form is BHD and relevant parameter are added into FFmpeg.
In the present embodiment, file header can first remain for writing the headspace of n index information in advance, and the n is source file The number of middle key frame, each index information are corresponding with a key frame.
In step 1032, the DECODER information of fileinfo and predetermined BHD forms is write into file header.
As long as form is BHD file, then the decoder of BHD forms just needs to write the file header of corresponding document, Used during in order to show this document.
In step 1033, the data of each frame of source file and relevant information are write in the data field of new file, and Record the document misregistration amount of each key frame.
Here, it is necessary to according to frame order, write the data and relevant information of each frame successively.Document misregistration amount is span From the byte number of data field beginning.
In step 1034, the timestamp of each key frame is obtained from the timestamp of each frame.
In step 1035, the index of document misregistration amount and the timestamp key frame as corresponding to of each key frame is believed Breath write-in file header.
In step 1036, using the new file after write-in as BHD files.
For any frame, the step 103 to 105 can include:According to the order of frame, the data and correlation of a certain frame are obtained Information, by position corresponding to the data of the frame and relevant information write-in data field, judge whether the frame is to close by relevant information Key frame;If it is then obtaining the timestamp and document misregistration amount of the frame, the data and phase of next frame are obtained according to the order of frame Close information;If it is not, according to the order of frame, the data and relevant information of next frame are obtained.
In one embodiment, as shown in figure 3, step 101 i.e. pass through FFmpeg, obtain source file fileinfo it Before, method also includes:
In step 100a, the conversion instruction for the form of source file to be converted to BHD is received.
Conversion instruction can be that user triggers.
In step 100b, according to conversion instruction, obtained by FFmpeg and open source file.
In one embodiment, as shown in figure 4, step 100b can include:
In step 100b1, source file is obtained by avformat_open_input functions in FFmpeg FormatCtx objects.
Here, the code corresponding to avformat_open_input can be:
IRes=avformat_open_input (s &pFormatCtx, pcFi leName, NULL, NULL).
Wherein, pcFi leName files are opened by FFmpeg, pcFi leName are filename, find pcFi leNam PFormatCtx objects, record has fileinfo in pFormatCtx objects.
Accordingly, step 101 can include:
In step 1011, pass through the fileinfo of FormatCtx object acquisition source files.
Here, the code by FormatCtx object acquisition fileinfos is as follows:
In one embodiment, as shown in figure 4, the data and its correlation of each frame in step 102, i.e. reading source file Information, it can include:
In step 1021, by FFmpeg av_read_frame functions read source file each frame data and Its relevant information.
Specifically the content of av_read_frame functions is:
In one embodiment, fileinfo comprises at least one of following:Video track, total playing duration, audio track quantity, Coded system and crucial number of frames;Relevant information at least also includes one of following:Data volume and characterize whether be key frame shape State information.
Fig. 5 is a kind of flow chart of format conversion method according to an exemplary embodiment, as shown in figure 5, form Conversion method is used in format conversion apparatus, and the device is applied to l inux servers, and the method comprising the steps of 201 to 208:
In step 201, receive for inciting somebody to action<X.avi>The form of video is converted to BHD conversion instruction.
<X.avi>Video is the X video that form is AVI format.
In step 202, according to conversion instruction, obtained by avformat_open_input functions in FFmpeg< X.avi>The FormatCtx objects of video.
In step 203, FormatCtx object acquisitions are passed through<X.avi>The fileinfo of video.
Wherein, getting X video has 1 video track, and coded format is H.265 1920x1080.1 audio track, compile Code form is AAC, 6 sound channels, 16 bits, 48k sample rates.Each frame information of video is successively read, is learnt, one, which shares 13000 frames, is Key frame.
In step 204, establish<X.bhd>File, and<X.bhd>File header.
In this step,<X.bhd>File is the empty video that form is BHD forms.
In step 205, the file space of 13000 index informations is reserved in file header.
In step 206, read<X.avi>The data and relevant information of each frame of video.
Here read access time order is the order of frame.Such as from it is video data that certain frame, which reads data, and data volume is 12448 bytes, timestamp are 2448 milliseconds, and sign is the status information of key frame.Here, data volume, timestamp and filling letter Breath is all relevant information.
In step 207, will<X.avi>Data and the relevant information write-in of each frame of video<X.bhd>Data field In, and record the document misregistration amount of each key frame.
In a step 208, the index of document misregistration amount and the timestamp key frame as corresponding to of each key frame is believed Breath write-in file header.
Here, repeatedly after write-in<X.bhd>File is exactly the X video that form is BHD.
In the present embodiment, FFmpeg realizes conversion of the AVI format to BHD forms.
Fig. 6 is a kind of block diagram of format conversion apparatus according to an exemplary embodiment, and the device can be by soft Part, hardware or both are implemented in combination with as some or all of of electronic equipment.As shown in fig. 6, the format conversion apparatus Including:
First acquisition module 301, for by FFmpeg, obtaining the fileinfo of source file.
Read module 302, read the data and its relevant information of each frame in the source file.
Generation module 303, for the data and relevant information of the fileinfo according to the source file, each frame, generation Identical and form is BHD BHD files with the content of the source file.
In one embodiment, as shown in fig. 7, the relevant information includes timestamp;The generation module 303 includes:
Setting up submodule 3031, for establishing form as BHD new file and the file header of the new file.
First write-in submodule 3032, for the DECODER information of the fileinfo and predetermined BHD forms to be write The file header.
Second write-in submodule 3033, for the data of each frame of the source file and relevant information write-in are described new In the data field of file, and record the document misregistration amount of each key frame.
First acquisition submodule 3034, for obtaining the time of each key frame from the timestamp of each frame Stamp.
3rd write-in submodule 3035, for using the document misregistration amount and timestamp of each key frame as corresponding to The index information of key frame writes the file header;Using the new file after write-in as the BHD files.
In one embodiment, as shown in figure 8, described device also includes:
Receiving module 304, for receiving the conversion instruction for being used for that the form of source file to be converted to BHD.
Second acquisition module 305, for according to the conversion instruction, being obtained by the FFmpeg and opening the source document Part.
In one embodiment, as shown in figure 9, second acquisition module 305 includes:
Second acquisition submodule 3051, for obtaining institute by avformat_open_input functions in the FFmpeg State the FormatCtx objects of source file.
Accordingly, first acquisition module 301 includes:
3rd acquisition submodule 3011, for the fileinfo by source file described in the FormatCtx object acquisitions.
In one embodiment, as shown in Figure 10, the read module 302 includes:
Reading submodule 3021, for reading the source file by av_read_frame functions in the FFmpeg The data and its relevant information of each frame.
In one embodiment, the fileinfo comprises at least one of following:Video track, total playing duration, audio track Quantity, coded system and crucial number of frames;
The relevant information at least also includes one of following:Data volume and characterize whether be key frame status information.Together When, it should be appreciated that for the ease of description, the size of the various pieces shown in accompanying drawing is not the proportionate relationship according to reality Draw.
The present embodiment also provides a kind of server, and the server includes:
Above-mentioned format conversion apparatus.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be and its The difference of its embodiment, same or analogous part cross-reference between each embodiment.For system embodiment For, because it is substantially corresponding with embodiment of the method, so description is fairly simple, referring to the portion of embodiment of the method in place of correlation Defend oneself bright.
The present invention, device and server may be achieved in many ways.For example, can by software, hardware, firmware or Person's software, hardware, any combinations of firmware realize the present invention, device and server.The step of for methods described Order is stated merely to illustrate, order described in detail above is not limited to the step of method of the invention, unless with other Mode illustrates.In addition, in certain embodiments, the present invention can be also embodied as recording program in the recording medium, this A little programs include being used for the machine readable instructions for realizing the method according to the invention.Thus, the present invention also covering storage is used to hold The recording medium of the program of row the method according to the invention.
Description of the invention provides for the sake of example and description, and is not exhaustively or by the present invention It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.Select and retouch State embodiment and be to more preferably illustrate the principle and practical application of the present invention, and one of ordinary skill in the art is managed The present invention is solved so as to design the various embodiments with various modifications suitable for special-purpose.

Claims (13)

  1. A kind of 1. format conversion method, it is characterised in that including:
    By FFmpeg, the fileinfo of source file is obtained;
    Read the data and its relevant information of each frame in the source file;
    According to the data and relevant information of the fileinfo of the source file, each frame, the content phase with the source file is generated Same and form is BHD BHD files.
  2. 2. according to the method for claim 1, it is characterised in that the relevant information includes timestamp;
    The fileinfo according to the source file, the data and relevant information of each frame, are generated interior with the source file Hold the BHD files that identical and form is BHD, including:
    Form is established as BHD new file and the file header of the new file;
    The DECODER information of the fileinfo and predetermined BHD forms is write into the file header;
    The data of each frame of the source file and relevant information are write in the data field of the new file, and record each close The document misregistration amount of key frame;
    The timestamp of each key frame is obtained from the timestamp of each frame;
    The index information of document misregistration amount and the timestamp key frame as corresponding to of each key frame is write into the text Part head;
    Using the new file after write-in as the BHD files.
  3. 3. according to the method described in the claim 1, it is characterised in that it is described by FFmpeg, obtain the file of source file Before information, methods described also includes:
    Receive the conversion instruction for the form of source file to be converted to BHD;
    According to the conversion instruction, obtained by the FFmpeg and open the source file.
  4. 4. according to the method for claim 3, it is characterised in that described to be obtained by the FFmpeg and open the source document Part, including:
    The FormatCtx objects of the source file are obtained by avformat_open_input functions in the FFmpeg;
    Accordingly, it is described by FFmpeg, the fileinfo of source file is obtained, including:
    Pass through the fileinfo of source file described in the FormatCtx object acquisitions.
  5. 5. according to the method for claim 2, it is characterised in that the data for reading each frame in the source file and Its relevant information, including:
    The data of each frame of the source file and its related letter are read by av_read_frame functions in the FFmpeg Breath.
  6. 6. according to the method for claim 2, it is characterised in that the fileinfo comprises at least one of following:Video track, Total playing duration, audio track quantity, coded system and crucial number of frames;
    The relevant information at least also includes one of following:Data volume and characterize whether be key frame status information.
  7. A kind of 7. format conversion apparatus, it is characterised in that including:
    First acquisition module, for by FFmpeg, obtaining the fileinfo of source file;
    Read module, read the data and its relevant information of each frame in the source file;
    Generation module, for the data and relevant information of the fileinfo according to the source file, each frame, generation and the source The BHD files that the content of file is identical and form is BHD.
  8. 8. device according to claim 7, it is characterised in that the relevant information includes timestamp;The generation module Including:
    Setting up submodule, for establishing form as BHD new file and the file header of the new file;
    First write-in submodule, for the DECODER information of the fileinfo and predetermined BHD forms to be write into the file Head;
    Second write-in submodule, for the data of each frame of the source file and relevant information to be write to the number of the new file According in area, and record the document misregistration amount of each key frame;
    First acquisition submodule, for obtaining the timestamp of each key frame from the timestamp of each frame;
    3rd write-in submodule, for using document misregistration amount and the timestamp key frame as corresponding to of each key frame Index information writes the file header;Using the new file after write-in as the BHD files.
  9. 9. according to the device described in the claim 7, it is characterised in that described device also includes:
    Receiving module, for receiving the conversion instruction for being used for that the form of source file to be converted to BHD;
    Second acquisition module, for according to the conversion instruction, being obtained by the FFmpeg and opening the source file.
  10. 10. device according to claim 9, it is characterised in that second acquisition module includes:
    Second acquisition submodule, for obtaining the source file by avformat_open_input functions in the FFmpeg FormatCtx objects;
    Accordingly, first acquisition module includes:
    3rd acquisition submodule, for the fileinfo by source file described in the FormatCtx object acquisitions.
  11. 11. device according to claim 8, it is characterised in that the read module includes:
    Reading submodule, for passing through each frame of the av_read_frame functions reading source file in the FFmpeg Data and its relevant information.
  12. 12. device according to claim 8, it is characterised in that the fileinfo comprises at least one of following:Video Rail, total playing duration, audio track quantity, coded system and crucial number of frames;
    The relevant information at least also includes one of following:Data volume and characterize whether be key frame status information.
  13. 13. a kind of server, it is characterised in that including the device described in any one of claim 7 to 12.
CN201711107143.2A 2017-11-10 2017-11-10 Format conversion method, device and server Pending CN107820124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711107143.2A CN107820124A (en) 2017-11-10 2017-11-10 Format conversion method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711107143.2A CN107820124A (en) 2017-11-10 2017-11-10 Format conversion method, device and server

Publications (1)

Publication Number Publication Date
CN107820124A true CN107820124A (en) 2018-03-20

Family

ID=61609254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711107143.2A Pending CN107820124A (en) 2017-11-10 2017-11-10 Format conversion method, device and server

Country Status (1)

Country Link
CN (1) CN107820124A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157973A (en) * 2021-03-29 2021-07-23 广州市百果园信息技术有限公司 Method, device, equipment and medium for generating cover

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080284905A1 (en) * 2007-05-17 2008-11-20 Inventec Multimedia & Telecom Corporation Schedulable multiple-formal video converting apparatus
CN102045553A (en) * 2009-10-09 2011-05-04 腾讯科技(深圳)有限公司 Multimedia transcoding device and method and multimedia player
US20120054605A1 (en) * 2010-08-31 2012-03-01 Hillcrest Publishing Group, Inc. Electronic document conversion system
CN105228001A (en) * 2015-09-26 2016-01-06 北京暴风科技股份有限公司 The method and system that a kind of FLV format video is play online
CN106060656A (en) * 2016-06-28 2016-10-26 暴风集团股份有限公司 Method and system for generating BHD file based on DirectShow

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080284905A1 (en) * 2007-05-17 2008-11-20 Inventec Multimedia & Telecom Corporation Schedulable multiple-formal video converting apparatus
CN102045553A (en) * 2009-10-09 2011-05-04 腾讯科技(深圳)有限公司 Multimedia transcoding device and method and multimedia player
US20120054605A1 (en) * 2010-08-31 2012-03-01 Hillcrest Publishing Group, Inc. Electronic document conversion system
CN105228001A (en) * 2015-09-26 2016-01-06 北京暴风科技股份有限公司 The method and system that a kind of FLV format video is play online
CN106060656A (en) * 2016-06-28 2016-10-26 暴风集团股份有限公司 Method and system for generating BHD file based on DirectShow

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157973A (en) * 2021-03-29 2021-07-23 广州市百果园信息技术有限公司 Method, device, equipment and medium for generating cover

Similar Documents

Publication Publication Date Title
CN109698920B (en) Follow teaching system based on internet teaching platform
US10158906B2 (en) System and method for flexible video construction
US10497397B2 (en) Generating video-notes from videos using machine learning
CN1777945B (en) Method and apparatus for synchronous reproduction of main contents recorded on an interactive recording medium and additional contents therefor
JP4430882B2 (en) COMPOSITE MEDIA CONTENT CONVERSION DEVICE, CONVERSION METHOD, AND COMPOSITE MEDIA CONTENT CONVERSION PROGRAM
US8199826B2 (en) Method and apparatus for encoding/decoding
US7984089B2 (en) User-defined indexing of multimedia content
CN108605160A (en) Information processing equipment and information processing method
US10720187B2 (en) Method and apparatus to extract key video frames from online education
CN107820124A (en) Format conversion method, device and server
US8351768B2 (en) Media processing comparison system and techniques
CN102047662B (en) Encoder
CN106792219B (en) It is a kind of that the method and device reviewed is broadcast live
CN108831510A (en) Method, apparatus, terminal and the storage medium that audio-video document is got ready
CN104485123B (en) A kind of method and apparatus of subway line operation scene playback
Schöning et al. Visual Analytics of Gaze Data with Standard Multimedia Players
US11810335B2 (en) Metadata for embedded binary data in video containers
KR101565139B1 (en) Method for serving learning resources for multi channel in smart learning
Lauer et al. Web technologies and standards for the delivery of recorded presentations
Ivetić et al. Augmented AVI video file for road surveying
US20090160862A1 (en) Method and Apparatus for Encoding/Decoding
García et al. Interactive Music Applications by MPEG-A Support in Sonic Visualizer
WO2023229683A1 (en) Video editing projects using single bundled video files
Miletic et al. The structure of the Pyramidia e-learning tool-the programmer's point of view
WO2007043829A1 (en) Method and apparatus for encoding/decoding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination