CN111193956A - Video data processing method and video playing device - Google Patents

Video data processing method and video playing device Download PDF

Info

Publication number
CN111193956A
CN111193956A CN201811361408.6A CN201811361408A CN111193956A CN 111193956 A CN111193956 A CN 111193956A CN 201811361408 A CN201811361408 A CN 201811361408A CN 111193956 A CN111193956 A CN 111193956A
Authority
CN
China
Prior art keywords
video
frame
data
filling
stream data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811361408.6A
Other languages
Chinese (zh)
Other versions
CN111193956B (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.)
Shenzhen Ipanel TV Inc
Original Assignee
Shenzhen Ipanel TV Inc
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 Shenzhen Ipanel TV Inc filed Critical Shenzhen Ipanel TV Inc
Priority to CN201811361408.6A priority Critical patent/CN111193956B/en
Publication of CN111193956A publication Critical patent/CN111193956A/en
Application granted granted Critical
Publication of CN111193956B publication Critical patent/CN111193956B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4383Accessing a communication channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4385Multiplex stream processing, e.g. multiplex stream decrypting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a video data processing method and video playing equipment, which can obtain a video playing instruction, fill an empty packet into a buffer area of a video player according to a preset filling rate, obtain video stream data in the process of filling the empty packet into the buffer area of the video player, analyze the video stream data, determine an I frame in the video stream data, stop filling the empty packet into the buffer area of the video player after determining the I frame in the video stream data, and push the I frame and later video frame data to the buffer area of the video player. In the process of obtaining the first I frame picture from the video stream data, the invention simultaneously fills the empty packet into the buffer area of the video player, so that the empty packet occupies the capacity of the buffer area to shorten the time for filling the buffer area of the video player, thereby realizing the rapid playing of the video picture by the video playing equipment.

Description

