WO2024001777A1 - Video decoding method, virtual set-top box, physical-end set-top box and medium - Google Patents

Video decoding method, virtual set-top box, physical-end set-top box and medium Download PDF

Info

Publication number
WO2024001777A1
WO2024001777A1 PCT/CN2023/100133 CN2023100133W WO2024001777A1 WO 2024001777 A1 WO2024001777 A1 WO 2024001777A1 CN 2023100133 W CN2023100133 W CN 2023100133W WO 2024001777 A1 WO2024001777 A1 WO 2024001777A1
Authority
WO
WIPO (PCT)
Prior art keywords
top box
decoding
video
pts
decoded
Prior art date
Application number
PCT/CN2023/100133
Other languages
French (fr)
Chinese (zh)
Inventor
杨洋
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2024001777A1 publication Critical patent/WO2024001777A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • 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/41Structure of client; Structure of client peripherals
    • 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
    • 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, rendering scenes according to MPEG-4 scene graphs

Definitions

  • the present disclosure relates to, but is not limited to, the technical fields of multimedia terminals and cloud computing.
  • the cloud set-top box receives the video stream, it forwards the video stream to the physical terminal, and the physical terminal decodes and renders the video stream.
  • the cloud set-top box receives the video stream, it forwards the video stream to the physical terminal, and the physical terminal decodes and renders the video stream.
  • the present disclosure provides a video decoding method, a cloud set-top box, a physical set-top box, and a computer-readable medium.
  • a video decoding method for use in a cloud set-top box.
  • the video decoding method includes: continuously sending each video frame to be decoded to a physical set-top box in the form of a video stream; Continuously add the display timestamp PTS values of each video frame to be decoded in the code stream to the PTS queue in order from small to large; receive the decoding feedback sent by the physical end set-top box; compare the received decoding feedback with the current PTS Compare the smallest PTS value in the queue; determine the physical terminal based on the comparison result Whether the set-top box decodes normally; if the physical set-top box decodes normally, delete the smallest PTS value in the current PTS queue.
  • a video decoding method for use in a physical set-top box.
  • the video decoding method includes: receiving a video code stream; and according to the PTS value of each video frame to be decoded in the video code stream.
  • the video frames to be decoded are decoded in sequence and corresponding decoding feedback is generated; and the decoding feedback is sent to the cloud set-top box according to the decoding order.
  • a cloud set-top box includes: one or more first processors; a first memory on which one or more first programs are stored. When a or multiple first programs are executed by one or more first processors, so that the one or more first processors implement the video decoding method provided by the first aspect of the present disclosure; one or more first I/O (Input/output) interface, connected between the first processor and the first memory, configured to implement information interaction between the first processor and the first memory.
  • first I/O Input/output
  • a physical set-top box includes: one or more second processors; a second memory on which one or more second programs are stored. When a or multiple second programs are executed by one or more second processors, so that the one or more second processors implement the video decoding method provided by the second aspect of the present disclosure; one or more second I/O interfaces , connected between the second processor and the second memory, and configured to implement information interaction between the second processor and the second memory.
  • a computer-readable medium is provided.
  • An executable program is stored on the computer-readable medium.
  • the processor is caused to execute the present disclosure.
  • the video decoding method provided.
  • Figure 1 shows a cloud decoding framework
  • Figure 2 is a flow chart of an implementation of the video decoding method provided by the present disclosure
  • Figure 3 is a flow chart of another implementation of the video decoding method provided by the present disclosure.
  • Figure 4 is a flow chart of yet another implementation of the video decoding method provided by the present disclosure.
  • Figure 5 is a flow chart of yet another implementation of the video decoding method provided by the present disclosure.
  • FIG. 6 is a flow chart of an implementation of step S250;
  • Figure 7 is a schematic diagram of an implementation of the cloud decoding framework provided by the present disclosure.
  • Figure 8 is a signaling diagram of the video decoding method provided by the present disclosure, in which the physical set-top box decodes successfully;
  • Figure 9 is a signaling diagram of the video decoding method provided by the present disclosure, in which the physical end set-top box fails to decode.
  • Figure 1 shows a cloud decoding framework.
  • the cloud set-top box includes a cloud player and a cloud codec component MediaCodec. After the player intercepts the code stream, it sends the frames to be decoded to the cloud MediaCodec, and the cloud MediaCodec sends the frames to be decoded to the physical set-top box.
  • decoding each video frame includes the following steps: sending the video frame to be decoded to the physical set-top box; after decoding, the physical set-top box reports the decoding success and the display timestamp (PTS, Presentation Time Stamp) value of the successfully decoded video frame. ;
  • the cloud set-top box sends rendering instructions to the physical set-top box.
  • the above decoding process will involve three network data interactions.
  • a network delay for example, 30ms
  • the network transmission time alone takes 90ms, which results in only 11 video frames being decoded per second. That said, the video decoding rate is relatively slow.
  • a video decoding method for use in a cloud set-top box. As shown in Figure 2, the video decoding method includes steps S110 to S160.
  • step S110 each video frame to be decoded is continuously sent to the physical set-top box in the form of a video code stream.
  • step S120 the presentation time stamp (PTS) values of each video frame to be decoded in the code stream are continuously added to the PTS queue in ascending order.
  • PTS presentation time stamp
  • step S130 decoding feedback sent by the physical end set-top box is received.
  • step S140 the received decoding feedback is compared with the smallest PTS value in the current PTS queue.
  • step S150 it is determined according to the comparison result whether the physical set-top box decodes normally.
  • step S160 if the physical set-top box decodes normally, delete the smallest PTS value in the current PTS queue.
  • the cloud set-top box After the cloud set-top box intercepts the video stream, it converts each to-be-decoded Video frames are continuously sent to the physical set-top box, which improves the efficiency of sending frames to be decoded.
  • step S120 the PTS value of the video frame to be decoded is added to the PTS queue.
  • the minimum PTS value in the PTS queue is deleted.
  • PTS values in the PTS queue established by the cloud set-top box correspond to multiple video frames.
  • the physical end set-top box After each video frame to be decoded is sent to the physical end set-top box in the form of a code stream, the physical end set-top box also decodes each received frame to be decoded in order from small to large PTS values. Every time the physical set-top box correctly decodes a video frame to be decoded, the one with the smallest PTS value in the PTS queue is deleted. In other words, the PTS queue is a dynamic queue, and new PTS values are constantly being added. As the physical set-top box continues to correctly decode the video frames to be decoded, the PTS values in the PTS queue are gradually deleted.
  • steps S120 and S160 are equivalent to simulating the frame decoding rate in the physical set-top box.
  • the physical set-top box does not need to interact with the cloud set-top box after receiving the video frame to be decoded, and the physical set-top box only needs to interact with the cloud set-top box once after decoding a video frame. This not only ensures correct video decoding, but also reduces the impact of network delay on video decoding, and improves the efficiency of video decoding by the physical set-top box.
  • sequence number of each step does not represent the execution order of each step. In other words, it is not necessary to add the PTS value of each frame to be decoded to the PTS queue after all the frames to be decoded are sent to the physical set-top box.
  • step S110 and step S120 are performed simultaneously. That is to say, every time a frame to be decoded is sent to the physical end set-top box, the PTS value of the frame to be decoded is added to the PTS queue.
  • steps S110 and S120 are also performed until all code streams intercepted by the cloud set-top box are sent to the physical set-top box.
  • steps S130 to S160 are performed sequentially. Each time a decoding feedback is received (that is, each time step S130 is executed), steps S140 to S160 are executed.
  • the rate at which PTS values are added to the PTS queue there is no special limitation on the rate at which PTS values are added to the PTS queue.
  • the rate at which the PTS value is added to the PTS queue may be the same as the rate at which the cloud set-top box sends the code stream to the physical set-top box. That is to say, while sending the video frame to be decoded to the physical end set-top box, the PTS value of the video frame to be decoded can be added to the PTS queue.
  • the present disclosure is not limited to this, and the rate at which the PTS value is added to the PTS queue may also be different from the code stream rate.
  • the rate at which the PTS value is added to the PTS queue can be adjusted based on the decoding feedback of the physical set-top box.
  • the specific type of decoding feedback is not particularly limited.
  • the decoding feedback may include the PTS value of the decoding completed frame. That is to say, every time the physical set-top box completes decoding of a video frame, it sends the PTS value of the video frame that has just been decoded to the cloud set-top box. As mentioned above, the physical set-top box decodes each video frame in the order of PTS from small to large. Unless nothing unexpected happens, the PTS value of each decoded video frame is the one with the smallest PTS value among all undecoded video frames of the current physical set-top box. The situation in the cloud set-top box is similar.
  • the smallest PTS value in the PTS queue corresponds to the video frame that is about to be decoded or is being decoded in the physical set-top box.
  • step S140 of comparing the received decoding feedback with the smallest PTS value in the PTS queue the smallest PTS value in the PTS queue can be used to subtract the PTS value of the received decoding completion frame, to obtain The difference is the comparison result. If the comparison result is less than the predetermined value, it means that the video decoding speed of the physical set-top box simulated in the cloud set-top box is not much different from the actual video decoding speed of the physical set-top box. In this case, it can be determined that the decoding of the physical set-top box is normal.
  • the video decoding method may further include: if the comparison result is not less than the predetermined value, generating information indicating that frameless decoding is completed. It should be pointed out that when frame decoding is not completed, it will not stop sending the code stream to the physical set-top box, nor will it stop adding the corresponding PTS value to the PTS queue. Only adding the PTS value to the PTS queue without deleting the PTS value is equivalent to slowing down
  • the video decoding speed of the physical set-top box is simulated in the cloud set-top box.
  • the predetermined value is not particularly limited. As an optional implementation, the predetermined value may be the time required for playing 3 to 5 video frames.
  • the decoding may fail due to various factors (for example, physical set-top box hardware problems, data loss during stream transmission).
  • a decoding failure flag will be generated and sent to the cloud set-top box as "decoding feedback”.
  • the video decoding method also includes: In step S170, decoding exception information is generated.
  • step S170 after the decoding exception information is generated, relevant technical personnel can process the decoding exception information.
  • the abnormality of the physical end set-top box can also be determined in the following manner: after receiving the decoding feedback, query the PTS queue to determine the smallest PTS value in the PTS queue; when the PTS queue is empty When, decoding exception information is generated.
  • the video decoding method also includes step S180.
  • step S180 if the physical set-top box decodes normally, a rendering instruction for the decoded video frame is sent to the physical set-top box.
  • the physical set-top box After receiving the rendering instruction, the physical set-top box can render the corresponding decoded video frame.
  • a video decoding method for use in a physical set-top box. As shown in Figure 4, the video decoding method includes steps S210 to S230.
  • step S210 the video code stream is received.
  • step S220 each video frame to be decoded is sequentially decoded in the order of the PTS value of each video frame to be decoded in the video code stream, and corresponding decoding feedback is generated.
  • step S230 the decoding feedback is sent to the cloudification machine according to the decoding order. top box.
  • the physical set-top box cooperates with the cloud set-top box. Therefore, the video code stream received in step S210 is the video code stream sent in step S110 in the video decoding method provided by the first aspect of the present disclosure.
  • the physical set-top box decodes each frame to be decoded in the received code stream, it only needs to interact with the cloud set-top box once by generating decoding feedback, thus reducing the impact of network delay on the decoding process.
  • each time a video frame is decoded a decoding feedback is generated.
  • the video frame to be decoded is added to the decoding queue.
  • the video frames to be decoded are arranged in ascending order according to their respective PTS values.
  • decoding is also performed in ascending order of PTS values.
  • the requirements before each step are only for convenience of description and do not represent the order of execution.
  • step S210, step S220 and step S230 can also be performed simultaneously.
  • the video frame to be decoded is decoded.
  • the generated decoding feedback is sent to the cloud set-top box.
  • the decoding feedback includes the PTS value of the decoded video frame.
  • the physical set-top box decodes a video frame normally, it feeds back the PTS value of the video frame to the cloud set-top box, so that the cloud set-top box can perform step S140.
  • the decoding feedback includes a decoding failure identification of the decoding abnormal frame.
  • a decoding failure identifier for the abnormal frame in which decoding fails is generated.
  • the physical set-top box needs to render the decoded video frames.
  • rendering instructions are also issued by the cloud set-top box.
  • the video decoding method also includes steps S240 and S250.
  • step S240 a rendering instruction is received.
  • step S250 the corresponding decoded frame is rendered according to the rendering instruction. dye.
  • the PTS value can be carried in the rendering instruction. After the physical set-top box determines the PTS value in the rendering instruction, it renders the decoded frame corresponding to the PTS value.
  • step S250 may include steps S251 to S254.
  • step S251 determine the PTS value of the decoded video frame corresponding to the rendering instruction.
  • step S252 the PTS value of the decoded video frame is compared with the PTS value corresponding to the rendering instruction.
  • step S253 if the PTS value of the decoded video frame does not exceed the PTS value corresponding to the rendering instruction, the decoded video frame is rendered after waiting for a predetermined time.
  • step S254 if the PTS value of the decoded video frame is greater than the PTS value corresponding to the rendering instruction, the frame to be rendered is rendered.
  • the PTS value of the video frame that has just been decoded does not exceed the PTS value corresponding to the rendering instruction, it means that the decoding speed of the physical set-top box is too fast and rendering cannot be performed immediately. Otherwise, the image rendering frame rate will be too high. You need to wait for a predetermined time before rendering the decoded frame to achieve better video display effects.
  • a cloud set-top box includes: one or more first processors; a first memory on which one or more first programs are stored. When a or multiple first programs are executed by one or more first processors, so that the one or more first processors implement the video decoding method provided by the first aspect of the present disclosure; one or more first I/O interfaces , connected between the first processor and the first memory, and configured to implement information interaction between the first processor and the first memory.
  • the first processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.
  • the first memory is a device with data storage capabilities, including but not limited to random access memory. (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH);
  • the first I/O interface read-write interface
  • the first memory can realize information interaction between the first processor and the first memory, which includes but is not limited to a data bus (Bus), etc.
  • a physical set-top box includes: one or more second processors; a second memory on which one or more second programs are stored. When a or multiple second programs are executed by one or more second processors, so that the one or more second processors implement the video decoding method provided by the second aspect of the present disclosure; one or more second I/O interfaces , connected between the second processor and the second memory, and configured to implement information interaction between the second processor and the second memory.
  • the second processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.
  • the second memory is a device with data storage capabilities, including but not limited to random access memory.
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • FLASH flash memory
  • the second I/O interface read-write interface
  • a computer-readable medium is provided.
  • An executable program is stored on the computer-readable medium.
  • the processor is caused to execute the present disclosure.
  • the video decoding method provided.
  • a cloud set-top box As a sixth aspect of the present disclosure, a cloud set-top box is provided. As shown in Figure 7, the cloud set-top box includes a cloud player, a cloud Mediacodec, a PTS management component and a physical side status recording component.
  • the cloud player is configured to intercept the video stream and send the intercepted video stream to the cloud Mediacodec in the form of a code stream.
  • the cloud Mediacodec is configured to save the PTS value of each video frame to be decoded, and continuously send each video frame to be decoded to the physical set-top box in the form of a video stream.
  • the PTS management component is configured to continuously add the PTS values of each video frame to be decoded to the PTS queue at the first rate in order from small to large.
  • the physical side status recording component is configured to receive decoding feedback sent by the physical side set-top box.
  • the PTS management component is also configured to compare the decoding feedback with the smallest PTS value in the current PTS queue to determine whether the physical set-top box decodes normally, and delete the smallest PTS value in the current PTS queue when the physical set-top box decodes normally.
  • the PTS management component is configured to adjust the rate at which PTS values are added to the PTS queue.
  • the cloud player is also used to send rendering requests to the cloud Mediacodec.
  • Cloud Mediacodec is also used to send the PTS value of the video frame corresponding to the rendering request.
  • a physical set-top box As a seventh aspect of the present disclosure, a physical set-top box is provided. As shown in Figure 7, the physical set-top box includes a decoding component and a rendering identifier management component.
  • the decoding component is configured to: receive a video code stream; decode each video frame to be decoded in sequence according to the PTS value of each video frame to be decoded in the video code stream, and generate corresponding decoding feedback; decode according to the In sequence, the decoding feedback is sent to the cloud set-top box.
  • the rendering identification management component is configured to: receive a rendering instruction; and render the corresponding decoding completed frame according to the rendering instruction.
  • the video decoding method provided by the present disclosure will be introduced below with reference to Figures 8 and 9. Shown in Figure 8 is the signaling diagram during normal decoding of the physical end set-top box. As shown in the figure, in this case, the video decoding method includes S101 to S117.
  • the cloud video application opens and creates a cloud application player to play the video source.
  • the cloud application player (cloud player) creates a cloud MediaCodec decoder.
  • Cloud MediaCodec creates a decoder on the physical set-top box and initializes the decoder.
  • the cloud application player sends a code stream to the cloud MediaCodec for decoding by the physical set-top box.
  • the cloud MediaCodec records the PTS value of the video frame to the PTS management component.
  • the cloud MediaCodec pushes the video frame to the physical set-top box.
  • the physical end set-top box adds the video frame to the decoding queue and performs decoding.
  • the cloud application player queries the cloud MediaCodec whether data decoding is completed.
  • the cloud MediaCodec queries the PTS management component whether there is a PTS value.
  • the cloud application player sends a request to render the video frame.
  • the cloud MediaCodec sends the PTS value of the frame to be rendered to the rendering identification management component of the physical set-top box.
  • the rendering identification management component records the current cloud rendering progress.
  • each decoder component of the physical set-top box queries the rendering identification management component for the PTS value to be rendered sent by the cloud. If the PTS value of the decoded frame is less than or equal to the PTS value of the frame to be rendered sent by the cloud, value, immediately render the decoded video frame; otherwise, it means that the physical set-top box decodes too fast and cannot render the decoded video frame immediately, otherwise the image rendering frame rate is too high; until the rendering identification management component receives the cloud When sending the PTS value of the rendering frame, compare the PTS value of the frame that has just been decoded by the physical set-top box with the PTS value of the frame to be rendered sent by the cloud.
  • Figure 9 shows the signaling diagram when the physical set-top box decodes abnormally.
  • the video decoding method includes S201 to S211.
  • cloud set-top boxes and physical set-top boxes have created cloud decoding channels, And initialize the decoder on the physical side.
  • the cloud application player sends the code stream to the cloud MediaCodec for decoding.
  • the cloud MediaCodec records the PTS value of the frame to the PTS management component.
  • the cloud MediaCodec pushes the frame to the physical set-top box.
  • the physical end adds the frame to the decoding queue and performs decoding, but the decoding fails.
  • the cloud application player queries the cloud MediaCodec whether data decoding is completed.
  • the cloud MediaCodec queries the PTS management component whether a PTS value is stored.
  • the PTS management component stores the PTS value, and then queries the physical side status recording component to decode the PTS on the physical side. As a result, it is found that the physical side decoding failed.
  • the cloud application player notifies the cloud video application, and the cloud application displays a playback failure.
  • Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage medium includes any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data. Implemented volatile and non-volatile, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store desired information and that can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
  • Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a general illustrative sense only and not for purpose of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone, or may be used in conjunction with other embodiments, unless expressly stated otherwise. Features and/or components are used in combination. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Provided in the present disclosure is a video decoding method, which is used for a virtual set-top box. The video decoding method comprises: continuously sending, by means of a video code stream and to a physical-end set-top box, video frames to be decoded; in ascending order, continuously adding, to a presentation time stamp (PTS) queue, PTS values of said video frames in the code stream; receiving decoding feedback which is sent by the physical-end set-top box; comparing the received decoding feedback with the smallest PTS value in the current PTS queue; according to a comparison result, determining whether the physical-end set-top box is decoded normally; and if the physical-end set-top box is decoded normally, deleting the smallest PTS value from the current PTS queue. Further provided in the present disclosure are a video decoding method for a physical-end set-top box, and a virtual set-top box, a physical-end set-top box and a computer-readable storage medium.

