CN108200061B - Video file processing method, application server and computer readable storage medium - Google Patents

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

Info

Publication number
CN108200061B
CN108200061B CN201810003943.8A CN201810003943A CN108200061B CN 108200061 B CN108200061 B CN 108200061B CN 201810003943 A CN201810003943 A CN 201810003943A CN 108200061 B CN108200061 B CN 108200061B
Authority
CN
China
Prior art keywords
server
video file
video
content
nginx
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810003943.8A
Other languages
Chinese (zh)
Other versions
CN108200061A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810003943.8A priority Critical patent/CN108200061B/en
Priority to PCT/CN2018/089425 priority patent/WO2019134338A1/en
Publication of CN108200061A publication Critical patent/CN108200061A/en
Application granted granted Critical
Publication of CN108200061B publication Critical patent/CN108200061B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Linguistics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a video file processing method, which comprises the following steps: defining a calling interface between the S3 server and the nginx server based on the CEPH specification; uploading the video file to the S3 server 4 and storing the video file in a storage segment; defining a command for playing the content of the memory segment in a configuration file of the nginx server; receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and if the video playing instruction is matched with the command for playing the content of the memory segment, calling the content of the memory segment to the nginx server through the calling interface, and transmitting the content of the memory end to the client by the nginx server. The invention also provides an application server and a computer readable storage medium. The invention can realize unlimited capacity expansion of video file storage, ensure the stability of video file storage and the convenience of reading, and improve the user experience.

Description

