Nothing Special   »   [go: up one dir, main page]

CN113254393B - Interactive video packaging method and device and electronic equipment - Google Patents

Interactive video packaging method and device and electronic equipment Download PDF

Info

Publication number
CN113254393B
CN113254393B CN202110372799.7A CN202110372799A CN113254393B CN 113254393 B CN113254393 B CN 113254393B CN 202110372799 A CN202110372799 A CN 202110372799A CN 113254393 B CN113254393 B CN 113254393B
Authority
CN
China
Prior art keywords
file
container
files
index
interactive video
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
CN202110372799.7A
Other languages
Chinese (zh)
Other versions
CN113254393A (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.)
Altstory Technology Beijing Co ltd
Original Assignee
Altstory 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 Altstory Technology Beijing Co ltd filed Critical Altstory Technology Beijing Co ltd
Priority to CN202110372799.7A priority Critical patent/CN113254393B/en
Publication of CN113254393A publication Critical patent/CN113254393A/en
Application granted granted Critical
Publication of CN113254393B publication Critical patent/CN113254393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/122File system administration, e.g. details of archiving or snapshots using management policies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention provides a method and a device for packaging an interactive video, and electronic equipment, wherein the method comprises the following steps: acquiring a plurality of media resource files corresponding to a target interactive video file to be packaged; creating a data record container for recording metadata of various media resource files; creating corresponding file index containers for the media resource files respectively in the data record containers, and recording index data of the corresponding media resource files in the file index containers; adding various media resource files after the data recording container; a target interactive video file is generated based on the data record container and the multiple media asset file packages. Based on the method provided by the invention, the media resources required by playing the interactive video are packaged in one file, so that the management is convenient, the branched video can be continuously loaded, and the branched video can be loaded into the buffer area of the video player in advance, so that the time cost is reduced, and the video playing efficiency is improved.

Description

