ffmpeg

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

谁都会走 提交于 2021-02-04 08:28:15
问题 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

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

Serverless 音视频转码 —— 芒果 TV 落地实践(下)

ε祈祈猫儿з 提交于 2021-02-04 02:25:51
在 《Serverless 音视频转码——芒果 TV 落地实践(上)》 中,我们回顾了芒果 TV 吴坚强老师在 techo 大会的精彩分享,芒果TV 音视频编解码业务团队通过使用腾讯云 Serverless 音视频转码服务,成本降低 45% 以上,引起大家的广泛关注,小伙伴们都跃跃欲试! 本文我们将带领大家一起使用云函数 + COS + CLS + FFmpeg 构建高可用、并行处理、实时日志、高度自定义的视频转码服务。我们在此提供了两种方案,您可以直接用转码应用,一键部署,也可以通过 用函数的长运行方案来自己处理。 实现方案 方案一: 使用官网的流式音视频转码,一键部署。查看 详情 方案二: 利用云函数的异步执行机制,自主研发。查看 详情 流式音视频转码方案 通过云函数创建 FFmpeg 任务进程,云函数进程与 FFmpeg 任务进程通过 pipe 和 FIFO 的方式进行数据传输。云函数进程中的两个任务线程分别接收 FFmpeg 任务进程向函数进程输出的 FFmpeg 日志流与转码后的文件流,从而实现流式读写 COS 和实时日志输出的转码应用场景。 方案优势 流式转码 采用流式拉取源视频文件,流式上传转码文件的工作方式,突破了本地存储的限制,且不需要额外部署 CFS 等产品。 实时日志 视频转码过程中,可通过 CLS 日志实时查看转码进度。同时支持输出 FFmpeg

Large Panorama to Panning Video

我怕爱的太早我们不能终老 提交于 2021-02-02 09:35:54
问题 What would be the most efficient way to create a video from a panoramic image that would for example have the size: 5000 width x 600 height px? I created this GIF image that would explain things a bit better. Imagine that the video would be inside the red border. So the video would potentially be panning from left to right. 回答1: A moving crop is the most convenient way to achieve this in ffmpeg. ffmpeg -loop 1 -i in.jpg -vf crop=500:ih:'min((iw/10)*t,9*iw/10)':0 -t 10 pan.mp4 The crop filter

ffmpeg 学习笔记

扶醉桌前 提交于 2021-01-30 14:52:05
ffmpeg -threads 8 -i 997.mp4 -y -c:v libx264 -c:a copy -f hls -g 60 -hls_time 2 hls_list_size 0 -hls_segment_filename test/out-%08d.ts test/out.m3u8 ffmpeg -re -i 997.mp4 -c copy -f hls -bsf:v libx264 test/out-%08d.ts test/out.m3u8 "ffmpeg","-threads","4","-i","/tmp/video/workdir/rBL7YF9hn_CEOIUNAAAAAIn7Jxk745/marker/rBL7YF9hn_CEOIUNAAAAAIn7Jxk745.mp4","-c:v","libx264","-c:a","copy","-f","hls","-g","60","-hls_time","2","-hls_list_size","0","-hls_key_info_file","/tmp/video/workdir/rBL7YF9hn_CEOIUNAAAAAIn7Jxk745/marker/keys/encrypt.keyinfo","-hls_segment_filename","/tmp/video/workdir/rBL7YF9hn

Using ffmpeg with not consecutive numbered files

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-29 20:51:54
问题 I am using ffmpeg to produce a video starting from a set of png images. However, the images I have are numbered like this: image_D5_C0_F4.png image_D10_C0_F4.png image_D15_C0_F4.png image_D20_C0_F4.png and so on. Basically, everything remains the same, but the inner part changes. My ffmpeg command looks like this: ffmpeg -framerate 8 -start_number 5 -i img/image_%02d_C0_F4.png -c:v libx264 -r 30 -s 1200x900 -pix_fmt yuv420p out.mp4 but obviously it does not work. I looked into the manual to

FFmpeg amix-filter always does “volume normalization”. How to prevent it and what are the possible drawbacks of it?

孤人 提交于 2021-01-29 16:37:22
问题 There are many questions on this topic link1, link2, and link3. However, I am asking for suggestions on the probable solution and if it has some drawbacks. Problem Definition: amix-filter always does "volume normalization" and can't be turned off Reference: Please read comments over here by @Reino. He also had opened a ticket on the FFmpeg forum to explain the situation. Hacky Solution: amix=inputs=13:dropout_transition=1000,volume=13 Reference: Answered here, and also in the ticket.

Chain `drawtext` with ffmpeg-python

℡╲_俬逩灬. 提交于 2021-01-29 15:03:16
问题 I have a function within my python script to loop through some given text via an API but I am having issues drawing multiple text values:- def add_text(title, text_lines): input = ffmpeg.input(f'output/{title}.mp4') for text in text_lines: output = input.drawtext( fontsize='24', start_number=0, text=text['text'], fontcolor='white', escape_text=True ) ffmpeg.output(output, f'output/{title}-final.mp4').run() This works if I have a single test value passed into the loop, but if I pass 2 or more

How to push the H.264 format data received from socket to RTMP server?

南笙酒味 提交于 2021-01-29 14:14:03
问题 My test_ffmpeg.c can push the local H.264 video to the RTMP server,and received_video.c can receive h.264 format data from socket, but now I want to push the H264 format data received from the socket to the RTMP server. Excuse me, can it be implemented? and How can I modify my code? note 1:Three methods I found on the Internet.I want to use the third one, but I don't know how to modify it. Method 1: set up RTMP server locally, change the port number of local RTMP server to the same as socket

How to compress gif effectively to reduce size?

爱⌒轻易说出口 提交于 2021-01-29 11:24:32
问题 We use gifs for our blog extensively. We used to embed tenor nano gifs(90px height maintaining aspect ratio, used for GIF previews and shares on mobile) in it. Now we wanted to create our own gifs and are using the following command to convert mp4 to gif while maintaining the properties of tenor's nano gif. using ffmpeg version 4.1.4 But we observed a huge difference in size between the gif we created and the one created using tenor. ffmpeg -i input.mp4 -filter_complex "[0:v]fps=10,scale=-1