CN111031378B - 一种视频打点和记录epg信息的方法 - Google Patents

一种视频打点和记录epg信息的方法 Download PDF

Info

Publication number
CN111031378B
CN111031378B CN201911321784.7A CN201911321784A CN111031378B CN 111031378 B CN111031378 B CN 111031378B CN 201911321784 A CN201911321784 A CN 201911321784A CN 111031378 B CN111031378 B CN 111031378B
Authority
CN
China
Prior art keywords
video
max
image
value
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911321784.7A
Other languages
English (en)
Other versions
CN111031378A (zh
Inventor
李亚
修志远
林洪刚
李敬昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Ultra HD Video Industry Co Ltd
Original Assignee
Shandong Inspur Ultra HD Video Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Inspur Ultra HD Video Industry Co Ltd filed Critical Shandong Inspur Ultra HD Video Industry Co Ltd
Priority to CN201911321784.7A priority Critical patent/CN111031378B/zh
Publication of CN111031378A publication Critical patent/CN111031378A/zh
Application granted granted Critical
Publication of CN111031378B publication Critical patent/CN111031378B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4332Content storage operation, e.g. storage operation in response to a pause request, caching operations by placing content in organized collections, e.g. local EPG data repository
    • 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • H04N21/4314Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for fitting data in a restricted space on the screen, e.g. EPG data in a rectangular grid
    • 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream

Landscapes

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

Abstract

本发明提出一种视频打点和记录EPG信息的方法,包括步骤:将需要打入视频的EPG信息编码为通用JSON字符串;人工观看视频寻找到要嵌入信息的原始帧,拿出原始帧中图像格式为YUV420的图像,取出其中的Y值图像;遍历Y值图像得到Y值分布直方图,记录出现次数最多的Y值为Ymax;将Y值图像中所有大于Ymax的像素点的Y值加1;按照图像扫描顺序依次将转化好的二进制码写入Y值图像;裁剪视频时,播放器播放视频读取原始帧的二进制码;将该二进制码转换为包含EPG信息的字符串;当转换得到的type字段表示为结束时,完成裁剪。本发明能够在几乎不影响视频视觉效果的前提下,依据记录的EPG信息得到视频节目的精确裁剪。

Description

一种视频打点和记录EPG信息的方法
技术领域
本发明涉及视频数据处理技术领域,尤其涉及一种视频打点和记录EPG信息的方法。
背景技术
视频直播领域,往往需要在直播的内容中显示EPG信息,或者在节目过后进行EPG整段节目的截取存储,转化为点播节目。
目前的做法,基本都是根据视频的时间点进行打点处理,根据时间点进行截取。这种老的方式的弊端在于EPG的展示并不精准,尤其是视频内容在做了裁剪处理后,由于视频时长发生了变化,已经打好点的EPG信息需要全部重新打点处理;还有个弊端是在根据打点信息进行视频节目裁剪的时候,准确度不够精确,往往会出现节目多几秒钟或者少几秒钟的情况,对节目转点播的质量造成影响。
发明内容
目前的点播节目裁剪多用时间点打点处理的传统方式,由于误差导致裁剪出的视频精度不够高,容易出现时间的不够准确。另一方面,该方法导致视频节目的EPG展示不够精准,尤其是在视频时长发生变化后,EPG信息需要再次处理,造成工作冗余。
为解决此类问题,本发明提出以下方案。
一种视频打点和记录EPG信息的方法,包括以下步骤:
将需要打入视频的EPG信息编码为通用JSON字符串,所述通用JSON字符串包含type和name两个字段,type表示视频开始和结束,name表示EPG名字,将所述通用JSON字符串转化为二进制码;
人工观看视频寻找到要嵌入EPG信息的原始帧,所述原始帧为I帧、P帧或B帧其中任一,拿出原始帧中图像格式为YUV420的图像,取出其中的Y值图像;
遍历Y值图像得到Y值分布直方图,记录出现次数最多的Y值为Ymax
按照图像扫描顺序依次将转化好的所述二进制码写入Y值图像,二进制0记入Ymax,二进制1记入Ymax+1,记入完毕后将Y值图像合并到原始帧;
裁剪视频时,播放器播放视频读取原始帧,按照图像扫描顺序扫描,计算Ymax,顺序读取Ymax和Ymax+1这2个值的像素点,当读取到Ymax时记0,读取到Ymax+1时记1,按扫描顺序输出0和1的二进制码;
将该二进制码按照8位1个字节转换字节码,再转换为包含EPG信息的字符串;
当转换得到的type字段表示为结束时,完成裁剪。
进一步的,type=0表示视频开始,type=1表示视频结束。
进一步的,所述通用JSON字符串可扩展,但总字节长度
Figure GDA0003349111840000021
其中Bmax为Y值为Ymax的字节数。
本发明提出的方法将视频信息记录在图像中,能够在Y值的变化几乎不影响视频视觉效果的前提下,依据记录的EPG信息得到视频节目的精确裁剪,且即使节目中有被删减的违规片段,也不影响节目的精确度和EPG信息的获取。
具体实施方式
为使得本发明的技术方案、优点更加清楚,下面将结合实施例,对本发明提出的一种视频打点和记录EPG信息的方法作进一步阐释。
S1.准备数据:
将需要打入视频的EPG信息编码为通用JSON字符串,JSON字符串包含type和name两个字段,type表示视频开始和结束,name表示EPG名字,该JSON字符串包含的字段可扩展,但不宜过长,因为图像存储的信息量是有限的,应小于等于Bmax/8向下取整的字节数,Bmax为Y值最大分布数Ymax的字节数;
将所述通用JSON字符串转化为二进制码,例如视频信息的JSON字符串为{"type":0,"name":"天龙八部(23)"},其对应二进制码为01111011001000100111010001111001011100000110010100100010001110100011000000101100001000100110111001100001011011010110010100100010001110100010001010110010010100110011111100110011010001011010111001000011101000001010000011001000110011001010010010001001111101,32个8位的二进制码,共256位。
S2.计算灰度图:
人工观看视频寻找到要嵌入信息的I帧,找到I帧后,取出I帧图像,拿到YUV420的原始图像,并取出区中的Y部分,得到Y值图像;
遍历Y值图像得到Y值分布直方图,记录出现次数最多的Y值为Ymax,该步骤的目的是尽可能多的存储数据。
S3.存储二进制数据:
按照图像扫描顺序(从左上角开始从左到右,从上到下扫描)依次将转化好的二进制码写入Y值图像,二进制0记入Ymax,二进制1记入Ymax+1,记入完毕后将Y值图像合并到原始的I帧。
S4.读取二进制数据:
裁剪视频时,播放器播放视频读取I帧,按照图像扫描顺序扫描,计算Ymax,顺序读取Ymax和Ymax+1这2个值的像素点,当读取到Ymax时记0,读取到Ymax+1时记1,按扫描顺序输出0和1的二进制码;
将该二进制码按照8位1个字节转换字节码,再转换为包含EPG信息的字符串;
当转换得到的type字段为1时,完成裁剪。
如果读取出来的信息不能转换为JSON字符串,那么证明该I帧图像没有写入任何信息。
以上实施例仅为本发明的示范性实施例,不用于限制本发明的范围,本发明的范围由权利要求书限定。任何本领域技术人员做出的同等替换或简单修改也视为落在本发明的实质保护范围内。

Claims (2)

1.一种视频打点和记录EPG信息的方法,其特征在于,包括以下步骤:
将需要打入视频的EPG信息编码为通用JSON字符串,所述通用JSON字符串包含type和name两个字段,type表示视频开始和结束,name表示EPG名字,将所述通用JSON字符串转化为二进制码;
人工观看视频寻找到要嵌入EPG信息的原始帧,所述原始帧为I帧、P帧或B帧其中任一,拿出原始帧中图像格式为YUV420的图像,取出其中的Y值图像;
遍历Y值图像得到Y值分布直方图,记录出现次数最多的Y值为Ymax
按照图像扫描顺序依次将转化好的所述二进制码写入Y值图像,二进制0记入Ymax,二进制1记入Ymax+1,记入完毕后将Y值图像合并到原始帧;
裁剪视频时,播放器播放视频读取原始帧,按照图像扫描顺序扫描,计算Ymax,顺序读取Ymax和Ymax+1这2个值的像素点,当读取到Ymax时记0,读取到Ymax+1时记1,按扫描顺序输出0和1的二进制码;
将该二进制码按照8位1个字节转换字节码,再转换为包含EPG信息的字符串;
当转换得到的type字段表示为结束时,完成裁剪;
所述通用JSON字符串可扩展,但总字节长度
Figure FDA0003349111830000011
其中Bmax为Y值为Ymax的字节数。
2.如权利要求1所述的视频打点和记录EPG信息的方法,其特征在于,type=0表示视频开始,type=1表示视频结束。
CN201911321784.7A 2019-12-20 2019-12-20 一种视频打点和记录epg信息的方法 Active CN111031378B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911321784.7A CN111031378B (zh) 2019-12-20 2019-12-20 一种视频打点和记录epg信息的方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911321784.7A CN111031378B (zh) 2019-12-20 2019-12-20 一种视频打点和记录epg信息的方法

Publications (2)

Publication Number Publication Date
CN111031378A CN111031378A (zh) 2020-04-17
CN111031378B true CN111031378B (zh) 2022-04-05

Family

ID=70212310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911321784.7A Active CN111031378B (zh) 2019-12-20 2019-12-20 一种视频打点和记录epg信息的方法

Country Status (1)

Country Link
CN (1) CN111031378B (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657465A (zh) * 2014-12-02 2016-06-08 Lg电子株式会社 多媒体装置及其控制方法
CN105898323A (zh) * 2015-12-04 2016-08-24 乐视致新电子科技(天津)有限公司 一种在视频中添加水印和确定水印的信息的方法和设备
CN106507120A (zh) * 2016-10-13 2017-03-15 北京奇虎科技有限公司 一种业务对象的处理方法、服务器、终端和系统
CN108549533A (zh) * 2018-04-11 2018-09-18 上海百事灵多媒体科技有限公司 一种epg页面可视化开发中添加自定义控件的方法
CN109902274A (zh) * 2019-02-22 2019-06-18 今天东翼科技有限公司 一种将json字符串转化为thrift二进制流的方法及系统
US10430212B1 (en) * 2016-07-13 2019-10-01 Screenshare Technology Ltd. Method for recording, editing and reproduction of computer session
CN110337004A (zh) * 2019-07-08 2019-10-15 西安交通大学 一种电视节目传播方法及系统
CN110505513A (zh) * 2019-08-15 2019-11-26 咪咕视讯科技有限公司 一种视频截图方法、装置、电子设备及存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8294822B2 (en) * 2010-08-17 2012-10-23 Broadcom Corporation Method and system for key aware scaling
CN105578290B (zh) * 2015-12-15 2019-04-12 无锡天脉聚源传媒科技有限公司 一种基于epg进行计划视频打点的方法及装置
WO2017165538A1 (en) * 2016-03-22 2017-09-28 Uru, Inc. Apparatus, systems, and methods for integrating digital media content into other digital media content
US10462509B2 (en) * 2016-12-29 2019-10-29 Bce Inc. Delivery of electronic programming guide using a caching content delivery network
CN109391829A (zh) * 2017-08-09 2019-02-26 创意引晴(开曼)控股有限公司 视频打点位置分析系统、分析方法及储存媒体
CN109960644A (zh) * 2017-12-22 2019-07-02 北京奇虎科技有限公司 一种sdk的测试方法和系统
US20190354762A1 (en) * 2018-05-17 2019-11-21 Chandru Bolaki Method and device for time lapsed digital video recording and navigation through the same
CN110198458B (zh) * 2019-05-31 2020-04-07 北京文香信息技术有限公司 一种加密音视频数据的处理方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657465A (zh) * 2014-12-02 2016-06-08 Lg电子株式会社 多媒体装置及其控制方法
CN105898323A (zh) * 2015-12-04 2016-08-24 乐视致新电子科技(天津)有限公司 一种在视频中添加水印和确定水印的信息的方法和设备
US10430212B1 (en) * 2016-07-13 2019-10-01 Screenshare Technology Ltd. Method for recording, editing and reproduction of computer session
CN106507120A (zh) * 2016-10-13 2017-03-15 北京奇虎科技有限公司 一种业务对象的处理方法、服务器、终端和系统
CN108549533A (zh) * 2018-04-11 2018-09-18 上海百事灵多媒体科技有限公司 一种epg页面可视化开发中添加自定义控件的方法
CN109902274A (zh) * 2019-02-22 2019-06-18 今天东翼科技有限公司 一种将json字符串转化为thrift二进制流的方法及系统
CN110337004A (zh) * 2019-07-08 2019-10-15 西安交通大学 一种电视节目传播方法及系统
CN110505513A (zh) * 2019-08-15 2019-11-26 咪咕视讯科技有限公司 一种视频截图方法、装置、电子设备及存储介质

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"A General Process for the Semantic Annotation and Enrichment of Electronic Program Guides";Santiago Gonzalez-Toral等;《Iberoamerican Knowledge Graphs and Semantic Web Conference——KGSWC 2019: Knowledge Graphs and Semantic Web》;20190519;全文 *
"基于Android平台的视频播放客户端的设计与实现";马晨夕;《中国优秀硕士学位论文全文数据库》;20170115;全文 *

Also Published As

Publication number Publication date
CN111031378A (zh) 2020-04-17

Similar Documents

Publication Publication Date Title
CN108769731B (zh) 一种检测视频中目标视频片段的方法、装置及电子设备
US20120257836A1 (en) Method for storing and processing image sequence and method for compressing, storing and processing image sequence
CN101996045B (zh) 图像处理设备和图像处理方法
US8532386B2 (en) Electronic document producing device, electronic document producing method and storage medium
CN116684631B (zh) 一种针对公文的图像压缩方法
US20110019928A1 (en) Image processing method, image processing apparatus, and program
CN105704559A (zh) 一种海报生成方法及装置
CN105025357A (zh) 一种视频倒放的方法
US20030184809A1 (en) Grayscale and binary image data compression
US10354353B2 (en) Digital video content security authentication method and system
CN111031378B (zh) 一种视频打点和记录epg信息的方法
US10037476B2 (en) Method and device for use when reassembling a fragmented JPEG image
US6243502B1 (en) Image quality maintenance
US20130315441A1 (en) System for extracting text from a document
CN115171241B (zh) 一种视频帧定位方法、装置、电子设备及存储介质
US8238665B2 (en) Processing of printed documents
US20130315485A1 (en) Textual information extraction method using multiple images
CN114125469B (zh) Mp4文件修复方法、装置、电子设备及存储介质
CN113453070B (zh) 视频关键帧压缩方法及装置、存储介质和电子设备
CN116403233A (zh) 一种基于数字化档案图像定位及识别方法
CN112651336B (zh) 关键帧的确定方法、设备、计算机可读存储介质
US9755762B2 (en) Optical signal recognition method and apparatus
CN111639214B (zh) 一种提高机器人采集动态红外热图时存储效率的方法
CN106101573A (zh) 一种视频标注的锚定及匹配方法
CN109547865B (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
CB02 Change of applicant information

Address after: 250101 west area, North 1st floor, S06 building, 1036 Chaochao Road, high tech Zone, Jinan City, Shandong Province

Applicant after: Shandong Inspur Ultra HD Video Industry Co.,Ltd.

Address before: 250101 west area, North 1st floor, S06 building, 1036 Chaochao Road, high tech Zone, Jinan City, Shandong Province

Applicant before: Shandong Inspur Yunman Intelligent Technology Co.,Ltd.

Address after: 250101 west area, North 1st floor, S06 building, 1036 Chaochao Road, high tech Zone, Jinan City, Shandong Province

Applicant after: Shandong Inspur Yunman Intelligent Technology Co.,Ltd.

Address before: 250101 west area, North 1st floor, S06 building, 1036 Chaochao Road, high tech Zone, Jinan City, Shandong Province

Applicant before: SHANDONG YUNMAN INTELLIGENT TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant