CN112783481A - Ffmpeg transcoding method based on java multithreading concurrency - Google Patents

Ffmpeg transcoding method based on java multithreading concurrency Download PDF

Info

Publication number
CN112783481A
CN112783481A CN202110220108.1A CN202110220108A CN112783481A CN 112783481 A CN112783481 A CN 112783481A CN 202110220108 A CN202110220108 A CN 202110220108A CN 112783481 A CN112783481 A CN 112783481A
Authority
CN
China
Prior art keywords
database
transcoding
ffmpeg
java
task
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.)
Pending
Application number
CN202110220108.1A
Other languages
Chinese (zh)
Inventor
吕伟
牛宝童
陆飞
王海龙
王祝荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Wanwei Information Technology Co Ltd
Original Assignee
China Telecom Wanwei Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Telecom Wanwei Information Technology Co Ltd filed Critical China Telecom Wanwei Information Technology Co Ltd
Priority to CN202110220108.1A priority Critical patent/CN112783481A/en
Publication of CN112783481A publication Critical patent/CN112783481A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of mpeg transcoding based on concurrency of thread pools, in particular to an mpeg transcoding method based on JAVA multithreading concurrency. The technical scheme of the thread pool is introduced into a back-end Java program, the database carries out ffmpeg transcoding task scheduling, the Java thread pool dispatches threads and starts the ffmpeg transcoding task, and thread concurrent operation is carried out, so that the transcoding rate of the audio and video file is improved.

Description

Ffmpeg transcoding method based on java multithreading concurrency
Technical Field
The invention relates to the technical field of ffmpeg transcoding based on concurrent thread pool, in particular to a method for ffmpeg transcoding based on JAVA multithreading concurrent.
Background
In the existing back-end technology development, most of the recording and conversion of digital audio and video are operated based on ffmpeg single thread, the audio and video conversion file transcoding is relatively slow, the conversion cannot be performed quickly, the service requirement of quick response is seriously influenced, and the data transcoding of large audio and video data files is slower. The experience effect of the user is not good. Under the social development environment of mutual interconnection and artificial intelligence, visualization and intellectualization are the overall trend of social development and depend on the speed and quality of information transmission to a certain extent. Higher requirements are required for the response speed of audio and video data transcoding. Therefore, new techniques need to be introduced to increase the transcoding rate problem.
Disclosure of Invention
The invention aims to provide an ffmpeg transcoding method based on JAVA multithreading concurrency, and solves the problems that an audio and video file is low in transcoding speed and cannot respond quickly and meet business requirements by using an ffmpeg transcoding technology in a post-end program of the prior art.
In order to solve the technical problems, the ffmpeg transcoding method based on JAVA multithreading concurrency comprises the ffmpeg transcoding method based on JAVA multithreading concurrency, and comprises a database and a data application layer, wherein the database is connected with the data application layer in a JDBC data source connection mode, the data application layer adopts JAVA thread pool multithreading processing, the data application layer is a Web application program, and the database is an Oracle database or a Mysql database; the method comprises the following steps:
s1, connecting a database with a data application layer in a JDBC data source connection mode to obtain a database which can be communicated by a Web application program;
s2, compiling the JAVA thread pool into a Web application program, and testing and calling;
s3, storing the ffmpeg transcoding task into a database, and reading the ffmpeg transcoding task existing in the database by the integrated Web application program;
s4, the Web application program schedules an ffmpeg transcoding task stored in a database, and a thread pool sends a thread to the task and starts the task;
and S5, executing the ffmpeg command to perform a transcoding task, and finally storing a transcoding result.
Further, the Web application program is edited by adopting a Java language architecture.
Furthermore, the database is one or more of an Oracle database and a Mysql database.
The invention has the beneficial effects that: the audio and video file transcoding method based on the Java application library comprises a database and a data application layer, wherein the database is connected with the data application layer in a JDBC data source connection mode, the data application layer adopts a JAVA thread pool for multithreading, the data application layer is a Web application program, and the database is an Oracle database or a Mysql database. The technical scheme of the thread pool is introduced into a back-end Java program, the database carries out ffmpeg transcoding task scheduling, the Java thread pool dispatches threads and starts the ffmpeg transcoding task, and thread concurrent operation is carried out, so that the transcoding rate of the audio and video file is improved.
Detailed Description
The invention relates to an ffmpeg transcoding method based on JAVA multithreading concurrency, which comprises a ffmpeg transcoding method based on JAVA multithreading concurrency, and the ffmpeg transcoding method comprises a database and a data application layer, wherein the database is connected with the data application layer in a JDBC data source connection mode, the data application layer adopts JAVA thread pool multithreading processing, the data application layer is a Web application program, and the database is an Oracle database or a Mysql database; the method comprises the following steps:
s1, connecting a database with a data application layer in a JDBC data source connection mode to obtain a database which can be communicated by a Web application program;
s2, compiling the JAVA thread pool into a Web application program, and testing and calling;
s3, storing the ffmpeg transcoding task into a database, and reading the ffmpeg transcoding task existing in the database by the integrated Web application program;
s4, the Web application program schedules an ffmpeg transcoding task stored in a database, and a thread pool sends a thread to the task and starts the task;
and S5, executing the ffmpeg command to perform a transcoding task, and finally storing a transcoding result.
Further, the Web application program is edited by adopting a Java language architecture.
Furthermore, the database is one or more of an Oracle database and a Mysql database.
The first embodiment is as follows:
the invention is used by taking the database as an Oracle database as an example, wherein an Oracle data source provides a scheduling task to be transcoded for an upper-layer service and dispatches the scheduling task.
S1, connecting an Oracle database with a data application layer in a JDBC data source connection mode to obtain a database which can be communicated by a Web application program;
s2, compiling the JAVA thread pool into a Web application program, and testing and calling;
s3, storing the ffmpeg transcoding task into a database, and reading the ffmpeg transcoding task existing in the database by the integrated Web application program;
s4, the Web application program schedules an ffmpeg transcoding task stored in a database, and a thread pool sends a thread to the task and starts the task;
and S5, executing the ffmpeg command to perform a transcoding task, and finally storing a transcoding result.
Example two:
the invention is used by taking the database as the Mysql database as an example, wherein the Mysql data source provides a scheduling task to be transcoded for the upper-layer service and dispatches the scheduling task.
S1, connecting the Mysql database with a data application layer in a JDBC data source connection mode to obtain a database which can be communicated by a Web application program;
s2, compiling the JAVA thread pool into a Web application program, and testing and calling;
s3, storing the ffmpeg transcoding task into a database, and reading the ffmpeg transcoding task existing in the database by the integrated Web application program;
s4, the Web application program schedules an ffmpeg transcoding task stored in a database, and a thread pool sends a thread to the task and starts the task;
and S5, executing the ffmpeg command to perform a transcoding task, and finally storing a transcoding result.
The invention solves the problem of low audio and video file transcoding speed and efficiency in the prior art. The technical scheme of the thread pool is introduced into a back-end Java program, the database carries out ffmpeg transcoding task scheduling, the Java thread pool dispatches threads and starts the ffmpeg transcoding task, and thread concurrent operation is carried out, so that the transcoding rate of the audio and video file is improved.

