Video file sharing method and device, equipment and medium

By dynamically adjusting the upload and browsing directories of video files, supporting encoding format transcoding and metadata processing, using OpenCV to intercept preview pictures, it solves the problem that video file sharing systems in the existing technology is difficult to achieve clear directories and simple operation, and improves video File sharing management efficiency and browsing experience.

CN119211594APending Publication Date: 2024-12-27GUANGZHOU SANQI DREAM NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411051113.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing video file sharing system is difficult to achieve clear catalogs, easy operation and management efficiency, especially in areas such as art video tutorials, which leads to poor browsing and difficulty in obtaining matching shared video files.

Method used

By obtaining the department information of the uploaded user, determining the upload directory of the video file, and identifying the department information of the browsing user in the web page, dynamically adjusting the visual directory, supporting the encoding format of the video file and automatic processing of metadata, and using OpenCV to intercept Preview the picture to realize simplified management and sharing of video files.

Benefits of technology

It reduces the operation complexity during video file sharing, improves directory clarity and management efficiency, and ensures that video files can be shared and browsed normally in different encoding formats, and is suitable for a wide range of internal enterprise video sharing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211594A_ABST
    Figure CN119211594A_ABST
Patent Text Reader

Abstract

The invention discloses a video file sharing method and device, equipment and a medium, and belongs to the technical field of audio and video processing. The method comprises the following steps: acquiring department information of an uploading user in response to an uploading request of a video file; determining an uploading directory of the video file according to the department information of the uploading user; receiving a video file, and storing the video file at a corresponding position of the uploading directory; in response to the video file browsing request, identifying department information of a browsing user; determining a visual directory of the browsing user according to the department information of the browsing user; and in response to a selection operation on the visual directory, determining a target position in the visual directory, and providing the video file corresponding to the target position to the Web page. According to the technical scheme, sharing of video files with clear directories can be realized, the complexity of sharing operation is reduced, concise management of the shared video files can be realized, and the method has a relatively large application range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of audio and video processing technology, and specifically relates to a method, device, equipment and medium for sharing a video file. Background Art

[0002] With the rapid development of science and technology, the sharing of various audio and video data has played an important role in enterprise development, technological innovation and product application. It can not only realize technology sharing, but also facilitate the operation of many environments such as testing and maintenance, reduce the difficulty of staff operations and improve work efficiency.

[0003] At present, the sharing of video data, taking the sharing of art video tutorials as an example, is characterized by being scattered and difficult to share, with poor browsing effects, and it is difficult to obtain shared video files that match the needs. Because the art department has high requirements for pages before releasing products and requires a lot of interactive work, the video file sharing services provided by some current open source or commercial products cannot fully meet the usage needs. Therefore, building a video file sharing system that integrates sharing, management, and browsing functions is a continuous work auxiliary tool for industry workers. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a video file sharing method, device, equipment and medium, the purpose of which is to realize video file sharing with clear directory in the process of video file sharing, reduce the complexity of operation for both the sharing personnel and the browsing personnel, and realize simplified management of shared video files, which has a wide range of applications.

[0005] In a first aspect, an embodiment of the present application provides a method for sharing a video file, the method comprising:

[0006] In response to a video file upload request, obtaining department information of the uploading user;

[0007] Determine the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user;

[0008] Receive a video file and store the video file in a corresponding location of the upload directory;

[0009] In response to a video file browsing request sent through a Web page, identifying department information of a browsing user;

[0010] Determine, according to the department information of the browsing user, a visible directory of the video sharing library for the browsing user; wherein the visible directory is part or all of all directories of the video sharing library;

[0011] In response to a selection operation on the visual directory, a target location in the visual directory is determined, and a video file corresponding to the target location is provided to the Web page.

[0012] Furthermore, after determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user, the method further includes:

[0013] Identify whether the encoding format of the video file in the video sharing library meets the preset format standard;

[0014] If not, the video file is transcoded to obtain a target encoding format.

[0015] Further, identifying whether the encoding format of the video file in the video sharing library meets the preset format standard includes:

[0016] Get the target encoding format supported by the web page;

[0017] Identify whether the encoding format of the video file in the video sharing library is the same as the target encoding format;

[0018] If they are the same, it is determined that the preset format standard is met; if they are different, it is determined that the preset format standard is not met;

