screenshotvIDeo
def screenshotvIDeo(url,interval,ID,fullduration,Title,quality): interval = int(interval) parsed_t = isodate.parse_duration(fullduration) durationseconds=parsed_t.total_seconds() iterat=int(durationseconds/int(interval)) for i in range(0,iterat): print(str(ID)) print(str(i)) print(str(i*interval)) part(url,time.strftime('%H:%M:%s',time.gmtime(int(i*interval))),"00:00:01",Title+"-"+str(ID),quality)
部分
def part(url,starttime,duration,name,quality): f = os.popen("ffmpeg $(youtube-dl -f "+quality+" -g '"+url+"' | sed 's/.*/-ss "+starttime+" -i &/') -t "+duration+" -c copy "+name+".mp4") Now = f.read() print(Now) f = os.popen("ffmpeg -i "+name+".mp4 -ss 00:00:00 -vframes 1 "+name+".jpg") Now = f.read() print(Now) f = os.popen("rm -rf "+name+".mp4") Now = f.read() print(Now)
所以我在第一个ffmpeg命令中得到了以下错误
解决方法 错误很明显:[mp4 @ 0x55d537f64240] Could not find tag for codec vp8 in stream #0,codec not currently supported in container.
Could not write header for output file #0 (incorrect codec parameters ?): InvalID argument
codec not currently supported in container.
使用支持vp8的其他容器,如webm或mkv.
总结以上是内存溢出为你收集整理的从youtube下载视频并转换为MP4全部内容,希望文章能够帮你解决从youtube下载视频并转换为MP4所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)