CN114173074B - Recording and storing method for video format conversion and format conversion method - Google Patents

Recording and storing method for video format conversion and format conversion method Download PDF

Info

Publication number
CN114173074B
CN114173074B CN202111235851.0A CN202111235851A CN114173074B CN 114173074 B CN114173074 B CN 114173074B CN 202111235851 A CN202111235851 A CN 202111235851A CN 114173074 B CN114173074 B CN 114173074B
Authority
CN
China
Prior art keywords
video format
video
file
conversion
format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111235851.0A
Other languages
Chinese (zh)
Other versions
CN114173074A (en
Inventor
关本立
欧俊文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ava Electronic Technology Co Ltd
Original Assignee
Ava Electronic Technology 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 Ava Electronic Technology Co Ltd filed Critical Ava Electronic Technology Co Ltd
Priority to CN202111235851.0A priority Critical patent/CN114173074B/en
Publication of CN114173074A publication Critical patent/CN114173074A/en
Application granted granted Critical
Publication of CN114173074B publication Critical patent/CN114173074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • 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)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a recording and storing method for video format conversion and a corresponding video file format conversion method. The recording and storing method comprises the following steps: when recording is started, a node information table is created; when recording the first video format file, packaging the audio and video stream in a second video format and calculating the first size of the second video format file in real time; wherein, the process of packaging the audio and video stream in the second video format does not store the actual second video format file; when the first size reaches a node with a specific size, adding key information corresponding to the node with the specific size to the node information table; wherein the key information includes: the identification information of the current slice and the position information mapped back to the first video format file. The invention can realize the rapid conversion from the default format to the target conversion format under the condition of less consumption of disk space.

Description