[0019] Transcoding the video file to obtain a target encoding format includes:

[0020] The video file is transcoded using ffmpeg to obtain an mpeg encoding format.

[0021] Furthermore, after determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user, the method further includes:

[0022] The video metadata of the video files in the video sharing library are automatically changed through a preset tool.

[0023] Furthermore, the video metadata of the video files in the video sharing library are automatically changed by a preset tool, including:

[0024] The video file in the video sharing library is intercepted with a video frame through OpenCV, and the video frame is used as a preview image of the video file.

[0025] Furthermore, before intercepting the video frame of the video file in the video sharing library through OpenCV, the method further includes:

[0026] Identifying whether the video file has a manually specified preview image;

[0027] If not, an operation of capturing video frames from the video file is performed.

[0028] Further, determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user includes:

[0029] Identify whether the department information of the uploading user is within the scope of the existing departments of the video sharing library;

[0030] If it is within the scope of an existing department, matching the target department according to the department information of the uploading user, and determining the upload directory of the target department as the upload directory of the video file in the video sharing library;

[0031] If it is not within the scope of the existing department, a new department directory is created according to the department information of the uploading user, and the new department directory is determined as the upload directory of the video file in the video sharing library.

[0032] In a second aspect, an embodiment of the present application provides a video file sharing device, the device comprising:

[0033] A department information acquisition module, used to obtain the department information of the uploading user in response to the video file upload request;

[0034] An upload directory determination module, used to determine the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user;

[0035] A storage location determination module, used for receiving a video file and storing the video file in a corresponding location of the upload directory;

[0036] A browsing request response module, used to respond to a video file browsing request sent through a Web page and identify the department information of the browsing user;

[0037] A visible directory determination module, used to determine the visible directory of the video sharing library to the browsing user according to the department information of the browsing user; wherein the visible directory is part or all of all the directories of the video sharing library;

[0038] The shared execution module is used to determine a target location in the visual directory in response to a selection operation on the visual directory, and provide a video file corresponding to the target location to the Web page.

[0039] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0040] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0041] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0042] In an embodiment of the present application, in response to a video file upload request, the department information of the uploading user is obtained; the upload directory of the video file in all directories of the video sharing library is determined based on the department information of the uploading user; the video file is received and stored in the corresponding position of the upload directory; in response to a video file browsing request issued through a Web page, the department information of the browsing user is identified; based on the department information of the browsing user, the visible directory of the video sharing library to the browsing user is determined; wherein the visible directory is part or all of all directories of the video sharing library; in response to a selection operation on the visible directory, the target location in the visible directory is determined, and the video file corresponding to the target location is provided to the Web page. The technical solution provided by the present application can realize video file sharing with clear directories during video file sharing, which reduces the complexity of operations for both sharing personnel and browsing personnel, and can realize simplified management of shared video files, and has a large scope of application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flowchart of a method for sharing a video file provided in Embodiment 1 of the present application;

[0044] Figure 2 This is a schematic diagram of the process of encoding format processing of a video file provided in Embodiment 2 of the present application;

[0045] Figure 3 is a schematic diagram of a video file sharing process provided in Embodiment 2 of the present application;

[0046] Figure 4 It is a structural diagram of a video file sharing device provided in Embodiment 3 of the present application;

[0047] Figure 5 It is a schematic diagram of the structure of the electronic device provided in Example 4 of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all of the content is shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0050] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0051] In conjunction with the accompanying drawings, the video file sharing method, device, equipment and medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0052] Embodiment 1

[0053] Figure 1 1 is a flow chart of a video file sharing method provided in Example 1 of the present application. Figure 1 As shown, the specific steps include:

[0054] S101, in response to a video file upload request, obtaining department information of the uploading user;

[0055] First, this application is applicable to the scenario of video file sharing within a company or department. Based on the above scenario, it can be understood that the execution subject of this application can be a terminal device or system with the ability to upload, organize and share video files.

[0056] Video files may include audio, video, or any other file format. For example, a video file may be a video tutorial that different groups in the art department of an application need to share in the intranet. In this example, the upload request for the video file may be issued by a member of the art department. Because in some scenarios, the development or design of an application requires coordination among all departments, the upload request may be issued to a member of any department of the application. Because some companies also involve scenarios that require resource synchronization, the upload request may also be issued by a member of any department of the company.