Interactive video packaging method and device and electronic equipment
Technical Field
The invention relates to the technical field of videos, in particular to a method and a device for packaging interactive videos and electronic equipment.
Background
At present, various media resource files of the interactive video are available, when the interactive video is manufactured and delivered to a platform for online playing, all the files are required to be packaged and transmitted to the other party, then the other party transmits the video to an internal video management server, the media resource files required by the interactive video are available, the fragmentation is carried out, the management is inconvenient, the delivery and the online playing are complicated, and the operation flow and the storage mode of each platform are different.
The interactive video files packaged in the conventional manner are loaded with various media resource files at present when playing the interactive video. The player needs to send a plurality of network requests to acquire the resources, so that the network communication brings about high additional cost, the time delay is also high, the playing time of the interactive video is long, and the second opening of the interactive video is not easy to realize. In addition, when a user selects a branch, the interactive video is not smooth enough to switch and play the branch video, and play is easy to be blocked, because the current branch video is different video files, the new video files need to be reloaded when new branch video is played, time cost exists in network request and filling the buffer area of the player with partial data of the video files, the interactive video player can acquire new video clips through the network request, a certain delay exists in the process, and video discontinuity in play blocking and user watching experience can be caused.
Disclosure of Invention
In view of the foregoing, the present invention is directed to a method and apparatus for packaging an interactive video, and an electronic device for overcoming the foregoing problems or at least partially solving the foregoing problems.
According to a first aspect of the present invention, there is provided a method for encapsulating an interactive video, including:
acquiring a plurality of media resource files corresponding to a target interactive video file to be packaged;
creating a data record container, and recording metadata of the plurality of media resource files;
Creating corresponding file index containers for the media resource files respectively in the data record containers, and recording index data of the corresponding media resource files in the file index containers;
Appending each of the plurality of media asset files after the data recording container;
and generating the target interactive video file based on the data record container and the various media resource file packages.
Optionally, creating a corresponding file index container in the data record container for each media resource file includes:
For any media resource file, identifying the resource type corresponding to and stored in each media resource file; the resource type comprises specific material files or non-specific material files; the non-specific material files include, but are not limited to, audio files, interactive component related files, scenario configuration files, and logic code files; the specific material files comprise conventional pixelated video files and vectorized video files;
creating a corresponding file index container in the data record container based on the resource type corresponding to each media resource file.
Optionally, creating a corresponding file index container in the data record container based on the resource type corresponding to each of the media resource files includes:
If the resource type stored by the media resource file is a specific material file, creating a file index container of a first type identifier or a file index container of a second type identifier in the data record container;
If the resource type stored by the media resource file is a non-specific material file, a file index container with a third type identifier is created.
Optionally, before the creating, in the data record container, a corresponding file index container for each media resource file, the method further includes:
Creating a resource index container in the data recording container, recording the sizes of the plurality of media resource files and the starting position in the target interactive video file;
wherein the resource index container comprises the number of left entries and content items; the number of the entries is the number corresponding to the media resource file.
Optionally, after creating a corresponding file index container for each media resource file in the data record container, the method further includes:
creating a first additional container and a second additional container in the data recording container;
And recording basic information required by playing the target interactive video file through the first additional container, and recording metadata information of the target interactive video file through the second additional container.
Optionally, before the creating the data record container, the method further includes:
Creating a file type container corresponding to the target interactive video file, and recording the file type of the target interactive video file;
creating a media information container corresponding to the target interactive video file, and embedding the data record container into the media information container.
Optionally, said appending each of said plurality of media asset files after said data recording container comprises:
calculating the actual position of each media resource file in the target interactive video file according to the sizes of each media resource file, the file type container and the media information container, and updating the number of items of content in the resource index container;
And adding various media resource files after the data record container according to the actual position of the media resource files in the target interactive video file.
Optionally, the generating the target interactive video file based on the data record container and the plurality of media asset file packages comprises:
and generating the target interactive video file based on the file type container, the media information container, the data record container and the multiple media resource file packages.
According to a second aspect of the present invention, there is provided an interactive video packaging apparatus, comprising:
The file acquisition module is configured to acquire a plurality of media resource files corresponding to the target interactive video file to be packaged;
a first creation module configured to create a data record container, recording metadata of the plurality of media asset files;
a second creating module configured to create a corresponding file index container for each of the media resource files in the data recording container, and record index data of the corresponding media resource files in each of the file index containers;
A file adding module configured to append each of the plurality of media asset files after the data recording container;
and the packaging module is configured to generate the target interactive video file based on the data record container and the packaging of the plurality of media resource files.
According to a third aspect of the present invention, there is provided a storage device having stored thereon a computer program which when executed by a processor implements the method of encapsulating interactive video of any of the first aspects.
The invention provides a method and a device for encapsulating an interactive video and electronic equipment. The IVF encapsulation format encapsulates all the branched videos together, the branched videos can be continuously loaded and loaded into a buffer area of a video player in advance, time cost is reduced, when the video is started to be played, only part of IVF data is needed to be loaded, waiting time of a user is greatly reduced, and second on is realized.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
The above, as well as additional objectives, advantages, and features of the present invention will become apparent to those skilled in the art from the following detailed description of a specific embodiment of the present invention when read in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of an interactive video packaging method according to an embodiment of the invention;
FIG. 2 is a flow chart of an interactive video packaging method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a packaged partial interactive video file structure according to an embodiment of the present invention;
Fig. 4 shows a schematic structural diagram of a packaging device for interactive video according to an embodiment of the invention.
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.
Video formats are classified into two types, video coding formats and video packaging formats. Video coding is a process of compressing the original data decoded from a camera or video into a format of a specific format specification, such as the common h.264, h.265 and national standard AVS format standards. Video encapsulation is to encapsulate data such as video stream, audio stream and subtitle into a file for distribution and playing, such as common MP4, AVI, MKV and other formats.
The IVF format is extended based on the MP4 format, and all file resources required by the interactive video are packaged. The MP4 format adopts the Box concept to organize metadata information and coded data required by audio and video decoding. Such as an MP4 file organized as a Box as follows. First, ftyp Box, defining the file type, followed by moov, free, mdat three top-level boxes. In moov Box, nest defines mvhd, track, etc. Box, and then other boxes are defined by inner nest.
Referring to fig. 1, the method for encapsulating an interactive video according to the embodiment of the present invention may at least include the following steps S101 to S105.
S101, acquiring a plurality of media resource files corresponding to target interactive video files to be packaged.
The target interactive video file to be packaged in the embodiment may be a group of completed interactive video files with complete scenario, where the target interactive video file corresponds to a plurality of media resource files, which may include related files such as a conventional video file, a vector video file, an audio file, a button picture related to an interactive component, a scenario configuration file, a logic code file, and the like, and before any interactive video file is packaged, the related files need to be acquired. In this embodiment, the format of the target interactive video file is set to the IVF format. The IVF format may be generated using a Python programming language, a Go language, or other coding implementation. For example, the IVF format may be played at the front end, that is, the web page playing end may use a general JavaScript/TYPESCRIPT programming language, and at other ends, such as the mobile phone end (iOS, android), use development languages corresponding to the ends.
S102, creating a data record container, and recording metadata of the various media resource files.
In the embodiment of the present invention, before the target interactive video file is packaged, a plurality of containers for storing data by users are created, in this embodiment, a Box concept is adopted, and data storage is realized by creating different boxes, optionally, after a plurality of media resource files corresponding to the target interactive video file to be packaged are obtained, a data recording container may be created, where the data recording container is used for recording metadata of the plurality of media resource files, such as sizes and positions of all media resource files, and so on. The Box definition format may be as follows according to the character sequence: 4Bytes Size,4Bytes Type = 'box name', 1Byte Version,3Bytes Flags.
In this embodiment, the data record container may be named Ivfh box, and is used to record metadata of the media asset file related to the IVF format. The media resource file may include a conventional video file, a vector video file, an audio file, an interactive component related file (such as a button picture related to an interactive component), a scenario configuration file, a logic code file, and the like, which form the target interactive video file. The specific format of Ivfh box can be as shown in table 1.
TABLE 1
The standard definition is referred to as follows:
s103, respectively creating corresponding file index containers for the media resource files in the data record containers, and recording index data of the corresponding media resource files in the file index containers.
After creating the data record container (Ivfh box), a corresponding file index container may be created for each media asset file separately at the data record container (Ivfh box). The above embodiments refer to that the media resource file may include a regular video file, a vector video file, an audio file, an interactive component related file (such as a button picture related to an interactive component), a scenario configuration file, a logic code file, and the like.
In an alternative embodiment of the present invention, a resource index container may also be created in the data recording container before the file index container is created in the data recording container, to record the sizes of the various media resource files and the starting position in the target interactive video file. The resource index container is denoted iflt box and iflt box in this embodiment, and is used to record the size of all media resource files (such as video files, pictures, text, etc. of the media resource) and the index data (i.e. the start position) in the IVF file. The specific format of the file index container (iflt box) may be as shown in table 2.
TABLE 2
The standard definition is referred to as follows:
As shown in connection with table 3, the resource index container includes a number of entries (Entries) left empty; the number of entries is the number corresponding to the media asset file, specifically, the number of entries in the asset index container (iflt box) leaves empty the offset field in the content item (Entries).
In an alternative embodiment of the present invention, for any media resource file, when creating a corresponding file index container for each media resource file in the data record container in step S103, the resource types stored corresponding to each media resource file may be identified first; and creating a corresponding file index container in the data record container based on the resource types stored correspondingly for each media resource file.
In the embodiment of the invention, the file types of the media resource files are divided into two types, including specific material files or non-specific material files, wherein the non-specific material files are other files except the specific material files, and the non-specific material files comprise but are not limited to audio files, interactive component related files, scenario configuration files and logic code files. The specific material files in this embodiment may include conventional pixelized video files, for which a pixel is the smallest unit of graphics, and vectorized video files, typically a single color dot, displayed on the screen. For a vectorized video file, it can be arbitrarily enlarged and the pixels are not distorted. In the embodiment of the invention, the video source file can be a plurality of conventional segmented video source files and vectorized video source files in fMP4 format, and each segmented video source can be used as each branch video for forming the interactive video. The above embodiments only schematically describe the file types of the specific material files, and in practical application, other types of files may be used as the specific material files according to the service development requirements, which is not limited by the embodiments of the present invention.
The created file index container is also different for different types of media asset files. For a particular media asset, such as a regular video asset file, a vector video asset file, a corresponding file index container is created. If not a specific media asset, a generic file index container is created. In one aspect, in this embodiment, if the resource type corresponding to the media resource file is a conventional video material file, a file index container of the first type identifier is created in the data record container. The file index container of the first type identifier is named imfi box, imfi box, and records related information of the conventional video material, and the number of entries (entries) and index positions in iflt box. The specific format of the file index container (imfi box) identified by the first type may be as shown in table 3.
TABLE 3 Table 3
The standard definition is referred to as follows:
The second type of identified file index container is named ipfi box, ipfi box, and records the related information of the vector video material, and the number of entries and index positions in iflt box. The specific format of the second type of identified file index container (ipfi box) may be as shown in table 4.
TABLE 4 Table 4
The standard definition is referred to as follows:
In the embodiment of the invention, the corresponding file index containers are respectively created for the specific material files of the conventional pixelized video file and the vectorized video file, so that the analysis sequence of the file materials can be determined according to the type identification of the file index container when the packaged interactive video is played in the later period, for example, the vectorized video file can be analyzed preferentially, and then the conventional pixelized video file is analyzed, thereby enabling the interactive video to be played more smoothly.
On the other hand, if the resource type stored corresponding to the media resource file is a non-specific material file, a universal file index container with a third type identifier is created. The present embodiment records the file index container of the third type identifier with the name idfi box, idfi box related information of the non-specific material, and the number of entries (entries) and index positions in iflt box. The specific format of the second type of identified file index container (idfi box) may be as shown in table 5.
TABLE 5
The standard definition is referred to as follows:
In an alternative embodiment of the present invention, after creating corresponding file index containers for each media resource file in the data record container, a first additional container and a second additional container may also be created in the data record container; and recording basic information required by playing the target interactive video file through the first additional container, and recording metadata information of the target interactive video file through the second additional container.
In the embodiment of the invention, the name of the first additional container is ivfi box, and the first additional container (ivfi box) records the file names of the initialization scripts and the configuration files required for playing the IVF file. The specific format of the first additional container (ivfi box) may be as shown in table 6.
TABLE 6
The standard definition is referred to as follows:
In the embodiment of the present invention, the name of the second additional container is ivfm box, and the second additional container (ivfm box) records some metadata information, such as build_version. The specific format of the second additional container (ivfm box) may be as shown in table 7.
TABLE 7
The standard definition is referred to as follows:
s104, adding various media resource files after the data recording container;
after the data record container is created, various media resource files can be added after the data record container, wherein each media resource file can be used as a storage unit to store corresponding media resource file data. In an alternative embodiment of the present invention, before creating the data record container, the method may further include:
S1, creating a file type container (ftyp, file type) corresponding to a target interactive video file, and recording the file type of the target interactive video file;
s2, creating a media information container corresponding to the target interactive video file, and embedding the data record container into the media information container (moov).
Further, appending various media asset files after the data recording container includes: calculating the actual position of each media resource file in the target interactive video file according to the sizes of each media resource file, the file type container and the media information container, and updating the number of items of content items in the resource index container; and adding various media resource files after the data record container according to the actual positions of the media resource files in the target interactive video file.
As described in the above embodiments, the resource index container (iflt box) in the data recording container can record the sizes of various media resource files and the start position in the target interactive video file, and the offset field in the entry count content item (Entries) therein is left empty. After the actual position of each media resource file in the target interactive video file is calculated, the offset field of entries in iflt box can be updated, and finally all media materials are sequentially added to ivfh box.
S105, generating a target interactive video file based on the data record container and the various media resource file packages.
The above embodiments refer to that, in addition to the data recording container and the various media resource files, the file type container and the media information container may be included, so when the target interactive video file is packaged, the target interactive video file may be generated based on the file type container, the media information container, the data recording container and the various media resource files, thereby obtaining a complete target interactive video file. The above embodiments only schematically describe the Box types required for the encapsulation of the interactive video file, and in practical application, the Box names and the arrangement sequence in the definition of the IVF format may be arbitrary, or the Box types may be expanded by adding new types of boxes, such as boxes with corresponding resources of interactive special effects and three-dimensional models.
The embodiment of the invention provides a method for encapsulating an interactive video, which encapsulates all media resources needed by playing the interactive video in one file by designing an interactive video encapsulation format IVF, thereby being convenient to manage. The IVF packaging format packages all the branched videos together, the branched videos can be continuously loaded and loaded into the buffer area of the video player in advance, so that the time cost is reduced, when the video is started to be played, only part of IVF data is needed to be loaded, the waiting time of a user is greatly reduced, the video playing efficiency is improved, and the second opening is realized.
Fig. 2 is a flow chart of an interactive video packaging method according to an alternative embodiment of the present invention, and as can be seen from fig. 2, the method provided by the embodiment of the present invention may include:
Step S201, creating file type container ftyp box, media information container moov box, and adding data record container ivfh box after media information container moov box for recording metadata (such as size, position, etc.) of all media resource files related to IVF format;
Step S202, obtaining various media resource files, including conventional pixelated video files, vectorized video files, audio files, interactive component related files (such as button pictures related to the interactive components), scenario configuration files, logic code files and the like, which form target interactive video files; the video file is a segmented file with a plurality of fMP-4 formats, if the video file is in a format other than fMP, preprocessing is needed, the video file is packaged into a format of fMP, each segment in fMP4 video is used as a storage unit of the IVF file, and the Size (Size) of the segment is recorded;
Step S203, creating iflt box in the data record container ivfh box, for recording the size of all media assets (such as segments, pictures, texts of fMP) and the starting position in the IVF file; wherein, the offset field of entries in iflt box is left blank;
Step S204, for any media resource file, judging whether the media resource file is a specific material file, if yes, executing step S205; if not, executing step S208;
Step S205, judging whether the specific material file is a pixelized video file, if so, executing step S206; if not, executing step S207;
step S206, creating imfi box in ivfh box for recording related information of the conventional pixelated video file and the number of entries and index positions in iflt box;
Step S207, creating ipfi box in ivfh box for recording the related information of the vector video material and the number and index position of entries in iflt box;
Step S208, creating idfi box in ivfh box for recording the related information of the non-specific material and the number and index position of the entries in iflt box;
step S209, creating ivfi box in ivfh box, which is used for recording the initialization script and the file name of the configuration file required by playing the IVF file;
Step S210, creating ivfm box in ivfh box for recording metadata information, such as build_version; the size of the entire ivfh box is now determined;
Step S211, calculating the actual position of each media resource file in the IVF file according to the size of each media resource file and the sizes of ftyp, moov and ivfh box, and updating the offset field of the entries in iflt box;
step S212, after all media files are added to ivfh box in sequence, the encapsulation of the IVF file is completed.
Fig. 3 is a schematic diagram of a part of an encapsulated interactive video file according to an embodiment of the present invention, and as can be seen in conjunction with fig. 3, in an embodiment of the present invention, there is only one Ivfh Box (data recording container) for each IVF file. Wherein iflt box (file index container), ivfi box (first additional container), ivfm box (second additional container) are only one, imfi box (first type-identified file index container), ipfi box (second type-identified file index container), idfi box (third type-identified file index container) are each one for each media asset file. In practical application, the Box names and the arrangement sequence in the IVF format definition can be arbitrary, or the extension can be performed by adding new types of boxes, such as boxes added with interactive special effects, three-dimensional models and other resources.
The embodiment of the invention provides a method for packaging an interactive video, which is used for packaging related media resources of the interactive video into one file, so that the management of materials is convenient, and the playing interaction experience is improved. By packaging the interactive video file into the file in the IVF format, the video material in the IVF file can be normally played by using a common video player, and the interactive logic can be executed by using the interactive video player except for normally playing the video material, so that the control component is displayed, and the user can interact. In practical application, the text such as pictures, configuration and codes can be encapsulated into the video format based on the MP4 video encapsulation format or other video encapsulation formats, or all media needed by playing the interactive video such as videos, pictures and codes can be encapsulated into a file.
Based on the same inventive concept, the embodiment of the present invention further provides an interactive video packaging device, as shown in fig. 4, where the interactive video packaging device provided by the embodiment of the present invention may include:
The file acquisition module 410 is configured to acquire a plurality of media resource files corresponding to the target interactive video file to be packaged;
A first creation module 420 configured to create a data record container, recording metadata of a plurality of media asset files;
A second creating module 430 configured to create a corresponding file index container for each media asset file in the data record container, and record index data of the corresponding media asset file in each file index container;
a file adding module 440 configured to append various media asset files after the data recording container;
the encapsulation module 450 is configured to generate a target interactive video file based on the data record container and the plurality of media asset file packages.
In an alternative embodiment of the present invention, the second creation module 430 may be further configured to:
For any media resource file, identifying the resource type corresponding to and stored by each media resource file; the resource type comprises specific material files or non-specific material files; non-specific material files include, but are not limited to, audio files, interactive component related files, scenario configuration files, logical code files; the specific material files comprise conventional pixelated video files and vectorized video files;
and creating a corresponding file index container in the data record container based on the resource type corresponding to and stored in each media resource file.
In an alternative embodiment of the present invention, the second creation module 430 may be further configured to:
when the resource type stored correspondingly by the media resource file is a specific material file, creating a file index container of a first type identifier or a file index container of a second type identifier in the data record container;
and when the resource type stored correspondingly by the media resource file is a non-specific material file, creating a file index container with a third type identifier.
In an alternative embodiment of the present invention, the second creation module 430 may be further configured to: before creating corresponding file index containers for each media resource file in the data recording container, creating a resource index container in the data recording container, and recording the sizes of various media resource files and the initial positions in the target interactive video file;
wherein the resource index container comprises the number of entries left blank; the number of the entries is the number corresponding to the media resource file.
In an alternative embodiment of the present invention, the second creation module 430 may be further configured to: creating a first additional container and a second additional container in the data recording container after creating corresponding file index containers for the media resource files respectively in the data recording container;
And recording basic information required by playing the target interactive video file through the first additional container, and recording metadata information of the target interactive video file through the second additional container.
In an alternative embodiment of the present invention, the first creation module 420 may be further configured to: before creating a data record container, creating a file type container corresponding to the target interactive video file, and recording the file type of the target interactive video file;
A media information container corresponding to the target interactive video file is created, and the data recording container is embedded into the media information container.
In an alternative embodiment of the present invention, the file adding module 440 may be further configured to:
calculating the actual position of each media resource file in the target interactive video file according to the sizes of each media resource file, the file type container and the media information container, and updating the number of items of content items in the resource index container;
and adding various media resource files after the data record container according to the actual positions of the media resource files in the target interactive video file.
In an alternative embodiment of the present invention, the encapsulation module 450 may be further configured to:
The target interactive video file is generated based on the file type container, the media information container, the data record container, and the plurality of media asset file packages.
In an alternative embodiment of the present invention, there is further provided a storage device, on which a computer program is stored, where the program when executed by a processor implements the method for encapsulating an interactive video according to the above embodiment.
In an alternative embodiment of the present invention, there is also provided an apparatus for encapsulating an interactive video, including a storage device, a processor, and a computer program stored on the storage device and capable of running on the processor, where the processor implements the method for encapsulating an interactive video described in the foregoing embodiment when executing the program.
It will be clear to those skilled in the art that the specific working processes of the above-described systems, devices, modules and units may refer to the corresponding processes in the foregoing method embodiments, and for brevity, the description is omitted here.
In addition, each functional unit in the embodiments of the present invention may be physically independent, two or more functional units may be integrated together, or all functional units may be integrated in one processing unit. The integrated functional units may be implemented in hardware or in software or firmware.
Those of ordinary skill in the art will appreciate that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or in whole or in part in the form of a software product stored in a storage medium, comprising instructions for causing a computing device (e.g., a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM), a magnetic disk, or an optical disk, etc.
Or all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a personal computer, a server, or a computing device such as a network device) associated with program instructions, which may be stored in a computer-readable storage medium, which when executed by a processor of the computing device, performs all or part of the steps of the method of embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all technical features thereof can be replaced by others within the spirit and principle of the present invention; such modifications and substitutions do not depart from the scope of the invention.