Video file processing method, application server and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a video file processing method, an application server, and a computer-readable storage medium.
Background
Currently, the video storage and transmission architecture includes a client, a nginx server (a high-performance HTTP and reverse proxy server, also an IMAP/POP3/SMTP server, also referred to as a front-end server), and a local disk, where the local disk refers to an application server connected 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 an I/O interface of a file system (fs), and the received video file is processed by a rtmp (Real Time Messaging Protocol) module of the nginx server, and is transmitted to the client in a live streaming manner according to the rtmp Protocol. In the structure of video storage and transmission, the storage size of the video file is limited due to the limitation of the hardware capacity of the local disk, and in addition, the data reading is not fast due to the influence of the data size, the storage space and the like in the data reading process of the current application server, so that the nginx server acquires the data content of the application server and transmits the video file to the client in the form of rtmp live broadcast stream through the rtmp module, and the client cannot realize the effect of directly playing the video file stored in the local disk on demand.
Disclosure of Invention
In view of this, the present invention provides a video file processing method, an application server and a computer-readable storage medium, which can utilize the characteristics of the S3 server to implement unlimited capacity expansion of video file storage, ensure the stability of video file storage and the convenience of reading, and simultaneously implement a video-on-demand service under the rtmp protocol according to an embedded video-on-demand instruction, thereby improving user experience.
In order to achieve the above object, the present invention provides an application server, which includes a memory and a processor, wherein the memory stores a video file processing program operable on the processor, and the video file processing program, when executed by the processor, implements the following steps:
defining a calling interface between the S3 server and nginx based on the CEPH specification;
uploading the video file to an S3 server and storing the video file in a storage segment;
receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and
if the video playing instruction is matched with the command for playing the content of the memory segment, the content of the memory segment is called to the nginx server through the calling interface, and the nginx server transmits the content of the memory end to the client.
Alternatively,
the step of the nginx server transmitting the content of the storage end to the client specifically comprises:
and transmitting the acquired content of the memory segment to the client in rtmp protocol.
Optionally, the video playing instruction is a click command for the client to open a link by using a player.
Optionally, the nginx server includes an rtmp module, wherein the step of defining a command to play the content of the memory segment in a configuration file of the nginx server is specifically configured to configure the rtmp module of the nginx server.
Optionally, the step of uploading the video file to the S3 server and storing the video file in a storage segment includes:
defining the name of an uploaded video file; and
the server specification sets access rights to the video file according to S3.
In addition, to achieve the above object, the present invention further provides a video file processing method, which is applied to an application server, and the method includes:
defining a calling interface between the S3 server and the nginx server based on the CEPH specification;
uploading the video file to an S3 server and storing the video file in a storage segment;
defining a command for playing the content of the memory segment in a configuration file of the nginx server;
receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and
if the video playing instruction is matched with the command for playing the content of the memory segment, the content of the memory segment is called to the nginx server through the calling interface, and the nginx server transmits the content of the memory end to the client.
Optionally, the step of the nginx server transmitting the content of the storage end to the client specifically includes:
transmitting the acquired content of the memory segment to the client in rtmp protocol
Optionally, the video playing instruction is a click command for the client to open a link by using a player.
Optionally, the nginx server includes an rtmp module, wherein the step of defining a command to play the content of the memory segment in a configuration file of the nginx server is specifically configured to configure the rtmp module of the nginx server.
Optionally, the step of uploading the video file to the S3 server and storing the video file in a storage segment specifically includes:
defining the name of an uploaded video file; and
the server specification sets access rights to the video file according to S3.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing a video file processing program, which is executable by at least one processor to cause the at least one processor to perform the steps of the video file processing method as described above.
Compared with the prior art, the application server, the video file processing method and the computer readable storage medium provided by the invention have the advantages that firstly, a calling interface between the S3 server and the nginx server is defined based on the CEPH specification; secondly, uploading the video file to an S3 server and storing the video file in a storage segment; then, defining a command for playing the content of the memory segment in a configuration file of the nginx server; then, receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and if the video playing instruction is matched with the command for playing the content of the memory segment, calling the content of the memory segment to the nginx server through the calling interface, and transmitting the content of the memory end to the client by the nginx server. Therefore, the characteristic that the S3 server reads data quickly can be utilized to realize the on-demand effect of the client on the video file stored in the local magnetic disk. The characteristics of the S3 server can be utilized to realize random storage of the video file storage, the storage stability and reading convenience of the video file are ensured, meanwhile, the video on demand service can be realized under the rtmp protocol according to the embedded video on demand instruction, and the user experience is improved.
Drawings
FIG. 1 is a schematic diagram of an alternative application environment for various embodiments of the present invention;
FIG. 2 is a schematic diagram of an alternative hardware architecture of the application server of FIG. 1;
FIG. 3 is a block diagram of a first embodiment of a video file processing program according to the present invention;
FIG. 4 is a flowchart of a first embodiment of a video file processing method according to the present invention;
FIG. 5 is a flowchart illustrating a video file processing method according to a second embodiment of the present invention.
Reference numerals:
Figure BDA0001537974640000041
Figure BDA0001537974640000051
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Fig. 1 is a schematic diagram of an alternative application environment according to various embodiments of the present invention.
In the embodiment, the present invention can be applied 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, where 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, initiates a corresponding request to the application server 2 through the nginx server 5, and is controlled by the application server 2 to invoke or process an object stored in the S3 server 4. In addition, the client 1 may be a mobile device such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet), a PMP (portable multimedia player), a navigation device, a car-mounted device, and the like, and a fixed terminal such as a digital TV, a desktop computer, a notebook, a server, and the like. The application server 2 may be a rack server, a blade server, a tower server, or a rack server, and the application server 2 may be an independent server or a server cluster composed of a plurality of servers. The network 3 may be a wireless or wired network such as an Intranet (Internet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, or a communication network.
The assets stored and retrieved by the S3 server 4 are called objects, and the objects are stored in a storage segment (bucket), and different objects are stored in different storage segments according to the different objects, such as a file stored in a file storage segment and a video file stored in a movie storage segment. The S3 server has the characteristics that other servers do not have, namely the file storage capacity is large, and the limitation of the storage space is not worried about; in addition, the reading speed of the file on the server of S3 is much faster than that of other storage media.
The application server 2 is in communication connection with one or more of the client 1, the S3 server 4 and the nginx server 5 through the network 3 respectively, so as to perform data transmission and interaction.
Based on the introduction of the above components of the application environment, the application server 2 connects and manages the S3 server 4 and the nginx server 5, defines the corresponding call interface, while the client 1 directly connects to the nginx server 5, initiates a corresponding request to the application server 2 through the nginx server 5, and is controlled by the application server 2 to call or process the object stored in the S3 server 4.
In this embodiment, when the application server 2 is installed and runs the video file processing program 200, a calling interface between the S3 server 4 and the nginx server 5 is defined based on the CEPH specification; uploading the video file to the S3 server 4 and storing the video file in a storage segment; defining a command for playing the contents of the memory segment in a configuration file of the nginx server 5; receiving a video playing instruction of a client 1 through an nginx server 5, and judging whether the video playing instruction is matched with the defined command for playing the content of the memory segment; if the video playing instruction is matched with the defined command for playing the content of the memory segment, calling the content of the memory segment to an nginx server through the calling interface; and the nginx server transmits the acquired content of the memory segment to the client 1 in rtmp protocol. In this way, the client 1 can realize on-demand of the video file stored in the local disk due to the characteristic that the S server can read data rapidly. And the random storage of the video file can be realized by utilizing the characteristics of the S3 server 4, the storage stability and the reading convenience of the video file are ensured, meanwhile, the video on demand service can be realized under the rtmp protocol according to the embedded video on demand instruction, and the user experience is improved.
Fig. 2 is a schematic diagram of an alternative hardware architecture of the application server 2 in fig. 1. In this embodiment, the application server 2 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13, which may be communicatively connected to each other through a system bus. It is noted that fig. 2 only shows the application server 2 with components 11-13, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the application server 2, such as a hard disk or a 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, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the application server 2. Of course, the memory 11 may also comprise both an internal storage unit of the application server 2 and an external storage device thereof. In this embodiment, the memory 11 is generally used for storing an operating system installed in the application server 2 and various types of application software, such as program codes of the video file processing program 200. Furthermore, the memory 11 may 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 generally used for controlling 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 the program code stored in the memory 11 or process data, for example, run the video file processing program 200.
The network interface 13 may comprise a wireless network interface or a wired network interface, and the network interface 13 is generally used for establishing a communication connection between the application server 2 and other electronic devices. In this embodiment, the network interface 13 is mainly used for connecting 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, and establishing a data transmission channel and a communication connection between the application server 2 and the one or more of the client 1, the S3 server 4 and the nginx server 5.
The application environment and the hardware structure and function of the related devices of the various embodiments of the present invention have been described in detail so far. Hereinafter, various embodiments of the present invention will be proposed based on the above-described application environment and related devices.
First, the present invention provides a video file processing program 200.
Referring to fig. 3, a block diagram of a video file processing program 200 according to a first embodiment of the present invention is shown.
In this embodiment, the video file processing program 200 includes a series of computer program instructions stored in the memory 11, which when executed by the processor 12, can implement the video file processing operations of the embodiments of the present invention. In some embodiments, the video file processing program 200 may be divided into one or more modules based on the particular operations implemented by the portions of the computer program instructions. For example, in fig. 3, the video file processing program 200 may be divided into an interface definition module 201, an upload module 202, a command definition module 203, a receive module 204, an acquisition module 205, and a transmission module 206. Wherein:
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 that can be divided into four levels: (1) basic storage system, (2) basic library, (3) high-level application interface: this layer includes three parts: RADOS GW (RADOS Gateway), rbd (reusable Block device), and Ceph FS (Ceph File System), which are used to provide an upper interface with a higher abstraction level and more convenient for an application or client 1 to use on the basis of librados library, wherein RADOS GW is a Gateway that provides a restf API compatible with Amazon S3 server 4 and Swift, and is used for developing a corresponding object storage application. (4) And (5) an application layer. The CEPH described above has a CEPH specification through which interface calls between various layers in the CEPH system can be made.
In the above CEPH system, one of the hierarchical-upper layer application interfaces may provide an upper layer interface for the externally connected server or client 1, that is, the CEPH may specify the calling interfaces of itself with the S3 server 4 and the nginx server 5, and meanwhile, since the S3 server 4 is a simple storage service device, there is a specific access interface, and the CEPH may define the calling interfaces 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 the video file to the S3 server 4 and store the video file in a storage segment. Specifically, the uploading module 202 implements the steps of uploading the video file to the S3 server 4 and storing the video file in a storage segment by:
the uploading module 202 defines the name of the uploaded video file; and sets access rights to the video file according to the S3 server 4 specification.
In this embodiment, mp4 or flv file may be uploaded to the movie packet (storage segment) of the S3 server 4, the name of the uploaded file is named "video. mp4", and the access right 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.
The command definition module 203 defines a command for playing the content of the memory segment in the configuration file of the nginx server 5.
Specifically, the nginx server 5 comprises an rtmp module, wherein the step of defining a command to play the content of the memory segment in a configuration file of the nginx server 5 is specifically configured to configure the rtmp module of the nginx server 5. rtmp (real Time Messaging protocol) real-Time Messaging protocol is an open protocol developed by Adobe Systems for audio, video and data transmission between Flash players and servers.
In this embodiment, the rtmp module of the nginx server 5 is configured by adding the following contents to nginx.conf:
Figure BDA0001537974640000101
the receiving module 204 receives a video playing instruction of the client 1 through the nginx server 5, and determines whether the video playing instruction is matched with the command for playing the content of the memory segment. And the video playing instruction is used for triggering a command of playing the content of the memory segment. The video playing instruction is a click command for the client 1 to open a link by using a player.
In this embodiment, the client 1 may initiate a video playing instruction by opening the following link with a VLC multimedia player or other player supporting rtmp protocol: rtmp:// { nginx _ server }/vod _ http/video. mp 4.
The obtaining module 205 is configured to, when the video playing instruction matches the command for playing the content of the memory segment, call the content of the memory segment to the nginx server through the call interface.
The transmission module 206 is configured to control the nginx server to transmit the content of the storage end to the client 1.
Through the program module 201 and 206, the video file processing program 200 provided by the present invention first defines a call interface between the S3 server 4 and the nginx server 5 based on the CEPH specification; secondly, uploading the video file to the S3 server 4 and storing the video file in a storage segment; then, defining a command for playing the content of the memory segment in a configuration file of the nginx server 5; then, receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and if the video playing instruction is matched with the command for playing the content of the memory segment, calling the content of the memory segment to the nginx server through the calling interface, and transmitting the content of the memory end to the client by the nginx server. Therefore, the characteristic that the S3 server reads data quickly can be utilized to realize the on-demand effect of the client on the video file stored in the local magnetic disk. The characteristics of the S3 server can be utilized to realize random storage of the video file storage, the storage stability and reading convenience of the video file are ensured, meanwhile, the video on demand service can be realized under the rtmp protocol according to the embedded video on demand instruction, and the user experience is improved.
In addition, the invention also provides a video file processing method.
Fig. 4 is a schematic flow chart showing an implementation of the video file processing method according to the first embodiment of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 4 may be changed and some steps may be omitted according to different requirements.
Step S401 defines S3 a call interface between the server 4 and the nginx server 5 based on the CEPH specification.
CEPH is a distributed file system that can be divided into four levels: (1) basic storage system, (2) basic library, (3) high-level application interface: this layer includes three parts: RADOS GW (RADOS Gateway), rbd (reusable Block device), and Ceph FS (Ceph File System), which are used to provide an upper interface with a higher abstraction level and more convenient for an application or client 1 to use on the basis of librados library, wherein RADOS GW is a Gateway that provides a restf API compatible with Amazon S3 server 4 and Swift, and is used for developing a corresponding object storage application. (4) And (5) an application layer. The CEPH described above has a CEPH specification through which interface calls between various layers in the CEPH system can be made.
In the above CEPH system, one of the hierarchical-upper layer application interfaces may provide an upper layer interface for the externally connected server or client 1, that is, the CEPH may specify the calling interfaces of itself with the S3 server 4 and the nginx server 5, and meanwhile, since the S3 server 4 is a simple storage service device, there is a specific access interface, and the CEPH may define the calling interfaces of the S3 server 4 and the nginx server 5 in the storage object calling process through the specification.
In step S402, the video file is uploaded to the S3 server 4 and stored in a storage segment. Specifically, the specific steps of uploading the video file to the S3 server 4 and storing the video file in a storage section will be described in detail in the second embodiment (fig. 5) of the video file processing method of the present invention.
In step S403, a command for playing the content of the memory segment is defined in the configuration file of the nginx server 5.
Specifically, the nginx server 5 comprises an rtmp module, wherein the step of defining a command to play the content of the memory segment in a configuration file of the nginx server 5 is specifically configured to configure the rtmp module of the nginx server 5. rtmp (real Time Messaging protocol) real-Time Messaging protocol is an open protocol developed by Adobe Systems for audio, video and data transmission between Flash players and servers.
In this embodiment, the rtmp module of the nginx server 5 is configured by adding the following contents to nginx.conf:
Figure BDA0001537974640000121
Figure BDA0001537974640000131
step S404, receiving a video playing instruction of the client 1 through the nginx server 5, and determining whether the video playing instruction matches with the command for playing the content of the memory segment. The video playing instruction is a click command for the client 1 to open a link by using a player.
In this embodiment, the client 1 may initiate a video playing instruction by opening the following link with a VLC multimedia player or other player supporting rtmp protocol: rtmp:// { nginx _ server }/vod _ http/video. mp 4.
Step S405, when the video playing instruction is matched with the command for playing the content of the memory segment, the content of the memory segment is called to the nginx server through the calling interface. .
Step S406, configured to control the nginx server to transmit the content of the storage end to the client 1.
Through the steps S401 to 406, the video file processing method provided by the present invention, first, defines a calling interface between the S3 server 4 and the nginx server 5 based on the CEPH specification; secondly, uploading the video file to the S3 server 4 and storing the video file in a storage segment; then, defining a command for playing the content of the memory segment in a configuration file of the nginx server 5; then, receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and if the video playing instruction is matched with the command for playing the content of the memory segment, calling the content of the memory segment to the nginx server through the calling interface, and transmitting the content of the memory end to the client by the nginx server. Therefore, the characteristic that the S3 server reads data quickly can be utilized to realize the on-demand effect of the client on the video file stored in the local magnetic disk. The characteristics of the S3 server can be utilized to realize random storage of the video file storage, the storage stability and reading convenience of the video file are ensured, meanwhile, the video on demand service can be realized under the rtmp protocol according to the embedded video on demand instruction, and the user experience is improved.
Fig. 5 is a schematic flow chart showing an implementation of the video file processing method according to the second embodiment of the present invention. In this embodiment, the execution order of the steps in the flowchart shown in fig. 5 may be changed and some steps may be omitted according to different requirements.
In this embodiment, the process of uploading the video file to the S3 server 4 and storing the video file in a storage segment specifically includes the following steps:
in step S501, an uploaded video file name is defined.
Step S502, the access authority for accessing the video file is set according to the specification of the server 4 of S3.
In this embodiment, mp4 or flv file may be uploaded to the movie packet (storage segment) of the S3 server 4, the name of the uploaded file is named "video. mp4", and the access right 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.
Through the above steps S501-502, the video file processing method of the present invention can upload a video file to the S3 server 4 by defining the name of the uploaded video file and setting the access right to access the video file according to the S3 server 4 specification. Therefore, infinite capacity expansion of video file storage is realized, and the stability of video file storage and the convenience of reading are ensured.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium storing a video file processing program, which is executable by at least one processor to cause the at least one processor to perform the steps of the video file processing method as described above.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A video file processing method is applied to an application server, and is characterized by comprising the following steps:
defining a calling interface between the S3 server and the nginx server based on the CEPH specification;
uploading the video file to an S3 server and storing the video file to a storage segment, wherein the S3 server stores different types of storage objects in different storage segments, and the uploading the video file to an S3 server and storing the video file to a storage segment comprises:
defining the name of an uploaded video file;
setting access authority for accessing the video file according to S3 server specifications;
defining a command for playing the content of the memory segment in a configuration file of the nginx server;
receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and
if the video playing instruction is matched with the command for playing the content of the memory segment, the content of the memory segment is called to the nginx server through the calling interface, and the nginx server transmits the content of the memory segment to the client.
2. The video file processing method according to claim 1, wherein the step of the nginx server transmitting the contents of the memory segment to the client specifically comprises:
and transmitting the acquired content of the memory segment to the client in rtmp protocol.
3. The video file processing method according to claim 1, wherein the video playing instruction is a click command for the client to open a link using a player.
4. 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 memory segment in a configuration file of the nginx server is specifically used to configure the rtmp module of the nginx server.
5. An application server, comprising a memory, a processor, the memory having stored thereon a video file processing program executable on the processor, the video file processing program when executed by the processor implementing the steps of:
defining a calling interface between the S3 server and the nginx server based on the CEPH specification;
uploading the video file to an S3 server and storing the video file to a storage segment, wherein the S3 server stores different types of storage objects in different storage segments, and the uploading the video file to an S3 server and storing the video file to a storage segment comprises:
defining the name of an uploaded video file;
setting access authority for accessing the video file according to S3 server specifications;
defining a command for playing the content of the memory segment in a configuration file of the nginx server;
receiving a video playing instruction of a client through an nginx server, and judging whether the video playing instruction is matched with the command for playing the content of the memory segment; and
if the video playing instruction is matched with the command for playing the content of the memory segment, the content of the memory segment is called to the nginx server through the calling interface, and the nginx server transmits the content of the memory segment to the client.
6. The application server of claim 5, wherein when the video file handler is executed by the processor, the step of the nginx server transmitting the contents of the memory segment to the client specifically comprises:
and transmitting the acquired content of the memory segment to the client in rtmp protocol.
7. The application server of claim 5, wherein the video playback instruction is a click command for the client to open a link with a player.
8. A computer-readable storage medium storing a video file processing program executable by at least one processor to cause the at least one processor to perform the steps of the video file processing method according to any one of claims 1-4.
CN201810003943.8A 2018-01-03 2018-01-03 Video file processing method, application server and computer readable storage medium Active CN108200061B (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN108200061A CN108200061A (en) 2018-06-22
CN108200061B true CN108200061B (en) 2020-12-04

Family

ID=62587657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810003943.8A Active CN108200061B (en) 2018-01-03 2018-01-03 Video file processing method, application server and computer readable 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 (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657443A (en) * 2015-12-30 2016-06-08 深圳市云宙多媒体技术有限公司 Live broadcast and time shifting playing method and system
CN105657440A (en) * 2016-01-05 2016-06-08 福建星网智慧科技股份有限公司 Video broadcast method and system

Family Cites Families (3)

* 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
CN106657379A (en) * 2017-01-06 2017-05-10 重庆邮电大学 Implementation method and system for NGINX server load balancing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657443A (en) * 2015-12-30 2016-06-08 深圳市云宙多媒体技术有限公司 Live broadcast and time shifting playing method and system
CN105657440A (en) * 2016-01-05 2016-06-08 福建星网智慧科技股份有限公司 Video broadcast method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Cloud Enabled Media Streaming using Amazon Web Services;V.D. Ambeth Kumar等;《2017 IEEE International Conference on Smart Technologies and Management for Computing》;20170804;第195-198页 *
Multi-Protocol Video Delivery with Late Trans-Muxing;Rufael Mekuria等;《MM’16:Proceedings of the 24th ACM international conference on Multimedia》;20161031;正文第3.2-3.3节,图3 *
Streaming Video on Demand with nginx and RTMP Module;Razvan Tudorica;《http://www.leaseweb.com/labs/2013/11/streaming-video-demand-nginx-rtmp-module/》;20131120;正文第1段-倒数第4段 *

Also Published As

Publication number Publication date
WO2019134338A1 (en) 2019-07-11
CN108200061A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN111629240B (en) Multi-screen interactive display method and device
US20170041376A1 (en) Data-sharing system and method
CN107147921B (en) Video playing acceleration method and device based on slice and intelligent CDN scheduling
KR101890973B1 (en) Network communication and cost awareness
CN103781028B (en) A kind of information subscribing mthods, systems and devices of mobile terminal
US20170055136A1 (en) Method and system for transmitting text messages
US11303949B2 (en) Method of switching resolution, computing device, and computer-readable storage medium
CN111309279A (en) Multi-screen interactive display method and device
CN108429922B (en) Video file processing method, application server and computer readable storage medium
CN111510777B (en) Method and device for measuring network speed, computer equipment and readable storage medium
CN111490947A (en) Data packet transmitting method, data packet receiving method, system, device and medium
CN112312162B (en) Video server for transmitting video stream
CN112218151A (en) Screen projection method, device, computer storage medium and system
CN113485972A (en) Multimedia sharing method, device, mobile terminal and storage medium
CN108200061B (en) Video file processing method, application server and computer readable storage medium
CN109347967B (en) Method and device for acquiring audio and video data
CN110225399B (en) Streaming media processing method and device, computer equipment and storage medium
CN111835651B (en) Data writing method, system, device and computer readable storage medium
CN103338263A (en) Method and system for sharing audio and video files based on players
CN103686633A (en) Method and device for transferring files
CN111385660A (en) Video on demand method, device, equipment and storage medium
KR101531284B1 (en) An apparatus for presenting cloud streaming services, a method thereof and a system thereof
CN112597406A (en) File transmission method and device, terminal equipment and storage medium
CN109788326B (en) Video resource pre-pushing method, device and system
JP5643449B1 (en) Server and method for displaying display screen on terminal device

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