Recording and storing method for video format conversion and format conversion method
Technical Field
The present invention relates to the field of video recording and playing technologies of cameras, and in particular, to a video format conversion method, a video format conversion device, an electronic device, and a storage medium.
Background
When a client (browser) downloads, video files of different encapsulation formats may be required. However, it is likely that only one format will be saved during recording, and conventionally, MP4 format files are saved. Currently, it is not a difficult matter to convert a video file format that is already locally available into another format. There are two conventional methods, the first method can parse and repackage the MP4 file content according to a specified format. The second method may use Ffmpeg to convert the entire MP4 file to a specified format before providing the downloaded data. However, when breakpoint download occurs, the conventional method cannot quickly provide data in a specified format at a specified location. The first method requires repackaging from scratch until the specified file location in the specified format, which is a long time for large files. The second method saves two packaging formats and wastes disk space, although not adding much time.
Disclosure of Invention
In order to overcome at least one of the defects in the prior art, the invention provides a video format conversion method, a video format conversion device, an electronic device and a storage medium.
In a first aspect, the present invention provides a recording and preserving method for video format conversion, including the steps of:
when recording is started, a node information table is created;
when recording the first video format file, packaging the audio and video stream in a second video format and calculating the first size of the second video format file in real time; wherein, the process of packaging the audio and video stream in the second video format does not store the actual second video format file;
when the first size reaches a node with a specific size, adding key information corresponding to the node with the specific size to the node information table; wherein the key information includes: the identification information of the current slice and the position information mapped back to the first video format file.
In one embodiment, the identification information of the current slice includes: key elements of the packet header, a packet increment counter and a current slice type;
the location information mapped back to the first video format file includes: the number of frames of video frames completed prior to the current slice, the number of frames of audio frames completed prior to the current slice, a video frame time stamp, and an audio frame time stamp.
In one embodiment, each of the specific size nodes differ by 1MB-3MB.
In one embodiment, the specific size nodes differ by 2MB.
In one embodiment, the first video format is MP4 format and the second video format is TS format.
In a second aspect, the present invention provides a video file format conversion method, where a video file to be converted is saved by using the saving method in any one of the foregoing embodiments, including the steps of:
receiving a request for converting the second video format file; wherein the request for converting the second video format file includes: a start changeover position;
obtaining a corresponding first position of the starting conversion position in a first video format file according to the node information table and the starting conversion position;
and encapsulating the first video format file in a second video format by taking the first position as a starting point, and generating the second video format file taking the first position as the starting point.
In one embodiment, the process of obtaining the corresponding first position of the start conversion position in the first video format file according to the node information table and the start conversion position includes the steps of:
the key information corresponding to the node with the specific size which is before the starting conversion position and closest to the starting conversion position is taken out from the node information table;
finding a second position corresponding to the first video format according to the extracted key information;
taking the second position as a starting point, carrying out second video format encapsulation on the first video format file and calculating the second size of the second video format file in real time; wherein, the process of packaging the first video format file in the second video format does not store the actual second video format file;
and obtaining a first position corresponding to the downloading starting position in the first video format file according to the starting conversion position and the second size.
In a third aspect, the present invention provides a recording and preserving apparatus for video format conversion, comprising:
the creating module is used for creating a node information table when recording is started;
the packaging module is used for packaging the audio and video stream in a second video format and calculating the first size of the file in the second video format in real time when the file in the first video format is recorded; wherein, the process of packaging the audio and video stream in the second video format does not store the actual second video format file;
the adding module is used for adding key information corresponding to the node with the specific size to the node information table when the first size reaches the node with the specific size; wherein the key information includes: the identification information of the current slice and the position information mapped back to the first video format file.
In a fourth aspect, the present invention provides a video file format conversion apparatus, comprising:
the receiving module is used for receiving a request for converting the second video format file; wherein the request for converting the second video format file includes: a start changeover position;
the positioning module is used for obtaining a first position corresponding to the starting conversion position in the first video format file according to the node information table and the starting conversion position;
and the generating module is used for packaging the first video format file with the first position as a starting point and generating a second video format file with the first position as a starting point.
In a fifth aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the above embodiments when executing the program.
In a sixth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor implements the method of any of the above embodiments.
In the method, in recording, the video is not stored in a target conversion format while the file in a default format is stored, and the mapping relation between the package size and the position of the file in the default format on a node with a specific size is established and recorded by calculating the package size of the file in the target conversion format in real time. In the conversion process, the mapping relation between the starting conversion position and the first video format file is obtained through the format conversion encapsulation which is not stored by the video file, so that the rapid conversion from the default format to the target conversion format is realized under the condition of less consumption of disk space.
Drawings
Fig. 1 is a schematic flow chart of the first embodiment.
Fig. 2 is a schematic flow chart of a second embodiment.
Fig. 3 is a schematic flow chart of an implementation manner of the second embodiment.
Fig. 4 is a schematic structural view of the third embodiment.
Fig. 5 is a schematic structural view of the fourth embodiment.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that, the term "first\second\ … …" related to the embodiments of the present invention is merely to distinguish similar objects, and does not represent a specific ordering for the objects, it is to be understood that "first\second\ … …" may interchange a specific order or sequence where allowed. It is to be understood that the objects identified by "first\second\ … …" may be interchanged where appropriate to enable embodiments of the invention described herein to be practiced in sequences other than those illustrated or described herein.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a recording and storing method for video format conversion according to an embodiment of the present invention, where the method includes step S110, step S120 and step S130. It should be noted that, step S110, step S120 and step S130 are merely reference numerals for clearly explaining the correspondence between the embodiments and fig. 1, and do not represent a sequential limitation of the steps of the method in the present embodiment.
Step S110, when recording is started, a node information table is created.
In general, it is likely that video data will be recorded in a file of a certain format. In order to realize the rapid conversion of the format under the condition of less consumption of disk space, the method records and stores one format file and simultaneously stores specific node information of another format file so as to facilitate the conversion of the subsequent steps. For this reason, when recording is started, that is, when a recording instruction is received, a node information table for recording specific node information is created.
Step S120, when recording the first video format file, the audio/video stream is encapsulated in a second video format and the first size of the second video format file is calculated in real time;
wherein, the process of packaging the audio/video stream in the second video format does not store the actual second video format file.
In general, the common recording and storing format is an MP4 format file, and the TS format file is a format file commonly used for video downloading, and for convenience of description, the method is described with the MP4 format file as the first video format file and the TS format file as the second video format file. When MP4 files are recorded, equipment encapsulates the audio/video stream in TS format, and calculates the size of the TS files in real time while encapsulating. In the packaging process, the actual TS file is not stored, and the packaging is only used for calculating the size of the TS file. In the packaging process, the size of the TS file is increased along with the recording process, so that theoretically, for each recording time, the corresponding size of the TS file exists. The method uses the relation between the recording time and the size of TS file to record the information in the recording process.
Step S130, when the first size reaches a node with a specific size, adding key information corresponding to the node with the specific size to the node information table;
wherein the key information includes: the identification information of the current slice and the position information mapped back to the first video format file.
The TS format file contains a plurality of TS format fragments, typically each of the TS format fragments is the same size. In this step, each node with a specific size is preset according to the size of the target TS format fragment, and a fragment is located between each two nodes with a specific size. For example, the size of the target TS format slice is 2MB, then each specific size node is 2MB, 4MB, 6MB, 8MB … …, respectively
When the size of the TS file calculated in real time reaches the nodes with the specific sizes, the key information corresponding to the nodes is added to the node information table created in step S110. The key information comprises: the identification information of the current fragment and the position information mapped back to the MP4 format file. Reaching a particular size node means that the total TS file size is greater than the particular size when the last converted TS slice is added. The key information is recorded in order to enable fast encapsulation of the TS slices on the particular node. It is necessary to record the location information of the fragment mapped back to the MP4 format file to find the corresponding video or audio data to fill the es packets in the TS fragment. And the identification information of the fragments is used for filling the packet header information of other TS formats.
In the method, in recording, the video is not stored in the default format file and is packaged in the target conversion format, and the mapping relation between the package size and the position of the default format file on a node with a specific size is established and recorded by calculating the package size of the target conversion format file in real time, so that the rapid conversion from the default format to the target conversion format is realized under the condition of less consumption of disk space.
In one embodiment, the identification information of the current slice includes: key elements of the packet header, a packet increment counter and a current slice type;
the location information mapped back to the first video format file includes: the number of frames of video frames completed prior to the current slice, the number of frames of audio frames completed prior to the current slice, a video frame time stamp, and an audio frame time stamp.
The information contained in the identification information of the current slice is specific information in the second video format and is used for identifying the current slice. When the audio and video frame data of the first video format needs to be packaged into the second video format at any specific node, the identification information needs to be supplemented to the package of the second video format so as to ensure that the fragmentation information is complete.
The information contained in the position information mapped back to the first video format file is used for positioning the specific positions of the corresponding video frame data and audio frame data in the first video format file, so that the audio and video frame data in the first video format can be conveniently packaged into the second video format.
In one embodiment, each of the specific size nodes differ by 1MB-3MB. Preferably, the nodes of a specific size differ by 2MB.
If the spacing between nodes is too large, it may take a long time to obtain the particular position fix required from the coarse position fix. And if the spacing between nodes is too small, more disk space is required to store the specific node information.
In one embodiment, the first video format is MP4 format and the second video format is TS format.
Example two
Corresponding to the first embodiment, a video file format conversion method is disclosed in the present embodiment, and the format conversion method is applicable to a video file saved by using the method of the first embodiment.
Referring to fig. 2, fig. 2 is a flowchart of a video file format conversion method according to a second embodiment of the present invention, where the method includes step S210, step S220 and step S230. It should be noted that, step S210, step S220 and step S230 are merely reference numerals for clearly explaining the correspondence between the embodiments and fig. 2, and do not represent the sequential limitation of the steps of the method in the present embodiment.
Step S210, receiving a request for converting the second video format file;
wherein the request for converting the second video format file includes: the transition position is started.
In this embodiment, for convenience of description, MP4 format file is used as the first video format file, and TS format file is used as the second video format file.
In general, a browser (client) requests to download a TS format file, and a server (server) fetches data of an MP4 format file frame by frame, encapsulates the data into TS format file fragments, and transmits the fragments to the browser. Many times, however, the network is unstable and interruption occurs during the download process. After the interruption, the browser requests that the download be started from a designated location of the TS format file, which is in fact the size of the file that the browser tells the server that it has downloaded. At this time, the request for downloading from the specified location is actually a request for converting the second video format file. Of course, this request for converting the second video format file will have different manifestations in different scenarios. For example, it may be that the server requests conversion of an MP4 format file into a TS format file from a certain point of time.
Step S220, according to the node information table and the start conversion position, a first position corresponding to the start conversion position in the first video format file is obtained.
As described in step S210, the start conversion position refers to the specified position of the TS format file, so this step maps the specified position of the TS format file back to the specified position of the MP4 format file. In the first embodiment, the recording key information is to record the positions of the start and end positions of each slice of video in the MP4 file, so that according to the key information in the node information table, it can be known which slice of the MP4 format file the start conversion position corresponds to, that is, coarse positioning is completed. Since a slice lasts for a short time, after the start conversion position is positioned on a specific section of video frame of the MP4 format file, the specific position, i.e. the first position, of the MP4 format file can be positioned by performing format conversion on the MP4 format file of the small section.
In step S230, the first video format file is encapsulated with the second video format using the first position as a starting point, and the second video format file using the first position as a starting point is generated.
After finding the appointed position of the TS format file and mapping the appointed position back to the appointed position of the MP4 format file, packaging the MP4 format file from the position to generate the TS format file. If the download is in the download scene, the server (server) continues to provide the download content, and sends the packaged TS format file to the browser until the browser downloads the whole TS format file.
In one embodiment, as shown in fig. 3, the process of obtaining the corresponding first position of the start conversion position in the first video format file according to the node information table and the start conversion position includes step S221, step S222, step S223, and step S224.
Step S221, retrieving, from the node information table, key information corresponding to a node of a specific size that is before and closest to the start transition position.
In this step, after the start conversion position is located on a specific TS format file fragment, the key information corresponding to the fragment start point is taken out from the node information table.
Step S222, finding a second position corresponding to the first video format according to the extracted key information.
Since the key information includes: the identification information of the current slice and the position information mapped back to the first video format file, so that the position where the start point maps back to the MP4 format file, i.e. the second position, can be found.
Step S223, taking the second position as a starting point, carrying out second video format encapsulation on the first video format file and calculating the second size of the second video format file in real time;
wherein, the process of packaging the first video format file in the second video format does not store the actual second video format file.
Since, as described above, the position at which the download is designated is actually the size of the file that the browser informs the server that has been downloaded, but this size is the size of the TS format file, and the size of the TS format file and the size of the MP4 format file are not in a linear correspondence relationship, the start conversion position can be found only after the TS format file is generated. At this time, the MP4 format file is subjected to TS format encapsulation with the second location as a starting point, and the second size of the second video format file is calculated in real time, so as to obtain whether the start conversion location is reached by judging the relationship between the second size and the size of the file already downloaded. Since the data in the middle of the transition from the second position to the start position is not needed, the actual TS format file is not saved during this encapsulation process to save disk.
Step S224, according to the start conversion position and the second size, obtaining a first position corresponding to the start downloading position in the first video format file.
When the second size reaches the size of the downloaded file, that is, the start conversion position is reached, the position mapped back to the MP4 format file is the first position corresponding to the start conversion position in the MP4 format file.
The conversion method converts the video format file by using the node information in the recording and storing method in the first embodiment. In the conversion process, the mapping relation between the starting conversion position and the first video format file is obtained through the format conversion encapsulation which is not stored by the video file, so that the rapid conversion from the default format to the target conversion format is realized under the condition of less consumption of disk space.
Example III
Corresponding to the method of the first embodiment, as shown in fig. 4, the present invention further provides a recording and storing apparatus 4 for video format conversion, including: a creation module 401, an encapsulation module 402, and an addition module 403.
A creating module 401, configured to create a node information table when recording is started;
the packaging module 402 is configured to perform second video format packaging on the audio/video stream and calculate a first size of the second video format file in real time when recording the first video format file; wherein, the process of packaging the audio and video stream in the second video format does not store the actual second video format file;
an adding module 403, configured to add key information corresponding to the reached node with a specific size to the node information table when the first size reaches the node with the specific size; wherein the key information includes: the identification information of the current slice and the position information mapped back to the first video format file.
In one embodiment, the identification information of the current slice includes: key elements of the packet header, a packet increment counter and a current slice type;
the location information mapped back to the first video format file includes: the number of frames of video frames completed prior to the current slice, the number of frames of audio frames completed prior to the current slice, a video frame time stamp, and an audio frame time stamp.
In one embodiment, each of the specific size nodes differ by 1MB-3MB. Preferably, the nodes of a specific size differ by 2MB.
In one embodiment, the first video format is MP4 format and the second video format is TS format.
In the recording process, the device stores the file in the default format and simultaneously encapsulates the video in the target conversion format without storing, and establishes and records the mapping relation between the encapsulation size and the position of the file in the default format on a node with a specific size by calculating the encapsulation size of the file in the target conversion format in real time, thereby realizing the rapid conversion from the default format to the target conversion format under the condition of less consumption of disk space.
Example IV
In correspondence to the method of the second embodiment, as shown in fig. 5, the present invention further provides a video file format conversion device 5, which is suitable for the video file saved by the device of the third embodiment. Comprising the following steps: a receiving module 501, a positioning module 502 and a generating module 503.
A receiving module 501, configured to receive a request for converting a file in a second video format; wherein the request for converting the second video format file includes: a start changeover position;
the positioning module 502 is configured to obtain, according to the node information table and the start conversion position, a first position corresponding to the start conversion position in the first video format file;
the generating module 503 is configured to encapsulate the first video format file with the first location as a starting point, and generate a second video format file with the first location as a starting point.
In one embodiment, the positioning module 502 performs the process of obtaining the corresponding first position of the start conversion position in the first video format file according to the node information table and the start conversion position, and includes the steps of:
the key information corresponding to the node with the specific size which is before the starting conversion position and closest to the starting conversion position is taken out from the node information table;
finding a second position corresponding to the first video format according to the extracted key information;
taking the second position as a starting point, carrying out second video format encapsulation on the first video format file and calculating the second size of the second video format file in real time; wherein, the process of packaging the first video format file in the second video format does not store the actual second video format file;
and obtaining a first position corresponding to the downloading starting position in the first video format file according to the starting conversion position and the second size.
The conversion device converts the video format file by using the node information in the recording and storing method in the first embodiment. In the conversion process, the mapping relation between the starting conversion position and the first video format file is obtained through the format conversion encapsulation which is not stored by the video file, so that the rapid conversion from the default format to the target conversion format is realized under the condition of less consumption of disk space.
Example five
The embodiment of the invention also provides a storage medium, on which computer instructions are stored, which when executed by a processor, implement the recording and saving method for video format conversion and/or the video file format conversion method of any of the above embodiments.
Those skilled in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a random access Memory (RAM, random Access Memory), a Read-Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the above-described integrated units of the present invention may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present invention may be essentially or part contributing to the related art, and the computer software product may be stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program code, such as a removable storage device, RAM, ROM, magnetic or optical disk.
Corresponding to the above-mentioned computer storage medium, in one embodiment, there is also provided a computer device including a memory, an encoder, and a computer program stored on the memory and executable on the encoder, wherein the encoder implements the recording and saving method and/or the video file format conversion method for video format conversion according to any of the above-mentioned embodiments when executing the program.
In the recording process, the computer equipment performs non-storage encapsulation on the video in the target conversion format while storing the file in the default format, and establishes and records the mapping relation between the encapsulation size and the position of the file in the default format on a node with a specific size by calculating the encapsulation size of the file in the target conversion format in real time. In the conversion process, the mapping relation between the starting conversion position and the first video format file is obtained through the format conversion encapsulation which is not stored by the video file, so that the rapid conversion from the default format to the target conversion format is realized under the condition of less consumption of disk space.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
It is to be understood that the above examples of the present invention are provided by way of illustration only and not by way of limitation of the embodiments of the present invention. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are desired to be protected by the following claims.