Video data processing method and video playing device
Technical Field
The present invention relates to the field of video playing technologies, and in particular, to a video data processing method and a video playing device.
Background
With the increasingly huge amount of video data and the development of video compression technology, technicians use the MPEG coding standard to transform original video pictures into three frame pictures of I frame, P frame and B frame through loss, so as to improve the transmission rate of video data.
In the existing video playing technology, a video player is provided with a data buffer, and the video player begins to analyze video data only after the buffer is filled with the video data. In addition, due to the characteristics of I-frames, P-frames, and B-frames, the video player must parse to the I-frame to start playing the picture, and the number of I-frames in the video data is small, and generally, a certain time is required for the video player to parse to the I-frame. Therefore, the video player can play the picture after a certain time after obtaining the playing instruction, and the time is the sum of the time that the buffer area of the video player is filled with the video data and the time that the video player takes to parse the I frame after the buffer area is filled.
Therefore, the prior art cannot realize the rapid playing of video pictures.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a video data processing method and a video playing device that overcome the above problems or at least partially solve the above problems, and the technical solutions are as follows:
a video data processing method is applied to a video playing device, and comprises the following steps:
obtaining a video playing instruction;
filling an empty packet into a buffer area of a video player according to a preset filling rate, acquiring video stream data in the process of filling the empty packet into the buffer area of the video player, analyzing the video stream data, and determining an I frame in the video stream data;
and after the I frame in the video stream data is determined, stopping filling the empty packet into the buffer area of the video player, and pushing the I frame and the subsequent video frame data to the buffer area of the video player.
Optionally, after the video playing device pushes the I frame and the subsequent video frame data to the buffer of the video player, the method further includes:
and after the buffer area of the video player is filled, the video playing equipment analyzes the I frame and the subsequent video frame data to play the video.
Optionally, the method further includes:
and setting the playing parameters of the video player.
Optionally, the filling the empty packet specifically includes:
and filling a transport stream TS data packet carrying invalid content, wherein the TS data packet conforms to a TS stream format.
Optionally, the analyzing the video stream data to determine an I frame in the video stream data specifically includes:
analyzing a header file of a video packet in the video stream data, and determining an I frame in the video stream data.
A video playback device, the video playback device comprising: an instruction obtaining module, a filling module, an I frame identification module and a pushing module,
the instruction obtaining module is used for obtaining a video playing instruction;
the filling module is used for filling empty packets into the buffer area of the video player according to a preset filling rate;
the I frame identification module is used for acquiring video stream data in the process of filling empty packets into the buffer area of the video player by the filling module, analyzing the video stream data and determining an I frame in the video stream data;
the filling module is further configured to stop filling empty packets into the buffer of the video player after the I frame identification module determines an I frame in the video stream data;
the pushing module is configured to push the I frame and subsequent video frame data to a buffer of the video player after the I frame identification module determines the I frame in the video stream data.
Optionally, the video playing device further includes a playing module,
the playing module is used for pushing the I frame and the subsequent video frame data to the buffer area of the video player by the pushing module so that the buffer area of the video player is filled with the I frame and the subsequent video frame data, and then analyzing the I frame and the subsequent video frame data to play the video.
Optionally, the video playing device further includes a parameter setting module,
and the parameter setting module is used for setting the playing parameters of the video player.
Optionally, the filling module is specifically configured to fill a transport stream TS packet carrying invalid content into a buffer of a video player according to a preset filling rate, and stop filling the TS packet into the buffer of the video player after the I-frame identification module determines an I-frame in the video stream data, where the TS packet conforms to a TS stream format.
Optionally, the I-frame identifying module is specifically configured to: obtaining video stream data, analyzing a header file of a video packet in the video stream data, and determining an I frame in the video stream data.
The invention discloses a video data processing method and video playing equipment, which can obtain a video playing instruction, fill an empty packet into a buffer area of a video player according to a preset filling rate, obtain video stream data in the process of filling the empty packet into the buffer area of the video player, analyze the video stream data, determine an I frame in the video stream data, stop filling the empty packet into the buffer area of the video player after determining the I frame in the video stream data, and push the I frame and later video frame data to the buffer area of the video player. In the process of obtaining the first I frame picture from the video stream data, the invention simultaneously fills the empty packet into the buffer area of the video player, so that the empty packet occupies the capacity of the buffer area to shorten the time for filling the buffer area of the video player, thereby realizing the rapid playing of the video picture by the video playing equipment.
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 refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating a video data processing method according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating another video data processing method according to an embodiment of the present invention;
fig. 3 is a flow chart illustrating another video data processing method according to an embodiment of the present invention;
fig. 4 shows a schematic structural diagram of a video playing device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can 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.
An embodiment of the present invention provides a video data processing method, which may be applied to a video playing device, and as shown in fig. 1, the method may include the following steps:
s100, obtaining a video playing instruction;
the video playing device may be an electronic device equipped with a video player, or an electronic device with a video playing function. The video player may be an application program dedicated to playing video, or may be a plug-in integrated into other application programs, for example: and the video playing plug-in is integrated into the browser.
Specifically, after the user selects the video to be watched, the video playing device obtains a playing instruction of the video. For example, a user may log on to a web page that may be a live video program using a personal computer or view the live video program through a digital television set-top box. If the sports channel program is selected to be watched on the webpage, at this time, the video playing device receives an instruction for playing the sports channel program. It will be appreciated that when the user selects to switch to another video channel while watching the sports channel program, for example, to a news channel, the video playback device will receive an instruction to play the news channel. In addition, for a video player capable of playing a live program at a fixed time, when a user selects a certain time to play the live program, the video playing device also obtains a playing instruction of the live program, and of course, the video playing device may start playing only when the time reaches the time, for example, the user requests to play a sports channel program at the noon 12 of the following day at a starwatch live webpage, at this time, the video playing device obtains a playing instruction to play the sports channel program at the noon 12 of the following day, and the video playing device starts playing the sports channel program at the noon 12 of the following day.
S200, filling empty packets into a buffer area of a video player according to a preset filling rate, acquiring video stream data in the process of filling the empty packets into the buffer area of the video player, analyzing the video stream data, and determining an I frame in the video stream data;
specifically, after the video playing device obtains the playing instruction, the present invention can fill the empty packet into the buffer of the video player according to the preset filling rate.
It should be noted that, in general, the video playing device may set a corresponding data caching policy, that is, a buffer capable of storing a certain amount of data is set, and when the buffer of the video player is filled with data, the video playing device starts to play a video according to the video frames in the buffer, so as to ensure a smooth effect during playing the video.
Optionally, the process of filling the empty packet may specifically include: and filling TS data packets carrying invalid content, wherein the TS data packets conform to a TS stream format.
Wherein, TS (Transport Stream) Stream data is video Stream data obtained and transmitted by a server side through a video compression coding technology of MPEG (moving picture experts Group) standard, and the TS Stream data is carried and transmitted by a TS data packet conforming to the TS Stream format. Note that the null packets carry only TS video stream data of invalid content. When the buffer of the video player receives the empty packet, because the empty packet is also a data packet conforming to the TS stream format, the video player will store the empty packet into the buffer of the video player, so that the time for filling the buffer is shortened. In addition, the null packet carries data of invalid content, and when the video player analyzes the null packet, the analysis rate of the video player is improved compared with other TS packets carrying valid data.
Specifically, when the buffer area of the video player is filled with empty packets, the buffer area of the video player is filled according to a preset filling rate. It is understood that the preset filling rate should be within a certain interval, if the rate is too small, the effect of filling empty packets to shorten the time required for the buffer to be filled with data cannot be realized, and if the rate is too large, the buffer will be filled with empty packets in a short time, and the effect of setting the buffer of the video player to ensure smooth video playing cannot be realized. Therefore, the appropriate rate for filling the null packets should be set according to the playing performance of a specific video playing device, wherein the playing performance of the video playing device includes: the data caching strategy made by the video playing equipment and the data volume which can be accommodated by the buffer area of the video player. In addition, the unit of the preset filling rate may be one kilobyte per second.
Specifically, in the process of filling an empty packet into the buffer of the video player, the video playing device receives video stream data sent from a server, analyzes the video stream data, and determines an I frame in the video stream data. It should be noted that the video is formed by using the principle of human visual persistence and rapidly playing a series of video pictures through video playing equipment to make human eyes feel moving. If the uncompressed original video frame is transmitted from the server, the huge amount of video image data will cause an unacceptable pressure on network transmission, so the MPEG video compression coding technology is used, various algorithms are adopted to reduce the data amount of each video frame, and the original video frame is lossy-converted into three frame frames, I frame, P frame and B frame, so as to improve the transmission rate of the video data.
The I frame is also called an intra-frame coding frame, is an important frame in inter-frame compression coding, and is also a coding frame of full-frame compression. When the video playing device decodes the I frame, the data of the I frame picture can be used to reconstruct a complete image without referring to other frame pictures. The P frame, also called an inter-frame predictive coding frame, compresses data of the frame according to a difference between the frame and an adjacent previous frame (I frame or P frame), that is, records a difference between a current frame picture and the previous frame (I frame or P frame). When the video playing device decodes the P frame, the image can be obtained only by referring to the frame picture cached by the video playing device before and superimposing the difference recorded by the P frame. In practical application, in the process of playing a video picture by a video playing device, if an I-frame picture is lost, the video playing device cannot analyze a following P-frame picture, so that a phenomenon of a video picture black screen occurs; if the P frame is lost, the video frame will have the phenomena of screen-splash, mosaic, etc. B-frames, also called bi-directional predictive coded frames, record the difference between the current frame and the previous and next frames. When the video playing device decodes the B frame, it needs to refer to not only the previous buffered picture, but also the following picture, and also to superimpose the difference defined by the B frame from the previous and following pictures to obtain the image. In the compression coding of three inter-frames of an I frame, a P frame and a B frame, the compression efficiency is the lowest in the I frame, the P frame is higher and the B frame is the highest. For example, the same video picture is lossy-converted into I-frame, P-frame, and B-frame, respectively, and of these three video pictures, the data amount of I-frame is largest, P-frame is smaller, and B-frame is smallest. In addition, in general, the video stream data received by the video playing device has the least number of I-frame pictures, more P-frames and the most B-frames, so that the compression efficiency of the video stream data is as high as possible, and the network transmission efficiency is improved as much as possible.
According to the characteristics of the I frame, the P frame and the B frame, it can be understood that the video playing device must analyze the I frame to play the video picture, and further continuously play the subsequent video picture, so the video playing device needs to determine the I frame picture in the received video stream data.
Optionally, the analyzing the video stream data to determine an I frame in the video stream data specifically includes:
analyzing a header file of a video packet in the video stream data, and determining an I frame in the video stream data.
The TS video stream data is carried and transmitted by a plurality of TS packets meeting the TS stream format, and the structure of the TS packets has fixed-size bytes. The data content of the TS packet is determined by the PID number in the TS packet header file, and meanwhile, the PID number is also the unique identification mark in the TS packet. Therefore, the video playing device can identify the content of the TS packet carrying data by analyzing the PID number in the header file of the TS packet. In the practical application process, the frame data of the I frame, the P frame and the B frame are all composed of a plurality of TS packets, and generally, the video playing equipment can identify whether the frame data is the frame I picture or not by analyzing PID numbers of header files of 1-3 TS packets.
S300, after the I frame in the video stream data is determined, stopping filling the empty packet into the buffer area of the video player, and pushing the I frame and the subsequent video frame data to the buffer area of the video player.
Specifically, after the video playing device identifies the first I frame picture in the received video stream data, it stops filling the empty packet into the buffer area of the video player, and pushes the obtained first I frame picture and the subsequent video frame data to the buffer area of the video player.
In the prior art, in order to achieve a smooth effect when a video playing device plays a video picture, the video playing device is provided with a buffer area capable of accommodating a certain amount of data of a video player, and after the buffer area of the video player is filled with data, the video playing device can start to analyze video stream data stored in the buffer area, and when an I frame is analyzed, the video picture can be played.
In addition, the video playing device starts to receive the video stream data transmitted from the server side after obtaining the playing instruction, wherein the time when the video playing device starts to receive the video stream data is arbitrary, and the type of the received frame picture is random, so that the first frame picture received by the video playing device may be an I frame, and may also be a P frame or a B frame. However, in the video stream data transmitted from the server side, the number of I-frame pictures in the video stream data is relatively small compared to P-frame and B-frame due to the difference in data compression rate between I-frame, P-frame and B-frame. Therefore, due to the difference in the number of I frames, P frames, and B frames, the first frame picture received by the video playback device from the video stream data is highly likely not an I frame, and even the video playback device needs to obtain an I frame picture after a while.
Therefore, due to the setting of the data buffer of the video player and the number of the I frames in the video stream, after the video playing device obtains the playing instruction, the video playing device cannot play the video pictures quickly, but must wait for the time when the buffer of the video player is filled up and the sum of the time when the buffer is filled up and the time when the buffer is parsed to the I frames, so as to play the pictures.
The invention receives the video stream data transmitted from the server end immediately after obtaining the playing instruction, but the difference is that the invention does not push the video stream into the buffer area of the video player immediately, but fills the buffer area of the video player with the empty packet in the TS stream data format, so that the empty packet occupies the capacity of the buffer area for the video stream data. In the process of filling empty packets into the buffer area of the video player, analyzing the received video stream data to obtain an I frame picture, and after obtaining the I frame picture, the video playing equipment pushes the I frame and the subsequent video stream data into the buffer area of the video player.
In the process of analyzing the video stream in advance until obtaining the I frame, when the video playing equipment obtains the I frame picture, the buffer area of the video player is filled with the empty packet with a certain data volume, at the moment, the capacity of the buffer area to the video stream data is reduced, in addition, in the process of analyzing the video stream data in the buffer area by the video playing equipment to play the video picture, because the empty packet carries the TS stream data with invalid content, the video playing equipment can quickly analyze the empty packet, the consumed time is very short, and the video playing equipment can quickly analyze the first obtained I frame picture to further play the video picture.
Therefore, compared with the prior art, the invention fills the empty packet into the buffer area of the video player simultaneously in the process of obtaining the first I frame picture from the video stream data, so that the empty packet occupies the capacity of the buffer area to shorten the time for filling the buffer area of the video player, thereby realizing the rapid playing of the video picture by the video playing device.
The video data processing method provided by the embodiment of the present invention may obtain a video playing instruction, fill an empty packet into a buffer area of a video player according to a preset filling rate, obtain video stream data in a process of filling the empty packet into the buffer area of the video player, analyze the video stream data, determine an I frame in the video stream data, after determining the I frame in the video stream data, stop filling the empty packet into the buffer area of the video player, and push the I frame and subsequent video frame data to the buffer area of the video player. The invention fills the empty packet into the buffer area of the video player and analyzes the received video stream data, so that the empty packet occupies the capacity of the buffer area to shorten the time for filling the buffer area of the video player, thereby realizing the rapid playing of the video pictures by the video playing equipment.
Optionally, as shown in fig. 2, another video data processing method provided in the embodiment of the present invention, based on the method shown in fig. 1, may further include the following steps:
s400, after the buffer area of the video player is filled, analyzing the I frame and the subsequent video frame data, and playing the video.
Specifically, the video playing device pushes the identified first I-frame picture and the identified subsequent video frame data to a buffer area of the video player, and when the video playing device is filled with the I-frame picture, the subsequent video frame data of the I-frame, and the empty packet filled before, the video playing device starts to analyze the I-frame picture and the subsequent video frame data and play the video picture. It should be noted that, after the video playing device parses the video frame data and plays the video frame, the video playing device continues to receive the video stream data and continuously pushes the received video stream data to the buffer area of the video player, wherein, if the rate of parsing the video stream data by the video playing device is faster than the rate of receiving the video stream data, the buffer area of the video player is not filled up, at this time, the video playing device stops parsing the received video frame data, and after the buffer area of the video player receives the video stream data until the buffer area of the video player is filled up again, the video playing device starts parsing the video frame data again from the video frame data that was previously stopped parsing, and starts playing the video frame again. Therefore, in order to ensure a smooth effect of watching video pictures, it should be ensured that the video playing device has a good rate of receiving video stream data.
The invention starts to analyze the I frame and the subsequent video frame data after the data buffer area of the video player is filled with the video stream data, and plays the video picture, so that the video playing equipment has smoother effect in the process of playing the video picture.
Optionally, as shown in fig. 3, another video data processing method provided by the present invention may specifically include the following steps:
s001, setting playing parameters of a video player;
specifically, when watching a video picture, a user can set playing parameters of the video player correspondingly according to personal preference habits. For example, when a video screen is viewed by using a personal computer, the playing parameters of the video player may be set on a web page playing the video screen, for example, the definition of the video screen played by the video player may be set, the smooth, high-definition, ultra-clear or blue-light effect may be selected, and the resolution of the video player, the playing speed of the video screen, the brightness of the video screen, and the like may also be set. When a user watches television programs by using the digital television set-top box, in general, the playing parameters of the video player can be set by a remote controller or corresponding keys on the digital television set-top box.
S100, obtaining a video playing instruction;
s200, filling empty packets into a buffer area of a video player according to a preset filling rate, acquiring video stream data in the process of filling the empty packets into the buffer area of the video player, analyzing the video stream data, and determining an I frame in the video stream data;
s300, after the I frame in the video stream data is determined, stopping filling the empty packet into the buffer area of the video player, and pushing the I frame and the subsequent video frame data to the buffer area of the video player.
Steps S100, S200, and S300 are the same as those shown in fig. 1, and are not described again.
It is understood that the user can set the playing parameters of the video player either before watching the video picture or during the process of switching the video channel. In other embodiments provided by the present invention, the execution sequence of the step S001 and the steps S100, S200, and S300 is not limited in the present invention. According to the invention, the user can set the playing parameters of the video player individually according to the self condition, so that the user has better viewing experience in the process of playing the video picture by the video player.
Corresponding to the embodiment of the method, the invention also provides video playing equipment.
As shown in fig. 4, a video playing device provided in an embodiment of the present invention may include: an instruction obtaining module 100, a filling module 200, an I-frame identifying module 300 and a pushing module 400,
the instruction obtaining module 100 is configured to obtain a video playing instruction;
the video playing device may be an electronic device equipped with a video player, or an electronic device with a video playing function. The video player may be an application program dedicated to playing video, or may be a plug-in integrated into other application programs, for example: and the video playing plug-in is integrated into the browser.
Specifically, after the user selects the video to be watched, the video playing device obtains a playing instruction of the video. For example, a user may log on to a web page that may be a live video program using a personal computer or view the live video program through a digital television set-top box. If the sports channel program is selected to be watched on the webpage, at this time, the video playing device receives an instruction for playing the sports channel program. It will be appreciated that when the user selects to switch to another video channel while watching the sports channel program, for example, to a news channel, the video playback device will receive an instruction to play the news channel. In addition, for a video player capable of playing a live program at a fixed time, when a user selects a certain time to play the live program, the video playing device also obtains a playing instruction of the live program, and of course, the video playing device may start playing only when the time reaches the time, for example, the user requests to play a sports channel program at the noon 12 of the following day at a starwatch live webpage, at this time, the video playing device obtains a playing instruction to play the sports channel program at the noon 12 of the following day, and the video playing device starts playing the sports channel program at the noon 12 of the following day.
The filling module 200 is configured to fill empty packets into a buffer of the video player according to a preset filling rate;
specifically, after the video playing device obtains the playing instruction, the present invention can fill the empty packet into the buffer of the video player according to the preset filling rate.
It should be noted that, in general, the video playing device may set a corresponding data caching policy, that is, a buffer capable of storing a certain amount of data is set, and when the buffer of the video player is filled with data, the video playing device starts to play a video according to the video frames in the buffer, so as to ensure a smooth effect during playing the video.
The filling module 200 may be specifically configured to: and filling TS data packets carrying invalid content into a buffer area of a video player according to a preset filling rate, and stopping filling the TS data packets into the buffer area of the video player after the I frame identification module determines an I frame in the video stream data, wherein the TS data packets conform to a TS stream format.
Specifically, when the buffer area of the video player is filled with empty packets, the buffer area of the video player is filled according to a preset filling rate. It is understood that the preset filling rate should be within a certain interval, if the rate is too small, the effect of filling empty packets to shorten the time required for the buffer to be filled with data cannot be realized, and if the rate is too large, the buffer will be filled with empty packets in a short time, and the effect of setting the buffer of the video player to ensure smooth video playing cannot be realized. Therefore, the appropriate rate for filling the null packets should be set according to the playing performance of a specific video playing device, wherein the playing performance of the video playing device includes: the data caching strategy made by the video playing equipment and the data volume which can be accommodated by the buffer area of the video player. In addition, the unit of the preset filling rate may be one kilobyte per second.
The I frame identification module 300 is configured to obtain video stream data in a process of filling an empty packet into the buffer of the video player by the filling module 200, analyze the video stream data, and determine an I frame in the video stream data;
specifically, in the process of filling an empty packet into the buffer of the video player, the video playing device receives video stream data sent from a server, analyzes the video stream data, and determines an I frame in the video stream data. It should be noted that the video is formed by using the principle of human visual persistence and rapidly playing a series of video pictures through video playing equipment to make human eyes feel moving. If the uncompressed original video frame is transmitted from the server, the huge amount of video image data will cause an unacceptable pressure on network transmission, so the MPEG video compression coding technology is used, various algorithms are adopted to reduce the data amount of each video frame, and the original video frame is lossy-converted into three frame frames, I frame, P frame and B frame, so as to improve the transmission rate of the video data.
The I frame is also called an intra-frame coding frame, is an important frame in inter-frame compression coding, and is also a coding frame of full-frame compression. When the video playing device decodes the I frame, the data of the I frame picture can be used to reconstruct a complete image without referring to other frame pictures. The P frame, also called an inter-frame predictive coding frame, compresses data of the frame according to a difference between the frame and an adjacent previous frame (I frame or P frame), that is, records a difference between a current frame picture and the previous frame (I frame or P frame). When the video playing device decodes the P frame, the image can be obtained only by referring to the frame picture cached by the video playing device before and superimposing the difference recorded by the P frame. In practical application, in the process of playing a video picture by a video playing device, if an I-frame picture is lost, the video playing device cannot analyze a following P-frame picture, so that a phenomenon of a video picture black screen occurs; if the P frame is lost, the video frame will have the phenomena of screen-splash, mosaic, etc. B-frames, also called bi-directional predictive coded frames, record the difference between the current frame and the previous and next frames. When the video playing device decodes the B frame, it needs to refer to not only the previous buffered picture, but also the following picture, and also to superimpose the difference defined by the B frame from the previous and following pictures to obtain the image. In the compression coding of three inter-frames of an I frame, a P frame and a B frame, the compression efficiency is the lowest in the I frame, the P frame is higher and the B frame is the highest. For example, the same video picture is lossy-converted into I-frame, P-frame, and B-frame, respectively, and of these three video pictures, the data amount of I-frame is largest, P-frame is smaller, and B-frame is smallest. In addition, in general, the video stream data received by the video playing device has the least number of I-frame pictures, more P-frames and the most B-frames, so that the compression efficiency of the video stream data is as high as possible, and the network transmission efficiency is improved as much as possible.
According to the characteristics of the I frame, the P frame and the B frame, it can be understood that the video playing device must analyze the I frame to play the video picture, and further continuously play the subsequent video picture, so the video playing device needs to determine the I frame picture in the received video stream data.
The I-frame identifying module 300 may be specifically configured to: obtaining video stream data, analyzing a header file of a video packet in the video stream data, and determining an I frame in the video stream data.
The TS video stream data is carried and transmitted by a plurality of TS packets meeting the TS stream format, and the structure of the TS packets has fixed-size bytes. The data content of the TS packet is determined by the PID number in the TS packet header file, and meanwhile, the PID number is also the unique identification mark in the TS packet. Therefore, the video playing device can identify the content of the TS packet carrying data by analyzing the PID number in the header file of the TS packet. In the practical application process, the frame data of the I frame, the P frame and the B frame are all composed of a plurality of TS packets, and generally, the video playing equipment can identify whether the frame data is the frame I picture or not by analyzing PID numbers of header files of 1-3 TS packets.
The filling module 200 is further configured to stop filling empty packets into the buffer of the video player after the I frame identification module 300 determines an I frame in the video stream data;
specifically, the filling module 200 may stop filling the buffer of the video player with the empty packet after the I-frame identifying module 300 identifies the first I-frame picture from the received video stream data.
The pushing module 400 is configured to push the I frame and subsequent video frame data to a buffer of the video player after the I frame identification module determines the I frame in the video stream data.
Specifically, the pushing module 400 may push the obtained first I frame picture and the subsequent video frame data to a buffer of the video player after the I frame identifying module 300 identifies the first I frame picture from the received video stream data.
Therefore, compared with the prior art, the invention fills the empty packet into the buffer area of the video player simultaneously in the process of obtaining the first I frame picture from the video stream data, so that the empty packet occupies the capacity of the buffer area to shorten the time for filling the buffer area of the video player, thereby realizing the rapid playing of the video picture by the video playing device.
The video playing device provided in the embodiment of the present invention may obtain a video playing instruction, fill an empty packet into a buffer area of a video player according to a preset filling rate, obtain video stream data in a process of filling the empty packet into the buffer area of the video player, analyze the video stream data, determine an I frame in the video stream data, after determining the I frame in the video stream data, stop filling the empty packet into the buffer area of the video player, and push the I frame and subsequent video frame data to the buffer area of the video player. The invention fills the empty packet into the buffer area of the video player and analyzes the received video stream data, so that the empty packet occupies the capacity of the buffer area to shorten the time for filling the buffer area of the video player, thereby realizing the rapid playing of the video pictures by the video playing equipment.
Optionally, the video playing device shown in fig. 4 may further include a playing module,
the playing module is configured to push the I frame and the subsequent video frame data to the buffer of the video player by the pushing module 400, so that the buffer of the video player is filled with the I frame and the subsequent video frame data, and then analyze the I frame and the subsequent video frame data to play a video.
Optionally, the video playing device shown in fig. 4 may further include a parameter setting module,
and the parameter setting module is used for setting the playing parameters of the video player.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A video data processing method, applied to a video playback device, the method comprising:
obtaining a video playing instruction;
filling an empty packet into a buffer area of a video player according to a preset filling rate, acquiring video stream data in the process of filling the empty packet into the buffer area of the video player, analyzing the video stream data, and determining an I frame in the video stream data;
and after the I frame in the video stream data is determined, stopping filling the empty packet into the buffer area of the video player, and pushing the I frame and the subsequent video frame data to the buffer area of the video player.
2. The method of claim 1, further comprising, after the video playing device pushes the I-frame and subsequent video frame data to a buffer of the video player:
and after the buffer area of the video player is filled, analyzing the I frame and the subsequent video frame data, and playing the video.
3. The method of claim 1, further comprising:
and setting the playing parameters of the video player.
4. The method of claim 1, wherein the filling the empty packet comprises:
and filling a transport stream TS data packet carrying invalid content, wherein the TS data packet conforms to a TS stream format.
5. The method of claim 1, wherein analyzing the video stream data to determine I frames in the video stream data comprises:
analyzing a header file of a video packet in the video stream data, and determining an I frame in the video stream data.
6. A video playback device, characterized in that the video playback device comprises: an instruction obtaining module, a filling module, an I frame identification module and a pushing module,
the instruction obtaining module is used for obtaining a video playing instruction;
the filling module is used for filling empty packets into the buffer area of the video player according to a preset filling rate;
the I frame identification module is used for acquiring video stream data in the process of filling empty packets into the buffer area of the video player by the filling module, analyzing the video stream data and determining an I frame in the video stream data;
the filling module is further configured to stop filling empty packets into the buffer of the video player after the I frame identification module determines an I frame in the video stream data;
the pushing module is configured to push the I frame and subsequent video frame data to a buffer of the video player after the I frame identification module determines the I frame in the video stream data.
7. The video playback device of claim 6, further comprising a playback module,
the playing module is used for pushing the I frame and the subsequent video frame data to the buffer area of the video player by the pushing module so that the buffer area of the video player is filled with the I frame and the subsequent video frame data, and then analyzing the I frame and the subsequent video frame data to play the video.
8. The video playback device of claim 6, further comprising a parameter setting module,
and the parameter setting module is used for setting the playing parameters of the video player.
9. The video playback device of claim 6, wherein the filling module is specifically configured to: and filling a transport stream TS data packet carrying invalid content into a buffer area of a video player according to a preset filling rate, and stopping filling the TS data packet into the buffer area of the video player after the I frame identification module determines an I frame in the video stream data, wherein the TS data packet conforms to a TS stream format.
10. The video playback device of claim 6, wherein the I-frame identification module is specifically configured to: obtaining video stream data, analyzing a header file of a video packet in the video stream data, and determining an I frame in the video stream data.
CN201811361408.6A 2018-11-15 2018-11-15 Video data processing method and video playing device Active CN111193956B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811361408.6A CN111193956B (en) 2018-11-15 2018-11-15 Video data processing method and video playing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811361408.6A CN111193956B (en) 2018-11-15 2018-11-15 Video data processing method and video playing device