Claims (5)

1. The method for encapsulating the interactive video is characterized by comprising the following steps of:
acquiring a plurality of media resource files corresponding to a target interactive video file to be packaged;
Creating a file type container corresponding to the target interactive video file, and recording the file type of the target interactive video file;
Creating a media information container corresponding to the target interactive video file, creating a data record container, recording metadata of the plurality of media resource files, and embedding the data record container into the media information container;
Creating a resource index container in the data recording container, recording the sizes of the plurality of media resource files and the starting position in the target interactive video file; the resource index container comprises a blank item number content item, wherein the item number is the number corresponding to the media resource file, and an offset field in the resource index container item number content item is blank;
For any media resource file, identifying the resource type corresponding to and stored in each media resource file; the resource type comprises specific material files or non-specific material files; the non-specific material files include, but are not limited to, audio files, interactive component related files, scenario configuration files, and logic code files; the specific material files comprise conventional pixelated video files and vectorized video files;
If the resource type stored by the media resource file is a specific material file, creating a file index container of a first type identifier or a file index container of a second type identifier in the data record container; if the resource type stored by the media resource file is a non-specific material file, creating a file index container with a third type identifier; the file index container of the first type mark records the related information of the conventional video material and the number and index position of the entries in the resource index container, the file index container of the second type mark records the related information of the vector video material and the number and index position of the entries in the resource index container, and the file index container of the third type mark records the related information of the nonspecific material and the number and index position of the entries in the resource index container;
recording index data of corresponding media resource files in each file index container;
creating a first additional container and a second additional container in the data recording container; recording basic information required by playing the target interactive video file through the first additional container, wherein the basic information comprises an initialization script required by the interactive video file and a file name of a configuration file, and recording metadata information of the target interactive video file through the second additional container;
Appending each of the plurality of media asset files after the data recording container;
And generating the target interactive video file based on the data record container and the various media resource file packages, wherein the format of the target interactive video file is IVF format.
2. The method of claim 1, wherein appending each of the plurality of media asset files after the data recording container comprises:
calculating the actual position of each media resource file in the target interactive video file according to the sizes of each media resource file, the file type container and the media information container, and updating the number of items of content in the resource index container;
And adding various media resource files after the data record container according to the actual position of the media resource files in the target interactive video file.
3. The method of claim 1, wherein generating the target interactive video file based on the data recording container and the plurality of media asset file packages comprises:
and generating the target interactive video file based on the file type container, the media information container, the data record container and the multiple media resource file packages.
4. An interactive video packaging device, comprising:
The file acquisition module is configured to acquire a plurality of media resource files corresponding to the target interactive video file to be packaged;
The first creating module is configured to create a file type container corresponding to the target interactive video file and record the file type of the target interactive video file; creating a media information container corresponding to the target interactive video file, creating a data record container, recording metadata of the plurality of media resource files, and embedding the data record container into the media information container; creating a resource index container in the data recording container, recording the sizes of the plurality of media resource files and the starting position in the target interactive video file; wherein the resource index container comprises the number of left entries and content items; the number of the entries is the number corresponding to the media resource files, and an offset field in the content item of the number of the entries of the resource index container is left blank;
The second creation module is configured to identify the resource type corresponding to and stored in each media resource file for any media resource file; the resource type comprises specific material files or non-specific material files; the non-specific material files include, but are not limited to, audio files, interactive component related files, scenario configuration files, and logic code files; the specific material files comprise conventional pixelated video files and vectorized video files; if the resource type stored by the media resource file is a specific material file, creating a file index container of a first type identifier or a file index container of a second type identifier in the data record container; if the resource type stored by the media resource file is a non-specific material file, creating a file index container with a third type identifier; recording index data of corresponding media resource files in each file index container; creating a first additional container and a second additional container in the data recording container; recording basic information required by playing the target interactive video file through the first additional container, wherein the basic information comprises an initialization script required by the interactive video file and a file name of a configuration file, and recording metadata information of the target interactive video file through the second additional container; the file index container of the first type mark records the related information of the conventional video material and the number and index position of the entries in the resource index container, the file index container of the second type mark records the related information of the vector video material and the number and index position of the entries in the resource index container, and the file index container of the third type mark records the related information of the nonspecific material and the number and index position of the entries in the resource index container;
A file adding module configured to append each of the plurality of media asset files after the data recording container;
and the packaging module is configured to package and generate the target interactive video file based on the data record container and the plurality of media resource files, wherein the format of the target interactive video file is IVF format.
5. A storage device having stored thereon a computer program, wherein the program when executed by a processor implements the method of encapsulating an interactive video according to any of claims 1 to 3.
CN202110372799.7A 2021-04-07 2021-04-07 Interactive video packaging method and device and electronic equipment Active CN113254393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110372799.7A CN113254393B (en) 2021-04-07 2021-04-07 Interactive video packaging method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110372799.7A CN113254393B (en) 2021-04-07 2021-04-07 Interactive video packaging method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113254393A CN113254393A (en) 2021-08-13
CN113254393B true CN113254393B (en) 2024-07-05

