Sfoglia il codice sorgente

Merge branch 'develop' of gitadmin/tuoheng_alg into release

tags/V2.6.2^2
chenyukun 1 anno fa
parent
commit
13edcf2c66
8 ha cambiato i file con 173 aggiunte e 24 eliminazioni
  1. +8
    -1
      .idea/deployment.xml
  2. +1
    -0
      .idea/sshConfigs.xml
  3. +9
    -2
      .idea/webServers.xml
  4. +29
    -20
      .idea/workspace.xml
  5. +3
    -1
      concurrency/IntelligentRecognitionProcess.py
  6. +2
    -0
      enums/ModelTypeEnum.py
  7. +101
    -0
      test/ffmpeg11/ffmpeg12.py
  8. +20
    -0
      test/ffmpeg11/ffmpeg13.py

+ 8
- 1
.idea/deployment.xml Vedi File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" serverName="66" remoteFilesAllowedToDisappearOnAutoupload="false">
<component name="PublishConfigData" autoUpload="Always" serverName="192.168.11.8" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="10.21">
<serverdata>
@@ -16,6 +16,13 @@
</mappings>
</serverdata>
</paths>
<paths name="192.168.11.8">
<serverdata>
<mappings>
<mapping deploy="/home/th/tuo_heng/dev/tuoheng_alg" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="66">
<serverdata>
<mappings>

+ 1
- 0
.idea/sshConfigs.xml Vedi File

@@ -6,6 +6,7 @@
<sshConfig authType="PASSWORD" host="192.168.10.21" id="adf5e1da-4910-4668-bfbb-432f4e2ae77c" port="22" nameFormat="DESCRIPTIVE" username="th" />
<sshConfig authType="PASSWORD" host="192.168.10.22" id="ac18a75e-ff42-4875-a5da-ad98d2d695ea" port="22" nameFormat="DESCRIPTIVE" username="th" />
<sshConfig authType="PASSWORD" connectionConfig="{&quot;serverAliveInterval&quot;:300}" host="192.168.10.66" id="dcf03076-1bc5-4ce3-a4e4-38f7f00ea74a" port="32782" nameFormat="DESCRIPTIVE" username="root" />
<sshConfig authType="PASSWORD" host="192.168.11.8" id="34e9c3c2-edbc-42f0-8c89-cb75bfdf55e1" port="32178" nameFormat="DESCRIPTIVE" username="th" />
</configs>
</component>
</project>

+ 9
- 2
.idea/webServers.xml Vedi File

@@ -3,7 +3,7 @@
<component name="WebServers">
<option name="servers">
<webServer id="630d5d4a-219c-4d57-bb0b-44534517b306" name="chenyukun">
<fileTransfer accessType="SFTP" host="192.168.10.66" port="32782" sshConfigId="98ad0e43-4426-4250-8bdd-0cf2c0e03bc1" sshConfig="root@192.168.10.66:32782 password">
<fileTransfer accessType="SFTP" host="192.168.10.66" port="32782" sshConfigId="dcf03076-1bc5-4ce3-a4e4-38f7f00ea74a" sshConfig="root@192.168.10.66:32782 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
@@ -12,7 +12,7 @@
<webServer id="cc246223-f324-4e86-9e18-4b309f3a6500" name="66">
<fileTransfer accessType="SFTP" host="192.168.10.66" port="32782" sshConfigId="dcf03076-1bc5-4ce3-a4e4-38f7f00ea74a" sshConfig="root@192.168.10.66:32782 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
<advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
@@ -30,6 +30,13 @@
</advancedOptions>
</fileTransfer>
</webServer>
<webServer id="b761b5c5-5f66-4c6a-ad49-4783ff5df619" name="192.168.11.8">
<fileTransfer accessType="SFTP" host="192.168.11.8" port="32178" sshConfigId="34e9c3c2-edbc-42f0-8c89-cb75bfdf55e1" sshConfig="th@192.168.11.8:32178 password">
<advancedOptions>
<advancedOptions dataProtectionLevel="Private" keepAliveTimeout="0" passiveMode="true" shareSSLContext="true" />
</advancedOptions>
</fileTransfer>
</webServer>
</option>
</component>
</project>

