CN113271458A - Method for detecting video source effectiveness in transcoding system - Google Patents

Method for detecting video source effectiveness in transcoding system Download PDF

Info

Publication number
CN113271458A
CN113271458A CN202110544988.8A CN202110544988A CN113271458A CN 113271458 A CN113271458 A CN 113271458A CN 202110544988 A CN202110544988 A CN 202110544988A CN 113271458 A CN113271458 A CN 113271458A
Authority
CN
China
Prior art keywords
video
address
file
plug flow
detection result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110544988.8A
Other languages
Chinese (zh)
Other versions
CN113271458B (en
Inventor
王程
李超
罗鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongke Flux Technology Co ltd
Original Assignee
Beijing Ruixin High Throughput Technology 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 Beijing Ruixin High Throughput Technology Co ltd filed Critical Beijing Ruixin High Throughput Technology Co ltd
Priority to CN202110544988.8A priority Critical patent/CN113271458B/en
Publication of CN113271458A publication Critical patent/CN113271458A/en
Application granted granted Critical
Publication of CN113271458B publication Critical patent/CN113271458B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • 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
    • H04N21/44008Processing 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 involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • 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
    • H04N21/4402Processing 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 involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing 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 involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4

Abstract

The invention discloses a method for detecting the effectiveness of a video source in a transcoding system, which comprises the following steps: step 1: when a transcoding task of a new video file or a network video plug flow is added in transcoding configuration of a transcoding system, a video address in a task request is obtained; step 2: detecting the existence of the video file at the server end according to the video address, and entering the step 3 if the video file exists; otherwise, judging the video address as the network video stream address, and entering the step 4; and step 3: calling OpenCV to carry out validity detection on the video file, and returning a detection result; and 4, step 4: and calling the FFMPEG to carry out validity detection on the network video plug flow and returning a detection result.

Description

Method for detecting video source effectiveness in transcoding system
Technical Field
The invention relates to a video processing and detecting technology, in particular to a method for detecting video source effectiveness in a transcoding system.
Background
With the development of internet technology, the transmission of video files or video streams occupies a large amount of internet resources, and invalid video files or video streams are not available, so that the validity of video sources is usually detected in order to avoid acquiring a large amount of invalid videos.
The existing detection method comprises two parts of requesting and returning results, specifically: firstly, a request mode is used for accessing an HTTP (Hypertext Transfer Protocol) service of a video source to acquire a state code, and then whether the video source is effective or not is judged according to the state code or whether a returned result is acquired. The HTTP Status Code (HTTP Status Code) is a 3-bit digital Code used to indicate the HTTP service response Status of the web server, and is used to indicate the Status of the page request, and the commonly used HTTP Status Code includes: 200, indicating that the request was successful; 303, indicating redirection; 400, indicating a request error; 401, indicating unauthorized; 403, indicating access is prohibited; 404, indicating that the file is not found; 500, server error. If the HTTP status code acquired by the request is 200, the detected video source is determined to be valid; if the request times out or the returned HTTP status code is not 200, the detected video source is deemed invalid. The video source detected in this way must be the HTTP address of the push stream, not the video file address.
However, when the video source address fails, the system needs to spend a large amount of time waiting for the return of the request result, and the waiting time generally exceeds the timeout time of the normal HTTP service, thereby causing the timeout of the request for accessing the port; in addition, the detection method can only detect the effectiveness of the video plug flow, but cannot detect the effectiveness of different types of video files.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method for detecting video source validity in a transcoding system, which is used to detect a transcoding task (including an uploaded video file or a video plug-flow using a network device such as a camera) newly added in a transcoding configuration of the transcoding system, and the method obtains and returns video information by parsing using FFMPEG or OPENCV, and if no information is returned during detection, directly returns a video source invalidity as a detection result, thereby being capable of realizing fast and effective detection of the validity of the video file and the video plug-flow.
In order to achieve the above object, the present invention provides a method for detecting video source effectiveness in a transcoding system, which comprises the following steps:
step 1: when a transcoding task of a new video file or a network video plug flow is added in transcoding configuration of a transcoding system, a video address in a task request is obtained;
step 2: the existence detection of the video file at the server side is carried out according to the video address,
if the video file is detected to exist, entering the step 3;
otherwise, judging the video address as a network video plug flow address, and entering the step 4;
and step 3: calling OpenCV to carry out video source validity detection on the video file, and returning a detection result;
and 4, step 4: and calling the FFMPEG to carry out video source validity detection on the network video plug flow, and returning a detection result.
In an embodiment of the present invention, the detecting the existence of the server-side video file according to the video address in step 2 specifically includes:
if the video to be detected exists in the server side in a file form or is uploaded to the server side through a file uploading interface, the detected video address is a file address, namely the video file existing in the server side is detected;
if the video to be detected is the network video plug flow, it is detected that no video file exists at the server side, that is, it is detected that the video address is the network video plug flow address, wherein the network video plug flow comprises camera plug flow or video plug flow of network service.
In an embodiment of the present invention, step 3 specifically includes:
step 301: reading a video file through a Python interface of OpenCV;
step 302: analyzing video information in the video file and entering the next step, wherein the video information comprises: the resolution, the total frame number, the code rate, the frame rate and the coding mode of the video;
if the video information cannot be acquired during analysis, directly returning the invalidity of the video file as an effectiveness detection result;
step 303: randomly acquiring any video frame of a video file as a thumbnail to be stored;
step 304: and returning the address of the saved thumbnail and the analyzed video information as a validity detection result.
In an embodiment of the present invention, step 4 specifically includes:
step 401: reading the video plug stream through FFMPEG;
step 402: analyzing video information in the video plug flow and entering the next step, wherein the video information comprises: the resolution, the total frame number, the code rate, the frame rate and the coding mode of the video;
if the video information cannot be acquired during analysis, directly returning the invalid video plug flow as an effectiveness detection result;
step 403: randomly acquiring any video frame of the video plug flow as a thumbnail to be stored;
step 404: and returning the address of the saved thumbnail and the analyzed video information as a validity detection result.
In an embodiment of the present invention, in step 402, when there is no image information in the video channel of the parsed video stream and only there is audio information in the audio channel, the video stream pushing invalidation is returned as the validity detection result.
According to the video source effectiveness detection method provided by the invention, the problem that the prior art can only detect the video plug flow is solved by additionally detecting the address path of the video file, the video source effectiveness detection speed is greatly improved, the defect that the prior art needs to wait for a long time is overcome, the user experience is more friendly, and the error probability of the system is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an architecture diagram of a transcoding system in which an embodiment of the present invention is located;
FIG. 2 is a flow chart of an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
Fig. 1 is an architecture diagram of a transcoding system according to an embodiment of the present invention, and as shown in fig. 1, the transcoding system according to the embodiment includes transcoding management, device management, and system management, where the transcoding management includes transcoding configuration, template management, and watermark management; device management includes camera management and nvr device management; the system management comprises user management, menu management and authority management. The method for detecting video source effectiveness provided by this embodiment is used for detecting effectiveness of videos in which a transcoding task is newly added in transcoding configuration of transcoding management, where the newly added videos include video files that have been already uploaded by a server or video plug streams of optical network equipment using a camera.
Fig. 2 is a flowchart of an embodiment of the present invention, and as shown in fig. 2, the embodiment provides a method for detecting video source validity in a transcoding system, which includes the following steps:
step 1: when a transcoding task of a new video file or a network video plug flow is added in transcoding configuration of a transcoding system, a video address in a task request is obtained;
the video file of the embodiment may be a video file existing in the server side in a file form, or a video file uploaded to the server side through a file upload interface; the network video stream pushing may be a video stream pushing of a camera or a video stream pushing of other network services, and the embodiment does not limit video files and video streams.
Step 2: the existence detection of the video file at the server side is carried out according to the video address,
if the video file is detected to exist, entering the step 3;
otherwise, judging the video address as a network video plug flow address, and entering the step 4;
in this embodiment, the step 2 of performing the presence detection of the video file at the server side according to the video address specifically includes:
if the video to be detected exists in the server side in a file form or is uploaded to the server side through a file uploading interface, the detected video address is a file address, namely the video file existing in the server side is detected;
if the video to be detected is network video plug flow, it is detected that no video file exists at the server side, that is, it is detected that the video address is a network video stream address, wherein the network plug flow includes camera plug flow, video plug flow of network service and the like.
And step 3: calling OpenCV (a cross-platform computer vision and machine learning software library issued based on BSD license (open source), which can run on various operating systems and provide various programming language interfaces) to carry out video source validity detection on a video file, and returning a detection result;
in this embodiment, step 3 specifically includes:
step 301: reading the video file through an OpenCV Python interface (OpenCV-Python);
step 302: analyzing video information in the video file and entering the next step, wherein the video information comprises: the resolution, the total frame number, the code rate, the frame rate, the coding mode and the like of the video;
if the video information cannot be acquired during analysis, directly returning the invalidity of the video file as an effectiveness detection result;
step 303: randomly acquiring any video frame of a video file as a thumbnail to be stored;
step 304: and returning the address of the saved thumbnail and the analyzed video information as a validity detection result.
And 4, step 4: calling FFMPEG (a set of open source computer programs which can be used for recording and converting digital audio and video and can convert the digital audio and video into streams) to carry out video source validity detection on the network video plug stream, and returning a detection result;
in this embodiment, step 4 specifically includes:
step 401: reading the video plug stream through FFMPEG;
step 402: analyzing video information in the video plug flow and entering the next step, wherein the video information comprises: the resolution, the total frame number, the code rate, the frame rate, the coding mode and the like of the video;
if the video information cannot be acquired during analysis, directly returning the invalid video plug flow as an effectiveness detection result;
step 403: randomly acquiring any video frame of the video plug flow as a thumbnail to be stored;
step 404: and returning the address of the saved thumbnail and the analyzed video information as a validity detection result.
In this embodiment, in step 402, when there is no image information in the video channel of the parsed video stream and only there is audio information in the audio channel, the video stream pushing invalidation is returned as the validity detection result.
The detection method of the embodiment can quickly and effectively detect whether the video to be detected is the video file, and then detects the effectiveness of the video file and the video plug flow, so that the detection speed is increased, and the accuracy is higher.
According to the video source effectiveness detection method provided by the invention, the problem that the prior art can only detect the video plug flow is solved by additionally detecting the address path of the video file, the video source effectiveness detection speed is greatly improved, the defect that the prior art needs to wait for a long time is overcome, the user experience is more friendly, and the error probability of the system is reduced.
Those of ordinary skill in the art will understand that: the figures are merely schematic representations of one embodiment, and the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.
Those of ordinary skill in the art will understand that: modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, or may be located in one or more devices different from the embodiments with corresponding changes. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (5)

1. A method for detecting the effectiveness of a video source in a transcoding system is characterized by comprising the following steps:
step 1: when a transcoding task of a new video file or a network video plug flow is added in transcoding configuration of a transcoding system, a video address in a task request is obtained;
step 2: the existence detection of the video file at the server side is carried out according to the video address,
if the video file is detected to exist, entering the step 3;
otherwise, judging the video address as a network video plug flow address, and entering the step 4;
and step 3: calling OpenCV to carry out video source validity detection on the video file, and returning a detection result;
and 4, step 4: and calling the FFMPEG to carry out video source validity detection on the network video plug flow, and returning a detection result.
2. The method for detecting video source effectiveness according to claim 1, wherein the step 2 of detecting the existence of the video file at the server side according to the video address specifically comprises:
if the video to be detected exists in the server side in a file form or is uploaded to the server side through a file uploading interface, the detected video address is a file address, namely the video file existing in the server side is detected;
if the video to be detected is the network video plug flow, it is detected that no video file exists at the server side, that is, it is detected that the video address is the network video plug flow address, wherein the network video plug flow comprises camera plug flow or video plug flow of network service.
3. The method for detecting the effectiveness of a video source according to claim 1, wherein step 3 specifically comprises:
step 301: reading a video file through a Python interface of OpenCV;
step 302: analyzing video information in the video file and entering the next step, wherein the video information comprises: the resolution, the total frame number, the code rate, the frame rate and the coding mode of the video;
if the video information cannot be acquired during analysis, directly returning the invalidity of the video file as an effectiveness detection result;
step 303: randomly acquiring any video frame of a video file as a thumbnail to be stored;
step 304: and returning the address of the saved thumbnail and the analyzed video information as a validity detection result.
4. The method for detecting the effectiveness of a video source according to claim 1, wherein the step 4 specifically comprises:
step 401: reading the video plug stream through FFMPEG;
step 402: analyzing video information in the video plug flow and entering the next step, wherein the video information comprises: the resolution, the total frame number, the code rate, the frame rate and the coding mode of the video;
if the video information cannot be acquired during analysis, directly returning the invalid video plug flow as an effectiveness detection result;
step 403: randomly acquiring any video frame of the video plug flow as a thumbnail to be stored;
step 404: and returning the address of the saved thumbnail and the analyzed video information as a validity detection result.
5. The method according to claim 4, wherein in step 402, when there is no image information in the video channel of the video stream, and only there is audio information in the audio channel, then returning the video stream invalid as the validity detection result.
CN202110544988.8A 2021-05-19 2021-05-19 Method for detecting video source effectiveness in transcoding system Active CN113271458B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110544988.8A CN113271458B (en) 2021-05-19 2021-05-19 Method for detecting video source effectiveness in transcoding system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110544988.8A CN113271458B (en) 2021-05-19 2021-05-19 Method for detecting video source effectiveness in transcoding system

Publications (2)

Publication Number Publication Date
CN113271458A true CN113271458A (en) 2021-08-17
CN113271458B CN113271458B (en) 2022-12-02

Family

ID=77231800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110544988.8A Active CN113271458B (en) 2021-05-19 2021-05-19 Method for detecting video source effectiveness in transcoding system

Country Status (1)

Country Link
CN (1) CN113271458B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004266528A (en) * 2003-02-28 2004-09-24 Fujitsu Ltd Video delivery service monitor and monitoring method
CN102325261A (en) * 2011-09-14 2012-01-18 上海交通大学 Synchronization method for eliminating jitter of inter-video video data of stereo video collecting and synthetizing system
CN102364946A (en) * 2011-11-17 2012-02-29 瑞斯康达科技发展股份有限公司 Method and device for judging effectiveness of signal
CN103501468A (en) * 2013-10-17 2014-01-08 珠海迈科电子科技有限公司 Method and device for detecting whether network video playing address is effective
CN103546830A (en) * 2013-10-28 2014-01-29 Tcl集团股份有限公司 Method and system for processing video address failure
CN105516734A (en) * 2015-12-10 2016-04-20 腾讯科技(深圳)有限公司 Method and apparatus for detecting video playing possibility
CN108184142A (en) * 2017-12-29 2018-06-19 深圳中兴网信科技有限公司 The inspection method of video flowing validity, the inspection system of video flowing validity
CN108777819A (en) * 2018-09-13 2018-11-09 上海二三四五网络科技有限公司 A kind of control method and control device based on browser player plays video web page

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004266528A (en) * 2003-02-28 2004-09-24 Fujitsu Ltd Video delivery service monitor and monitoring method
CN102325261A (en) * 2011-09-14 2012-01-18 上海交通大学 Synchronization method for eliminating jitter of inter-video video data of stereo video collecting and synthetizing system
CN102364946A (en) * 2011-11-17 2012-02-29 瑞斯康达科技发展股份有限公司 Method and device for judging effectiveness of signal
CN103501468A (en) * 2013-10-17 2014-01-08 珠海迈科电子科技有限公司 Method and device for detecting whether network video playing address is effective
CN103546830A (en) * 2013-10-28 2014-01-29 Tcl集团股份有限公司 Method and system for processing video address failure
CN105516734A (en) * 2015-12-10 2016-04-20 腾讯科技(深圳)有限公司 Method and apparatus for detecting video playing possibility
CN108184142A (en) * 2017-12-29 2018-06-19 深圳中兴网信科技有限公司 The inspection method of video flowing validity, the inspection system of video flowing validity
CN108777819A (en) * 2018-09-13 2018-11-09 上海二三四五网络科技有限公司 A kind of control method and control device based on browser player plays video web page

Also Published As

Publication number Publication date
CN113271458B (en) 2022-12-02

Similar Documents

Publication Publication Date Title
US10461931B2 (en) Method for watermarking content
US10140105B2 (en) Converting source code
US20180054649A1 (en) Method and device for switching video streams
AU2019200652B2 (en) Using messaging associated with adaptive bitrate streaming to perform media monitoring for mobile platforms
US11120293B1 (en) Automated indexing of media content
US11580200B2 (en) Code identification
US10116770B2 (en) Image processing apparatus based on open platform and protocol conversion method used for the same
CN112995698A (en) Video playing method, client, service platform and intelligent conference system
US10812550B1 (en) Bitrate allocation for a multichannel media stream
CN113225538A (en) Monitoring video playing method and device and service equipment
CN113271458B (en) Method for detecting video source effectiveness in transcoding system
CN114071242A (en) Video playing method, video pushing device and electronic equipment
US20090222919A1 (en) Method and system for content categorization
US10673919B1 (en) Concurrent input monitor and ingest
CN112995766B (en) Method and device for identifying IPTV multi-channel video stream
CN108920589B (en) Browsing hijacking identification method, device, server and storage medium
CN114630143A (en) Video stream storage method and device, electronic equipment and storage medium
CN111586488A (en) Video stream processing method and device, electronic equipment and storage medium
CN111935545B (en) Method, device and equipment for transcoding video data and storage medium
US20140293296A1 (en) Printing frames of a video
CN109831701B (en) Digital television equipment browser and method for expanding cross-page system event
EP4216555A1 (en) Computer implemented method for processing streaming requests and responses
CN117389769A (en) Browser-end rich text copying method and system based on cloud service and cloud platform
CN115249309A (en) Visual verification method and system for multimedia file
CN117032662A (en) Data processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Room 711c, 7 / F, block a, building 1, yard 19, Ronghua Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing 102600

Patentee after: Beijing Zhongke Flux Technology Co.,Ltd.

Address before: Room 711c, 7 / F, block a, building 1, yard 19, Ronghua Middle Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing 102600

Patentee before: Beijing Ruixin high throughput technology Co.,Ltd.