WO2019134338A1 - Video file processing method and program, application server, and storage medium - Google Patents

Video file processing method and program, application server, and storage medium Download PDF

Info

Publication number
WO2019134338A1
WO2019134338A1 PCT/CN2018/089425 CN2018089425W WO2019134338A1 WO 2019134338 A1 WO2019134338 A1 WO 2019134338A1 CN 2018089425 W CN2018089425 W CN 2018089425W WO 2019134338 A1 WO2019134338 A1 WO 2019134338A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
content
video file
video
command
Prior art date
Application number
PCT/CN2018/089425
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 WO2019134338A1 publication Critical patent/WO2019134338A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a video file processing method, a program, an application server, and a computer readable storage medium.
  • video storage and transmission architecture includes client, nginx server (a high-performance HTTP and reverse proxy server, also an IMAP/POP3/SMTP server, also known as the front-end server), local disk, and local disk.
  • nginx server a high-performance HTTP and reverse proxy server, also an IMAP/POP3/SMTP server, also known as the front-end server
  • local disk a high-performance HTTP and reverse proxy server
  • local disk a high-performance HTTP and reverse proxy server
  • local disk a high-performance HTTP and reverse proxy server
  • local disk also known as the front-end server
  • local disk Refers to the application server that connects to the nginx server.
  • the application server that connects to the nginx server.
  • For the video file all the video files are stored on the local disk, and are transmitted to the nginx server through the I/O interface of the file system (fs), and the rtmp (Real Time Messaging Protocol) of the nginx server is real-time.
  • the storage capacity of the video file is limited due to the limitation of the hardware capacity of the local disk.
  • the current application server is in the process of reading data, due to the size of the data, the storage is performed. The impact of space and so on, resulting in data reading is not fast, so the nginx server obtains the data content of the application server and then transmits the video file to the client in the form of rtmp live stream through the rtmp module, the client cannot directly implement the local The effect of on-demand video files stored on disk.
  • the present application provides a video file processing method, a program, an application server, and a computer readable storage medium, which can utilize the characteristics of the S3 server to realize unlimited expansion of video file storage, ensure the stability of video file storage, and read.
  • the video on demand service can be implemented under the rtmp protocol according to the embedded video on demand instruction, thereby improving the user experience.
  • the present application provides an application server, where the application server includes a memory, a processor, and a video file processing program executable on the processor, where the video file processing is stored.
  • the program implements the following steps when executed by the processor:
  • the content of the storage segment is retrieved by the calling interface to the nginx server, and the content of the storage end is transmitted by the nginx server. To the client.
  • the present application further provides a video file processing method, which is applied to an application server, and the method includes:
  • the content of the storage segment is retrieved by the calling interface to the nginx server, and the content of the storage end is transmitted by the nginx server. To the client.
  • the present application further provides a video file processing program, where the video file processing program includes:
  • An interface definition module configured to define a calling interface between the S3 server and the nginx server based on the CEPH specification
  • the uploading module is configured to upload a video file to the S3 server and store the file to a storage segment;
  • a command definition module configured to define a command for playing the content of the storage segment in a configuration file of the nginx server
  • a receiving module configured to receive a video play instruction of the client by using the nginx server, and determine whether the video play instruction matches the command for playing the content of the storage segment;
  • An acquiring module configured to: retrieve the content of the storage segment to the nginx server by using the calling interface, if the video playback instruction matches the command for playing the content of the storage segment;
  • a transmission module configured to control the nginx server to transmit the content of the storage end to the client.
  • the present application further provides a computer readable storage medium storing a video file processing program, the video file processing program being executable by at least one processor, so that The at least one processor performs the steps of the video file processing method as described above.
  • the application server, the video file processing method and the computer readable storage medium proposed by the present application firstly define a calling interface between the S3 server and the nginx server based on the CEPH specification; secondly, upload the video file to the S3.
  • the server is stored in a storage segment; then, a command to play the content of the storage segment is defined in a configuration file of the nginx server; then, a video playback instruction of the client is received through the nginx server, and the video playback instruction and the playback are determined.
  • the S3 server can quickly read the characteristics of the data, and the on-demand effect of the video file stored by the client on the local disk can be realized. It can also realize the arbitrary storage of video file storage by using the characteristics of S3 server, ensure the stability of video file storage and the convenience of reading, and also realize the video on demand service under the rtmp protocol according to the embedded video on demand instruction, and improve the service. user experience.
  • FIG. 1 is a schematic diagram of an optional application environment of each embodiment of the present application.
  • FIG. 2 is a schematic diagram of an optional hardware architecture of the application server of FIG. 1;
  • FIG. 3 is a block diagram showing the program of the first embodiment of the video file processing program of the present application.
  • FIG. 4 is a flowchart of a first embodiment of a video file processing method according to the present application.
  • FIG. 5 is a flowchart of a second embodiment of a video file processing method according to the present application.
  • Client 1 application server 2 The internet 3 S3 server 4 Nginx server 5 Memory 11 processor 12 Network Interface 13 Video file handler 200 Interface definition module 201 Upload module 202 Command definition module 203 Receiving module 204
  • FIG. 1 it is a schematic diagram of an optional application environment of each embodiment of the present application.
  • the present application is applicable to an application environment including, but not limited to, a client 1, an application server 2, a network 3, a S3 (Simple Storage Service) server 4, and a nginx server 5.
  • the application server 2 connects and manages the S3 server 4 and the nginx server 5, and the client 1 directly connects to the nginx server 5, and initiates a corresponding request to the application server 2 through the nginx server 5, and is controlled by the application server 2 to be retrieved or processed and stored in the S3.
  • the client 1 may be a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet PC), a PMP (Portable Multimedia Player), a navigation device, an in-vehicle device, etc.
  • Mobile devices such as, and fixed terminals such as digital TVs, desktop computers, notebooks, servers, and the like.
  • the application server 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server.
  • the application server 2 may be a stand-alone server or a server cluster composed of multiple servers.
  • the network 3 may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, Wireless or wired networks such as 5G networks, Bluetooth, Wi-Fi, and call networks.
  • GSM Global System of Mobile communication
  • WCDMA Wideband Code Division Multiple Access
  • 4G network Wireless or
  • the assets stored and retrieved by the S3 server 4 are referred to as objects, and the objects are stored in a bucket, and different objects are stored in different storage segments according to different objects, such as file files stored in file storage. Segment, the video file is stored in the movie storage segment.
  • the S3 server has the characteristics that other servers do not have, that is, the file storage capacity is large, and there is no need to worry about the limitation of the storage space; in addition, the reading speed of the files on the S3 server is much faster than the data reading speed of other storage media.
  • the application server 2 is respectively connected to one or more of the client 1, the S3 server 4, and the nginx server 5 through the network 3 for data transmission and interaction.
  • the application server 2 connects and manages the S3 server 4 and the nginx server 5, defines a corresponding calling interface, and the client 1 directly connects to the nginx server 5, and initiates a corresponding request to the application server through the nginx server 5. 2.
  • the object stored in the S3 server 4 is retrieved or processed by the application server 2.
  • the calling interface between the S3 server 4 and the nginx server 5 is defined based on the CEPH specification; the video file is uploaded to the S3 server 4 and stored to a storage.
  • a command for playing the content of the storage segment in the configuration file of the nginx server 5 receiving a video playback instruction of the client 1 through the nginx server 5, and determining the video playback instruction and the defined playing segment Whether the command of the content matches; if the video play instruction matches the defined command to play the content of the storage segment, the content of the storage segment is retrieved from the calling interface to the nginx server; the nginx server will obtain the location
  • the contents of the storage segment are transmitted to the client 1 in the rtmp protocol.
  • the S3 server 4 can be used to realize arbitrary storage of video files, ensuring the stability of video file storage and the convenience of reading, and can also implement video on demand service under the rtmp protocol according to the embedded video on demand instruction, thereby improving the user. Experience.
  • the application server 2 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through a system bus. It is to be noted that FIG. 2 only shows the application server 2 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), and a random access memory (RAM). , static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 11 may be an internal storage unit of the application server 2, such as a hard disk or memory of the application server 2.
  • the memory 11 may also be an external storage device of the application server 2, such as a plug-in hard disk equipped on the application server 2, a smart memory card (SMC), and a secure digital number. (Secure Digital, SD) card, flash card, etc.
  • the memory 11 can also include both the internal storage unit of the application server 2 and its external storage device.
  • the memory 11 is generally used to store an operating system installed in the application server 2 and various types of application software, such as program code of the video file processing program 200. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is typically used to control the overall operation of the application server 2, such as performing control and processing related to data interaction or communication with the client 1.
  • the processor 12 is configured to run program code or process data stored in the memory 11, such as running the video file processing program 200 and the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the application server 2 and other electronic devices.
  • the network interface 13 is mainly used to connect the application server 2 to one or more of the client 1, the S3 server 4, and the nginx server 5 through the network 3, in the application server 2 Establishing a data transmission channel and a communication connection with the one or more clients 1, the S3 server 4, and the nginx server 5.
  • the present application proposes a video file processing program 200.
  • FIG. 3 it is a program module diagram of the first embodiment of the video file processing program 200 of the present application.
  • the video file processing program 200 includes a series of computer program instructions stored in the memory 11, and when the computer program instructions are executed by the processor 12, the video files of the embodiments of the present application may be implemented. Processing operations.
  • the video file processing program 200 can be divided into one or more modules based on the particular operations implemented by the various portions of the computer program instructions. For example, in FIG. 3, the video file processing program 200 can be divided into an interface definition module 201, an upload module 202, a command definition module 203, a receiving module 204, an obtaining module 205, and a transmission module 206. among them:
  • the interface definition module 201 is configured to define a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification.
  • CEPH is a distributed file system, which can be divided into four levels: (1) basic storage system, (2) basic library librados, (3) high-level application interface: this layer consists of three parts: RADOS GW ( RADOS Gateway), RBD (Reliable Block Device) and Ceph FS (Ceph File System), which provide an upper level interface with higher level of abstraction, easier application or client 1 based on the librados library, where RADOS GW is A gateway that provides RESTful APIs compatible with Amazon S3 Server 4 and Swift for use by the corresponding object storage application development.
  • RADOS GW is A gateway that provides RESTful APIs compatible with Amazon S3 Server 4 and Swift for use by the corresponding object storage application development.
  • Application layer The above CEPH has a CEPH specification, which can be called by an interface between various levels in the CEPH system through the CEPH specification.
  • one of the layers - the high-level application interface can provide an upper-layer interface for the externally connected server or client 1, that is, CEPH can regulate its own calling interface with the S3 server 4 and the nginx server 5, and at the same time, due to the S3 server 4 is a simple storage service device, there is a specific access interface, CEPH can define the calling interface of the S3 server 4 and the nginx server 5 in the storage object calling process through the specification.
  • the uploading module 202 is configured to upload a video file to the S3 server 4 and store the file to a storage segment. Specifically, the uploading module 202 implements the step of uploading the video file to the S3 server 4 and storing it to a storage segment in the following manner:
  • the uploading module 202 defines an uploaded video file name; and sets access rights to access the video file according to the S3 server 4 specification.
  • the mp4 or flv file can be uploaded to the ticket (storage segment) of the movie of the S3 server 4, and the uploaded file name is named "video.mp4", and the access permission is set to "public-read”.
  • the corresponding content-type taking s3cmd as an example, the setting instruction is: s3cmd put video.mp4s3://movie--acl-public.
  • the command definition module 203 defines a command to play the content of the storage segment in a configuration file of the nginx server 5.
  • the nginx server 5 includes an rtmp module, and the step of defining a command for playing the storage segment content in a configuration file of the nginx server 5 is specifically configured to configure the rtmp module of the nginx server 5.
  • the rtmp Real Time Messaging Protocol
  • Real-Time Messaging Protocol is an open protocol developed by Adobe Systems for audio, video and data transfer between Flash Player and server.
  • the rtmp module of the nginx server 5 is configured, and the following content is added in the nginx.conf:
  • the receiving module 204 receives the video playing instruction of the client 1 through the nginx server 5, and determines whether the video playing instruction matches the command for playing the content of the storage segment.
  • the video play instruction is used to trigger a command to play the content of the storage segment.
  • the video play command is a click command for the client 1 to open a link by using a player.
  • the client 1 can initiate a video play command by using a VLC multimedia player or other player supporting the rtmp protocol to open a video play command: rtmp:// ⁇ nginx_server ⁇ /vod_http/video.mp4.
  • the obtaining module 205 is configured to retrieve the content of the storage segment to the nginx server by using the calling interface when the video playback instruction matches the command for playing the storage segment content.
  • the transmission module 206 is configured to control the nginx server to transmit the content of the storage end to the client 1.
  • the video file processing program 200 proposed by the present application firstly defines a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification; secondly, uploads a video file to the S3 server 4 and stores it to a storage segment; then, a command to play the content of the storage segment is defined in a configuration file of the nginx server 5; then, a video playback instruction of the client is received by the nginx server, and the video playback instruction is determined to play the storage Whether the command of the segment content matches; if the video play instruction matches the command to play the content of the storage segment, finally, the content of the storage segment is retrieved to the nginx server through the calling interface, and The nginx server transmits the content of the storage to the client.
  • the S3 server can quickly read the characteristics of the data, and the on-demand effect of the video file stored by the client on the local disk can be realized. It can also realize the arbitrary storage of video file storage by using the characteristics of S3 server, ensure the stability of video file storage and the convenience of reading, and also realize the video on demand service under the rtmp protocol according to the embedded video on demand instruction, and improve the service. user experience.
  • the present application also proposes a video file processing method.
  • FIG. 4 it is a schematic flowchart of the implementation of the first embodiment of the video file processing method of the present application.
  • the order of execution of the steps in the flowchart shown in FIG. 4 may be changed according to different requirements, and some steps may be omitted.
  • Step S401 defining a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification.
  • CEPH is a distributed file system, which can be divided into four levels: (1) basic storage system, (2) basic library librados, (3) high-level application interface: this layer consists of three parts: RADOS GW ( RADOS Gateway), RBD (Reliable Block Device) and Ceph FS (Ceph File System), which provide an upper level interface with higher level of abstraction, easier application or client 1 based on the librados library, where RADOS GW is A gateway that provides RESTful APIs compatible with Amazon S3 Server 4 and Swift for use by the corresponding object storage application development.
  • RADOS GW is A gateway that provides RESTful APIs compatible with Amazon S3 Server 4 and Swift for use by the corresponding object storage application development.
  • Application layer The above CEPH has a CEPH specification, which can be called by an interface between various levels in the CEPH system through the CEPH specification.
  • one of the layers - the high-level application interface can provide an upper-layer interface for the externally connected server or client 1, that is, CEPH can regulate its own calling interface with the S3 server 4 and the nginx server 5, and at the same time, due to the S3 server 4 is a simple storage service device, there is a specific access interface, CEPH can define the calling interface of the S3 server 4 and the nginx server 5 in the storage object calling process through the specification.
  • step S402 the video file is uploaded to the S3 server 4 and stored to a storage segment.
  • the specific steps of uploading the video file to the S3 server 4 and storing to a storage segment will be detailed in the second embodiment (Fig. 5) of the video file processing method of the present application.
  • Step S403 a command for playing the content of the storage segment is defined in a configuration file of the nginx server 5.
  • the nginx server 5 includes an rtmp module, and the step of defining a command for playing the storage segment content in a configuration file of the nginx server 5 is specifically configured to configure the rtmp module of the nginx server 5.
  • the rtmp Real Time Messaging Protocol
  • Real-Time Messaging Protocol is an open protocol developed by Adobe Systems for the transfer of audio, video and data between Flash Players and servers.
  • the rtmp module of the nginx server 5 is configured, and the following content is added in the nginx.conf:
  • Step S404 receiving a video play instruction of the client 1 through the nginx server 5, and determining whether the video play instruction matches the command for playing the content of the storage segment.
  • the video play command is a click command for the client 1 to open a link by using a player.
  • the client 1 can initiate a video play command by using a VLC multimedia player or other player supporting the rtmp protocol to open a video play command: rtmp:// ⁇ nginx_server ⁇ /vod_http/video.mp4.
  • Step S405 When the video play instruction matches the command to play the storage segment content, the content of the storage segment is retrieved to the nginx server by using the calling interface. .
  • Step S406 is configured to control the nginx server to transmit the content of the storage end to the client 1.
  • the video file processing method proposed by the present application firstly defines a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification; secondly, uploads the video file to the S3 server 4 and stores it to a storage. a segment; then, in the configuration file of the nginx server 5, a command to play the content of the storage segment is defined; then, a video playback instruction of the client is received by the nginx server, and the video playback instruction and the content of the storage segment are played.
  • the S3 server can quickly read the characteristics of the data, and the on-demand effect of the video file stored by the client on the local disk can be realized. It can also realize the arbitrary storage of video file storage by using the characteristics of S3 server, ensure the stability of video file storage and the convenience of reading, and also realize the video on demand service under the rtmp protocol according to the embedded video on demand instruction, and improve the service. user experience.
  • FIG. 5 it is a schematic flowchart of the implementation of the second embodiment of the video file processing method of the present application.
  • the order of execution of the steps in the flowchart shown in FIG. 5 may be changed according to different requirements, and some steps may be omitted.
  • the process of uploading a video file to the S3 server 4 and storing the data to a storage segment includes the following steps:
  • Step S501 defining an uploaded video file name.
  • Step S502 setting access rights for accessing the video file according to the S3 server 4 specification.
  • the mp4 or flv file can be uploaded to the ticket (storage segment) of the movie of the S3 server 4, and the uploaded file name is named "video.mp4", and the access permission is set to "public-read”.
  • the corresponding content-type taking the S3 server cmd as an example, the setting instruction is: s3cmd put video.mp4s3://movie--acl-public.
  • the video file processing method proposed by the present application can upload the video file to the S3 server 4 by defining the uploaded video file name and setting the access right of accessing the video file according to the S3 server 4 specification. In this way, the unlimited expansion of the video file storage is realized, and the stability of the video file storage and the convenience of reading are ensured.
  • the present application further provides a computer readable storage medium storing a video file processing program, the video file processing program being executable by at least one processor, so that The at least one processor performs the steps of the video file processing method as described above.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Abstract