Family

ID=77220458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110372799.7A Active CN113254393B (en) 2021-04-07 2021-04-07 Interactive video packaging method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113254393B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125532A (en) * 2021-10-30 2022-03-01 杭州当虹科技股份有限公司 Interactive video seamless cutting method and device
CN115460468B (en) * 2022-08-10 2023-09-15 北京爱奇艺科技有限公司 Interactive video file creation method, interactive video playing method, device, electronic equipment and medium
CN115460435A (en) * 2022-08-25 2022-12-09 广州博冠信息科技有限公司 Special effect animation playing method and device, storage medium and computer equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924584A (en) * 2018-05-30 2018-11-30 互影科技(北京)有限公司 The packaging method and device of interactive video
CN110545480A (en) * 2018-05-29 2019-12-06 北京字节跳动网络技术有限公司 Preloading control method and device of media file and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9227139B2 (en) * 2002-12-10 2016-01-05 Sony Computer Entertainment America Llc Virtualization system and method for hosting applications
US20050033758A1 (en) * 2003-08-08 2005-02-10 Baxter Brent A. Media indexer
KR20130107266A (en) * 2010-06-14 2013-10-01 톰슨 라이센싱 Method and apparatus for encapsulating coded multi-component video
KR20120055462A (en) * 2010-11-21 2012-05-31 휴먼 모니터링 리미티드 Method and system of encoding and decoding media content
CN103517131A (en) * 2012-08-14 2014-01-15 Tcl集团股份有限公司 Method for playing segmental videos in gapless mode in television set and television set
WO2016004240A1 (en) * 2014-07-03 2016-01-07 Mobiledirect, Inc. Interactive distributed multimedia system
CN108124187A (en) * 2017-11-24 2018-06-05 互影科技(北京)有限公司 The generation method and device of interactive video

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545480A (en) * 2018-05-29 2019-12-06 北京字节跳动网络技术有限公司 Preloading control method and device of media file and storage medium
CN108924584A (en) * 2018-05-30 2018-11-30 互影科技(北京)有限公司 The packaging method and device of interactive video