Publications (2)

Publication Number Publication Date
CN111193956A true CN111193956A (en) 2020-05-22
CN111193956B CN111193956B (en) 2023-04-18

Family

ID=70708972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811361408.6A Active CN111193956B (en) 2018-11-15 2018-11-15 Video data processing method and video playing device

Country Status (1)

Country Link
CN (1) CN111193956B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117119223A (en) * 2023-10-23 2023-11-24 天津华来科技股份有限公司 Video stream playing control method and system based on multichannel transmission

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060104345A1 (en) * 2004-11-12 2006-05-18 Pelco Method and apparatus for controlling a video surveillance display
CN101212671A (en) * 2007-12-21 2008-07-02 上海广电(集团)有限公司中央研究院 Low-delay real-time transport stream multiplexing method
CN102202210A (en) * 2010-03-23 2011-09-28 上海威乾视频技术有限公司 Method for mobile phone to play real-time monitoring video and mobile phone to play real-time monitoring video
CN104113778A (en) * 2014-08-01 2014-10-22 广州金山网络科技有限公司 Video stream decoding method and device
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060104345A1 (en) * 2004-11-12 2006-05-18 Pelco Method and apparatus for controlling a video surveillance display
CN101212671A (en) * 2007-12-21 2008-07-02 上海广电(集团)有限公司中央研究院 Low-delay real-time transport stream multiplexing method
CN102202210A (en) * 2010-03-23 2011-09-28 上海威乾视频技术有限公司 Method for mobile phone to play real-time monitoring video and mobile phone to play real-time monitoring video
CN104113778A (en) * 2014-08-01 2014-10-22 广州金山网络科技有限公司 Video stream decoding method and device
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117119223A (en) * 2023-10-23 2023-11-24 天津华来科技股份有限公司 Video stream playing control method and system based on multichannel transmission
CN117119223B (en) * 2023-10-23 2023-12-26 天津华来科技股份有限公司 Video stream playing control method and system based on multichannel transmission