The present application discloses a video file processing method, comprising: defining a call interface between an S3 server and an Nginx server on the basis of the CEPH specification; uploading a video file to the S3 server 4 and storing the file to a storage segment; defining in a configuration file of the Nginx server a command for playing back the content of the storage segment; receiving a video playback instruction of a client via the Nginx server, and determining whether the video playback instruction matches the command for playing back the content of the storage segment; and if the video playback instruction matches the command for playing back the content of the storage segment, calling the content of the storage segment to the Nginx server by means of the call interface, and transmitting the content of the storage segment to the client by means of the Nginx server. The present application further provides a video file processing program, an application server, and a computer readable storage medium. The present application can achieve unlimited expansion of video file storage, thereby ensuring stable storage and convenient reading of video files, and improving the user experience.

Description

视频文件处理方法、程序、应用服务器及存储介质Video file processing method, program, application server and storage medium
优先权申明Priority claim
本申请基于巴黎公约申明享有2018年01月03日递交的申请号为CN201810003943.8、名称为“视频文件处理方法、应用服务器及计算机可读存储介质”中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。The present application is based on the priority of the Chinese Patent Application entitled "Video file processing method, application server and computer readable storage medium", which is filed on January 3, 2018, with the application number of CN201810003943.8, which is filed on January 3, 2018. The overall content is incorporated herein by reference.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种视频文件处理方法、程序、应用服务器及计算机可读存储介质。The present application relates to the field of communications technologies, and in particular, to a video file processing method, a program, an application server, and a computer readable storage medium.
背景技术Background technique
目前,视频的存储及传输架构包括客户端、nginx服务器(一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器,也可以称之为前段服务器)、本地磁盘,其中本地磁盘指的是连接nginx服务器的应用服务器。而对于视频文件而言,所有视频文件均存储于上述本地磁盘上,通过文件系统(file system,fs)的I/O接口传送至nginx服务器,并由nginx服务器的rtmp(Real Time Messaging Protocol,实时消息传输协议)模块对接收的视频文件进行处理,并依据rtmp协议将视频文件以直播流的形式传送至客户端。在上述的视频存储及传输的结构中,由于本地磁盘的硬件容量限制,使得视频文件的存储大小受到限制,另外,由于现在的应用服务器在进行数据读取的过程中,由于受到数据大小,存储空间等等的影响,导致数据读取并不快,故由nginx服务器获取应用服务器的数据内容再通过rtmp模块将视频文件以rtmp的直播流的形式传送至客户端,客户端便不能实现直接对本地磁盘存储的视频文件进行点播的效果。Currently, video storage and transmission architecture includes client, nginx server (a high-performance HTTP and reverse proxy server, also an IMAP/POP3/SMTP server, also known as the front-end server), local disk, and local disk. Refers to the application server that connects to the nginx server. For the video file, all the video files are stored on the local disk, and are transmitted to the nginx server through the I/O interface of the file system (fs), and the rtmp (Real Time Messaging Protocol) of the nginx server is real-time. The message transmission protocol module processes the received video file and transmits the video file to the client in the form of a live stream according to the rtmp protocol. In the above structure of video storage and transmission, the storage capacity of the video file is limited due to the limitation of the hardware capacity of the local disk. In addition, since the current application server is in the process of reading data, due to the size of the data, the storage is performed. The impact of space and so on, resulting in data reading is not fast, so the nginx server obtains the data content of the application server and then transmits the video file to the client in the form of rtmp live stream through the rtmp module, the client cannot directly implement the local The effect of on-demand video files stored on disk.
发明内容Summary of the invention
有鉴于此,本申请提出一种视频文件处理方法、程序、应用服务器及计算机可读存储介质,可以利用S3服务器的特性实现视频文件存储的无限扩容,保证视频文件存储的稳定性以及读取的便捷性,同时还可以依据嵌入的视频点播指令在rtmp协议下实现视频点播的服务,提升了用户体验。In view of this, the present application provides a video file processing method, a program, an application server, and a computer readable storage medium, which can utilize the characteristics of the S3 server to realize unlimited expansion of video file storage, ensure the stability of video file storage, and read. Convenience, at the same time, the video on demand service can be implemented under the rtmp protocol according to the embedded video on demand instruction, thereby improving the user experience.
首先,为实现上述目的,本申请提出一种应用服务器,所述应用服务器包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的视频文件处理程序,所述视频文件处理程序被所述处理器执行时实现如下步骤:First, in order to achieve the above object, the present application provides an application server, where the application server includes a memory, a processor, and a video file processing program executable on the processor, where the video file processing is stored. The program implements the following steps when executed by the processor:
基于CEPH规范定义S3服务器与nginx之间的调用接口;Defining a calling interface between the S3 server and nginx based on the CEPH specification;
上传视频文件至S3服务器并存储至一存储段;Upload a video file to the S3 server and store it to a storage segment;
通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;及Receiving, by the nginx server, a video play instruction of the client, and determining whether the video play instruction matches the command for playing the content of the storage segment; and
若所述视频播放指令与所述播放所述存储段内容的命令匹配,通过所述调用接口调取所述存储段的内容至所述nginx服务器,并由所述nginx服务器传输所述存储端的内容至所述客户端。And if the video play instruction matches the command to play the content of the storage segment, the content of the storage segment is retrieved by the calling interface to the nginx server, and the content of the storage end is transmitted by the nginx server. To the client.
此外,为实现上述目的,本申请还提供一种视频文件处理方法,该方法应用于应用服务器,所述方法包括:In addition, to achieve the above object, the present application further provides a video file processing method, which is applied to an application server, and the method includes:
基于CEPH规范定义S3服务器与nginx服务器之间的调用接口;Defining a calling interface between the S3 server and the nginx server based on the CEPH specification;
上传视频文件至S3服务器并存储至一存储段;Upload a video file to the S3 server and store it to a storage segment;
在nginx服务器的配置文件中定义播放所述存储段内容的命令;Defining a command to play the content of the storage segment in a configuration file of the nginx server;
通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;及Receiving, by the nginx server, a video play instruction of the client, and determining whether the video play instruction matches the command for playing the content of the storage segment; and
若所述视频播放指令与所述播放所述存储段内容的命令匹配,通过所述调用接口调取所述存储段的内容至所述nginx服务器,并由所述nginx服务器传输所述存储端的内容至所述客户端。And if the video play instruction matches the command to play the content of the storage segment, the content of the storage segment is retrieved by the calling interface to the nginx server, and the content of the storage end is transmitted by the nginx server. To the client.
进一步地,为实现上述目的,本申请还提供一种视频文件处理程序,所述视频文件处理程序包括:Further, in order to achieve the above object, the present application further provides a video file processing program, where the video file processing program includes:
接口定义模块,用于基于CEPH规范定义S3服务器与nginx服务器之间的调用接口;An interface definition module, configured to define a calling interface between the S3 server and the nginx server based on the CEPH specification;
上传模块,用于上传视频文件至S3服务器并存储至一存储段;The uploading module is configured to upload a video file to the S3 server and store the file to a storage segment;
命令定义模块,用于在nginx服务器的配置文件中定义播放所述存储段内容的命令;a command definition module, configured to define a command for playing the content of the storage segment in a configuration file of the nginx server;
接收模块,用于通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;a receiving module, configured to receive a video play instruction of the client by using the nginx server, and determine whether the video play instruction matches the command for playing the content of the storage segment;
获取模块,用于若所述视频播放指令与所述播放所述存储段内容的命令匹配,通过所述调用接口调取所述存储段的内容至所述nginx服务器;An acquiring module, configured to: retrieve the content of the storage segment to the nginx server by using the calling interface, if the video playback instruction matches the command for playing the content of the storage segment;
传输模块,用于控制所述nginx服务器传输所述存储端的内容至客户端。a transmission module, configured to control the nginx server to transmit the content of the storage end to the client.
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有视频文件处理程序,所述视频文件处理程序可被至少一个处理器执行,以使所述至少一个处理器执行如上述的视频文件处理方法的步骤。Further, in order to achieve the above object, the present application further provides a computer readable storage medium storing a video file processing program, the video file processing program being executable by at least one processor, so that The at least one processor performs the steps of the video file processing method as described above.
相较于现有技术,本申请所提出的应用服务器、视频文件处理方法及计算机可读存储介质,首先,基于CEPH规范定义S3服务器与nginx服务器之间的调用接口;其次,上传视频文件至S3服务器并存储至一存储段;然后,在nginx服务器的配置文件中定义播放所述存储段内容的命令;接着,通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;若所述视频播放指令与所述播放所述存储段内容的命令匹配,最后通过所述调用接口调取所述存储段的内容至所述nginx服务器,并由所述nginx服务器传输所述存储端的内容至所述客户端。这样,既可以利用S3服务器快速读取数据的特性,实现客户端对本地磁盘存储的视频文件的点播效果。又可以利用S3服务器的特性实现视频文件存储的任意存储, 保证视频文件存储的稳定性以及读取的便捷性,同时还可以依据嵌入的视频点播指令在rtmp协议下实现视频点播的服务,提升了用户体验。Compared with the prior art, the application server, the video file processing method and the computer readable storage medium proposed by the present application firstly define a calling interface between the S3 server and the nginx server based on the CEPH specification; secondly, upload the video file to the S3. The server is stored in a storage segment; then, a command to play the content of the storage segment is defined in a configuration file of the nginx server; then, a video playback instruction of the client is received through the nginx server, and the video playback instruction and the playback are determined. Whether the command of the storage segment content matches; if the video playback instruction matches the command for playing the storage segment content, finally, the content of the storage segment is retrieved to the nginx server through the calling interface, and The content of the storage end is transmitted by the nginx server to the client. In this way, the S3 server can quickly read the characteristics of the data, and the on-demand effect of the video file stored by the client on the local disk can be realized. It can also realize the arbitrary storage of video file storage by using the characteristics of S3 server, ensure the stability of video file storage and the convenience of reading, and also realize the video on demand service under the rtmp protocol according to the embedded video on demand instruction, and improve the service. user experience.
附图说明DRAWINGS
图1是本申请各个实施例一可选的应用环境示意图;1 is a schematic diagram of an optional application environment of each embodiment of the present application;
图2是图1中应用服务器一可选的硬件架构的示意图;2 is a schematic diagram of an optional hardware architecture of the application server of FIG. 1;
图3是本申请视频文件处理程序第一实施例的程序模块图;Figure 3 is a block diagram showing the program of the first embodiment of the video file processing program of the present application;
图4为本申请视频文件处理方法第一实施例的流程图;4 is a flowchart of a first embodiment of a video file processing method according to the present application;
图5为本申请视频文件处理方法第二实施例的流程图。FIG. 5 is a flowchart of a second embodiment of a video file processing method according to the present application.
附图标记:Reference mark:
客户端 Client 11
应用服务器 application server 22
网络The internet 33
S3服务器 S3 server 44
nginx服务器Nginx server 55
存储器Memory 1111
处理器processor 1212
网络接口Network Interface 1313
视频文件处理程序Video file handler 200200
接口定义模块Interface definition module 201201
上传模块Upload module 202202
命令定义模块Command definition module 203203
接收模块Receiving module 204204
获取模块Acquisition module 205205
传输模块Transmission module 206206
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions of "first", "second" and the like in the present application are for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. . Thus, features defining "first" or "second" may include at least one of the features, either explicitly or implicitly. In addition, the technical solutions between the various embodiments may be combined with each other, but must be based on the realization of those skilled in the art, and when the combination of the technical solutions is contradictory or impossible to implement, it should be considered that the combination of the technical solutions does not exist. Nor is it within the scope of protection required by this application.
参阅图1所示,是本申请各个实施例一可选的应用环境示意图。Referring to FIG. 1 , it is a schematic diagram of an optional application environment of each embodiment of the present application.
在本实施例中,本申请可应用于包括,但不仅限于,客户端1、应用服务器2、网络3、S3(Simple Storage Service,简单存储服务)服务器4、nginx服务器5的应用环境中,其中应用服务器2连接并管理S3服务器4和nginx服务器5,客户端1则直接连接nginx服务器5,并通过nginx服务器5发起相应请求至应用服务器2,并由应用服务器2控制调取或处理存储于S3服务器4中的对象。另外,所述客户端1可以是移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装 置、车载装置等等的可移动设备,以及诸如数字TV、台式计算机、笔记本、服务器等等的固定终端。所述应用服务器2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等计算设备,该应用服务器2可以是独立的服务器,也可以是多个服务器所组成的服务器集群。所述网络3可以是企业内部网(Intranet)、互联网(Internet)、全球移动通讯系统(Global System of Mobile communication,GSM)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、4G网络、5G网络、蓝牙(Bluetooth)、Wi-Fi、通话网络等无线或有线网络。In this embodiment, the present application is applicable to an application environment including, but not limited to, a client 1, an application server 2, a network 3, a S3 (Simple Storage Service) server 4, and a nginx server 5. The application server 2 connects and manages the S3 server 4 and the nginx server 5, and the client 1 directly connects to the nginx server 5, and initiates a corresponding request to the application server 2 through the nginx server 5, and is controlled by the application server 2 to be retrieved or processed and stored in the S3. The object in server 4. In addition, the client 1 may be a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet PC), a PMP (Portable Multimedia Player), a navigation device, an in-vehicle device, etc. Mobile devices such as, and fixed terminals such as digital TVs, desktop computers, notebooks, servers, and the like. The application server 2 may be a computing device such as a rack server, a blade server, a tower server, or a rack server. The application server 2 may be a stand-alone server or a server cluster composed of multiple servers. The network 3 may be an intranet, an Internet, a Global System of Mobile communication (GSM), a Wideband Code Division Multiple Access (WCDMA), a 4G network, Wireless or wired networks such as 5G networks, Bluetooth, Wi-Fi, and call networks.
所述S3服务器4存储和检索的资产被称为对象,而对象存储在存储段(bucket)中,并根据对象的不同,将不同的对象存储在不同的存储段,比如file文件存储在file存储段,视频文件存储在movie存储段。其中S3服务器具有其他服务器所不具有的特点,即文件存储量大,不用担心存储空间的限制;另外,对S3服务器上文件的读取速度要远远快于其他存储媒介的数据读取速度。The assets stored and retrieved by the S3 server 4 are referred to as objects, and the objects are stored in a bucket, and different objects are stored in different storage segments according to different objects, such as file files stored in file storage. Segment, the video file is stored in the movie storage segment. The S3 server has the characteristics that other servers do not have, that is, the file storage capacity is large, and there is no need to worry about the limitation of the storage space; in addition, the reading speed of the files on the S3 server is much faster than the data reading speed of other storage media.
其中,所述应用服务器2中通过所述网络3分别与一个或多个所述客户端1、S3服务器4、nginx服务器5通信连接,以进行数据传输和交互。The application server 2 is respectively connected to one or more of the client 1, the S3 server 4, and the nginx server 5 through the network 3 for data transmission and interaction.
基于上述应用环境各个组件的介绍,应用服务器2连接并管理S3服务器4和nginx服务器5,定义相应调用接口,而客户端1则直接连接nginx服务器5,并通过nginx服务器5发起相应请求至应用服务器2,并由应用服务器2控制调取或处理存储于S3服务器4中的对象。Based on the introduction of each component of the application environment, the application server 2 connects and manages the S3 server 4 and the nginx server 5, defines a corresponding calling interface, and the client 1 directly connects to the nginx server 5, and initiates a corresponding request to the application server through the nginx server 5. 2. The object stored in the S3 server 4 is retrieved or processed by the application server 2.
本实施例中,所述应用服务器2安装并运行有视频文件处理程序200时,基于CEPH规范定义S3服务器4与nginx服务器5之间的调用接口;上传视频文件至S3服务器4并存储至一存储段;在nginx服务器5的配置文件中定义播放所述存储段内容的命令;通过nginx服务器5接收客户端1的视频播放指令,并判断所述视频播放指令与定义的所述播放所述存储段内容的命令是否匹配;若所述视频播放指令与定义的所述播放所述存储段内容的命令匹配,通过所述调 用接口调取所述存储段的内容至nginx服务器;nginx服务器将获取的所述存储段的内容以rtmp协议传输至客户端1。这样,由于S服务器本身快速读取数据的特性使得客户端1可实现对本地磁盘存储的视频文件的点播。又可以利用S3服务器4的特性实现视频文件任意存储,保证视频文件存储的稳定性以及读取的便捷性,同时还可以依据嵌入的视频点播指令在rtmp协议下实现视频点播的服务,提升了用户体验。In this embodiment, when the application server 2 installs and runs the video file processing program 200, the calling interface between the S3 server 4 and the nginx server 5 is defined based on the CEPH specification; the video file is uploaded to the S3 server 4 and stored to a storage. a command for playing the content of the storage segment in the configuration file of the nginx server 5; receiving a video playback instruction of the client 1 through the nginx server 5, and determining the video playback instruction and the defined playing segment Whether the command of the content matches; if the video play instruction matches the defined command to play the content of the storage segment, the content of the storage segment is retrieved from the calling interface to the nginx server; the nginx server will obtain the location The contents of the storage segment are transmitted to the client 1 in the rtmp protocol. In this way, due to the characteristics of the S server itself to quickly read data, the client 1 can implement on-demand video files stored on the local disk. The S3 server 4 can be used to realize arbitrary storage of video files, ensuring the stability of video file storage and the convenience of reading, and can also implement video on demand service under the rtmp protocol according to the embedded video on demand instruction, thereby improving the user. Experience.
参阅图2所示,是图1中应用服务器2一可选的硬件架构的示意图。本实施例中,所述应用服务器2可包括,但不仅限于,可通过系统总线相互通信连接存储器11、处理器12、网络接口13。需要指出的是,图2仅示出了具有组件11-13的应用服务器2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Referring to FIG. 2, it is a schematic diagram of an optional hardware architecture of the application server 2 in FIG. In this embodiment, the application server 2 may include, but is not limited to, the memory 11, the processor 12, and the network interface 13 being communicably connected to each other through a system bus. It is to be noted that FIG. 2 only shows the application server 2 with components 11-13, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器11可以是所述应用服务器2的内部存储单元,例如该应用服务器2的硬盘或内存。在另一些实施例中,所述存储器11也可以是所述应用服务器2的外部存储设备,例如该应用服务器2上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器11还可以既包括所述应用服务器2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器11通常用于存储安装于所述应用服务器2的操作系统和各类应用软件,例如所述视频文件处理程序200的程序代码等。此外,所述存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), and a random access memory (RAM). , static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. In some embodiments, the memory 11 may be an internal storage unit of the application server 2, such as a hard disk or memory of the application server 2. In other embodiments, the memory 11 may also be an external storage device of the application server 2, such as a plug-in hard disk equipped on the application server 2, a smart memory card (SMC), and a secure digital number. (Secure Digital, SD) card, flash card, etc. Of course, the memory 11 can also include both the internal storage unit of the application server 2 and its external storage device. In this embodiment, the memory 11 is generally used to store an operating system installed in the application server 2 and various types of application software, such as program code of the video file processing program 200. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理 器12通常用于控制所述应用服务器2的总体操作,例如执行与所述客户端1进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行所述的视频文件处理程序200等。The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 12 is typically used to control the overall operation of the application server 2, such as performing control and processing related to data interaction or communication with the client 1. In this embodiment, the processor 12 is configured to run program code or process data stored in the memory 11, such as running the video file processing program 200 and the like.
所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述应用服务器2与其他电子设备之间建立通信连接。本实施例中,所述网络接口13主要用于通过所述网络3将所述应用服务器2与一个或多个所述客户端1、S3服务器4、nginx服务器5相连,在所述应用服务器2与所述一个或多个客户端1、S3服务器4、nginx服务器5之间的建立数据传输通道和通信连接。The network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the application server 2 and other electronic devices. In this embodiment, the network interface 13 is mainly used to connect the application server 2 to one or more of the client 1, the S3 server 4, and the nginx server 5 through the network 3, in the application server 2 Establishing a data transmission channel and a communication connection with the one or more clients 1, the S3 server 4, and the nginx server 5.
至此,己经详细介绍了本申请各个实施例的应用环境和相关设备的硬件结构和功能。下面,将基于上述应用环境和相关设备,提出本申请的各个实施例。So far, the application environment of the various embodiments of the present application and the hardware structure and functions of related devices have been described in detail. Hereinafter, various embodiments of the present application will be proposed based on the above-described application environment and related devices.
首先,本申请提出一种视频文件处理程序200。First, the present application proposes a video file processing program 200.
参阅图3所示,是本申请视频文件处理程序200第一实施例的程序模块图。Referring to FIG. 3, it is a program module diagram of the first embodiment of the video file processing program 200 of the present application.
本实施例中,所述的视频文件处理程序200包括一系列的存储于存储器11上的计算机程序指令,当该计算机程序指令被处理器12执行时,可以实现本申请各实施例的视频文件的处理操作。在一些实施例中,基于该计算机程序指令各部分所实现的特定的操作,所述视频文件处理程序200可以被划分为一个或多个模块。例如,在图3中,所述的视频文件处理程序200可以被分割成接口定义模块201、上传模块202、命令定义模块203、接收模块204、获取模块205及传输模块206。其中:In this embodiment, the video file processing program 200 includes a series of computer program instructions stored in the memory 11, and when the computer program instructions are executed by the processor 12, the video files of the embodiments of the present application may be implemented. Processing operations. In some embodiments, the video file processing program 200 can be divided into one or more modules based on the particular operations implemented by the various portions of the computer program instructions. For example, in FIG. 3, the video file processing program 200 can be divided into an interface definition module 201, an upload module 202, a command definition module 203, a receiving module 204, an obtaining module 205, and a transmission module 206. among them:
所述接口定义模块201,用于基于CEPH规范定义S3服务器4与nginx服务器5之间的调用接口。The interface definition module 201 is configured to define a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification.
CEPH是一种分布式文件系统,其可以分为四个层次:(1)基础存储系统、(2)基础库librados、(3)高层应用接口:这一层包括了三个部分:RADOS GW (RADOS Gateway)、RBD(Reliable Block Device)和Ceph FS(Ceph File System),其作用是在librados库的基础上提供抽象层次更高、更便于应用或客户端1使用的上层接口,其中RADOS GW是一个提供与Amazon S3服务器4和Swift兼容的RESTful API的gateway,以供相应的对象存储应用开发使用。(4)应用层。上述CEPH具有CEPH规范,通过CEPH规范可以CEPH系统中各个层次之间的接口调用。CEPH is a distributed file system, which can be divided into four levels: (1) basic storage system, (2) basic library librados, (3) high-level application interface: this layer consists of three parts: RADOS GW ( RADOS Gateway), RBD (Reliable Block Device) and Ceph FS (Ceph File System), which provide an upper level interface with higher level of abstraction, easier application or client 1 based on the librados library, where RADOS GW is A gateway that provides RESTful APIs compatible with Amazon S3 Server 4 and Swift for use by the corresponding object storage application development. (4) Application layer. The above CEPH has a CEPH specification, which can be called by an interface between various levels in the CEPH system through the CEPH specification.
在上述CEPH系统中,其中一个层次——高层应用接口可以为外部相连的服务器或者客户端1提供上层接口,即CEPH可以规范自身同S3服务器4和nginx服务器5的调用接口,同时,由于S3服务器4是一种简单存储服务装置,存在特定的访问接口,CEPH可以通过规范定义S3服务器4和nginx服务器5在存储对象调用过程中的调用接口。In the above CEPH system, one of the layers - the high-level application interface can provide an upper-layer interface for the externally connected server or client 1, that is, CEPH can regulate its own calling interface with the S3 server 4 and the nginx server 5, and at the same time, due to the S3 server 4 is a simple storage service device, there is a specific access interface, CEPH can define the calling interface of the S3 server 4 and the nginx server 5 in the storage object calling process through the specification.
所述上传模块202,用于上传视频文件至S3服务器4并存储至一存储段。具体地,所述上传模块202通过以下方式实现所述上传视频文件至S3服务器4并存储至一存储段的步骤:The uploading module 202 is configured to upload a video file to the S3 server 4 and store the file to a storage segment. Specifically, the uploading module 202 implements the step of uploading the video file to the S3 server 4 and storing it to a storage segment in the following manner:
所述上传模块202定义上传的视频文件名称;并根据S3服务器4规范设定访问所述视频文件的访问权限。The uploading module 202 defines an uploaded video file name; and sets access rights to access the video file according to the S3 server 4 specification.
在本实施方式中,可以将mp4或者flv文件上传到S3服务器4的movie这个bucket(存储段),并将上传的文件名称命名为"video.mp4",同时设置访问权限为"public-read"以及对应的content-type,以s3cmd为例,其设置指令为:s3cmd put video.mp4s3://movie--acl-public。In this embodiment, the mp4 or flv file can be uploaded to the ticket (storage segment) of the movie of the S3 server 4, and the uploaded file name is named "video.mp4", and the access permission is set to "public-read". And the corresponding content-type, taking s3cmd as an example, the setting instruction is: s3cmd put video.mp4s3://movie--acl-public.
所述命令定义模块203,在nginx服务器5的配置文件中定义播放所述存储段内容的命令。The command definition module 203 defines a command to play the content of the storage segment in a configuration file of the nginx server 5.
具体地,所述nginx服务器5包括rtmp模块,其中,在nginx服务器5的配置文件中定义播放所述存储段内容的命令的步骤具体用于配置所述nginx服务器5的所述rtmp模块。rtmp(Real Time Messaging Protocol)实时消息传送协议是Adobe Systems公司为Flash播放器和服务器之间音频、视频和数据传 输开发的开放协议。Specifically, the nginx server 5 includes an rtmp module, and the step of defining a command for playing the storage segment content in a configuration file of the nginx server 5 is specifically configured to configure the rtmp module of the nginx server 5. The rtmp (Real Time Messaging Protocol) Real-Time Messaging Protocol is an open protocol developed by Adobe Systems for audio, video and data transfer between Flash Player and server.
在本实施方式中,配置nginx服务器5的rtmp模块,通过在nginx.conf中新增如下内容来实现:In this implementation manner, the rtmp module of the nginx server 5 is configured, and the following content is added in the nginx.conf:
Figure PCTCN2018089425-appb-000001
Figure PCTCN2018089425-appb-000001
所述接收模块204,通过nginx服务器5接收客户端1的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配。,所述视频播放指令用于触发播放所述存储段内容的命令。所述视频播放指令为所述客户端1利用播放器打开链接的点击命令。The receiving module 204 receives the video playing instruction of the client 1 through the nginx server 5, and determines whether the video playing instruction matches the command for playing the content of the storage segment. The video play instruction is used to trigger a command to play the content of the storage segment. The video play command is a click command for the client 1 to open a link by using a player.
在本实施方式中,所述客户端1可以通过利用VLC多媒体播放器或者其他支持rtmp协议的播放器打开如下链接来发起视频播放指令:rtmp://{nginx_server}/vod_http/video.mp4。In this embodiment, the client 1 can initiate a video play command by using a VLC multimedia player or other player supporting the rtmp protocol to open a video play command: rtmp://{nginx_server}/vod_http/video.mp4.
所述获取模块205,用于在所述视频播放指令与所述播放所述存储段内容的命令匹配时,通过所述调用接口调取所述存储段的内容至所述nginx服务器。The obtaining module 205 is configured to retrieve the content of the storage segment to the nginx server by using the calling interface when the video playback instruction matches the command for playing the storage segment content.
所述传输模块206,用于控制所述nginx服务器传输所述存储端的内容至客户端1。The transmission module 206 is configured to control the nginx server to transmit the content of the storage end to the client 1.
通过上述程序模块201-206,本申请所提出的视频文件处理程序200,首先,基于CEPH规范定义S3服务器4与nginx服务器5之间的调用接口;其次,上传视频文件至S3服务器4并存储至一存储段;然后,在nginx服务器5的配置文件中定义播放所述存储段内容的命令;接着,通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;若所述视频播放指令与所述播放所述存储段内容的命令匹配,最后通过所述调用接口调取所述存储段的内容至所述nginx服务器, 并由所述nginx服务器传输所述存储端的内容至所述客户端。这样,既可以利用S3服务器快速读取数据的特性,实现客户端对本地磁盘存储的视频文件的点播效果。又可以利用S3服务器的特性实现视频文件存储的任意存储,保证视频文件存储的稳定性以及读取的便捷性,同时还可以依据嵌入的视频点播指令在rtmp协议下实现视频点播的服务,提升了用户体验。Through the above-mentioned program modules 201-206, the video file processing program 200 proposed by the present application firstly defines a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification; secondly, uploads a video file to the S3 server 4 and stores it to a storage segment; then, a command to play the content of the storage segment is defined in a configuration file of the nginx server 5; then, a video playback instruction of the client is received by the nginx server, and the video playback instruction is determined to play the storage Whether the command of the segment content matches; if the video play instruction matches the command to play the content of the storage segment, finally, the content of the storage segment is retrieved to the nginx server through the calling interface, and The nginx server transmits the content of the storage to the client. In this way, the S3 server can quickly read the characteristics of the data, and the on-demand effect of the video file stored by the client on the local disk can be realized. It can also realize the arbitrary storage of video file storage by using the characteristics of S3 server, ensure the stability of video file storage and the convenience of reading, and also realize the video on demand service under the rtmp protocol according to the embedded video on demand instruction, and improve the service. user experience.
此外,本申请还提出一种视频文件处理方法。In addition, the present application also proposes a video file processing method.
参阅图4所示,是本申请视频文件处理方法第一实施例的实施流程示意图。在本实施例中,根据不同的需求,图4所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。Referring to FIG. 4, it is a schematic flowchart of the implementation of the first embodiment of the video file processing method of the present application. In this embodiment, the order of execution of the steps in the flowchart shown in FIG. 4 may be changed according to different requirements, and some steps may be omitted.
步骤S401,基于CEPH规范定义S3服务器4与nginx服务器5之间的调用接口。Step S401, defining a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification.
CEPH是一种分布式文件系统,其可以分为四个层次:(1)基础存储系统、(2)基础库librados、(3)高层应用接口:这一层包括了三个部分:RADOS GW(RADOS Gateway)、RBD(Reliable Block Device)和Ceph FS(Ceph File System),其作用是在librados库的基础上提供抽象层次更高、更便于应用或客户端1使用的上层接口,其中RADOS GW是一个提供与Amazon S3服务器4和Swift兼容的RESTful API的gateway,以供相应的对象存储应用开发使用。(4)应用层。上述CEPH具有CEPH规范,通过CEPH规范可以CEPH系统中各个层次之间的接口调用。CEPH is a distributed file system, which can be divided into four levels: (1) basic storage system, (2) basic library librados, (3) high-level application interface: this layer consists of three parts: RADOS GW ( RADOS Gateway), RBD (Reliable Block Device) and Ceph FS (Ceph File System), which provide an upper level interface with higher level of abstraction, easier application or client 1 based on the librados library, where RADOS GW is A gateway that provides RESTful APIs compatible with Amazon S3 Server 4 and Swift for use by the corresponding object storage application development. (4) Application layer. The above CEPH has a CEPH specification, which can be called by an interface between various levels in the CEPH system through the CEPH specification.
在上述CEPH系统中,其中一个层次——高层应用接口可以为外部相连的服务器或者客户端1提供上层接口,即CEPH可以规范自身同S3服务器4和nginx服务器5的调用接口,同时,由于S3服务器4是一种简单存储服务装置,存在特定的访问接口,CEPH可以通过规范定义S3服务器4和nginx服务器5在存储对象调用过程中的调用接口。In the above CEPH system, one of the layers - the high-level application interface can provide an upper-layer interface for the externally connected server or client 1, that is, CEPH can regulate its own calling interface with the S3 server 4 and the nginx server 5, and at the same time, due to the S3 server 4 is a simple storage service device, there is a specific access interface, CEPH can define the calling interface of the S3 server 4 and the nginx server 5 in the storage object calling process through the specification.
步骤S402,上传视频文件至S3服务器4并存储至一存储段。具体地,所述上传视频文件至S3服务器4并存储至一存储段的具体步骤将在本申请视频 文件处理方法第二实施例(图5)进行详述。In step S402, the video file is uploaded to the S3 server 4 and stored to a storage segment. Specifically, the specific steps of uploading the video file to the S3 server 4 and storing to a storage segment will be detailed in the second embodiment (Fig. 5) of the video file processing method of the present application.
步骤S403,在nginx服务器5的配置文件中定义播放所述存储段内容的命令。Step S403, a command for playing the content of the storage segment is defined in a configuration file of the nginx server 5.
具体地,所述nginx服务器5包括rtmp模块,其中,在nginx服务器5的配置文件中定义播放所述存储段内容的命令的步骤具体用于配置所述nginx服务器5的所述rtmp模块。rtmp(Real Time Messaging Protocol)实时消息传送协议是Adobe Systems公司为Flash播放器和服务器之间音频、视频和数据传输开发的开放协议。Specifically, the nginx server 5 includes an rtmp module, and the step of defining a command for playing the storage segment content in a configuration file of the nginx server 5 is specifically configured to configure the rtmp module of the nginx server 5. The rtmp (Real Time Messaging Protocol) Real-Time Messaging Protocol is an open protocol developed by Adobe Systems for the transfer of audio, video and data between Flash Players and servers.
在本实施方式中,配置nginx服务器5的rtmp模块,通过在nginx.conf中新增如下内容来实现:In this implementation manner, the rtmp module of the nginx server 5 is configured, and the following content is added in the nginx.conf:
Figure PCTCN2018089425-appb-000002
Figure PCTCN2018089425-appb-000002
步骤S404,通过nginx服务器5接收客户端1的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配。所述视频播放指令为所述客户端1利用播放器打开链接的点击命令。Step S404, receiving a video play instruction of the client 1 through the nginx server 5, and determining whether the video play instruction matches the command for playing the content of the storage segment. The video play command is a click command for the client 1 to open a link by using a player.
在本实施方式中,所述客户端1可以通过利用VLC多媒体播放器或者其他支持rtmp协议的播放器打开如下链接来发起视频播放指令:rtmp://{nginx_server}/vod_http/video.mp4。In this embodiment, the client 1 can initiate a video play command by using a VLC multimedia player or other player supporting the rtmp protocol to open a video play command: rtmp://{nginx_server}/vod_http/video.mp4.
步骤S405,在所述视频播放指令与所述播放所述存储段内容的命令匹配时,通过所述调用接口调取所述存储段的内容至所述nginx服务器。。Step S405: When the video play instruction matches the command to play the storage segment content, the content of the storage segment is retrieved to the nginx server by using the calling interface. .
步骤S406,用于控制所述nginx服务器传输所述存储端的内容至客户端1。Step S406 is configured to control the nginx server to transmit the content of the storage end to the client 1.
通过上述步骤S401-406,本申请所提出的视频文件处理方法,首先,基于CEPH规范定义S3服务器4与nginx服务器5之间的调用接口;其次,上传视频文件至S3服务器4并存储至一存储段;然后,在nginx服务器5的配 置文件中定义播放所述存储段内容的命令;接着,通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;若所述视频播放指令与所述播放所述存储段内容的命令匹配,最后通过所述调用接口调取所述存储段的内容至所述nginx服务器,并由所述nginx服务器传输所述存储端的内容至所述客户端。这样,既可以利用S3服务器快速读取数据的特性,实现客户端对本地磁盘存储的视频文件的点播效果。又可以利用S3服务器的特性实现视频文件存储的任意存储,保证视频文件存储的稳定性以及读取的便捷性,同时还可以依据嵌入的视频点播指令在rtmp协议下实现视频点播的服务,提升了用户体验。Through the above steps S401-406, the video file processing method proposed by the present application firstly defines a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification; secondly, uploads the video file to the S3 server 4 and stores it to a storage. a segment; then, in the configuration file of the nginx server 5, a command to play the content of the storage segment is defined; then, a video playback instruction of the client is received by the nginx server, and the video playback instruction and the content of the storage segment are played. If the command of the video match is matched with the command to play the content of the storage segment, finally, the content of the storage segment is retrieved by the calling interface to the nginx server, and the nginx server is used by the nginx server. Transmitting the content of the storage terminal to the client. In this way, the S3 server can quickly read the characteristics of the data, and the on-demand effect of the video file stored by the client on the local disk can be realized. It can also realize the arbitrary storage of video file storage by using the characteristics of S3 server, ensure the stability of video file storage and the convenience of reading, and also realize the video on demand service under the rtmp protocol according to the embedded video on demand instruction, and improve the service. user experience.
参阅图5所示,是本申请视频文件处理方法第二实施例的实施流程示意图。在本实施例中,根据不同的需求,图5所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。Referring to FIG. 5, it is a schematic flowchart of the implementation of the second embodiment of the video file processing method of the present application. In this embodiment, the order of execution of the steps in the flowchart shown in FIG. 5 may be changed according to different requirements, and some steps may be omitted.
在本实施例中,所述上传视频文件至S3服务器4并存储至一存储段的流程,具体包括如下步骤:In this embodiment, the process of uploading a video file to the S3 server 4 and storing the data to a storage segment includes the following steps:
步骤S501,定义上传的视频文件名称。Step S501, defining an uploaded video file name.
步骤S502,根据S3服务器4规范设定访问所述视频文件的访问权限。Step S502, setting access rights for accessing the video file according to the S3 server 4 specification.
在本实施方式中,可以将mp4或者flv文件上传到S3服务器4的movie这个bucket(存储段),并将上传的文件名称命名为"video.mp4",同时设置访问权限为"public-read"以及对应的content-type,以S3服务器cmd为例,其设置指令为:s3cmd put video.mp4s3://movie--acl-public。In this embodiment, the mp4 or flv file can be uploaded to the ticket (storage segment) of the movie of the S3 server 4, and the uploaded file name is named "video.mp4", and the access permission is set to "public-read". And the corresponding content-type, taking the S3 server cmd as an example, the setting instruction is: s3cmd put video.mp4s3://movie--acl-public.
通过上述步骤S501-502,本申请所提出的视频文件处理方法,可以通过定义上传的视频文件名称以及根据S3服务器4规范设定访问所述视频文件的访问权限来上传视频文件至S3服务器4。这样,实现视频文件存储的无限扩容,保证视频文件存储的稳定性以及读取的便捷性。Through the above steps S501-502, the video file processing method proposed by the present application can upload the video file to the S3 server 4 by defining the uploaded video file name and setting the access right of accessing the video file according to the S3 server 4 specification. In this way, the unlimited expansion of the video file storage is realized, and the stability of the video file storage and the convenience of reading are ensured.
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质存储有视频文件处理程序,所述视频文件处理程序 可被至少一个处理器执行,以使所述至少一个处理器执行如上述的视频文件处理方法的步骤。Further, in order to achieve the above object, the present application further provides a computer readable storage medium storing a video file processing program, the video file processing program being executable by at least one processor, so that The at least one processor performs the steps of the video file processing method as described above.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种视频文件处理方法,应用于应用服务器,其特征在于,所述方法包括:A video file processing method is applied to an application server, where the method includes:
    基于CEPH规范定义S3服务器与nginx服务器之间的调用接口;Defining a calling interface between the S3 server and the nginx server based on the CEPH specification;
    上传视频文件至S3服务器并存储至一存储段;Upload a video file to the S3 server and store it to a storage segment;
    在nginx服务器的配置文件中定义播放所述存储段内容的命令;Defining a command to play the content of the storage segment in a configuration file of the nginx server;
    通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;及Receiving, by the nginx server, a video play instruction of the client, and determining whether the video play instruction matches the command for playing the content of the storage segment; and
    若所述视频播放指令与所述播放所述存储段内容的命令匹配,通过所述调用接口调取所述存储段的内容至所述nginx服务器,并由所述nginx服务器传输所述存储端的内容至所述客户端。And if the video play instruction matches the command to play the content of the storage segment, the content of the storage segment is retrieved by the calling interface to the nginx server, and the content of the storage end is transmitted by the nginx server. To the client.
  2. 如权利要求1所述的视频文件处理方法,其特征在于,所述nginx服务器传输所述存储端的内容至所述客户端的步骤具体包括:The video file processing method according to claim 1, wherein the step of the nginx server transmitting the content of the storage end to the client comprises:
    将获取的所述存储段的内容以rtmp协议传输至所述客户端。The obtained content of the storage segment is transmitted to the client in an rtmp protocol.
  3. 如权利要求1所述的视频文件处理方法,其特征在于,所述视频播放指令为所述客户端利用播放器打开链接的点击命令。The video file processing method according to claim 1, wherein the video playback command is a click command for the client to open a link by using a player.
  4. 如权利要求1所述的视频文件处理方法,其特征在于,所述nginx服务器包括rtmp模块,其中,在nginx服务器的配置文件中定义播放所述存储段内容的命令的步骤具体用于配置所述nginx服务器的所述rtmp模块。The video file processing method according to claim 1, wherein the nginx server comprises an rtmp module, wherein the step of defining a command to play the content of the storage segment in a configuration file of the nginx server is specifically configured to configure the The rtmp module of the nginx server.
  5. 如权利要求1所述的视频文件处理方法,其特征在于,所述上传视频文件至S3服务器并存储至一存储段的步骤,包括:The video file processing method according to claim 1, wherein the step of uploading the video file to the S3 server and storing the data to a storage segment comprises:
    定义上传的视频文件名称;及Define the name of the uploaded video file; and
    根据S3服务器规范设定访问所述视频文件的访问权限。The access rights to access the video file are set according to the S3 server specification.
  6. 一种视频文件处理程序,其特征在于,所述视频文件处理程序包括:A video file processing program, characterized in that the video file processing program comprises:
    接口定义模块,用于基于CEPH规范定义S3服务器与nginx服务器之间的调用接口;An interface definition module, configured to define a calling interface between the S3 server and the nginx server based on the CEPH specification;
    上传模块,用于上传视频文件至S3服务器并存储至一存储段;The uploading module is configured to upload a video file to the S3 server and store the file to a storage segment;
    命令定义模块,用于在nginx服务器的配置文件中定义播放所述存储段内容的命令;a command definition module, configured to define a command for playing the content of the storage segment in a configuration file of the nginx server;
    接收模块,用于通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;a receiving module, configured to receive a video play instruction of the client by using the nginx server, and determine whether the video play instruction matches the command for playing the content of the storage segment;
    获取模块,用于若所述视频播放指令与所述播放所述存储段内容的命令匹配,通过所述调用接口调取所述存储段的内容至所述nginx服务器;An acquiring module, configured to: retrieve the content of the storage segment to the nginx server by using the calling interface, if the video playback instruction matches the command for playing the content of the storage segment;
    传输模块,用于控制所述nginx服务器传输所述存储端的内容至客户端。a transmission module, configured to control the nginx server to transmit the content of the storage end to the client.
  7. 如权利要求6所述的视频文件处理程序,其特征在于,所述传输模块具体用于将获取的所述存储段的内容以rtmp协议传输至所述客户端。The video file processing program according to claim 6, wherein the transmission module is specifically configured to transmit the acquired content of the storage segment to the client in an rtmp protocol.
  8. 如权利要求6所述的视频文件处理程序,其特征在于,所述视频播放指令为所述客户端利用播放器打开链接的点击命令。The video file processing program according to claim 6, wherein said video playback command is a click command for said client to open a link using a player.
  9. 如权利要求6所述的视频文件处理程序,其特征在于,所述nginx服务器包括rtmp模块,所述命令定义模块具体用于配置所述nginx服务器的所述rtmp模块。The video file processing program according to claim 6, wherein the nginx server comprises an rtmp module, and the command definition module is specifically configured to configure the rtmp module of the nginx server.
  10. 如权利要求6所述的视频文件处理程序,其特征在于,所述上传模块具体用于定义上传的视频文件名称,根据S3服务器规范设定访问所述视频文件的访问权限。The video file processing program according to claim 6, wherein the uploading module is specifically configured to define an uploaded video file name, and set an access right for accessing the video file according to an S3 server specification.
  11. 一种应用服务器,其特征在于,所述应用服务器包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的视频文件处理程序,所述视频文件处理程序被所述处理器执行时实现如下步骤:An application server, comprising: a memory, a processor, on the memory, a video file processing program executable on the processor, wherein the video file processing program is used by the processor The following steps are implemented during execution:
    基于CEPH规范定义S3服务器与nginx服务器之间的调用接口;Defining a calling interface between the S3 server and the nginx server based on the CEPH specification;
    上传视频文件至S3服务器并存储至一存储段;Upload a video file to the S3 server and store it to a storage segment;
    在nginx服务器的配置文件中定义播放所述存储段内容的命令;Defining a command to play the content of the storage segment in a configuration file of the nginx server;
    通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;及Receiving, by the nginx server, a video play instruction of the client, and determining whether the video play instruction matches the command for playing the content of the storage segment; and
    若所述视频播放指令与所述播放所述存储段内容的命令匹配,通过所述调用接口调取所述存储段的内容至所述nginx服务器,并由所述nginx服务器传输所述存储端的内容至所述客户端。And if the video play instruction matches the command to play the content of the storage segment, the content of the storage segment is retrieved by the calling interface to the nginx server, and the content of the storage end is transmitted by the nginx server. To the client.
  12. 如权利要求11所述的应用服务器,其特征在于,所述视频文件处理程序被所述处理器执行时,所述nginx服务器传输所述存储端的内容至所述客户端的步骤具体包括:The application server according to claim 11, wherein when the video file processing program is executed by the processor, the step of the nginx server transmitting the content of the storage terminal to the client comprises:
    将获取的所述存储段的内容以rtmp协议传输至所述客户端。The obtained content of the storage segment is transmitted to the client in an rtmp protocol.
  13. 如权利要求11所述的应用服务器,其特征在于,所述视频播放指令为所述客户端利用播放器打开链接的点击命令。The application server according to claim 11, wherein said video playback command is a click command for said client to open a link using a player.
  14. 如权利要求11所述的应用服务器,其特征在于,所述nginx服务器包括rtmp模块,在nginx服务器的配置文件中定义播放所述存储段内容的命令的步骤具体包括配置所述nginx服务器的所述rtmp模块。The application server according to claim 11, wherein the nginx server comprises an rtmp module, and the step of defining a command for playing the content of the storage segment in a configuration file of the nginx server comprises: configuring the Rtmp module.
  15. 如权利要求11所述的应用服务器,其特征在于,所述上传视频文件至S3服务器并存储至一存储段的步骤,包括:The application server according to claim 11, wherein the step of uploading the video file to the S3 server and storing the data to a storage segment comprises:
    定义上传的视频文件名称;及Define the name of the uploaded video file; and
    根据S3服务器规范设定访问所述视频文件的访问权限。The access rights to access the video file are set according to the S3 server specification.
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有视频文件处理程序,所述视频文件处理程序可被至少一个处理器执行,以使所述至少一个处理器执行步骤:A computer readable storage medium storing a video file processing program, the video file processing program being executable by at least one processor to cause the at least one processor to perform the steps:
    基于CEPH规范定义S3服务器与nginx服务器之间的调用接口;Defining a calling interface between the S3 server and the nginx server based on the CEPH specification;
    上传视频文件至S3服务器并存储至一存储段;Upload a video file to the S3 server and store it to a storage segment;
    在nginx服务器的配置文件中定义播放所述存储段内容的命令;Defining a command to play the content of the storage segment in a configuration file of the nginx server;
    通过nginx服务器接收客户端的视频播放指令,并判断所述视频播放指令与所述播放所述存储段内容的命令是否匹配;及Receiving, by the nginx server, a video play instruction of the client, and determining whether the video play instruction matches the command for playing the content of the storage segment; and
    若所述视频播放指令与所述播放所述存储段内容的命令匹配,通过所述调用接口调取所述存储段的内容至所述nginx服务器,并由所述nginx服务器 传输所述存储端的内容至所述客户端。And if the video play instruction matches the command to play the content of the storage segment, the content of the storage segment is retrieved by the calling interface to the nginx server, and the content of the storage end is transmitted by the nginx server. To the client.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述视频文件处理程序被所述处理器执行时,所述nginx服务器传输所述存储端的内容至所述客户端的步骤具体包括:The computer readable storage medium according to claim 16, wherein when the video file processing program is executed by the processor, the step of the nginx server transmitting the content of the storage terminal to the client comprises:
    将获取的所述存储段的内容以rtmp协议传输至所述客户端。The obtained content of the storage segment is transmitted to the client in an rtmp protocol.
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述视频播放指令为所述客户端利用播放器打开链接的点击命令。The computer readable storage medium of claim 16 wherein said video play command is a click command for said client to open a link with a player.
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述nginx服务器包括rtmp模块,在nginx服务器的配置文件中定义播放所述存储段内容的命令的步骤具体包括配置所述nginx服务器的所述rtmp模块。The computer readable storage medium according to claim 16, wherein the nginx server comprises an rtmp module, and the step of defining a command to play the content of the storage segment in a configuration file of the nginx server comprises: configuring the nginx server The rtmp module.
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,所述上传视频文件至S3服务器并存储至一存储段的步骤,包括:The computer readable storage medium according to claim 16, wherein the step of uploading the video file to the S3 server and storing to a storage segment comprises:
    定义上传的视频文件名称;及Define the name of the uploaded video file; and
    根据S3服务器规范设定访问所述视频文件的访问权限。The access rights to access the video file are set according to the S3 server specification.
