CN111954016A - 一种直播视频流高效精准录制方案 - Google Patents
一种直播视频流高效精准录制方案 Download PDFInfo
- Publication number
- CN111954016A CN111954016A CN202010817592.1A CN202010817592A CN111954016A CN 111954016 A CN111954016 A CN 111954016A CN 202010817592 A CN202010817592 A CN 202010817592A CN 111954016 A CN111954016 A CN 111954016A
- Authority
- CN
- China
- Prior art keywords
- data
- video
- video stream
- time
- recording scheme
- 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.)
- Withdrawn
Links
- 238000004806 packaging method and process Methods 0.000 claims abstract description 4
- 230000005540 biological transmission Effects 0.000 claims description 9
- 238000005516 engineering process Methods 0.000 description 3
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4334—Recording operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明公开了一种直播视频流高效精准录制方案,其特征在于:包括以下步骤;步骤(1)、解析视频数据,获取视频流编码参数;步骤(2)、检测视频数据,如遇到非关键帧:S1、获取视频原始图像数据(yuv数据);S2、则按照S1获取到的参数,对原始图像数据进行重新编码;S3、编码后的码流数据填充时间戳转封装存储;S4、重复S2直到遇到第一个关键帧为止;步骤(3)、直接转封装存储之后的码流数据。本发明可以高效录制,对CPU占用极低,并且画质与原视频没区别,录制出来的视频时间精确。
Description
技术领域
本发明涉及计算机软件、视频技术领域,具体为一种直播视频流高效精准录制方案。
背景技术
当人们看直播视频时,往往有录制视频的需求。目前直播视频录制的现有技术,共两种,一种是对视频解码后的图像数据,进行重新编码,然后存储为视频文件。此方案的缺点是录出来的视频会比原视频画质差,而且视频编码对CPU的性能要求较高。另一种是直接存储直播视频流,不涉及重新编码。此方案的缺点是录出来的视频时间不够精确,往往存在一个gop以内的误差。
发明内容
本发明的目的在于提供一种直播视频流高效精准录制方案,以解决上述背景技术中提出的录制直播视频流的低效和录制时间不精准的问题。
为实现上述目的,本发明提供如下技术方案:一种直播视频流高效精准录制方案,包括以下步骤;
步骤(1)、解析视频数据,获取视频流编码参数;
步骤(2)、检测视频数据,如遇到非关键帧:
S1、获取视频原始图像数据(yuv数据);
S2、则按照S1获取到的参数,对原始图像数据进行重新编码;
S3、编码后的码流数据填充时间戳转封装存储;
S4、重复S2直到遇到第一个关键帧为止;
步骤(3)、直接转封装存储之后的码流数据。
优选的,步骤(1)中,视频流编码参数为分辨率、码率、时间戳、编码类型、编码等级信息。
优选的,步骤(1)中需要实时检测网络的通信质量和传输速率,并根据该网络实时的有效传输速率,动态地调整图像采集帧率,保证图像采集帧率与网络实时的有效传输速率同步匹配。
优选的,步骤(2)中,将得到的第一个关键帧的时间做为录制指令的开始时间。
本发明提出的一种直播视频流高效精准录制方案,有益效果在于:
1、本发明可以高效录制,对CPU占用极低,并且画质与原视频没区别;
2、本发明录制出来的视频时间精确。
附图说明
图1为本发明的流程图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1,本发明提供一种技术方案:一种直播视频流高效精准录制方案,包括以下步骤;
步骤(1)、解析视频数据,获取视频流编码参数,视频流编码参数为分辨率、码率、时间戳、编码类型、编码等级信息;
需要实时检测网络的通信质量和传输速率,并根据该网络实时的有效传输速率,动态地调整图像采集帧率,保证图像采集帧率与网络实时的有效传输速率同步匹配;
步骤(2)、检测视频数据,如遇到非关键帧:
S1、获取视频原始图像数据(yuv数据);
S2、则按照S1获取到的参数,对原始图像数据进行重新编码;
S3、编码后的码流数据填充时间戳转封装存储;
S4、重复S2直到遇到第一个关键帧为止;
将得到的第一个关键帧的时间做为录制指令的开始时间;
步骤(3)、直接转封装存储之后的码流数据。
对录制视频头部非关键帧解码后的图像数据,以和原码流相同的配置进行重新编码,存储编出来的数据,之后的数据不重新编码,进行直接存储,这样由于不丢弃数据,所以录制出来的视频文件时间是精确的,而头部非关键帧数据最多只有一个关键帧间隔的时间,所以其数据量较小,CPU占用也不高,达到了高效和精准的目的。
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。
Claims (4)
1.一种直播视频流高效精准录制方案,其特征在于:包括以下步骤;
步骤(1)、解析视频数据,获取视频流编码参数;
步骤(2)、检测视频数据,如遇到非关键帧:
S1、获取视频原始图像数据(yuv数据);
S2、则按照S1获取到的参数,对原始图像数据进行重新编码;
S3、编码后的码流数据填充时间戳转封装存储;
S4、重复S2直到遇到第一个关键帧为止;
步骤(3)、直接转封装存储之后的码流数据。
2.根据权利要求1所述的一种直播视频流高效精准录制方案,其特征在于:步骤(1)中,视频流编码参数为分辨率、码率、时间戳、编码类型、编码等级信息。
3.根据权利要求1所述的一种直播视频流高效精准录制方案,其特征在于:步骤(1)中需要实时检测网络的通信质量和传输速率,并根据该网络实时的有效传输速率,动态地调整图像采集帧率,保证图像采集帧率与网络实时的有效传输速率同步匹配。
4.根据权利要求1所述的一种直播视频流高效精准录制方案,其特征在于:步骤(2)中,将得到的第一个关键帧的时间做为录制指令的开始时间。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010817592.1A CN111954016A (zh) | 2020-08-14 | 2020-08-14 | 一种直播视频流高效精准录制方案 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010817592.1A CN111954016A (zh) | 2020-08-14 | 2020-08-14 | 一种直播视频流高效精准录制方案 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111954016A true CN111954016A (zh) | 2020-11-17 |
Family
ID=73343769
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010817592.1A Withdrawn CN111954016A (zh) | 2020-08-14 | 2020-08-14 | 一种直播视频流高效精准录制方案 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111954016A (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114095737A (zh) * | 2021-11-29 | 2022-02-25 | 腾讯科技(深圳)有限公司 | 点云媒体文件封装方法、装置、设备及存储介质 |
WO2022134086A1 (zh) * | 2020-12-25 | 2022-06-30 | 华为技术有限公司 | 数据处理方法、装置和系统 |
-
2020
- 2020-08-14 CN CN202010817592.1A patent/CN111954016A/zh not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022134086A1 (zh) * | 2020-12-25 | 2022-06-30 | 华为技术有限公司 | 数据处理方法、装置和系统 |
CN114095737A (zh) * | 2021-11-29 | 2022-02-25 | 腾讯科技(深圳)有限公司 | 点云媒体文件封装方法、装置、设备及存储介质 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1879409B (zh) | 记录装置及方法、再生装置及方法 | |
RU2370906C2 (ru) | Способ и устройство для редактирования видеофрагментов в сжатой области | |
CN112689119B (zh) | 一种云会议中录制视频合屏的处理方法及装置 | |
US10911817B2 (en) | Information processing system | |
CN111954016A (zh) | 一种直播视频流高效精准录制方案 | |
CN103297807A (zh) | 一种基于hadoop平台的提高视频转码效率的方法 | |
CN103765908A (zh) | 用于对视频数据进行复用和解复用以识别视频数据的再现状态的方法和设备 | |
EP2429136A1 (en) | Method and apparatus for carrying transport stream | |
US6693959B1 (en) | Method and apparatus for indexing and locating key frames in streaming and variable-frame-length data | |
CN114827663A (zh) | 分布式直播插帧系统及方法 | |
CN109086457A (zh) | 一种分布式视频帧随机读取的元数据服务系统及工作方法 | |
US20140003519A1 (en) | Video encoding apparatus, video decoding apparatus, video encoding method, and video decoding method | |
CN102118633B (zh) | 视频文件播放的方法、装置及系统 | |
CN101296166B (zh) | 基于索引的多媒体数据的测量方法 | |
CN106791536A (zh) | 多媒体文件的录制播放方法及终端 | |
US8259789B2 (en) | Methods and systems for picture rate reduction of stored video while under continuous record load | |
CN100459686C (zh) | 视频再现设备和视频再现方法 | |
CN114339316A (zh) | 一种基于视频直播的视频流编码处理方法 | |
CN105657448A (zh) | 一种编码视频流的转发方法、装置及系统 | |
CN105187688A (zh) | 一种对手机采集的实时视频和音频进行同步的方法及系统 | |
CN114786065A (zh) | 一种基于FFmpeg的HLS视频播放进度精准切换方法 | |
US7430325B2 (en) | Encoding system conversion apparatus and method for same | |
CN111866602A (zh) | 一种无损高精度的流采集方法 | |
US11831862B2 (en) | Embedded timestamps for determining offset between test streams | |
CN115243101B (zh) | 视频动静率识别方法、装置、电子设备及存储介质 |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20201117 |
|
WW01 | Invention patent application withdrawn after publication |