相关疑难解决方法(0)

使用 ffmpeg/avconv 调整视频大小以适应静态大小的播放器

我有一个 html 5 视频播放器,宽 700 像素,高 400 像素。我试图用avconv使用ffmpeg确保它符合我的播放器来调整(同时保留宽高比)和决策。

输入可以是任何大小的文件,所以我需要调整较大的文件的大小,但用黑条将较小的文件居中。到目前为止,我已经尝试过:-s-aspect,我已经看到pad-vfswitch一起使用,但不明白它是如何工作的,足以获得我需要的东西。

图片

这是我需要什么的粗略想法。我不确定这是否可能。这几乎就像 CSS 的 max-width/max-height。我意识到这可能只是一个混乱的词,但如果有人碰巧明白我在说什么,我会很感激帮助,谢谢。

avconv 命令:

avconv -y -i control.avi -vcodec libx264 -b 2000k -bufsize 20M -acodec aac -strict experimental -ar 44100 -ab 256k bigbuck_out.mp4
Run Code Online (Sandbox Code Playgroud)

ffmpeg video-conversion libav

82
推荐指数
3
解决办法
8万
查看次数

使用 ffmpeg 进行视频填充

我正在尝试使用 ffmpeg 的填充选项,但出现错误。

我正在关注本教程。这是错误:

ffmpeg version git-2013-11-13-129af66 Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 13 2013 16:40:26 with gcc 4.4.3 (GCC)
configuration: --arch=arm --target-os=linux --enable-cross-compile --cross-prefix=/Users/sunitha/Downloads/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi- --prefix=../build --sysroot=/Users/sunitha/Downloads/android-ndk/platforms/android-9/arch-arm --extra-cflags=' -I/Users/sunitha/Downloads/android-ndk/platforms/android-9/arch-arm/usr/include -I/Users/sunitha/Downloads/full_ffmpeg/ffmpeg-android/libmp3lame/include -DANDROID -marm -march=armv6 ' --extra-ldflags=' -L/Users/sunitha/Downloads/android-ndk/platforms/android-9/arch-arm/usr/lib -L/Users/sunitha/Downloads/full_ffmpeg/ffmpeg-android/libmp3lame/lib' --disable-debug --enable-libmp3lame --disable-ffplay --disable-ffprobe --disable-ffserver --enable-avfilter --enable-decoders --enable-demuxers --enable-encoders --enable-filters --enable-indevs --enable-network --enable-parsers --enable-protocols --enable-swscale --enable-gpl --enable-nonfree
libavutil      52. 39.100 / 52. 39.100  
libavcodec     55. 18.102 / 55. 18.102  
libavformat    55. 12.102 / 55. 12.102  
libavdevice    55.  3.100 …
Run Code Online (Sandbox Code Playgroud)

ffmpeg

8
推荐指数
1
解决办法
3万
查看次数

标签 统计

ffmpeg ×2

libav ×1

video-conversion ×1