Claims (3)

1. A concurrent ffmpeg transcoding method based on JAVA multithreading is characterized in that: the system comprises a database and a data application layer, wherein the database is connected with the data application layer in a JDBC data source connection mode, the data application layer adopts a JAVA thread pool for multithreading processing, the data application layer is a Web application program, and the database is an Oracle database or a Mysql database; the method comprises the following steps:
s1, connecting a database with a data application layer in a JDBC data source connection mode to obtain a database which can be communicated by a Web application program;
s2, compiling the JAVA thread pool into a Web application program, and testing and calling;
s3, storing the ffmpeg transcoding task into a database, and reading the ffmpeg transcoding task existing in the database by the integrated Web application program;
s4, the Web application program schedules an ffmpeg transcoding task stored in a database, and a thread pool sends a thread to the task and starts the task;
and S5, executing the ffmpeg command to perform a transcoding task, and finally storing a transcoding result.
2. The Simplet transcoding method based on JAVA multithreading concurrency of claim 1, wherein: the Web application program is edited by adopting a Java language architecture.
3. The Simplet transcoding method based on JAVA multithreading concurrency of claim 1, wherein: the database is one or more of an Oracle database and a Mysql database.
CN202110220108.1A 2021-02-27 2021-02-27 Ffmpeg transcoding method based on java multithreading concurrency Pending CN112783481A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110220108.1A CN112783481A (en) 2021-02-27 2021-02-27 Ffmpeg transcoding method based on java multithreading concurrency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110220108.1A CN112783481A (en) 2021-02-27 2021-02-27 Ffmpeg transcoding method based on java multithreading concurrency

