Javascript 流说明符'';在filtergraph描述中[0][1]concat=a=1:n=1:v=1[s0]不匹配任何流
我试图将django中的两个音频文件与ffmpeg连接起来,但在filtergraph描述[0][1]concat=a=1:n=1:v=1[s0]中获取此错误流说明符“”不匹配任何流` 这是我的功能Javascript 流说明符'';在filtergraph描述中[0][1]concat=a=1:n=1:v=1[s0]不匹配任何流,javascript,python,django,ffmpeg,Javascript,Python,Django,Ffmpeg,我试图将django中的两个音频文件与ffmpeg连接起来,但在filtergraph描述[0][1]concat=a=1:n=1:v=1[s0]中获取此错误流说明符“”不匹配任何流` 这是我的功能 def audiomarge(request): recorded_audio = request.FILES['audio'] new = tempSong(tempSongFile=recorded_audio) new.tempSongFile.name = 'test
def audiomarge(request):
recorded_audio = request.FILES['audio']
new = tempSong(tempSongFile=recorded_audio)
new.tempSongFile.name = 'test.wav'
new.save()
record_file_path = new.tempSongFile.path
record_file_path = str(record_file_path)
recorded_audio = request.POST.get('audio')
songslug = request.POST.get('songslug')
current_song = Song.objects.filter(slug=songslug)[0]
current_song_path = current_song.songFile.url
current_song_path = '.'+(str(current_song_path))
input_first = ffmpeg.input(current_song_path)
input_second = ffmpeg.input(record_file_path)
ffmpeg.concat(input_first, input_second, v=1, a=1).output('./finished_video.wav').run()
return HttpResponse('okay')
我还尝试了.compile()而不是.run()。在这种情况下,什么都没有发生您正在将两个音频文件合并在一起,因此v=1参数应为0 因为它代表“输出视频流” 我自己也试过了,这个改变对我很有效。让我知道这对你是否也有效
ffmpeg.concat(input_first, input_second, v=0, a=1).output('./finished_video.wav').run()
@Tanmoy Bhowmick你能告诉我答案是否适合你吗?:)