首页 > TAG信息列表 > videoname

利用ffmpeg合并音频和视频

一、当视频文件中没有音频时将audioname音频与videoname视频替换 ffmpeg -i videoname.mp4 -i music.mp3 -c:v copy -c:a aac -strict experimental outputname.mp4二、当视频包含音频时用audioname音频替换videoname中的音频 ffmpeg -i videoname.mp4 -i music.mp3 -c:v copy -c:

设计模式之观察者模式(Observer Pattern)

观察者模式(Observer Pattern) 1.场景引入 很久很久之前,我们获知世界大事都是要通过报纸的。而报社的业务就是出版报纸,向某家报社订阅报纸,只要他们有新报纸出版,就会给你送过来。当你不想再看报纸时,取消订阅,他们就不会再送新报纸过来了。 再比如,你在B站上关注了一个UP主,只要他一更新

video

cap = cv2.VideoCapture("./data/2020-10-22-14-09-22.mp4") frame = cap.read() fourcc = cv2.VideoWriter_fourcc(*'MJPG') videoname = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) # vout = cv2.VideoWriter('output/'

视频格式转换

1.将avi格式转换为mp4 ffmpeg -i input.avi           #查看input.avi的相关格式内容 ffmpeg -i input.avi output.mp4 ffmpeg -i input.avi -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4   2.批量转换,使用for循环 #!/bin/bash for videoname in `find /var/ftp/pu

Transform the vot dataset into 4 corner format

Transform the vot dataset into 4 corner format   Matlab code to change the 8 value ground truth into 4 corner format: (x1, y1, width, height).    clc; close all; clear all; path = '/Tracking_Benchmark/VOT2018/';videoFiles = dir(path); videoFi