Also Published As

Publication number Publication date
CN113254393A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN113254393B (en) Interactive video packaging method and device and electronic equipment
US11070893B2 (en) Method and apparatus for encoding media data comprising generated content
US9282381B2 (en) Media playback control
US20120198492A1 (en) Stitching Advertisements Into A Manifest File For Streaming Video
US20090157750A1 (en) Integrated multimedia file format structure, and multimedia service system and method based on the intergrated multimedia format structure
US20110134108A1 (en) Interactive three-dimensional augmented realities from item markers for on-demand item visualization
US10770114B2 (en) Video matrix barcode system
CN110545479B (en) Loading control method and device for media playing and storage medium
CN115769588A (en) Method and apparatus for encapsulating annotation regions in ISOBMFF tracks
CN112616069A (en) Streaming media video playing and generating method and equipment
CN109241344B (en) Method and apparatus for processing information
US20240137608A1 (en) Partial frame replacement enabling multiple versions in an integrated video package
US9762703B2 (en) Method and apparatus for assembling data, and resource propagation system
CN113011909B (en) Content delivery method, device, server and storage medium
CN107977551B (en) Method and device for protecting file and electronic equipment
CN111506747B (en) File analysis method, device, electronic equipment and storage medium
CN111093101B (en) Media file delivery method and device, storage medium and electronic device
CN108831510B (en) Method, device, terminal and storage medium for dotting audio and video files
CN116896597A (en) Method and apparatus for generating and parsing media file, program product and storage medium
EP3955131A1 (en) Expression package generation method and device, electronic device, and medium
CN114363694A (en) Video processing method and device, computer equipment and storage medium
CN113778820A (en) Application program data export method, device, electronic device and storage medium
CN113420242A (en) Shopping guide method, resource distribution method, content display method and equipment
US11810335B2 (en) Metadata for embedded binary data in video containers
CN114097249B (en) Method and apparatus for packaging panoramic images in files

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