Claims (11)

1. A recording and preserving method for video format conversion, comprising the steps of:
when recording is started, a node information table is created;
when recording the first video format file, packaging the audio and video stream in a second video format and calculating the first real-time size of the second video format file in real time; wherein, the process of packaging the audio and video stream in the second video format does not store the actual second video format file;
when the first real-time size reaches a node with a specific size, adding key information corresponding to the node with the specific size to the node information table; wherein the key information includes: the identification information of the current slice and the position information mapped back to the first video format file.
2. The recording and preserving method for video format conversion according to claim 1, wherein the identification information of the current slice comprises: key elements of the packet header, a packet increment counter and a current slice type;
the location information mapped back to the first video format file includes: the number of frames of video frames completed prior to the current slice, the number of frames of audio frames completed prior to the current slice, a video frame time stamp, and an audio frame time stamp.
3. The recording and preserving method for video format conversion as claimed in claim 1 or 2, wherein each specific size node differs by 1MB-3MB.
4. A recording and preserving method for video format conversion as claimed in claim 3, characterized in that the difference between each specific size node is 2MB.
5. The recording and saving method for video format conversion according to claim 1 or 2, wherein the first video format is MP4 format and the second video format is TS format.
6. A video file format conversion method, wherein a video file to be converted is stored by the method according to any one of claims 1 to 5, comprising the steps of:
receiving a request for converting the second video format file; wherein the request for converting the second video format file includes: a start changeover position;
obtaining a corresponding first position of the starting conversion position in a first video format file according to the node information table and the starting conversion position;
and encapsulating the first video format file in a second video format by taking the first position as a starting point, and generating the second video format file taking the first position as the starting point.
7. The method for converting video file format according to claim 6, wherein the process of obtaining the corresponding first position of the start conversion position in the first video format file according to the node information table and the start conversion position comprises the steps of:
the key information corresponding to the node with the specific size which is before the starting conversion position and closest to the starting conversion position is taken out from the node information table;
finding a second position corresponding to the first video format according to the extracted key information;
taking the second position as a starting point, carrying out second video format encapsulation on the first video format file and calculating a second real-time size of the second video format file in real time; wherein, the process of packaging the first video format file in the second video format does not store the actual second video format file;
and obtaining a first position corresponding to the downloading starting position in the first video format file according to the starting conversion position and the second real-time size.
8. A recording and preserving apparatus for video format conversion, comprising:
the creating module is used for creating a node information table when recording is started;
the packaging module is used for packaging the audio and video stream in a second video format and calculating the first real-time size of the file in the second video format in real time when the file in the first video format is recorded; wherein, the process of packaging the audio and video stream in the second video format does not store the actual second video format file;
the adding module is used for adding key information corresponding to the node with the specific size to the node information table when the first real-time size reaches the node with the specific size; wherein the key information includes: the identification information of the current slice and the position information mapped back to the first video format file.
9. A video file format conversion apparatus in which a video file to be converted is stored with the recording and storing apparatus according to claim 8, comprising:
the receiving module is used for receiving a request for converting the second video format file; wherein the request for converting the second video format file includes: a start changeover position;
the positioning module is used for obtaining a first position corresponding to the starting conversion position in the first video format file according to the node information table and the starting conversion position;
and the generating module is used for packaging the first video format file with the first position as a starting point and generating a second video format file with the first position as a starting point.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-7 when the program is executed by the processor.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202111235851.0A 2021-10-22 2021-10-22 Recording and storing method for video format conversion and format conversion method Active CN114173074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111235851.0A CN114173074B (en) 2021-10-22 2021-10-22 Recording and storing method for video format conversion and format conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111235851.0A CN114173074B (en) 2021-10-22 2021-10-22 Recording and storing method for video format conversion and format conversion method