+ 29
- 20
.idea/workspace.xml Vedi File

@@ -5,8 +5,12 @@
</component>
<component name="ChangeListManager">
<list default="true" id="4f7dccd9-8f92-4a6e-90cc-33890d102263" name="Changes" comment="Changes">
<change beforePath="$PROJECT_DIR$/.idea/deployment.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/deployment.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/sshConfigs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/sshConfigs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/webServers.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/webServers.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.py" beforeDir="false" afterPath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/enums/ModelTypeEnum.py" beforeDir="false" afterPath="$PROJECT_DIR$/enums/ModelTypeEnum.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -146,18 +150,18 @@
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\work\alg_new\tuoheng_alg\test\ffmpeg11" />
<recent name="D:\work\alg_new\tuoheng_alg\util" />
<recent name="D:\work\alg\tuoheng_alg\test\ffmpeg11" />
<recent name="D:\work\alg\tuoheng_alg\data" />
<recent name="D:\work\alg\tuoheng_alg\test" />
<recent name="D:\work\alg\tuoheng_alg\font" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\work\alg\tuoheng_alg\test\水印" />
<recent name="D:\work\alg\tuoheng_alg\image" />
</key>
</component>
<component name="RunManager" selected="Python.test">
<component name="RunManager" selected="Python.ffmpeg13">
<configuration name="aa" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="tuoheng_alg" />
<option name="INTERPRETER_OPTIONS" value="" />
@@ -180,20 +184,20 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="ffmpeg33" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<configuration name="ffmpeg12" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="tuoheng_alg" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/../../../software/anaconda/envs/test/python.exe" />
<option name="SDK_HOME" value="D:\software\anaconda\envs\chenyukun\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test/ffmpeg11" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/ffmpeg11/ffmpeg33.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/ffmpeg11/ffmpeg12.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
@@ -202,20 +206,20 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="mysqltest" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
<configuration name="ffmpeg13" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="tuoheng_alg" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test" />
<option name="IS_MODULE_SDK" value="true" />
<option name="SDK_HOME" value="D:\software\anaconda\envs\chenyukun\python.exe" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test/ffmpeg11" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/mysqltest.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/ffmpeg11/ffmpeg13.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
@@ -224,20 +228,20 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="producer_start" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<configuration name="mysqltest" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
<module name="tuoheng_alg" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="sftp://dell@192.168.10.12:22/home/dell/anaconda3/envs/prod/bin/python3.8" />
<option name="WORKING_DIRECTORY" value="/home/chenyukun/algSch/test/kafka/" />
<option name="IS_MODULE_SDK" value="false" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="/home/chenyukun/algSch/test/kafka/producer_start.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/test/mysqltest.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
@@ -292,19 +296,19 @@
</configuration>
<list>
<item itemvalue="Python.mysqltest" />
<item itemvalue="Python.producer_start" />
<item itemvalue="Python.aa" />
<item itemvalue="Python.ffmpeg33" />
<item itemvalue="Python.producer_start1" />
<item itemvalue="Python.test" />
<item itemvalue="Python.ffmpeg12" />
<item itemvalue="Python.ffmpeg13" />
</list>
<recent_temporary>
<list>
<item itemvalue="Python.ffmpeg13" />
<item itemvalue="Python.ffmpeg12" />
<item itemvalue="Python.test" />
<item itemvalue="Python.producer_start1" />
<item itemvalue="Python.aa" />
<item itemvalue="Python.ffmpeg33" />
<item itemvalue="Python.producer_start" />
</list>
</recent_temporary>
</component>
@@ -393,7 +397,10 @@
<workItem from="1675038738781" duration="20967000" />
<workItem from="1675126111623" duration="4395000" />
<workItem from="1675158655221" duration="5508000" />
<workItem from="1675298111671" duration="522000" />
<workItem from="1675298111671" duration="1710000" />
<workItem from="1675388395566" duration="5304000" />
<workItem from="1675643763842" duration="771000" />
<workItem from="1676269822235" duration="1871000" />
</task>
<servers />
</component>
@@ -446,6 +453,7 @@
<SUITE FILE_PATH="coverage/tuoheng_alg$KafkaUtils.coverage" NAME="KafkaUtils Coverage Results" MODIFIED="1663465345491" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/tuoheng_alg$aa1.coverage" NAME="aa1 覆盖结果" MODIFIED="1667351136888" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/ffmpeg11" />
<SUITE FILE_PATH="coverage/tuoheng_alg$test2.coverage" NAME="test2 覆盖结果" MODIFIED="1669178077956" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/str" />
<SUITE FILE_PATH="coverage/tuoheng_alg$ffmpeg12.coverage" NAME="ffmpeg12 覆盖结果" MODIFIED="1675391366890" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/ffmpeg11" />
<SUITE FILE_PATH="coverage/tuoheng_alg$2.coverage" NAME="协程2 覆盖结果" MODIFIED="1668066168428" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/opt/tuo_heng/algSch/test/协程/" />
<SUITE FILE_PATH="coverage/tuoheng_alg$aa.coverage" NAME="aa 覆盖结果" MODIFIED="1670490313339" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/chenyukun/algSch/test/ffmpeg11" />
<SUITE FILE_PATH="coverage/tuoheng_alg$4.coverage" NAME="视频添加图片水印4 Coverage Results" MODIFIED="1661874731395" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test" />
@@ -462,6 +470,7 @@
<SUITE FILE_PATH="coverage/tuoheng_alg$ffmpeg22.coverage" NAME="aa 覆盖结果" MODIFIED="1667350492259" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/opt/tuo_heng" />
<SUITE FILE_PATH="coverage/tuoheng_alg$cv2test1.coverage" NAME="cv2test1 覆盖结果" MODIFIED="1665738045603" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/DATA/chenyukun/algSch/test/" />
<SUITE FILE_PATH="coverage/tuoheng_alg$ImageUtils.coverage" NAME="ImageUtils Coverage Results" MODIFIED="1663499421253" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/tuoheng_alg$ffmpeg13.coverage" NAME="ffmpeg13 覆盖结果" MODIFIED="1675394160900" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/ffmpeg11" />
<SUITE FILE_PATH="coverage/tuoheng_alg$TimeUtils.coverage" NAME="TimeUtils Coverage Results" MODIFIED="1661222768678" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/util" />
<SUITE FILE_PATH="coverage/tuoheng_alg___$producer_stop.coverage" NAME="producer_stop 覆盖结果" MODIFIED="1668522920533" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="/home/thsw/chenyukun/algSch" />
<SUITE FILE_PATH="coverage/tuoheng_alg___$test.coverage" NAME="test 覆盖结果" MODIFIED="1668577200259" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/test/while" />