Also Published As

Publication number Publication date
CN111193956B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN110248204B (en) Processing method, device, equipment and storage medium for live broadcast cache
US9843844B2 (en) Network streaming of media data
US8259812B2 (en) PVR-support video decoding system
CN105187850B (en) The method and apparatus that the information of encoded video data is provided and receives encoded video data
US8254449B2 (en) Video traffic bandwidth prediction
CN107566918B (en) A kind of low delay under video distribution scene takes the neutrel extraction of root
WO2021147448A1 (en) Video data processing method and apparatus, and storage medium
US10735744B2 (en) Adaptive bitrate streaming techniques
CA2599803A1 (en) System and method for generating trick mode streams
EP2635025B1 (en) Video processing method and video appliance implementing the method
EP2615790A1 (en) Method, system and devices for improved adaptive streaming of media content
US7840119B2 (en) Methods and apparatus for processing progressive I-slice refreshed MPEG data streams to enable trick play mode features on a display device
CN114189711A (en) Video processing method and device, electronic equipment and storage medium
CN111193956B (en) Video data processing method and video playing device
US20240080487A1 (en) Method, apparatus for processing media data, computer device and storage medium
CN103918258A (en) Reducing amount of data in video encoding
US11870831B2 (en) Method and apparatus for playing multimedia streaming data
CN114189686A (en) Video encoding method, apparatus, device, and computer-readable storage medium
US7423652B2 (en) Apparatus and method for digital video decoding
CN110139144A (en) One kind is based on TV sharing method in smart home
CN115695918B (en) Multi-camera broadcast guide control method and device, readable storage medium and terminal equipment
CN114615549B (en) Streaming media seek method, client, storage medium and mobile device
WO2023078048A1 (en) Video bitstream encapsulation method and apparatus, video bitstream decoding method and apparatus, and video bitstream access method and apparatus
US9219930B1 (en) Method and system for timing media stream modifications
CN117082249A (en) Video encoding method, video decoding method, encoder, decoder, and medium

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