Publications (1)

Publication Number Publication Date
CN112783481A true CN112783481A (en) 2021-05-11

Family

ID=75762048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110220108.1A Pending CN112783481A (en) 2021-02-27 2021-02-27 Ffmpeg transcoding method based on java multithreading concurrency

Country Status (1)

Country Link
CN (1) CN112783481A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113727110A (en) * 2021-08-27 2021-11-30 猪八戒股份有限公司 Method, apparatus and medium for converting h264 format into mp4 format
US11611603B2 (en) * 2020-03-06 2023-03-21 IC Events Inc. Apparatus and method for transmitting multiple on-demand audio streams locally to web-enabled devices

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170126775A1 (en) * 2015-10-28 2017-05-04 Curtis J. Schwebke Remote desktop protocol client for a standards-based web browser
CN107197475A (en) * 2016-03-14 2017-09-22 重庆邮电大学 A kind of sensing node identifier resolution method of testing and system based on multithreading
CN111400038A (en) * 2020-03-10 2020-07-10 山东汇贸电子口岸有限公司 Video and picture multi-resolution self-adaptive video watermarking method and system
CN111432243A (en) * 2020-04-01 2020-07-17 山东汇贸电子口岸有限公司 Video transcoding method and device
CN111757145A (en) * 2020-07-31 2020-10-09 四川巧夺天工信息安全智能设备有限公司 Method for processing monitoring videos with balanced multipath loads in batch

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170126775A1 (en) * 2015-10-28 2017-05-04 Curtis J. Schwebke Remote desktop protocol client for a standards-based web browser
CN107197475A (en) * 2016-03-14 2017-09-22 重庆邮电大学 A kind of sensing node identifier resolution method of testing and system based on multithreading
CN111400038A (en) * 2020-03-10 2020-07-10 山东汇贸电子口岸有限公司 Video and picture multi-resolution self-adaptive video watermarking method and system
CN111432243A (en) * 2020-04-01 2020-07-17 山东汇贸电子口岸有限公司 Video transcoding method and device
CN111757145A (en) * 2020-07-31 2020-10-09 四川巧夺天工信息安全智能设备有限公司 Method for processing monitoring videos with balanced multipath loads in batch

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11611603B2 (en) * 2020-03-06 2023-03-21 IC Events Inc. Apparatus and method for transmitting multiple on-demand audio streams locally to web-enabled devices
CN113727110A (en) * 2021-08-27 2021-11-30 猪八戒股份有限公司 Method, apparatus and medium for converting h264 format into mp4 format

Similar Documents

Publication Publication Date Title
CN112783481A (en) Ffmpeg transcoding method based on java multithreading concurrency
CN101164055B (en) Media timeline sorting
US20020097257A1 (en) Interface and related methods for reducing source accesses in a development system
US8359340B2 (en) System and method for representing media assets
CN101512656A (en) GPU timeline with render-ahead queue
CN104333808A (en) General player applied to Android and Linux smart televisiosn
CN1877543A (en) Data-driven automatic testing system and method
US20110258550A1 (en) System and method for generating persistent sessions in a graphical interface for managing communication sessions
CN107526634A (en) The method for supporting multiple sound pick-up outfits simultaneously in Android device
CN101271548A (en) Distributed multimedia task management system based on workflow and its implementing method
CN101339789B (en) Implementing method of multimedia engine
CN103065223A (en) Method and device of rich media data content creation
JP2010509859A (en) System and method for high speed subtitle creation
US20090083221A1 (en) System and Method for Estimating and Storing Skills for Reuse
CN1892651A (en) Computer data-schedule automatic playing management system
CN1747034B (en) Method for preventing audio or video interrupt in mixed multimedia player
JP2016116206A (en) Meeting reproduction method, acquisition method of media stream, and program
CN101448094B (en) Method for rapidly importing media material
CN102522096A (en) Synchronous replay system for multi-channel audio and video and method thereof
CN101083114A (en) Recording apparatus and method, program, and storage medium
Cranmer The ATLAS analysis architecture
Rickert et al. Evaluation of media analysis and information retrieval solutions for audio-visual content through their integration in realistic workflows of the broadcast industry
CN101719062A (en) Implementing method for executing test design by script
CN101477531A (en) Method for implementing flow model from testing environment issuance to manufacturing environment
CN106791539A (en) A kind of storage of film digital program and extracting method

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210511