[0057] The uploading user is the user who sends the upload request. The department information of the user may be associated with the work number of the user. The department information of the user may be identified based on the work number, name or identity ID of the user.

[0058] S102, determining an upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user;

[0059] After determining the department information, the upload directory of the video file in the video sharing library for the uploading user can be determined based on the department information. It can be understood that if the video sharing library is built based on an application developed by a company, the directories associated with the various functional modules of the application can be set. If the video sharing library is built based on the company dimension, all directories can include the various departments of the company and the branches under the departments, etc.

[0060] In this solution, if the department information of the uploading user is the character model making department of the art department, after the uploading user sends an upload request, the uploaded video file can be stored in all directories and in the directory of the character model making department of the art department.

[0061] In this solution, after uploading, the user's work number information, identity ID or IP address used for uploading can be stored at the same time to indicate the identity of the uploading user. The uploading time information, uploading duration information, etc. can also be stored at the same time after uploading. This can be used to assist other browsing users in browsing and understand the relevant information when the video file is uploaded based on the above information.

[0062] In one embodiment, optionally, determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user includes:

[0063] Identify whether the department information of the uploading user is within the scope of the existing departments of the video sharing library;

[0064] If it is within the scope of an existing department, matching the target department according to the department information of the uploading user, and determining the upload directory of the target department as the upload directory of the video file in the video sharing library;

[0065] If it is not within the scope of the existing department, a new department directory is created according to the department information of the uploading user, and the new department directory is determined as the upload directory of the video file in the video sharing library.

[0066] There may be a situation where the department information of the uploading user is not within the scope of the existing departments of the video sharing library. For example, the user issues an upload request for a video file, and the department to which the uploading user belongs happens to be a newly established department. In this case, in order to ensure the accuracy of the upload directory, the department information of the uploading user will be matched with the existing departments of the video sharing library. If the match is successful, the upload directory of the matched target department will be determined as the upload directory of the video file in the video sharing library. If the match fails, a new department will be created with the department information of the uploading user, and an upload directory corresponding to the new department, i.e., a new department directory, will be established, and the new department directory will be determined as the upload directory of the video file in the video sharing library.

[0067] The technical solution provided in this embodiment can realize the operation of matching the department information of the uploading user, and then realize the accurate management of the upload directory of the video files uploaded to the video sharing library, which is convenient for the subsequent search of shared resources, makes the division of shared resources clearer, and improves the user experience of the video file sharing process.

[0068] S103, receiving a video file, and storing the video file in a corresponding position of the upload directory;

[0069] After determining the upload directory, the video file can be received and stored in the corresponding position of the upload directory. That is, if the upload directory points to a fixed storage location, the video file will be stored therein. It is understandable that if the size of the storage space of the corresponding position of the upload directory is not specified in advance, the video file can be received and stored. If the size of the storage space is specified, it is necessary to identify whether the storage space is sufficient to store the video file before storage. If it is insufficient, the corresponding position of the upload directory needs to be expanded. For example, the default expansion is 2GB each time. After three expansions, a corresponding notification instruction will be generated, so that the administrator of the video sharing library can make specific checks and adjustments on whether the directory allocation is reasonable and whether the space size setting is reasonable.

[0070] S104, in response to a video file browsing request sent through a Web page, identifying department information of a browsing user;

[0071] Web (World Wide Web) is the global wide area network, also known as the World Wide Web. It is a global, dynamically interactive, cross-platform distributed graphical information system based on hypertext and HTTP. It is a network service built on the Internet, which provides a graphical, easy-to-access and intuitive interface for viewers to find and browse information on the Internet. The documents and hyperlinks organize the information nodes on the Internet into an interconnected mesh structure. A web page is a web page, which can be a page in a website. Usually, a web page is the basic element of a website and is a platform for carrying various website applications. In layman's terms, a website is composed of web pages.

[0072] In this solution, the video sharing library can be accessed through a Web page, which can improve the availability of the video sharing library and make it more convenient to use without complicated operations.

[0073] When a video file browsing request is received through a Web page, the department information of the browsing user will be identified.

[0074] S105, determining, according to the department information of the browsing user, a visible directory of the video sharing library for the browsing user; wherein the visible directory is part or all of all directories of the video sharing library;