Publications (2)

Publication Number Publication Date
CN114173074A CN114173074A (en) 2022-03-11
CN114173074B true CN114173074B (en) 2023-11-03

Family

ID=80477205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111235851.0A Active CN114173074B (en) 2021-10-22 2021-10-22 Recording and storing method for video format conversion and format conversion method

Country Status (1)

Country Link
CN (1) CN114173074B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003203431A (en) * 2001-12-27 2003-07-18 Toshiba Corp Optical disk device, optical disk and these methods
CN1529499A (en) * 2003-09-29 2004-09-15 上海交通大学 Motion adaptive module realizing method for video image format conversion
JP2007329861A (en) * 2006-06-09 2007-12-20 Matsushita Electric Ind Co Ltd Recording apparatus
JP2009180834A (en) * 2008-01-29 2009-08-13 Toshiba Corp Image signal processing apparatus and image processing method
CN104219538A (en) * 2014-09-15 2014-12-17 深圳市云宙多媒体技术有限公司 Real-time acquiring and uploading and data processing method and system for audio and video
CN104380728A (en) * 2012-06-01 2015-02-25 阿尔卡特朗讯公司 Method and apparatus for mixing a first video signal and a second video signal
CN105208440A (en) * 2015-09-22 2015-12-30 北京暴风科技股份有限公司 Online playing method and system for MP4-format video
CN108989885A (en) * 2017-06-05 2018-12-11 腾讯科技(深圳)有限公司 Video file trans-coding system, dividing method, code-transferring method and device
CN110213615A (en) * 2018-04-04 2019-09-06 腾讯科技(深圳)有限公司 Video transcoding method, device, server and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003203431A (en) * 2001-12-27 2003-07-18 Toshiba Corp Optical disk device, optical disk and these methods
CN1529499A (en) * 2003-09-29 2004-09-15 上海交通大学 Motion adaptive module realizing method for video image format conversion
JP2007329861A (en) * 2006-06-09 2007-12-20 Matsushita Electric Ind Co Ltd Recording apparatus
JP2009180834A (en) * 2008-01-29 2009-08-13 Toshiba Corp Image signal processing apparatus and image processing method
CN104380728A (en) * 2012-06-01 2015-02-25 阿尔卡特朗讯公司 Method and apparatus for mixing a first video signal and a second video signal
CN104219538A (en) * 2014-09-15 2014-12-17 深圳市云宙多媒体技术有限公司 Real-time acquiring and uploading and data processing method and system for audio and video
CN105208440A (en) * 2015-09-22 2015-12-30 北京暴风科技股份有限公司 Online playing method and system for MP4-format video
CN108989885A (en) * 2017-06-05 2018-12-11 腾讯科技(深圳)有限公司 Video file trans-coding system, dividing method, code-transferring method and device
CN110213615A (en) * 2018-04-04 2019-09-06 腾讯科技(深圳)有限公司 Video transcoding method, device, server and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
自适应码率户外视频直播系统的设计与实现;吕晓静;中国优秀硕士学位论文全文数据库;全文 *