+ 3
- 1
concurrency/IntelligentRecognitionProcess.py Vedi File

@@ -1074,7 +1074,9 @@ def get_model(args):
# 加载钓鱼游泳模型
ModelType.ANGLERSWIMMER_MODEL.value[1]: (lambda x, y, z, r: ModelUtils.Model(x, y, z, r, ModelType.ANGLERSWIMMER_MODEL), ModelType.ANGLERSWIMMER_MODEL.value[1]),
# 加载乡村模型
ModelType.COUNTRYROAD_MODEL.value[1]: (lambda x, y, z, r: ModelUtils.Model(x, y, z, r, ModelType.COUNTRYROAD_MODEL), ModelType.COUNTRYROAD_MODEL.value[1])
ModelType.COUNTRYROAD_MODEL.value[1]: (lambda x, y, z, r: ModelUtils.Model(x, y, z, r, ModelType.COUNTRYROAD_MODEL), ModelType.COUNTRYROAD_MODEL.value[1]),
# 加载船只模型
ModelType.SHIP_MODEL.value[1]: (lambda x, y, z, r: ModelUtils.Model(x, y, z, r, ModelType.SHIP_MODEL), ModelType.SHIP_MODEL.value[1])
}
for model in args[1]:
try:

+ 2
- 0
enums/ModelTypeEnum.py Vedi File