[0075] According to the department information of the browsing user, permission identification can be performed to determine which resources in the video sharing library are visible to the browsing user, and then determine the visible directory. It can be understood that if the browsing user has permission to view all video files shared by all departments, the visible directory is equal to all directories. If only video files shared by some departments can be viewed, the visible directory is a part of all directories.

[0076] For example, during the development of application A, departments X, Y, and Z participated, and during the development of application B, departments X and W participated. In the video sharing library developed by the company, browsing users of department W only have the right to access video files shared by departments X and W for application B. If browsing users of department X only participated in the development of application A, then the browsing users only have the right to access video files shared by departments X, Y, and Z for application A.

[0077] S106, in response to the selection operation on the visual directory, determining a target location in the visual directory, and providing a video file corresponding to the target location to the Web page.

[0078] After the browsing user selects a target location based on the visible directory, the video file corresponding to the target location can be fed back to the Web page for the browsing user to watch.

[0079] The technical solution provided in this embodiment obtains the department information of the uploading user in response to the upload request of the video file; determines the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user; receives the video file and stores the video file in the corresponding position of the upload directory; identifies the department information of the browsing user in response to the video file browsing request issued through the Web page; determines the visible directory of the video sharing library to the browsing user according to the department information of the browsing user; wherein the visible directory is part or all of all directories of the video sharing library; determines the target location in the visible directory in response to the selection operation of the visible directory, and provides the video file corresponding to the target location to the Web page. The technical solution provided in this application can realize the sharing of video files with clear directories in the process of video file sharing, reduces the complexity of operation for both the sharing personnel and the browsing personnel, and can realize the simplified management of shared video files, and has a large scope of application.

[0080] Based on the above technical solutions, optionally, after determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user, the method further includes:

[0081] Identify whether the encoding format of the video file in the video sharing library meets the preset format standard;

[0082] If not, the video file is transcoded to obtain a target encoding format.

[0083] Among them, a video file itself usually consists of two parts: audio and video. For example, a video file is composed of avc video encoding + AAC audio encoding. Common video encoding formats include Xvid, AVC / H.264, MPEG1, MPEG2, etc. Common audio encoding formats include MP3, AAC, etc. Different encoding formats have different characteristics. For example, AVI, which means Audio Video Interactive, is to store video and audio encoding together. The AVI format has many restrictions. There can only be one video track and one audio track, and there can be some additional tracks, such as text. The AVI format does not provide any control function. WMV, Windows Media Video, is the general name for a group of digital video codec formats developed by Microsoft. ASF (Advanced Systems Format) is its packaging format. MPEG format, MPEG (Moving Picture Experts Group), is a media packaging form recognized by the International Organization for Standardization (IS0) and supported by most machines. Its storage methods are diverse and can adapt to different application environments. The file container format of MPEG-4 files is specified in Layer 1 (mux), 14 (mpg), 15 (avc), etc. MPEG has rich control functions, and can have multiple videos (i.e. angles), audio tracks, subtitles (bitmap subtitles), etc. MPEG1 is an MPEG (Moving Picture Experts Group) multimedia format used to compress and store audio and video. Used in computers and games, MPEG1 has a resolution of 352*240 pixels and a frame rate of 25 frames per second (PAL). MPEG2 is an MPEG (Moving Picture Experts Group) multimedia format used to compress and store audio and video. For use in broadcast-quality applications, MPEG 2 defines protocols that support the addition of closed captions and various language channel functions. DivX / xvid, DivX is a digital multimedia compression technology invented by DivX Networks that is similar to MP3. DivX is based on MPEG-4 and can compress MPEG-2 format multimedia files to 10% of the original, and can also compress VHS format videotape format files to 1% of the original. Through broadband devices such as DSL or Cable Moden. At the same time, it allows viewing on other devices (such as digital TV, Blu-ray player, PocketPC, digital photo frame, mobile phone) with low machine requirements. This encoded video can be played smoothly as long as the CPU is above 300MHz, 64M memory and a graphics card with 8M video memory. DivX files are small and the image quality is better. A CD-ROM can hold 120 minutes of movies with quality close to DVD. DV, digital video, is usually used to refer to devices (such as portable cameras) that capture and store video in digital format.There are two types of AVI files, DV Type I and DV Type II. DV Type I, digital video AVI files contain original video and audio information. DV Type I files are usually smaller than DV Type II files and are compatible with most A / V devices, such as DV camcorders and recorders. DV Type II, digital video AVI files contain original video and audio information, and also contain a separate audio track as a copy of the DV audio. DV Type II is more widely compatible with software than DV Type I, because most programs that use AVI files expect to use a separate audio track. MKV, Matroska is a new multimedia packaging format that can package multiple differently encoded videos and 16 or more audios in different formats and subtitles in different languages ​​into a Matroska Media file. It is also one of the open source multimedia packaging formats. Matroska can also provide very good interactive functions, and is more convenient and powerful than MPEG. RM / RMVB, Real Video or Real Media (RM) files are a file container developed by RealNetworks. It can usually only accommodate media encoded with Real Video and Real Audio. The file has certain interactive functions and allows scripts to be written to control playback. RM, especially the variable bit rate RMVB format, is very small and very popular among Internet downloaders. MOV, QuickTime Movie is a container developed by Apple. Due to the dominance of Apple computers in the professional graphics field, the QuickTime format has basically become a universal format in the film production industry. On February 11, 1998, the International Organization for Standardization (IS0) recognized the QuickTime file format as the basis of the MPEG-4 standard. QT can store a wealth of content. In addition to video and audio, it can also support pictures, text (text subtitles), etc. OGG, Ogg Media is a completely open multimedia system plan, and OGM (Ogg Media File) is its container format. OGM can support multiple tracks such as multiple videos, audios, subtitles (text subtitles), etc. MOD format is the name of the storage format used by hard disk camcorders produced by JVC.