Description

视频解码方法、云化机顶盒、物理端机顶盒、介质Video decoding method, cloud set-top box, physical set-top box, media
相关申请的交叉引用Cross-references to related applications
本申请要求2022年6月30日提交给中国专利局的第202210763777.8号专利申请的优先权,其全部内容通过引用合并于此。This application claims priority from Patent Application No. 202210763777.8 submitted to the China Patent Office on June 30, 2022, the entire content of which is incorporated herein by reference.
技术领域Technical field
本公开涉及但不限于多媒体终端和云计算技术领域。The present disclosure relates to, but is not limited to, the technical fields of multimedia terminals and cloud computing.
背景技术Background technique
随着大视频业务日益发展成熟,用户对业务体验提出了更高的要求,希望能够拥有更好的UI(User Interface)体验,享受更丰富的增值业务;同时云计算与虚拟化技术的高速发展,因此基于云计算与虚拟化技术的云化机顶盒就运用而生。As the big video business becomes increasingly mature, users have higher requirements for business experience, hoping to have a better UI (User Interface) experience and enjoy richer value-added services; at the same time, cloud computing and virtualization technology are developing rapidly , so the cloud set-top box based on cloud computing and virtualization technology was born.
对于不支持硬件加速的虚拟机,云端应用播放视频时的解码、渲染只能使用CPU(中央处理单元)处理,导致虚拟机资源占用高。目前,通常采用桌面流和视频流分离的方式来解决上述问题。For virtual machines that do not support hardware acceleration, the decoding and rendering of cloud applications when playing videos can only be processed by the CPU (central processing unit), resulting in high virtual machine resource usage. Currently, the above problems are usually solved by separating desktop streams and video streams.
例如,云化机顶盒接收到视频流后,将视频流转发给物理终端,由物理终端对视频流进行解码和渲染。但是,该方案中存在解码效率低的问题。For example, after the cloud set-top box receives the video stream, it forwards the video stream to the physical terminal, and the physical terminal decodes and renders the video stream. However, there is a problem of low decoding efficiency in this scheme.
发明内容Contents of the invention
本公开提供一种视频解码方法、一种云化机顶盒、一种物理端机顶盒、一种计算机可读介质。The present disclosure provides a video decoding method, a cloud set-top box, a physical set-top box, and a computer-readable medium.
作为本公开的第一个方面,提供一种视频解码方法,用于云化机顶盒,所述视频解码方法包括:将各个待解码的视频帧以视频码流的方式连续地发送给物理端机顶盒;按照从小到大的顺序将码流中各个待解码的视频帧的显示时间戳PTS值连续地加入PTS队列;接收所述物理端机顶盒发送的解码反馈;将接收到的所述解码反馈与当前PTS队列中最小的PTS值进行比较;根据比较结果判断所述物理端 机顶盒是否正常解码;若所述物理端机顶盒正常解码,删除当前PTS队列中最小的PTS值。As a first aspect of the present disclosure, a video decoding method is provided for use in a cloud set-top box. The video decoding method includes: continuously sending each video frame to be decoded to a physical set-top box in the form of a video stream; Continuously add the display timestamp PTS values of each video frame to be decoded in the code stream to the PTS queue in order from small to large; receive the decoding feedback sent by the physical end set-top box; compare the received decoding feedback with the current PTS Compare the smallest PTS value in the queue; determine the physical terminal based on the comparison result Whether the set-top box decodes normally; if the physical set-top box decodes normally, delete the smallest PTS value in the current PTS queue.
作为本公开的第二个方面,提供一种视频解码方法,用于物理端机顶盒,所述视频解码方法包括:接收视频码流;按照所述视频码流中各待解码的视频帧的PTS值的顺序依次对各所述待解码的视频帧进行解码,并生成相应的解码反馈;按照解码顺序,将所述解码反馈发送至云化机顶盒。As a second aspect of the present disclosure, a video decoding method is provided for use in a physical set-top box. The video decoding method includes: receiving a video code stream; and according to the PTS value of each video frame to be decoded in the video code stream. The video frames to be decoded are decoded in sequence and corresponding decoding feedback is generated; and the decoding feedback is sent to the cloud set-top box according to the decoding order.
作为本公开的第三个方面,提供一种云化机顶盒,所述云化机顶盒包括:一个或多个第一处理器;第一存储器,其上存储有一个或多个第一程序,当一个或多个第一程序被一个或多个第一处理器执行,使得一个或多个第一处理器实现本公开第一个方面所提供的视频解码方法;一个或多个第一I/O(输入/输出)接口,连接在第一处理器与第一存储器之间,配置为实现第一处理器与第一存储器的信息交互。As a third aspect of the present disclosure, a cloud set-top box is provided. The cloud set-top box includes: one or more first processors; a first memory on which one or more first programs are stored. When a or multiple first programs are executed by one or more first processors, so that the one or more first processors implement the video decoding method provided by the first aspect of the present disclosure; one or more first I/O ( Input/output) interface, connected between the first processor and the first memory, configured to implement information interaction between the first processor and the first memory.
作为本公开的第四个方面,提供一种物理端机顶盒,所述物理端机顶盒包括:一个或多个第二处理器;第二存储器,其上存储有一个或多个第二程序,当一个或多个第二程序被一个或多个第二处理器执行,使得一个或多个第二处理器实现本公开第二个方面所提供的视频解码方法;一个或多个第二I/O接口,连接在第二处理器与第二存储器之间,配置为实现第二处理器与第二存储器的信息交互。As a fourth aspect of the present disclosure, a physical set-top box is provided. The physical set-top box includes: one or more second processors; a second memory on which one or more second programs are stored. When a or multiple second programs are executed by one or more second processors, so that the one or more second processors implement the video decoding method provided by the second aspect of the present disclosure; one or more second I/O interfaces , connected between the second processor and the second memory, and configured to implement information interaction between the second processor and the second memory.
作为本公开的第五个方面,提供一种计算机可读介质,所述计算机可读介质上存储有可执行程序,当所述可执行程度被处理器执行时,使得所述处理器执行本公开所提供的视频解码方法。As a fifth aspect of the present disclosure, a computer-readable medium is provided. An executable program is stored on the computer-readable medium. When the executable program is executed by a processor, the processor is caused to execute the present disclosure. The video decoding method provided.
附图说明Description of drawings
图1示出了一种云化解码框架;Figure 1 shows a cloud decoding framework;
图2是本公开所提供的视频解码方法的一种实施方式的流程图;Figure 2 is a flow chart of an implementation of the video decoding method provided by the present disclosure;
图3是本公开所提供的视频解码方法的另一种实施方式的流程图;Figure 3 is a flow chart of another implementation of the video decoding method provided by the present disclosure;
图4是本公开所提供的视频解码方法的还一种实施方式的流程图; Figure 4 is a flow chart of yet another implementation of the video decoding method provided by the present disclosure;
图5是本公开所提供的视频解码方法的再一种实施方式的流程图;Figure 5 is a flow chart of yet another implementation of the video decoding method provided by the present disclosure;
图6是步骤S250的一种实施方式的流程图;Figure 6 is a flow chart of an implementation of step S250;
图7是本公开所提供的云化解码框架的一种实施方式的示意图;Figure 7 is a schematic diagram of an implementation of the cloud decoding framework provided by the present disclosure;
图8是本公开所提供的视频解码方法的信令图,其中,物理端机顶盒解码成功;Figure 8 is a signaling diagram of the video decoding method provided by the present disclosure, in which the physical set-top box decodes successfully;
图9是本公开所提供的视频解码方法的信令图,其中,物理端机顶盒解码失败。Figure 9 is a signaling diagram of the video decoding method provided by the present disclosure, in which the physical end set-top box fails to decode.
具体实施方式Detailed ways
为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开提供的视频解码方法、云化机顶盒、物理端机顶盒、计算机可读介质进行详细描述。In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the video decoding method, cloud set-top box, physical set-top box, and computer-readable medium provided by the present disclosure will be described in detail below with reference to the accompanying drawings.
在下文中将参考附图更充分地描述示例实施方式,但是所述示例实施方式可以以不同形式来体现且不应当被解释为限于本文阐述的实施方式。反之,提供这些实施方式的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。Example embodiments will be described more fully below with reference to the accompanying drawings, which may, however, be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully allow those skilled in the art to fully understand the scope of the disclosure.
在不冲突的情况下,本公开各实施方式及实施方式中的各特征可相互组合。The various embodiments and features in the embodiments of the present disclosure may be combined with each other without conflict.
如本文所使用的,术语“和/或”包括一个或多个相关列举条目的任何和所有组合。As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
本文所使用的术语仅用于描述特定实施方式,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加一个或多个其它特征、整体、步骤、操作、元件、组件和/或其群组。The terminology used herein is used to describe particular embodiments only and is not intended to limit the disclosure. As used herein, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and/or "made of" are used in this specification, the presence of said features, integers, steps, operations, elements and/or components is specified but does not exclude the presence or Add one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技 术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be construed as having the same meaning as in the relevant technical meaning consistent with the meaning within the art and context of the present disclosure, and is not to be construed as having an idealized or overly formal meaning unless expressly so limited herein.
图1示出了一种云化解码框架。如图1所示,云化机顶盒包括云端播放器、云端编解码组件MediaCodec,播放器截获码流后,将待解码帧发送给云端MediaCodec,云端MediaCodec将待解码帧发送给物理机顶盒。这样,对每一个视频帧进行解码都包括以下步骤:向物理机顶盒发送待解码视频帧;物理机顶盒解码后上报解码成功、以及该解码成功的视频帧的显示时间戳(PTS,Presentation Time Stamp)值;云化机顶盒向物理机顶盒发送渲染指令。Figure 1 shows a cloud decoding framework. As shown in Figure 1, the cloud set-top box includes a cloud player and a cloud codec component MediaCodec. After the player intercepts the code stream, it sends the frames to be decoded to the cloud MediaCodec, and the cloud MediaCodec sends the frames to be decoded to the physical set-top box. In this way, decoding each video frame includes the following steps: sending the video frame to be decoded to the physical set-top box; after decoding, the physical set-top box reports the decoding success and the display timestamp (PTS, Presentation Time Stamp) value of the successfully decoded video frame. ;The cloud set-top box sends rendering instructions to the physical set-top box.
由于云化机顶盒、以及物理机顶盒之间的接口为同步结构,因此,上述解码过程会涉及三个网络数据交互。当存在网络延时的情况下(例如,30ms),对一帧视频帧进行解码时,仅网络传输时间就需要90ms,这导致了每秒仅能解码11帧视频帧。也就是说,视频解码速率相对较慢。Since the interface between the cloud set-top box and the physical set-top box has a synchronous structure, the above decoding process will involve three network data interactions. When there is a network delay (for example, 30ms), when decoding one video frame, the network transmission time alone takes 90ms, which results in only 11 video frames being decoded per second. That said, the video decoding rate is relatively slow.
有鉴于此,作为本公开的第一个方面,提供一种视频解码方法,用于云化机顶盒,如图2所示,所述视频解码方法包括步骤S110至S160。In view of this, as a first aspect of the present disclosure, a video decoding method is provided for use in a cloud set-top box. As shown in Figure 2, the video decoding method includes steps S110 to S160.
在步骤S110中,将各个待解码的视频帧以视频码流的方式连续地发送给物理端机顶盒。In step S110, each video frame to be decoded is continuously sent to the physical set-top box in the form of a video code stream.
在步骤S120中,按照从小到大的顺序将码流中各个待解码的视频帧的显示时间戳(PTS,Presentation Time Stamp)值连续地加入PTS队列。In step S120, the presentation time stamp (PTS) values of each video frame to be decoded in the code stream are continuously added to the PTS queue in ascending order.
在步骤S130中,接收所述物理端机顶盒发送的解码反馈。In step S130, decoding feedback sent by the physical end set-top box is received.
在步骤S140中,将接收到的所述解码反馈与当前PTS队列中最小的PTS值进行比较。In step S140, the received decoding feedback is compared with the smallest PTS value in the current PTS queue.
在步骤S150中,根据比较结果判断所述物理端机顶盒是否正常解码。In step S150, it is determined according to the comparison result whether the physical set-top box decodes normally.
在步骤S160中,若所述物理端机顶盒正常解码,删除当前PTS队列中最小的PTS值。In step S160, if the physical set-top box decodes normally, delete the smallest PTS value in the current PTS queue.
云化机顶盒截获视频流后,以视频码流的方式将各个待解码的 视频帧连续地发给物理端机顶盒,提高了待解码帧的发送效率。After the cloud set-top box intercepts the video stream, it converts each to-be-decoded Video frames are continuously sent to the physical set-top box, which improves the efficiency of sending frames to be decoded.
在步骤S120中,将待解码的视频帧的PTS值加入PTS队列,当物理端机顶盒正确解码后,将PTS队列中的最小PTS值删除。In step S120, the PTS value of the video frame to be decoded is added to the PTS queue. When the physical set-top box decodes it correctly, the minimum PTS value in the PTS queue is deleted.
在云化机顶盒建立的PTS队列中的多个PTS值对应多个视频帧。将各个待解码的视频帧以码流的方式发送给物理端机顶盒后,物理端机顶盒也是按照PTS值的从小到大的顺序对接收到的各个待解码帧进行解码。物理端机顶盒每正确解码一个待解码的视频帧,PTS队列中PTS值最小的一个被删除。也就是说,PTS队列是一个动态队列,不停有新的PTS值加入,随着物理端机顶盒不停对各待解码的视频帧正确解码,PTS队列中的PTS值也在逐渐被删除。可以认为,PTS队列中剩余的PTS值所对应的视频帧,正是物理端机顶盒接收到的、且还未解码的视频帧。因此,步骤S120和步骤S160相当于对物理端机顶盒中的帧解码速率进行了模拟。Multiple PTS values in the PTS queue established by the cloud set-top box correspond to multiple video frames. After each video frame to be decoded is sent to the physical end set-top box in the form of a code stream, the physical end set-top box also decodes each received frame to be decoded in order from small to large PTS values. Every time the physical set-top box correctly decodes a video frame to be decoded, the one with the smallest PTS value in the PTS queue is deleted. In other words, the PTS queue is a dynamic queue, and new PTS values are constantly being added. As the physical set-top box continues to correctly decode the video frames to be decoded, the PTS values in the PTS queue are gradually deleted. It can be considered that the video frames corresponding to the remaining PTS values in the PTS queue are exactly the video frames received by the physical set-top box and not yet decoded. Therefore, steps S120 and S160 are equivalent to simulating the frame decoding rate in the physical set-top box.
在本公开中,物理端机顶盒接收到待解码的视频帧之后不需要与云化机顶盒进行交互,并且物理端机顶盒只需要在对一个视频帧进行解码后,与云化机顶盒进行一次交互。既保证了视频解码的正确进行,又减少了网络延迟对视频解码的影响,提高了物理端机顶盒进行视频解码的效率。In the present disclosure, the physical set-top box does not need to interact with the cloud set-top box after receiving the video frame to be decoded, and the physical set-top box only needs to interact with the cloud set-top box once after decoding a video frame. This not only ensures correct video decoding, but also reduces the impact of network delay on video decoding, and improves the efficiency of video decoding by the physical set-top box.
需要指出的是,在本公开中,各个步骤的序号并不代表各个步骤的执行顺序。也就是说,并非是将所有待解码帧都发送物理端机顶盒之后才将各个待解码帧的PTS值加入到PTS队列中。It should be noted that in this disclosure, the sequence number of each step does not represent the execution order of each step. In other words, it is not necessary to add the PTS value of each frame to be decoded to the PTS queue after all the frames to be decoded are sent to the physical set-top box.
在本公开中,步骤S110和步骤S120同步进行的。也就是说,每向物理端机顶盒发送一个待解码帧,则将该待解码帧的PTS值加入到所述PTS队列中。In the present disclosure, step S110 and step S120 are performed simultaneously. That is to say, every time a frame to be decoded is sent to the physical end set-top box, the PTS value of the frame to be decoded is added to the PTS queue.
在接收到物理机顶盒发送的解码反馈后,步骤S110和步骤S120也是在进行的,直至云化机顶盒截获的码流均被发送至物理端机顶盒为止。After receiving the decoding feedback sent by the physical set-top box, steps S110 and S120 are also performed until all code streams intercepted by the cloud set-top box are sent to the physical set-top box.
在本公开中,步骤S130至步骤S160是顺序执行的。每接收到一个解码反馈(即,每执行一次步骤S130),就执行一次步骤S140至步骤S160。 In the present disclosure, steps S130 to S160 are performed sequentially. Each time a decoding feedback is received (that is, each time step S130 is executed), steps S140 to S160 are executed.
在本公开中,对将PTS值加入PTS队列中的速率不做特殊的限定。作为一种可选实施方式,将PTS值加入PTS队列中的速率可以与云化机顶盒向物理端机顶盒发送的码流的码流速率相同。也就是说,可以在向物理端机顶盒发送待解码的视频帧的同时,将该待解码的视频帧的PTS值加入PTS队列。In the present disclosure, there is no special limitation on the rate at which PTS values are added to the PTS queue. As an optional implementation manner, the rate at which the PTS value is added to the PTS queue may be the same as the rate at which the cloud set-top box sends the code stream to the physical set-top box. That is to say, while sending the video frame to be decoded to the physical end set-top box, the PTS value of the video frame to be decoded can be added to the PTS queue.
当然,本公开并不限于此,将PTS值加入PTS队列中的速率也可以与所述码流速率不相同。为了确保在云化机顶盒一端准确地模拟出物理端机顶盒的解码速率,可以根据物理端机顶盒的解码反馈对将PTS值加入PTS队列的速率进行调整。Of course, the present disclosure is not limited to this, and the rate at which the PTS value is added to the PTS queue may also be different from the code stream rate. In order to ensure that the decoding rate of the physical set-top box is accurately simulated on the cloud set-top box side, the rate at which the PTS value is added to the PTS queue can be adjusted based on the decoding feedback of the physical set-top box.
在本公开中,对所述解码反馈的具体类型不做特殊的限定。作为一种可选实施方式,所述解码反馈可以包括解码完成帧的PTS值。也就是说,当物理端机顶盒每完成一个视频帧的解码,即向云化机顶盒发送该刚刚解码完成的视频帧的PTS值。如上文中所述,物理端机顶盒是按照PTS从小到大的顺序对各个视频帧进行解码的。在不出意外的情况下,每次被解码的视频帧的PTS值都是当前物理端机顶盒所有未解码的视频帧中PTS值最小的一者。云化机顶盒中的情况也是类似的,PTS队列中的最小的一个PTS值,对应的也是物理端机顶盒中即将被解码、或者正在被解码的视频帧。在将接收到的所述解码反馈与所述PTS队列中最小的PTS值进行比较的步骤S140中,可以利用所述PTS队列中最小的PTS值减去接收到的解码完成帧的PTS值,得到的差值为所述比较结果。若所述比较结果小于预定数值,说明云化机顶盒中模拟的物理端机顶盒视频解码速度与物理端机顶盒实际进行的视频解码速度相差不大,这种情况下可以判定所述物理端机顶盒解码正常。相应地,若所述比较结果不小于所述预定数值,说明云化机顶盒中模拟的物理端机顶盒视频解码速度大于物理端机顶盒实际进行的视频解码速度。在这种情况下,所述视频解码方法还可以包括:若所述比较结果不小于所述预定数值,生成表征无帧解码完成的信息。需要指出的是,在没有帧解码完成的情况下,不会停止将码流发送至物理端机顶盒,也不会停止将相应PTS值加入PTS队列。只向PTS队列中增加PTS值、而不删减PTS值,相当于减慢 了云化机顶盒中模拟的物理端机顶盒视频解码速度。In the present disclosure, the specific type of decoding feedback is not particularly limited. As an optional implementation manner, the decoding feedback may include the PTS value of the decoding completed frame. That is to say, every time the physical set-top box completes decoding of a video frame, it sends the PTS value of the video frame that has just been decoded to the cloud set-top box. As mentioned above, the physical set-top box decodes each video frame in the order of PTS from small to large. Unless nothing unexpected happens, the PTS value of each decoded video frame is the one with the smallest PTS value among all undecoded video frames of the current physical set-top box. The situation in the cloud set-top box is similar. The smallest PTS value in the PTS queue corresponds to the video frame that is about to be decoded or is being decoded in the physical set-top box. In step S140 of comparing the received decoding feedback with the smallest PTS value in the PTS queue, the smallest PTS value in the PTS queue can be used to subtract the PTS value of the received decoding completion frame, to obtain The difference is the comparison result. If the comparison result is less than the predetermined value, it means that the video decoding speed of the physical set-top box simulated in the cloud set-top box is not much different from the actual video decoding speed of the physical set-top box. In this case, it can be determined that the decoding of the physical set-top box is normal. Correspondingly, if the comparison result is not less than the predetermined value, it means that the simulated video decoding speed of the physical set-top box in the cloud set-top box is greater than the actual video decoding speed of the physical set-top box. In this case, the video decoding method may further include: if the comparison result is not less than the predetermined value, generating information indicating that frameless decoding is completed. It should be pointed out that when frame decoding is not completed, it will not stop sending the code stream to the physical set-top box, nor will it stop adding the corresponding PTS value to the PTS queue. Only adding the PTS value to the PTS queue without deleting the PTS value is equivalent to slowing down The video decoding speed of the physical set-top box is simulated in the cloud set-top box.
在本公开中,对所述预定值不做特殊的限定。作为一种可选实施方式,所述预定值可以是3到5帧视频帧进行播放时所需要的时间。In the present disclosure, the predetermined value is not particularly limited. As an optional implementation, the predetermined value may be the time required for playing 3 to 5 video frames.
物理端机顶盒对接收到的视频帧进行解码时,可能会因各种因素(例如,物理端机顶盒硬件问题、码流传输过程中的数据丢失)而解码失败。当物理端机顶盒解码失败时,会生成解码失败标识,并将该标识作为“解码反馈”发送给云化机顶盒。When the physical set-top box decodes the received video frame, the decoding may fail due to various factors (for example, physical set-top box hardware problems, data loss during stream transmission). When the physical set-top box fails to decode, a decoding failure flag will be generated and sent to the cloud set-top box as "decoding feedback".
在利用PTS队列中的最小的一个PTS值与解码失败标识进行比较时,容易判断出解码反馈为解码失败标识,如图3所示,在这种情况下,所述视频解码方法还包括:在步骤S170中,生成解码异常信息。When comparing the smallest PTS value in the PTS queue with the decoding failure indicator, it is easy to determine that the decoding feedback is the decoding failure indicator, as shown in Figure 3. In this case, the video decoding method also includes: In step S170, decoding exception information is generated.
步骤S170中,生成解码异常信息后,相关技术人员可以对该解码异常信息进行处理。In step S170, after the decoding exception information is generated, relevant technical personnel can process the decoding exception information.
在本公开中,还可以通过如下方式判定物理端机顶盒异常:接收到所述解码反馈后,对PTS队列进行查询,以确定所述PTS队列中的最小的PTS值;当所述PTS队列为空时,生成解码异常信息。In this disclosure, the abnormality of the physical end set-top box can also be determined in the following manner: after receiving the decoding feedback, query the PTS queue to determine the smallest PTS value in the PTS queue; when the PTS queue is empty When, decoding exception information is generated.
物理端机顶盒完成对待解码的视频帧的解码后,需要对解码获得的视频帧进行渲染,因此,如图3所示,所述视频解码方法还包括步骤S180。After the physical end set-top box completes decoding of the video frame to be decoded, it needs to render the decoded video frame. Therefore, as shown in Figure 3, the video decoding method also includes step S180.
在步骤S180中,若所述物理端机顶盒正常解码,向所述物理端机顶盒发送针对解码完成的视频帧的渲染指令。In step S180, if the physical set-top box decodes normally, a rendering instruction for the decoded video frame is sent to the physical set-top box.
物理端机顶盒接收到渲染指令后,可以对相应的解码完成的视频帧进行渲染。After receiving the rendering instruction, the physical set-top box can render the corresponding decoded video frame.
作为本公开的第二个方面,提供一种视频解码方法,用于物理端机顶盒,如图4所示,所述视频解码方法包括步骤S210至S230。As a second aspect of the present disclosure, a video decoding method is provided for use in a physical set-top box. As shown in Figure 4, the video decoding method includes steps S210 to S230.
在步骤S210中,接收视频码流。In step S210, the video code stream is received.
在步骤S220中,按照所述视频码流中各待解码的视频帧的PTS值的顺序依次对各所述待解码的视频帧进行解码,并生成相应的解码反馈。In step S220, each video frame to be decoded is sequentially decoded in the order of the PTS value of each video frame to be decoded in the video code stream, and corresponding decoding feedback is generated.
在步骤S230中,按照解码顺序,将所述解码反馈发送至云化机 顶盒。In step S230, the decoding feedback is sent to the cloudification machine according to the decoding order. top box.
所述物理端机顶盒与所述云化机顶盒相配合,因此,在步骤S210中接收到的视频码流是本公开第一个方面所提供的视频解码方法中的步骤S110发送的视频码流。在物理端机顶盒对接收到的码流中的各个待解码帧进行解码时,只需要通过生成解码反馈的方式与云化机顶盒交互一次,从而降低了网络延迟对解码过程的影响。The physical set-top box cooperates with the cloud set-top box. Therefore, the video code stream received in step S210 is the video code stream sent in step S110 in the video decoding method provided by the first aspect of the present disclosure. When the physical set-top box decodes each frame to be decoded in the received code stream, it only needs to interact with the cloud set-top box once by generating decoding feedback, thus reducing the impact of network delay on the decoding process.
需要指出的是,每对一个视频帧进行解码,就生成一个解码反馈。作为一种可选实施方式,物理端机顶盒每接收到一个待解码的视频帧,则将该待解码的视频帧加入解码队列。在所述解码队列中,各个待解码的视频帧按照各自的PTS值从小到大顺序排列。在对各个待解码的视频帧进行解码时,也按照PTS值从小到大的顺序进行解码。It should be noted that each time a video frame is decoded, a decoding feedback is generated. As an optional implementation manner, each time the physical end set-top box receives a video frame to be decoded, the video frame to be decoded is added to the decoding queue. In the decoding queue, the video frames to be decoded are arranged in ascending order according to their respective PTS values. When decoding each video frame to be decoded, decoding is also performed in ascending order of PTS values.
与本公开的第一个方面类似,第二个方面所提供的视频解码方法中,各个步骤前的需要也只是为了便于表述,并不代表执行顺序。Similar to the first aspect of the present disclosure, in the video decoding method provided in the second aspect, the requirements before each step are only for convenience of description and do not represent the order of execution.
也就是说,在本公开中,步骤S210、步骤S220以及步骤S230也可以同步进行。每接收到一个待解码的视频帧,则对该待解码的视频帧进行解码。并且,在所述视频解码方法中,每生成一个解码反馈,即将该生成的解码反馈发送至云化机顶盒。That is to say, in the present disclosure, step S210, step S220 and step S230 can also be performed simultaneously. Each time a video frame to be decoded is received, the video frame to be decoded is decoded. Moreover, in the video decoding method, each time a decoding feedback is generated, the generated decoding feedback is sent to the cloud set-top box.
作为一种可选实施方式,若正常解码,针对解码完成的视频帧,所述解码反馈包括解码完成的视频帧的PTS值。As an optional implementation, if the decoding is normal, for the decoded video frame, the decoding feedback includes the PTS value of the decoded video frame.
也就是说,物理端机顶盒每正常解码一个视频帧,就向云化机顶盒反馈该视频帧的PTS值,以供云化机顶盒执行步骤S140。That is to say, every time the physical set-top box decodes a video frame normally, it feeds back the PTS value of the video frame to the cloud set-top box, so that the cloud set-top box can perform step S140.
作为另一种可选实施方式,所述解码反馈包括解码异常帧的解码失败标识。当解码失败时,生成针对该解码失败的异常帧的解码失败标识。As another optional implementation, the decoding feedback includes a decoding failure identification of the decoding abnormal frame. When decoding fails, a decoding failure identifier for the abnormal frame in which decoding fails is generated.
完成解码后,物理端机顶盒需要对解码完成的视频帧进行渲染。如上文中所述,渲染指令也是云化机顶盒发出的。相应地,如图5所示,所述视频解码方法还包括步骤S240和S250。After decoding is completed, the physical set-top box needs to render the decoded video frames. As mentioned above, rendering instructions are also issued by the cloud set-top box. Correspondingly, as shown in Figure 5, the video decoding method also includes steps S240 and S250.
在步骤S240中,接收渲染指令。In step S240, a rendering instruction is received.
在步骤S250中,根据所述渲染指令对相应的解码完成帧进行渲 染。In step S250, the corresponding decoded frame is rendered according to the rendering instruction. dye.
作为一种可选实施方式,可以在渲染指令中携带PTS值。物理端机顶盒确定渲染指令中的PTS值之后,对该PTS值所对应的解码完成帧进行渲染。As an optional implementation, the PTS value can be carried in the rendering instruction. After the physical set-top box determines the PTS value in the rendering instruction, it renders the decoded frame corresponding to the PTS value.
当然,本公开并不限于此。作为一种可选实施方式,如图6所示,步骤S250可以包括步骤S251至S254。Of course, the present disclosure is not limited to this. As an optional implementation, as shown in Figure 6, step S250 may include steps S251 to S254.
在步骤S251中,确定所述渲染指令对应的解码完成的视频帧的PTS值.In step S251, determine the PTS value of the decoded video frame corresponding to the rendering instruction.
在步骤S252中,将解码完成的视频帧的PTS值与所述渲染指令对应的PTS值进行比较。In step S252, the PTS value of the decoded video frame is compared with the PTS value corresponding to the rendering instruction.
在步骤S253中,若所述解码完成的视频帧的PTS值不超过所述渲染指令对应的PTS值,则等待预定时间后对所述解码完成的视频帧进行渲染。In step S253, if the PTS value of the decoded video frame does not exceed the PTS value corresponding to the rendering instruction, the decoded video frame is rendered after waiting for a predetermined time.
在步骤S254中,若所述解码完成的视频帧的PTS值大于所述渲染指令对应的PTS值,则对所述待渲染帧进行渲染。In step S254, if the PTS value of the decoded video frame is greater than the PTS value corresponding to the rendering instruction, the frame to be rendered is rendered.
若刚解码完成的视频帧的PTS值不超过所述渲染指令对应的PTS值,说明物理端机顶盒的解码速度过快,不能立刻执行渲染,否则会出现图像渲染帧率过高的问题。需要等待预定时间后,再对解码完成帧进行渲染,以实现更好的视频显示效果。If the PTS value of the video frame that has just been decoded does not exceed the PTS value corresponding to the rendering instruction, it means that the decoding speed of the physical set-top box is too fast and rendering cannot be performed immediately. Otherwise, the image rendering frame rate will be too high. You need to wait for a predetermined time before rendering the decoded frame to achieve better video display effects.
若刚解码完成的视频帧的PTS值大于渲染指令对应的PTS,立刻进行渲染。If the PTS value of the video frame that has just been decoded is greater than the PTS corresponding to the rendering instruction, rendering is performed immediately.
作为本公开的第三个方面,提供一种云化机顶盒,所述云化机顶盒包括:一个或多个第一处理器;第一存储器,其上存储有一个或多个第一程序,当一个或多个第一程序被一个或多个第一处理器执行,使得一个或多个第一处理器实现本公开第一个方面所提供的视频解码方法;一个或多个第一I/O接口,连接在第一处理器与第一存储器之间,配置为实现第一处理器与第一存储器的信息交互。As a third aspect of the present disclosure, a cloud set-top box is provided. The cloud set-top box includes: one or more first processors; a first memory on which one or more first programs are stored. When a or multiple first programs are executed by one or more first processors, so that the one or more first processors implement the video decoding method provided by the first aspect of the present disclosure; one or more first I/O interfaces , connected between the first processor and the first memory, and configured to implement information interaction between the first processor and the first memory.
在本公开中,第一处理器为具有数据处理能力的器件,其包括但不限于中央处理器(CPU)等;第一存储器为具有数据存储能力的器件,其包括但不限于随机存取存储器(RAM,更具体如SDRAM、 DDR等)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH);第一I/O接口(读写接口)连接在第一处理器与第一存储器间,能实现第一处理器与第一存储器的信息交互,其包括但不限于数据总线(Bus)等。In this disclosure, the first processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the first memory is a device with data storage capabilities, including but not limited to random access memory. (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the first I/O interface (read-write interface) is connected between the first processor and the first memory , can realize information interaction between the first processor and the first memory, which includes but is not limited to a data bus (Bus), etc.
作为本公开的第四个方面,提供一种物理端机顶盒,所述物理端机顶盒包括:一个或多个第二处理器;第二存储器,其上存储有一个或多个第二程序,当一个或多个第二程序被一个或多个第二处理器执行,使得一个或多个第二处理器实现本公开第二个方面所提供的视频解码方法;一个或多个第二I/O接口,连接在第二处理器与第二存储器之间,配置为实现第二处理器与第二存储器的信息交互。As a fourth aspect of the present disclosure, a physical set-top box is provided. The physical set-top box includes: one or more second processors; a second memory on which one or more second programs are stored. When a or multiple second programs are executed by one or more second processors, so that the one or more second processors implement the video decoding method provided by the second aspect of the present disclosure; one or more second I/O interfaces , connected between the second processor and the second memory, and configured to implement information interaction between the second processor and the second memory.
在本公开中,第二处理器为具有数据处理能力的器件,其包括但不限于中央处理器(CPU)等;第二存储器为具有数据存储能力的器件,其包括但不限于随机存取存储器(RAM,更具体如SDRAM、DDR等)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH);第二I/O接口(读写接口)连接在第二处理器与第二存储器102间,能实现第二处理器与第二存储器的信息交互,其包括但不限于数据总线(Bus)等。In this disclosure, the second processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the second memory is a device with data storage capabilities, including but not limited to random access memory. (RAM, more specifically such as SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the second I/O interface (read-write interface) is connected to the Between the two processors and the second memory 102, information exchange between the second processor and the second memory can be realized, which includes but is not limited to a data bus (Bus), etc.
作为本公开的第五个方面,提供一种计算机可读介质,所述计算机可读介质上存储有可执行程序,当所述可执行程度被处理器执行时,使得所述处理器执行本公开所提供的视频解码方法。As a fifth aspect of the present disclosure, a computer-readable medium is provided. An executable program is stored on the computer-readable medium. When the executable program is executed by a processor, the processor is caused to execute the present disclosure. The video decoding method provided.
作为本公开的第六个方面,提供一种云化机顶盒,如图7所示,该云化机顶盒包括云端播放器、云端Mediacodec、PTS管理组件和物理端状态记录组件。As a sixth aspect of the present disclosure, a cloud set-top box is provided. As shown in Figure 7, the cloud set-top box includes a cloud player, a cloud Mediacodec, a PTS management component and a physical side status recording component.
云端播放器配置为截获视频流,并将截获的视频流以码流的方式发送至云端Mediacodec。The cloud player is configured to intercept the video stream and send the intercepted video stream to the cloud Mediacodec in the form of a code stream.
云端Mediacodec配置为保存各待解码的视频帧的PTS值,并将各个待解码的视频帧以视频码流的方式连续地发送给物理端机顶盒。The cloud Mediacodec is configured to save the PTS value of each video frame to be decoded, and continuously send each video frame to be decoded to the physical set-top box in the form of a video stream.
PTS管理组件配置为按照从小到大的顺序以第一速率将各个待解码的视频帧的PTS值连续地加入PTS队列。The PTS management component is configured to continuously add the PTS values of each video frame to be decoded to the PTS queue at the first rate in order from small to large.
物理端状态记录组件配置为接收物理端机顶盒发送的解码反馈。 The physical side status recording component is configured to receive decoding feedback sent by the physical side set-top box.
PTS管理组件还配置为根据所述解码反馈与当前PTS队列中最小的PTS值进行比较,以判断物理端机顶盒是否正常解码,并在物理端机顶盒正常解码,删除当前PTS队列中最小的PTS值。The PTS management component is also configured to compare the decoding feedback with the smallest PTS value in the current PTS queue to determine whether the physical set-top box decodes normally, and delete the smallest PTS value in the current PTS queue when the physical set-top box decodes normally.
除此之外,PTS管理组件还配置为调整将PTS值加入PTS队列的速率。云端播放器还用于向云端Mediacodec发送渲染请求。云端Mediacodec还用于发送渲染请求对应的视频帧的PTS值。In addition to this, the PTS management component is configured to adjust the rate at which PTS values are added to the PTS queue. The cloud player is also used to send rendering requests to the cloud Mediacodec. Cloud Mediacodec is also used to send the PTS value of the video frame corresponding to the rendering request.
作为本公开的第七个方面,提供一种物理端机顶盒。如图7所示,该物理端机顶盒包括解码组件和渲染标识管理组件。As a seventh aspect of the present disclosure, a physical set-top box is provided. As shown in Figure 7, the physical set-top box includes a decoding component and a rendering identifier management component.
解码组件配置为:接收视频码流;按照所述视频码流中各待解码的视频帧的PTS值的顺序依次对各所述待解码的视频帧进行解码,并生成相应的解码反馈;按照解码顺序,将所述解码反馈发送至云化机顶盒。The decoding component is configured to: receive a video code stream; decode each video frame to be decoded in sequence according to the PTS value of each video frame to be decoded in the video code stream, and generate corresponding decoding feedback; decode according to the In sequence, the decoding feedback is sent to the cloud set-top box.
渲染标识管理组件配置为:接收渲染指令;根据所述渲染指令对相应的解码完成帧进行渲染。The rendering identification management component is configured to: receive a rendering instruction; and render the corresponding decoding completed frame according to the rendering instruction.
下面结合图8和图9对本公开所提供的视频解码方法进行介绍。图8中所示的是物理端机顶盒正常解码时的信令图。如图所示,在这种情况下,视频解码方法包括S101至S117。The video decoding method provided by the present disclosure will be introduced below with reference to Figures 8 and 9. Shown in Figure 8 is the signaling diagram during normal decoding of the physical end set-top box. As shown in the figure, in this case, the video decoding method includes S101 to S117.
在S101,云化视频应用打开并创建云端应用播放器播放片源。In S101, the cloud video application opens and creates a cloud application player to play the video source.
在S102,云端应用播放器(云端播放器)创建云端MediaCodec解码器。In S102, the cloud application player (cloud player) creates a cloud MediaCodec decoder.
在S103,云端MediaCodec在物理端机顶盒创建解码器并对解码器初始化。In S103, Cloud MediaCodec creates a decoder on the physical set-top box and initializes the decoder.
在S104,云端应用播放器向云端MediaCodec发送码流,以供物理端机顶盒进行解码。In S104, the cloud application player sends a code stream to the cloud MediaCodec for decoding by the physical set-top box.
在S105,云端MediaCodec向PTS管理组件记录该视频帧的PTS值。In S105, the cloud MediaCodec records the PTS value of the video frame to the PTS management component.
在S106,云端MediaCodec向物理端机顶盒推送该视频帧。At S106, the cloud MediaCodec pushes the video frame to the physical set-top box.
在S107,物理端机顶盒对将该视频帧加入解码队列中,进行解码。In S107, the physical end set-top box adds the video frame to the decoding queue and performs decoding.
在S108,物理端机顶盒解码数据完成后,将解码完成的视频帧 的PTS值上报至物理端状态记录组件。In S108, after the physical end set-top box completes decoding the data, the decoded video frame The PTS value is reported to the physical end status recording component.
在S109,云端应用播放器向云端MediaCodec查询是否有数据解码完成。In S109, the cloud application player queries the cloud MediaCodec whether data decoding is completed.
在S110a,云端MediaCodec向PTS管理组件查询是否有PTS值。In S110a, the cloud MediaCodec queries the PTS management component whether there is a PTS value.
在S111,PTS管理组件中无任何帧数据,直接通知云端应用播放器无帧解码完成。In S111, there is no frame data in the PTS management component, and the cloud application player is directly notified that no frame decoding is completed.
在S112,PTS管理组件中有帧数据,将最小PTS值与物理端状态记录组件记录的物理端机顶盒反馈的PTS值进行比较。In S112, there is frame data in the PTS management component, and the minimum PTS value is compared with the PTS value fed back by the physical end set-top box recorded by the physical end status recording component.
在S113,PTS管理组件的最小PTS值比物理端机顶盒反馈的PTS值大超过5帧数据,则说明物理端机顶盒解码慢了,需要降低云端模拟的PTS值发送速度,直接通知云端应用播放器无帧解码完成。In S113, if the minimum PTS value of the PTS management component is greater than the PTS value fed back by the physical set-top box by more than 5 frames of data, it means that the physical set-top box decodes slowly and needs to reduce the sending speed of the cloud simulated PTS value and directly notify the cloud application player that there is no Frame decoding completed.
在S114,否则将该解码完成的视频帧的PTS值上报给播放器,同时将该PTS值从PTS管理模块的队列中移除。In S114, otherwise, the PTS value of the decoded video frame is reported to the player, and the PTS value is removed from the queue of the PTS management module.
在S115,云端应用播放器发送请求渲染该视频帧。In S115, the cloud application player sends a request to render the video frame.
在S116,云端MediaCodec将需要渲染帧的PTS值发送给物理端机顶盒的渲染标识管理组件,该渲染标识管理组件记录当前云端渲染进度。In S116, the cloud MediaCodec sends the PTS value of the frame to be rendered to the rendering identification management component of the physical set-top box. The rendering identification management component records the current cloud rendering progress.
在S117,物理端机顶盒的解码器组件每解完一帧后,从渲染标识管理组件查询云端发送的待渲染PTS值,如果该解码完成帧的PTS值小于或等于云端发送的待渲染帧的PTS值,立刻渲染该解码完成的视频帧;否则说明物理端机顶盒解码过快了,不能立刻对解码完成的视频帧进行渲染,不然现象就是图像渲染帧率过高;直到渲染标识管理组件收到云端发送的渲染帧的PTS值时候,再将物理端机顶盒刚完成解码的帧的PTS值与云端发送的待渲染帧的PTS值比较,刚完成解码的帧的PTS值若小于或等于云端发送的待渲染帧的PTS,立刻对刚解码完成的视频帧进行渲染,然后继续解码下一帧。In S117, after each decoder component of the physical set-top box decodes a frame, it queries the rendering identification management component for the PTS value to be rendered sent by the cloud. If the PTS value of the decoded frame is less than or equal to the PTS value of the frame to be rendered sent by the cloud, value, immediately render the decoded video frame; otherwise, it means that the physical set-top box decodes too fast and cannot render the decoded video frame immediately, otherwise the image rendering frame rate is too high; until the rendering identification management component receives the cloud When sending the PTS value of the rendering frame, compare the PTS value of the frame that has just been decoded by the physical set-top box with the PTS value of the frame to be rendered sent by the cloud. If the PTS value of the frame that has just been decoded is less than or equal to the frame that is to be rendered sent by the cloud. Render the PTS of the frame, immediately render the video frame that has just been decoded, and then continue to decode the next frame.
图9中所示的是物理端机顶盒解码异常时的信令图。在这种情况下,视频解码方法包括S201至S211。Figure 9 shows the signaling diagram when the physical set-top box decodes abnormally. In this case, the video decoding method includes S201 to S211.
在S201,云化机顶盒和物理端机顶盒已经创建云化解码通道、 并初始化物理端的解码器。In S201, cloud set-top boxes and physical set-top boxes have created cloud decoding channels, And initialize the decoder on the physical side.
在S202,云端应用播放器向云端MediaCodec发送码流进行解码。In S202, the cloud application player sends the code stream to the cloud MediaCodec for decoding.
在S203,云端MediaCodec向PTS管理组件记录该帧的PTS值。In S203, the cloud MediaCodec records the PTS value of the frame to the PTS management component.
在S204,云端MediaCodec向物理端机顶盒推送该帧。In S204, the cloud MediaCodec pushes the frame to the physical set-top box.
在S205,物理端对将该帧加入解码队列中,进行解码,解码失败。In S205, the physical end adds the frame to the decoding queue and performs decoding, but the decoding fails.
在S206,向物理端状态记录组件上报解码失败状态。In S206, the decoding failure status is reported to the physical end status recording component.
在S207,云端应用播放器向云端MediaCodec查询是否有数据解码完成。In S207, the cloud application player queries the cloud MediaCodec whether data decoding is completed.
在S208,云端MediaCodec向PTS管理组件查询是否存储有PTS值。In S208, the cloud MediaCodec queries the PTS management component whether a PTS value is stored.
在S209,PTS管理组件存储有PTS值,则向物理端状态记录组件查询物理端解码PTS,结果发现物理端解码失败。In S209, the PTS management component stores the PTS value, and then queries the physical side status recording component to decode the PTS on the physical side. As a result, it is found that the physical side decoding failed.
在S210a,上报播放器解码失败。In S210a, a player decoding failure is reported.
在S211,云端应用播放器通知云端视频应用,云端应用显示播放失败。In S211, the cloud application player notifies the cloud video application, and the cloud application displays a playback failure.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其它数据)的任何方法或技术中 实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其它存储器技术、CD-ROM、数字多功能盘(DVD)或其它光盘存储、磁盒、磁带、磁盘存储或其它磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其它传输机制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some steps, systems, and functional modules/units in the devices disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may consist of several physical components. Components execute cooperatively. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is known to those of ordinary skill in the art, the term computer storage medium includes any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data. Implemented volatile and non-volatile, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disk (DVD) or other optical disk storage, magnetic cassettes, tapes, disk storage or other magnetic storage devices, or may Any other medium used to store desired information and that can be accessed by a computer. Additionally, it is known to those of ordinary skill in the art that communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
本文已经公开了示例实施方式,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施方式相结合描述的特征、特性和/或元素,或可与其它实施方式相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。 Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a general illustrative sense only and not for purpose of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone, or may be used in conjunction with other embodiments, unless expressly stated otherwise. Features and/or components are used in combination. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims (13)

  1. 一种视频解码方法,用于云化机顶盒,所述视频解码方法包括:A video decoding method for cloud set-top boxes. The video decoding method includes:
    将各个待解码的视频帧以视频码流的方式连续地发送给物理端机顶盒;Continuously send each video frame to be decoded to the physical set-top box in the form of a video stream;
    按照从小到大的顺序将码流中各个待解码的视频帧的显示时间戳PTS值连续地加入PTS队列;Continuously add the display timestamp PTS values of each video frame to be decoded in the code stream to the PTS queue in order from small to large;
    接收所述物理端机顶盒发送的解码反馈;Receive decoding feedback sent by the physical end set-top box;
    将接收到的所述解码反馈与当前PTS队列中最小的PTS值进行比较;Compare the received decoding feedback with the smallest PTS value in the current PTS queue;
    根据比较结果判断所述物理端机顶盒是否正常解码;Determine whether the physical set-top box decodes normally according to the comparison result;
    若所述物理端机顶盒正常解码,删除当前PTS队列中最小的PTS值。If the physical end set-top box decodes normally, delete the smallest PTS value in the current PTS queue.
  2. 根据权利要求1所述的视频解码方法,其中,所述解码反馈包括解码完成的视频帧的PTS值;The video decoding method according to claim 1, wherein the decoding feedback includes the PTS value of the decoded video frame;
    在将接收到的所述解码反馈与所述PTS队列中最小的PTS值进行比较的步骤中,利用所述PTS队列中最小的PTS值减去接收到的解码完成的视频帧的PTS值,得到的差值为所述比较结果;In the step of comparing the received decoding feedback with the smallest PTS value in the PTS queue, subtracting the PTS value of the received decoded video frame from the smallest PTS value in the PTS queue, we obtain The difference is the comparison result;
    若所述比较结果小于预定数值,则判定所述物理端机顶盒解码正常。If the comparison result is less than the predetermined value, it is determined that the physical end set-top box is decoding normally.
  3. 根据权利要求2所述的视频解码方法,其中,所述视频解码方法还包括:The video decoding method according to claim 2, wherein the video decoding method further includes:
    若所述比较结果不小于所述预定数值,生成表征无帧解码完成的信息。If the comparison result is not less than the predetermined value, information indicating completion of frameless decoding is generated.
  4. 根据权利要求1至3中任意一项所述的视频解码方法,其中,若所述解码反馈为解码失败标识,所述视频解码方法还包括: The video decoding method according to any one of claims 1 to 3, wherein if the decoding feedback is a decoding failure indicator, the video decoding method further includes:
    生成解码异常信息。Generate decoding exception information.
  5. 根据权利要求1至3中任意一项所述的视频解码方法,其中,所述视频解码方法还包括:The video decoding method according to any one of claims 1 to 3, wherein the video decoding method further includes:
    若所述物理端机顶盒正常解码,向所述物理端机顶盒发送针对解码完成的视频帧的渲染指令。If the physical set-top box decodes normally, a rendering instruction for the decoded video frame is sent to the physical set-top box.
  6. 一种视频解码方法,用于物理端机顶盒,所述视频解码方法包括:A video decoding method for physical set-top boxes. The video decoding method includes:
    接收视频码流;Receive video stream;
    按照所述视频码流中各待解码的视频帧的PTS值的顺序依次对各所述待解码的视频帧进行解码,并生成相应的解码反馈;Sequentially decoding each video frame to be decoded in the order of the PTS value of each video frame to be decoded in the video code stream, and generating corresponding decoding feedback;
    按照解码顺序,将所述解码反馈发送至云化机顶盒。According to the decoding order, the decoding feedback is sent to the cloud set-top box.
  7. 根据权利要求6所述的视频解码方法,其中,若正常解码,针对解码完成的视频帧,所述解码反馈包括解码完成的视频帧的PTS值。The video decoding method according to claim 6, wherein if the decoding is normal, for the decoded video frame, the decoding feedback includes the PTS value of the decoded video frame.
  8. 根据权利要求6所述的视频解码方法,其中,若解码异常,所述解码反馈包括解码异常的视频帧的解码失败标识。The video decoding method according to claim 6, wherein if the decoding is abnormal, the decoding feedback includes a decoding failure identification of the video frame with abnormal decoding.
  9. 根据权利要求6至8中任意一项所述的视频解码方法,其中,所述视频解码方法还包括:The video decoding method according to any one of claims 6 to 8, wherein the video decoding method further includes:
    接收渲染指令;Receive rendering instructions;
    根据所述渲染指令对相应的解码完成的视频帧进行渲染。Render the corresponding decoded video frame according to the rendering instruction.
  10. 根据权利要求9所述的视频解码方法,其中,所述根据所述渲染指令对相应的解码完成的视频帧进行渲染,包括:The video decoding method according to claim 9, wherein rendering the corresponding decoded video frame according to the rendering instruction includes:
    确定所述渲染指令对应的解码完成的视频帧的PTS值;Determine the PTS value of the decoded video frame corresponding to the rendering instruction;
    将解码完成的视频帧的PTS值与所述渲染指令对应的PTS值进 行比较;The PTS value of the decoded video frame is compared with the PTS value corresponding to the rendering instruction. row comparison;
    若所述解码完成的视频帧的PTS值不超过所述渲染指令对应的PTS值,则等待预定时间后对所述解码完成的视频帧进行渲染;If the PTS value of the decoded video frame does not exceed the PTS value corresponding to the rendering instruction, then wait for a predetermined time before rendering the decoded video frame;
    若所述解码完成的视频帧的PTS值大于所述渲染指令对应的PTS值,则对所述待渲染帧进行渲染。If the PTS value of the decoded video frame is greater than the PTS value corresponding to the rendering instruction, the frame to be rendered is rendered.
  11. 一种云化机顶盒,所述云化机顶盒包括:A cloud set-top box, which includes:
    一个或多个第一处理器;one or more first processors;
    第一存储器,其上存储有一个或多个第一程序,当一个或多个第一程序被一个或多个第一处理器执行,使得一个或多个第一处理器实现权利要求1至5中任意一项所述的视频解码方法;A first memory having one or more first programs stored thereon. When the one or more first programs are executed by one or more first processors, the one or more first processors implement claims 1 to 5 The video decoding method described in any one of the above;
    一个或多个第一I/O接口,连接在第一处理器与第一存储器之间,配置为实现第一处理器与第一存储器的信息交互。One or more first I/O interfaces are connected between the first processor and the first memory, and are configured to implement information exchange between the first processor and the first memory.
  12. 一种物理端机顶盒,所述物理端机顶盒包括:A physical set-top box, which includes:
    一个或多个第二处理器;one or more second processors;
    第二存储器,其上存储有一个或多个第二程序,当一个或多个第二程序被一个或多个第二处理器执行,使得一个或多个第二处理器实现权利要求6至10中任意一项所述的视频解码方法;The second memory has one or more second programs stored thereon, and when the one or more second programs are executed by one or more second processors, the one or more second processors implement claims 6 to 10 The video decoding method described in any one of the above;
    一个或多个第二I/O接口,连接在第二处理器与第二存储器之间,配置为实现第二处理器与第二存储器的信息交互。One or more second I/O interfaces are connected between the second processor and the second memory, and are configured to implement information exchange between the second processor and the second memory.
  13. 一种计算机可读介质,所述计算机可读介质上存储有可执行程序,当所述可执行程度被处理器执行时,使得所述处理器执行权利要求1至10中任意一项所述的视频解码方法。 A computer-readable medium having an executable program stored on the computer-readable medium. When the executable program is executed by a processor, the processor is caused to execute the method described in any one of claims 1 to 10. Video decoding method.
