How to use https input with ffmpeg “amovie” filter?

这一生的挚爱 提交于 2021-02-04 08:26:30

问题


I'm applying a filter on my audio file before adding it to the video. This is the command I use:

ffmpeg -y -i video-input.mp4 -f lavfi -i "amovie=audio.mp3:loop=0,asetpts=N/SR/TB,afade=in:st=0:d=1,afade=out:st=92:d=2" -shortest -c:v copy -c:a aac -strict -2 video-output.mp4

I would like to use a https input:

ffmpeg -y -i video-input.mp4 -f lavfi -i "amovie=https://www.xxxx.com/audio.mp3:loop=0,asetpts=N/SR/TB,afade=in:st=0:d=1,afade=out:st=92:d=2" -shortest -c:v copy -c:a aac -strict -2 video-output.mp4

But this is the error I get:

[Parsed_amovie_0 @ 0x55da3a414a40] Failed to avformat_open_input 'https'
[lavfi @ 0x55da3a436660] Error initializing filter 'amovie' with args 'https://www.xxxx.com/audio.mp3:loop=0'
amovie=https://www.xxxx.com/audio.mp3:loop=0,asetpts=N/SR/TB: No such file or directory

From the "amovie" documentation on ffmpeg:

filename: The name of the resource to read (not necessarily a file; it can also be a device or a stream accessed through some protocol).

How can I use a https input in my audio filter ?


回答1:


The URL has to be escaped as : is a special character, as is /. So, for bash, use

amovie=https\\\:\/\/www.xxxx.com\/audio.mp3


来源:https://stackoverflow.com/questions/61103263/how-to-use-https-input-with-ffmpeg-amovie-filter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!