[0084] The preset format standard may be one or more of the above-mentioned formats. Identifying whether the encoding format of the video file in the video sharing library meets the preset format standard may be identifying whether the encoding format of the video file is within the range of the preset format standard. If it is within the range of the preset format standard, it is determined that the requirement is met and no processing is required. If it is not met, the video file is transcoded to obtain the target encoding format.

[0085] It should be noted that the preset format standard can be one format or multiple formats. The formats in the preset format standard need to meet the requirements of being able to be played on a web page, so as to ensure that the video files in the video sharing library can be successfully viewed by browsing users. Otherwise, the video sharing effect cannot be achieved.

[0086] Through such a setting, this solution can ensure that each video file in the video sharing library can be shared successfully, improve the user experience during the uploading or browsing process, avoid a series of complex operations caused by sharing failure, or problems that affect the work progress of staff.

[0087] Based on the above technical solutions, optionally, after determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user, the method further includes:

[0088] The video metadata of the video files in the video sharing library are automatically changed through a preset tool.

[0089] Video metadata can be data such as the thumbnail and video title of the video file in the video sharing library. After uploading the video file to the video sharing library, you can use preset tools to collect and automatically identify and change it. For example, if the AI ​​tool recognizes that the main body of the video is a video related to children's education, you can change its video title to: Children's Education Video.

[0090] It is understandable that the preset tool can be an AI tool or other tools, for example, it can be a tool for uniformly modifying the names of video files, such as encoding them sequentially according to the order of upload time.

[0091] This embodiment can automatically change the video metadata of the video file after the video file is uploaded to the video sharing library through the automatic change operation of the video metadata, so that the processed video file can be better displayed in the video sharing library, and can help other users quickly understand the content of the video file when other users browse it.

[0092] Based on the above technical solutions, optionally, the video metadata of the video files in the video sharing library are automatically changed by a preset tool, including:

[0093] The video file in the video sharing library is intercepted with a video frame through OpenCV, and the video frame is used as a preview image of the video file.

[0094] OpenCV, the full name of Open Source Computer Vision Library, is an open source computer vision library mainly used for image and video processing. It was first developed by Intel in 1999 and has evolved into a global open source project maintained and contributed by many developers. OpenCV is available on a variety of operating systems and platforms, including Windows, Linux, macOS, Android, and iOS. The core of OpenCV is written in C++, but it provides interfaces to multiple programming languages ​​such as Python, Java, MATLAB, etc., allowing developers to use the functions of OpenCV through familiar languages. These interfaces have greatly lowered the threshold for using computer vision technology and attracted a wide range of application fields. OpenCV has very rich functions, including but not limited to image processing, video analysis, object detection and tracking, image feature extraction and description, implementation of machine learning and deep learning algorithms, as well as camera calibration and 3D reconstruction. It also provides advanced functions such as various image filters, histogram operations, binarization, shape descriptor calculation, etc. The modular structure of OpenCV makes it easy to expand and maintain. Its main modules include core functions, image processing, video analysis, feature extraction and description, object detection, high GUI interface, video input / output, GPU acceleration algorithms, etc. OpenCV is widely used in many fields, such as face recognition, gesture recognition, human-computer interaction, action recognition, motion tracking, object recognition, image segmentation, robotics, etc. It has rich documentation and numerous sample codes, providing developers with convenient learning resources.