PCT/CN2023/100133 2022-06-30 2023-06-14 Video decoding method, virtual set-top box, physical-end set-top box and medium WO2024001777A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210763777.8A CN117376579A (en) 2022-06-30 2022-06-30 Video decoding method, cloud set top box, physical end set top box and medium
CN202210763777.8 2022-06-30

Publications (1)

Publication Number Publication Date
WO2024001777A1 true WO2024001777A1 (en) 2024-01-04

Family

ID=89382824

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/100133 WO2024001777A1 (en) 2022-06-30 2023-06-14 Video decoding method, virtual set-top box, physical-end set-top box and medium

Country Status (2)

Country Link
CN (1) CN117376579A (en)
WO (1) WO2024001777A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110085602A1 (en) * 2008-09-24 2011-04-14 Tencent Technology (Shenzhen) Company Ltd. Video Communication System, Device and Method Based on Feedback Reference Frames
CN103037209A (en) * 2011-09-30 2013-04-10 腾讯科技(深圳)有限公司 Method and device for decoding and processing video frame
CN109088887A (en) * 2018-09-29 2018-12-25 北京金山云网络技术有限公司 A kind of decoded method and device of Streaming Media
WO2020019140A1 (en) * 2018-07-23 2020-01-30 深圳市大疆创新科技有限公司 Video processing method, terminal device and machine-readable storage medium
CN112911389A (en) * 2021-01-18 2021-06-04 浙江大华技术股份有限公司 Video playing switching method, electronic equipment and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110085602A1 (en) * 2008-09-24 2011-04-14 Tencent Technology (Shenzhen) Company Ltd. Video Communication System, Device and Method Based on Feedback Reference Frames
CN103037209A (en) * 2011-09-30 2013-04-10 腾讯科技(深圳)有限公司 Method and device for decoding and processing video frame
WO2020019140A1 (en) * 2018-07-23 2020-01-30 深圳市大疆创新科技有限公司 Video processing method, terminal device and machine-readable storage medium
CN109088887A (en) * 2018-09-29 2018-12-25 北京金山云网络技术有限公司 A kind of decoded method and device of Streaming Media
CN112911389A (en) * 2021-01-18 2021-06-04 浙江大华技术股份有限公司 Video playing switching method, electronic equipment and computer storage medium