PCT/CN2018/089425 2018-01-03 2018-06-01 Video file processing method and program, application server, and storage medium WO2019134338A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810003943.8 2018-01-03
CN201810003943.8A CN108200061B (en) 2018-01-03 2018-01-03 Video file processing method, application server and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019134338A1 true WO2019134338A1 (en) 2019-07-11

Family

ID=62587657

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/089425 WO2019134338A1 (en) 2018-01-03 2018-06-01 Video file processing method and program, application server, and storage medium

Country Status (2)

Country Link
CN (1) CN108200061B (en)
WO (1) WO2019134338A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111565168B (en) * 2020-03-02 2023-05-23 杭州云毅网络科技有限公司 Object storage method, system, storage medium and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120102154A1 (en) * 2010-10-26 2012-04-26 Futurewei Technologies, Inc. Cloud-Based Transcoding Platform Systems and Methods
US20170054590A1 (en) * 2015-08-21 2017-02-23 Rohit Agarwal Multi-Tenant Persistent Job History Service for Data Processing Centers
CN105657443A (en) * 2015-12-30 2016-06-08 深圳市云宙多媒体技术有限公司 Live broadcast and time shifting playing method and system
CN105657440B (en) * 2016-01-05 2018-11-13 福建星网智慧科技股份有限公司 A kind of method and system of net cast

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
GONG, . HUAWEI ET AL.: "Design of Embedded Online Store Gateway Based on S3 Semantics", JOURNAL OF BEIJING INFORMATION SCIENCE & TECHNOLOGY UNIVERSITY, vol. 32, no. 1, 15 February 2017 (2017-02-15) *
RAZVAN TUDORICA, STREAMING VIDEO ON DEMAND WITH NGINX AND RTMP MODULE, 23 November 2013 (2013-11-23), Retrieved from the Internet <URL:http://www.scribd.com/document/328149330/Streaming-Video-on-Demand-With-Nginx-and-RTMP-Module-LeaseWEb-Labs> *
V.D. AMBETH KUMAR ET AL.: "Cloud Enabled Media Streaming using Amazon Web Services", 2017 IEEE INTERNATIONAL CONFERENCE ON SMART TECHNOLOGIES AND MANAGEMENT FOR COMPUTING, COMMUNICATION, CONTROLS, ENERGY AND MATERIALS (ICSTM, 2 August 2017 (2017-08-02), Chennai, T.N., India, pages 195 - 198, XP033242272, doi:10.1109/ICSTM.2017.8089150 *

Also Published As

Publication number Publication date
CN108200061A (en) 2018-06-22
CN108200061B (en) 2020-12-04

Similar Documents

Publication Publication Date Title
US20210336897A1 (en) Controllng distribution of resources in a network
US11855858B2 (en) Systems and methods for providing notifications of changes in a cloud-based file system
US9706371B2 (en) Push notification middleware
US9336406B2 (en) Multiprotocol access control list with guaranteed protocol compliance
US9712631B2 (en) Push notification via file sharing service synchronization
US20140298395A1 (en) Methods and systems for playing video on multiple terminals
US9780994B2 (en) Notification normalization
US20140157354A1 (en) Securing Access to Resources on a Network
US10917484B2 (en) Identifying and managing redundant digital content transfers
WO2019134248A1 (en) Video file processing method, application server, and computer readable storage medium
EP3465450B1 (en) Improving throughput in openfabrics environments
US20120307078A1 (en) Automatic sharing and replacement of content based on network connectivity
WO2019134338A1 (en) Video file processing method and program, application server, and storage medium
US20140115091A1 (en) Machine-implemented file sharing method for network storage system
CN109788326B (en) Video resource pre-pushing method, device and system
WO2018031399A1 (en) Access control for message channels in a messaging system
WO2019242279A1 (en) Message processing method and device
US11825165B2 (en) Method of determining video resolution, computing device, and computer-program product
US8615548B1 (en) System and method for deferred data downloading
CN111930696B (en) File transmission processing method and system based on small program
US20140068006A1 (en) Method, apparatus and system for providing content
CN112597406A (en) File transmission method and device, terminal equipment and storage medium
US20230022435A1 (en) Method for managing network connections
WO2021012723A1 (en) Multimedia file storage and access method
JP2015197692A (en) Server device, cache system, information processing method, and program

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: 18898656

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01/10/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18898656

Country of ref document: EP

Kind code of ref document: A1