[0095] In this solution, by utilizing the video processing function of OpenCV, a certain video frame in the video file is intercepted as a preview image, and the video information is generated or updated and stored. Here, generating the video information means using the video frame as a preview image of the video file. It can be understood that the operation of intercepting the video frame through OpenCV can be to identify the video frames in the video file one by one, and determine a video frame that best represents the content of the video file as the preview image of the video file, so that the browser or uploader can have a preliminary understanding of the content displayed by the video file based on the preview image.

[0096] Through such a setting, the present embodiment can use OpenCV technology to automatically replace the preview image of the video file. After the uploader uploads the video, the preview image of the video file can be seen, and when the browsing person enters the directory, he can also see the video file with the preview image. This setting can not only automatically generate images for users to browse, but also save the uploader from complicated operations to select preview images, so that the uploader can achieve the purpose of automatically generating preview images based on simple uploading operations.

[0097] Based on the above technical solutions, optionally, before intercepting the video frame of the video file in the video sharing library through OpenCV, the method further includes:

[0098] Identifying whether the video file has a manually specified preview image;

[0099] If not, an operation of capturing video frames from the video file is performed.

[0100] In this solution, before OpenCV captures a video frame from a video file in the video sharing library, it is necessary to identify whether the video file has been manually specified with a preview image by the uploading user or other personnel. For example, a label can be generated after the preview image is manually specified, indicating that a historical event of manually specifying a preview image has occurred in the video file.

[0101] After a manually specified preview image is identified, the operation of capturing a video frame of the video file will not be performed, or an operation of capturing a video frame of the video file will be performed, but the preview image obtained by the operation will not overwrite the manually specified preview image.

[0102] After identifying that there is no manually specified preview image, an operation of capturing a video frame of the video file may be performed, and the captured video frame may be used as a preview image of the video file.

[0103] Through such a setting, the present solution can automatically generate a preview image for a video file, and after recognizing that the user has already specified a preview image for the video file, the preview image specified by the user will not be overwritten.

[0104] Embodiment 2

[0105] Figure 2 It is a flowchart of the encoding format processing of the video file provided in the second embodiment of the present application. This solution makes a better improvement on the above embodiment, and the specific improvement is: identifying whether the encoding format of the video file in the video sharing library meets the preset format standard, including: obtaining the target encoding format supported by the Web page; identifying whether the encoding format of the video file in the video sharing library is the same as the target encoding format; if the same, it is determined to meet the preset format standard; if different, it is determined to not meet the preset format standard; transcoding the video file to obtain the target encoding format, including: performing ffmpeg transcoding on the video file to obtain the mpeg encoding format.

[0106] like Figure 2 As shown, the specific steps include:

[0107] S201, obtaining a target encoding format supported by the Web page;

[0108] Among them, the target encoding format supported by the web page can be the encoding format of the video that can be opened and played normally in the web page. The target encoding format can be one or more. After the supported target encoding formats are determined, they can be updated according to actual conditions to add, delete or replace one or more target encoding formats.

[0109] S202, identifying whether the encoding format of the video file in the video sharing library is the same as the target encoding format; if the same, executing S203; if not the same, executing S204;

[0110] Among them, if the encoding format of the video file in the video sharing library is the same as any one of the target encoding formats, the encoding format of the video file does not need to be modified, that is, it meets the preset format standard. If the encoding format of the video file in the video sharing library is different from each of the target encoding formats, the encoding format of the video file needs to be modified, that is, it does not meet the preset format standard.

[0111] S203, determining that the preset format standard is met;

[0112] S204, determining that the preset format standard is not met, and performing ffmpeg transcoding on the video file to obtain an mpeg encoding format.

[0113] If the preset format standard is not met, the video file can be transcoded using ffmpeg to obtain an mpeg encoding format.

