视频降重
每隔几帧抽一帧 视频延长 音频变调 加上背景音乐
当然不要完全抄人家的 该打乱顺序就打乱 去水印 提取字幕 然后多抄几部视频
视频降重
每隔几帧抽一帧 视频延长 音频变调 加上背景音乐
当然不要完全抄人家的 该打乱顺序就打乱 去水印 提取字幕 然后多抄几部视频
ffmpeg -threads 4 -crf 28 -preset ultrafast
ffmpeg -f video4linux2 -framerate 30 -input_format mjpeg -video_size 1920x1080 -i /dev/video6 -c:v libx265 -preset ultrafast -c:a none -crf 20 out.mp4
ffmpeg -f rawvideo -video_size 2592x1944 -pixel_format yuyv422 -i input_yuyv422_2592x1944.dat -f image2 output.png
ffmpeg -i $input -ss $seek_to_seconds -t $output_length -c:v copy -c:a copy $output
ffplay -flags2 +export_mvs input.mkv -vf codecview=mv=pf+bf+bb
ffplay $input -vf mestimate=epzs:mb_size=16:search_param=32,codecview=mv=pf+bf+bb
ffmpeg -i MOV_3147.mp4 -vf ‘select=not(mod(n,10))’,setpts=0.1*PTS,deshake=edge=blank:rx=64:ry=64:blocksize=4:contrast=31 -tune grain -crf 17 -an wolken-2-deshake.mkv
ffmpeg -i input.mkv -vf ‘select=not(mod(n,20))’,setpts=0.05*PTS,mestimate=hexbs,vidstabdetect=shakiness=10:result=transforms.trf
ffmpeg -i input.mkv -vf ‘select=not(mod(n,20))’,setpts=0.05*PTS,mestimate=hexbs,vidstabtransform=crop=black:smoothing=0:optzoom=0
ffmpeg -i MOV_3147.mp4 -vf ‘select=not(mod(n,20))’,setpts=0.05*PTS,vidstabtransform=crop=black:smoothing=180:optzoom=0:interpol=bicubic -an -vcodec libx265 -crf 16 -tune grain wolken-2-deshake.mkv
ffmpeg -i file.mkv -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable,zscale=t=bt709:m=bt709:r=tv,format=yuv420p -crf 20 -acodec copy output.mkv
ffmpeg -r 1 -i file.mp4 -r 1 frames_%05d.jpg
ffmpeg -r 30 -i frames_%05d.jpg output.mp4
ffmpeg -i file.mp3
ffmpeg -i video.avi image_output%d.jpg
ffmpeg -f mp3 -i input.mp3 -t 00:00:30 -ss 00:00:15 output.mp3
ffmpeg -i video.avi output.gif
ffmpeg -i music.mp3 -i video.avi output.mpg
ffmpeg -i video.avi -vn -ar 44100 -ac 2 -ab 192k -f mp3 output.mp3
ffmpeg -i video.flv -ar 44100 -ac 2 -ab 192k -f mp3 output.mp3
to detect hard-coded subtitles, crop the region and detect sudden changes
can also use pyscenedetect to do the job
1 | pip3 install av |
… silencedetect A->A Detect silence.
… silenceremove A->A Remove silence.
1 | ffmpeg -y -i "/root/Desktop/works/pyjom/tests/random_giphy_gifs/samoyed.gif" \ |
to get mosaic motion vectors and visualize:
1 | ffmpeg -i "/root/Desktop/works/pyjom/tests/random_giphy_gifs/samoyed.gif" \ |
1 | ffmpeg -h filter=showspectrumpic |
1 | ffmpeg -filters |
1 | ffmpeg -i "/root/Desktop/works/pyjom/samples/video/LiEIfnsvn.mp4" \ |
1 | ffmpeg -hide_banner -i "$file" -an \ |
ffmpeg can produce motion vector estimation but it is not exportable, only for internal use.
mp4 format provides motion vector information thus maybe we need not to use GPU to get those ‘optical flow’ data.
mv-extractor Extract frames and motion vectors from H.264 and MPEG-4 encoded video.
mpegflow for easy extraction of motion vectors stored in video files
mv-tractus: A simple tool to extract motion vectors from h264 encoded videos.
1 | ffmpeg -ss 01:10:35 -i invideo.mp4 -vframes 1 -q:v 3 screenshot.jpg |
dctdnoiz fftdnoiz hqdn3d nlmeans owdenoise removegrain vaguedenoiser nlmeans_opencl yaepblur
1 | env LD_LIBRARY_PATH=/root/anaconda3/pkgs/cudatoolkit-10.0.130-0/lib/:/root/anaconda3/pkgs/cudnn-7.6.5-cuda10.0_0/lib/:$LD_LIBRARY_PATH \ |
1 | ffmpeg -y -i "/root/Desktop/works/pyjom/tests/random_giphy_gifs/samoyed.gif"\ |
‘fast_bilinear’
Select fast bilinear scaling algorithm.
‘bilinear’
Select bilinear scaling algorithm.
‘bicubic’
Select bicubic scaling algorithm.
‘experimental’
Select experimental scaling algorithm.
‘neighbor’
Select nearest neighbor rescaling algorithm.
‘area’
Select averaging area rescaling algorithm.
‘bicublin’
Select bicubic scaling algorithm for the luma component, bilinear for chroma components.
‘gauss’
Select Gaussian rescaling algorithm.
‘sinc’
Select sinc rescaling algorithm.
‘lanczos’
Select Lanczos rescaling algorithm. The default width (alpha) is 3 and can be changed by setting param0.
‘spline’
Select natural bicubic spline rescaling algorithm.
‘print_info’
Enable printing/debug logging.
‘accurate_rnd’
Enable accurate rounding.
‘full_chroma_int’
Enable full chroma interpolation.
‘full_chroma_inp’
Select full chroma input.
‘bitexact’
Enable bitexact output.