Also Published As

Publication number Publication date
CN117376579A (en) 2024-01-09

Similar Documents

Publication Publication Date Title
US9992113B2 (en) Virtual network interface controller performance using physical network interface controller receive side scaling offloads
US20210344938A1 (en) Video decoding method and apparatus, computer device, and storage medium
US9253100B2 (en) Asynchronous virtual machine replication
US9535677B2 (en) Software discovery in an environment with heterogeneous machine groups
CN109634718B (en) Method and system for creating mirror image by cloud platform
US20140297815A1 (en) Synchronous playback of media using a wi-fi network with the media originating from a bluetooth source
WO2022142616A1 (en) Data storage method and apparatus based on redis, and device and storage medium
WO2017054462A1 (en) Video decoding method, server and mobile terminal
US20210349382A1 (en) Screen projection method and system
CN110046026B (en) Method for specifying virtual disk speed limit by cloud host, computing equipment and cloud platform
US10838691B2 (en) Method and apparatus of audio/video switching
US20220004387A1 (en) Handling an input/output store instruction
WO2021103366A1 (en) Bullet screen processing method and system based on wechat mini-program
US20150365357A1 (en) Mtu management in a virtualized computer system
WO2017054540A1 (en) Data processing method and device, server, and controller
WO2022237695A1 (en) High-concurrency protocol stack offloading method and device based on host-side large-capacity memory, and medium
WO2014149519A1 (en) Flow director-based low latency networking
CN109246182A (en) A kind of Distributed Lock Manager and its implementation
CN109218817B (en) Method and device for displaying virtual gift prompting message
US11061727B1 (en) Preventing performance degradation over time in a cache
WO2019080852A1 (en) Data processing method, data processing circuit, and network device
WO2022057028A1 (en) Remote backup method for database, device and cloud server
EP3242258A1 (en) Method and apparatus for processing virtual card
WO2024001777A1 (en) Video decoding method, virtual set-top box, physical-end set-top box and medium
US9578120B1 (en) Messaging with key-value persistence

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23829959

Country of ref document: EP

Kind code of ref document: A1