[0114] Among them, ffmpeg transcoding is a very powerful multimedia processing tool that can be used to transcode video and audio. For example, using ffmpeg transcoding for video transcoding, you can convert a video file from one format to another. For example, convert a .mp4 file to .avi format:

[0115] ffmpeg-iinput.mp4 output.avi;

[0116] In addition, ffmpeg can also adjust the video resolution, for example, adjust the video resolution to 1920x1080:

[0117] ffmpeg-iinput.mp4-vf"scale=1920:1080"output.mp4;

[0118] Additionally, ffmpeg can adjust the video bitrate or compression level, for example, to compress the video using more efficient encoding settings:

[0119] ffmpeg-iinput.mp4-crf 23output.mp4;

[0120] The -crf parameter is used to control the quality and compression rate of the video. The smaller the value, the higher the quality.

[0121] In addition, ffmpeg can also perform audio transcoding, such as extracting audio from one format or converting it to another format, such as extracting audio from a video file and saving it in .wav format:

[0122] ffmpeg-iinput.mp4-vn-acodec pcm_s16le output.wav;

[0123] Among them, -vn means not processing the video stream, only the audio stream. -acodec is used to specify the audio encoder.

[0124] The technical solution provided in this embodiment can ensure that browsing users can smoothly watch video files in the subsequent sharing stage by converting the format of video files into MPEG encoding format, avoiding the situation where video files cannot be played after uploading due to encoding format problems, affecting the user experience.

[0125] Figure 3 Schematic diagram of the video file sharing process provided in the second embodiment of the present application. Figure 3 As shown, this solution can adopt the following steps:

[0126] Step 1: If a new department joins, first configure the video sharing library such as samba to upload permissions to the corresponding directory to the new department.

[0127] Step 2: The user uploads the video file to the corresponding directory of the video sharing library.

[0128] Step 3: The application regularly and deeply traverses the video sharing library. If the video encoding does not match (the target format is mpeg format, or the format cannot be played normally on the web page), ffmpeg transcoding is performed. OpenCV captures the video frame as a preview image and generates or updates the video information into the library.

[0129] Step 4: Users can browse the referenced web page to browse the video catalog by department and click on the details to browse the video in the exact order of fuzzy matching. Video metadata such as preview images can also be modified, and the application will not overwrite the manually modified preview images.

[0130] For example, different groups in the art department need to share and view internal or online video tutorials, such as sharing the latest AI video painting technology. By building a video management WEB page, video integrated management and single-page browsing can be achieved.

[0131] In the above solution, the video sharing library can use samba or various open source sharing software. You can also consider "mirror replication" of the shared library for high availability.

[0132] Web pages such as Nginx can embed the original video address and also divert the video to reduce network bandwidth and improve availability.

[0133] Through the above settings, the technical solution allows users to browse corresponding videos on the web page after uploading videos to the shared library according to the rules; after the user uploads the video, the video is automatically sorted into chapters and nested in sub-directories. In addition, there can be a clearer departmental video directory browsing and retrieval effect than file directory management. For some special video files, users do not need to install the corresponding player but can be uniformly transcoded, which expands the scope of application.

[0134] Embodiment 3

[0135] Figure 4 Schematic diagram of the structure of the video file sharing device provided in the third embodiment of the present application. Figure 4 As shown, the device comprises:

[0136] The department information acquisition module 401 is used to obtain the department information of the uploading user in response to the video file upload request;

[0137] An upload directory determining module 402, configured to determine an upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user;

[0138] The storage location determination module 403 is used to receive the video file and store the video file in a corresponding location of the upload directory;

[0139] A browsing request response module 404 is used to respond to a video file browsing request sent through a Web page and identify the department information of the browsing user;

[0140] A visible directory determination module 405 is used to determine the visible directory of the video sharing library to the browsing user according to the department information of the browsing user; wherein the visible directory is part or all of all the directories of the video sharing library;

[0141] The sharing execution module 406 is used to determine a target location in the visual directory in response to a selection operation on the visual directory, and provide a video file corresponding to the target location to the Web page.