Also Published As

Publication number Publication date
CN114173074A (en) 2022-03-11

Similar Documents

Publication Publication Date Title
CN107277081A (en) Section method for down loading and device, the stream media system of stream medium data
CN102217322B (en) Media forwarding method, media receiving method, client, and system
CN108200447B (en) Live broadcast data transmission method and device, electronic equipment, server and storage medium
EP3780642A1 (en) Streaming media data processing method and streaming media processing server
CN110545456B (en) Synchronous playing method and device of media files and storage medium
CN107277563B (en) Method, server and terminal for generating and playing video file
CN112492345B (en) Audio and video storage method, system, terminal and computer readable storage medium
CN104837033B (en) A kind of information processing method and server
CN109089174B (en) Multimedia data stream processing method and device and computer storage medium
US20090317062A1 (en) Image processing method and apparatus
CN112218166A (en) Play starting method and related device for memory play of on-demand video
CN114173074B (en) Recording and storing method for video format conversion and format conversion method
CN107634928B (en) Code stream data processing method and device
EP4167572A1 (en) Video partitioning method, transfer method, server, adaptor and storage medium
US20100082740A1 (en) Moving picture file transmitting server and method of controlling operation of same
CN102118633B (en) Method, device and system for playing video files
CN113055706B (en) Video synthesis method, device, electronic equipment and storage medium
CN115811621A (en) Live stream playing method and device, computer equipment and storage medium
CN114025201A (en) Video playing method, device, equipment and storage medium
CN113873275B (en) Video media data transmission method and device
CN110545463B (en) Play control method and device based on media file conversion and storage medium
CN112243159A (en) Data processing and reading method and server, terminal and system based on DVB
CN113630408B (en) Data processing method, device, storage medium and server
CN114025196B (en) Encoding method, decoding method, encoding/decoding device, and medium
CN117041690A (en) Slicing method of mp4 file and generating method of mp4 file

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
GR01 Patent grant
GR01 Patent grant