@@ -25,6 +25,8 @@ class ModelType(Enum):

COUNTRYROAD_MODEL = ("10", "010", "乡村模型", 'countryRoad')

SHIP_MODEL = ("11", "011", "船只模型", 'ship')

def checkCode(code):
for model in ModelType:
if model.value[1] == code:

+ 101
- 0
test/ffmpeg11/ffmpeg12.py Vedi File

@@ -0,0 +1,101 @@
import json
import time
import subprocess as sp
import ffmpeg
import cv2
import sys
import random

import numpy as np

"""
获取视频基本信息
"""


def get_video_info(in_file):
try:
probe = ffmpeg.probe(in_file)
# format = probe['format']
# size = int(format['size'])/1024/1024
video_stream = next((stream for stream in probe['streams'] if stream['codec_type'] == 'video'), None)
if video_stream is None:
print('No video stream found', file=sys.stderr)
return
width = int(video_stream['width'])
height = int(video_stream['height'])
# num_frames = int(video_stream['nb_frames'])
up, down = str(video_stream['r_frame_rate']).split('/')
video_stream['fps']=eval(up) / eval(down)
# duration = float(video_stream['duration'])
# bit_rate = int(video_stream['bit_rate'])/1000
print('width: {}'.format(width))
print('height: {}'.format(height))
# print('num_frames: {}'.format(num_frames))
# print('bit_rate: {}k'.format(bit_rate))
# print('fps: {}'.format(fps))
# print('size: {}MB'.format(size))
# print('duration: {}'.format(duration))
return video_stream



except Exception as err:
print("aaaaaaaaaaaaaaaaaaaa", err)
return None


if __name__ == '__main__':
file_path = "rtmp://live.play.t-aaron.com/live/THSAa"
while True:
video_info = get_video_info(file_path)
print(json.dumps(video_info))
if video_info is None:
time.sleep(2)
continue
else:
break
command = ['ffmpeg',
# '-re',
'-y',
'-c:v', 'h264_cuvid',
'-i', file_path,
'-pix_fmt', 'bgr24',
'-f', 'rawvideo',
'-an',
'-']
width = int(video_info['width'])
height = int(video_info['height'])
fps = int(video_info['fps'])
p = sp.Popen(command, stdout=sp.PIPE)
ai_video_file = cv2.VideoWriter(r"C:\Users\chenyukun\Desktop\shipin\aaaa.mp4", cv2.VideoWriter_fourcc(*'mp4v'), fps,
(width, height))
start1 = time.time()
while True:
start = time.time()
in_bytes = p.stdout.read(int(width * height * 3))
if not in_bytes:
print(in_bytes)
p.stdout.close()
p.wait()
break
# img = (np.frombuffer(in_bytes, np.uint8)).reshape((int(height), int(width)))
# bgr_img = cv2.cvtColor(img, cv2.COLOR_YUV2BGR_NV12)
in_frame = (np.frombuffer(in_bytes, np.uint8).reshape([int(height), int(width), 3]))
# print("拉流时间:", time.time() - start)
# frame = cv2.resize(in_frame, (1280, 720)) # 改变图片尺寸
# i += 1
# print(round(time.time()-start, 5))
#
ai_video_file.write(in_frame)
# if time.time() - start1 > 60:
# ai_video_file.release()
# p.stdout.close()
# p.wait()
# break
# cv2.imshow('frame', in_frame)
# cv2.waitKey(1)
# time.sleep(1111)
p.stdout.close()
p.wait()
p.kill()

+ 20
- 0
test/ffmpeg11/ffmpeg13.py Vedi File

@@ -0,0 +1,20 @@
import json
import time
import subprocess as sp
import ffmpeg
import cv2
import sys
import random

import numpy as np



if __name__ == '__main__':

command = ["ffmpeg",
"-f", "concat",
"-i", r"C:\Users\chenyukun\Desktop\shipin\aaa.txt",
"-c", "copy",
r"C:\Users\chenyukun\Desktop\shipin\aaaa.mp4"]
p = sp.Popen(command, stdout=sp.PIPE)

Loading…
Annulla
Salva