[0142] The above-mentioned video file sharing device obtains the department information of the uploading user by responding to the upload request of the video file; determines the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user; receives the video file and stores the video file in the corresponding position of the upload directory; identifies the department information of the browsing user in response to the video file browsing request issued through the Web page; determines the visible directory of the video sharing library to the browsing user according to the department information of the browsing user; wherein the visible directory is part or all of all directories of the video sharing library; determines the target location in the visible directory in response to the selection operation of the visible directory, and provides the video file corresponding to the target location to the Web page. The technical solution provided by the present application can realize the sharing of video files with clear directories in the process of video file sharing, reduces the complexity of operation for both the sharing personnel and the browsing personnel, and can realize the simplified management of shared video files, and has a large scope of application.

[0143] The video file sharing device in the embodiment of the present application can be a device, or a component, integrated circuit or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0144] The video file sharing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0145] The video file sharing device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0146] Embodiment 4

[0147] Figure 5 Schematic diagram of the structure of the electronic device provided in the fourth embodiment of the present application. Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501, a memory 502, and a program or instruction stored in the memory 502 and executable on the processor 501. When the program or instruction is executed by the processor 501, each process of the above-mentioned video file sharing device embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0148] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0149] Embodiment 5

[0150] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned video file sharing device embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0151] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0152] Embodiment 6

[0153] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned video file sharing device embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0154] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0155] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0157] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0158] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A video file sharing method, characterized in that: The method comprises: In response to a video file upload request, obtaining department information of the uploading user; Determine the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user; Receive a video file and store the video file in a corresponding location of the upload directory; In response to a video file browsing request sent through a Web page, identifying department information of a browsing user; Determine, according to the department information of the browsing user, a visible directory of the video sharing library for the browsing user; wherein the visible directory is part or all of all directories of the video sharing library; In response to a selection operation on the visual directory, a target location in the visual directory is determined, and a video file corresponding to the target location is provided to the Web page.

2. The video file sharing method according to claim 1, characterized in that: After determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user, the method further includes: Identify whether the encoding format of the video file in the video sharing library meets the preset format standard; If not, the video file is transcoded to obtain a target encoding format.

3. The video file sharing method according to claim 2, characterized in that: Identifying whether the encoding format of the video file in the video sharing library meets the preset format standard includes: Get the target encoding format supported by the web page; Identify whether the encoding format of the video file in the video sharing library is the same as the target encoding format; If they are the same, it is determined that the preset format standard is met; if they are different, it is determined that the preset format standard is not met; Accordingly, the video file is transcoded to obtain a target encoding format, including: The video file is transcoded using ffmpeg to obtain an mpeg encoding format.

4. The video file sharing method according to claim 1, characterized in that: After determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user, the method further includes: The video metadata of the video files in the video sharing library are automatically changed through a preset tool.

5. The video file sharing method according to claim 4, characterized in that: Automatically changing the video metadata of the video files in the video sharing library by using a preset tool includes: The video file in the video sharing library is intercepted with a video frame through OpenCV, and the video frame is used as a preview image of the video file.

6. The video file sharing method according to claim 5, characterized in that: Before intercepting video frames from the video file in the video sharing library through OpenCV, the method further includes: Identifying whether the video file has a manually specified preview image; If not, an operation of capturing video frames from the video file is performed.

7. The video file sharing method according to claim 1, characterized in that: Determining the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user, including: Identify whether the department information of the uploading user is within the scope of the existing departments of the video sharing library; If it is within the scope of an existing department, matching the target department according to the department information of the uploading user, and determining the upload directory of the target department as the upload directory of the video file in the video sharing library; If it is not within the scope of the existing department, a new department directory is created according to the department information of the uploading user, and the new department directory is determined as the upload directory of the video file in the video sharing library.

8. A video file sharing device, characterized in that: The device comprises: A department information acquisition module, used to obtain the department information of the uploading user in response to the video file upload request; An upload directory determination module, used to determine the upload directory of the video file in all directories of the video sharing library according to the department information of the uploading user; A storage location determination module, used for receiving a video file and storing the video file in a corresponding location of the upload directory; A browsing request response module, used to respond to a video file browsing request sent through a Web page and identify the department information of the browsing user; A visible directory determination module, used to determine the visible directory of the video sharing library to the browsing user according to the department information of the browsing user; wherein the visible directory is part or all of all the directories of the video sharing library; The shared execution module is used to determine a target location in the visual directory in response to a selection operation on the visual directory, and provide a video file corresponding to the target location to the Web page.

9. An electronic device, characterized in that: The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the video file sharing method as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the video file sharing method according to any one of claims 1 to 7 are implemented.