ffmpeg – 业余语言练习

ffmpeg-drawtext

#ffplay -i 35-0-0.jpg -vf “crop=240:190:1072:0” #ffplay -i a0.jpg \ # -vf “drawtext=fontfile=/usr/share/fonts/songhei.ttf:fontcolor=ffffff:fontsize=460:x=1565:y=-40:text=’■'” \ #ffmpeg -i a0.jpg -vframes:v 1 \ # -vf “drawtext=fontfile=/usr/share/fonts/songhei.ttf:fontcolor=ffffff:fontsize=460:x=1565:y=-40:text=’■'” \ # -f image2 38-0.jpg && #ffmpeg -i a1.jpg -vframes:v 1 \ # -vf “drawtext=fontfile=/usr/share/fonts/songhei.ttf:fontcolor=ffffff:fontsize=460:x=1565:y=-40:text=’■'” \ # -f image2 38-1.jpg && #ffmpeg -i a2.jpg -vframes:v 1 \ # -vf “drawtext=fontfile=/usr/share/fonts/songhei.ttf:fontcolor=ffffff:fontsize=460:x=1565:y=-40:text=’■'” \ # -f… Continue reading ffmpeg-drawtext

Published
Categorized as ffmpeg

[ffbuild/common.mak:81: libavformat/adtsenc.o] Error 1

./libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr’ make: *** [ffbuild/common.mak:81: libavformat/adtsenc.o] Error 1 更改编译代码方式: cd FFmpeg-n5.1.2/libavcodec/x86/ vim mathops.h 定位到125 先删除125至最后一行,然后添加新的内容 // avoid +32 for shift optimization (gcc should do that …) #define NEG_SSR32 NEG_SSR32 static inline int32_t NEG_SSR32( int32_t a, int8_t s){ if (__builtin_constant_p(s)) __asm__ (“sarl %1, %0\n\t” : “+r” (a) : “i” (-s &… Continue reading [ffbuild/common.mak:81: libavformat/adtsenc.o] Error 1

Published
Categorized as ffmpeg

ffmpeg-绘制音频波形

#ffmpeg -i 雪山飞狐之塞北宝藏.mp3 -filter_complex “showwavespic=s=640×120” -frames:v 1 雪山飞狐之塞北宝藏output.png ffmpeg -i 线人.mp3 -filter_complex “showwavespic=s=640×240:split_channels=1” -frames:v 1 线人output.png -y

Published
Categorized as ffmpeg

ffmpeg-xrandr

root135@root135:~/Documents$ xrandr Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384 LVDS-1 connected (normal left inverted right x axis y axis) 1366×768 60.00 + 1360×768 59.80 59.96 1280×720 60.00 59.99 59.86 59.74 1024×768 60.04 60.00 960×720 60.00 928×696 60.05 896×672 60.01 1024×576 59.95 59.96 59.90 59.82 960×600 59.93 60.00 960×540… Continue reading ffmpeg-xrandr

Published
Categorized as ffmpeg

ffmpeg-xfade-rectcrop

ffmpeg -i fuzhous.mp4 -i seas.mp4 -filter_complex “[0:v]fps=25[v0];[1:v]fps=25[v1];[v0][v1]xfade=transition=rectcrop:duration=2:offset=3,format=yuv420p” ff_xfade_rectcrop.mp4

Published
Categorized as ffmpeg