我在看这个问题
我想使用 avconv 来做到这一点,但是,我还想将帧大小缩小大约一半。我的问题是当我这样做
avconv -i "$file" -s 640x480 -strict experimental "mp4/$file.mp4"
Run Code Online (Sandbox Code Playgroud)
输出的像素化程度令人难以置信,并且会大大降低视频质量。我正在尝试为我的掌上电脑将视频文件转换为更小的尺寸。基本上,我试图得到这个:
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.1
Format settings, CABAC : No
Format settings, ReFrames : 4 frames
Format settings, GOP : M=2, N=48
Codec ID : V_MPEG4/ISO/AVC
Duration : 21mn 31s
Bit rate mode : Variable
Maximum bit rate : 1 101 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 fps
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Default : Yes
Forced : No
Run Code Online (Sandbox Code Playgroud)
看起来像这样
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 21mn 45s
Bit rate : 218 Kbps
Width : 624 pixels
Height : 352 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.041
Stream size : 33.9 MiB (60%)
Writing library : x264 core 138 r2 9e941d1
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Run Code Online (Sandbox Code Playgroud)
问题:如何使用 avconv 降低比特率和帧大小?如果不能在avconv中完成,我可以在ffmpeg中完成吗?上半部分的视频 ~= 200mb,下半部分的视频 ~=50mb,我想以尽可能少的像素化获得 50mb。
我不知道 avconv,但无论如何你应该把原来的分辨率减半。看到您的原始分辨率是 1280x720,您应该使用 640x360。通过这种方式,编码器必须将 4 个像素精确调整为 1 个,而不是像您选择的分辨率那样 4.52826734(组成)。当编码器没有可用的调整大小算法时,这至少可以避免出现问题。
小智 4
每当您寻求有关 avconv 的帮助时,请附上其完整输出。否则,无论是谁回答,都只能靠猜测。
在这种情况下,我的猜测是您的 avconv (或更准确地说 libavcodec)不是用 libx264 编译的,因此使用内部 mpeg4 ASP 编码器(具有糟糕的默认值)。所以解决方案是获得支持 libx264 的 libavcodec - 在 Ubuntu 上你应该安装 libavcodec-extra-53,否则你可能需要自己编译。
| 归档时间: |
|
| 查看次数: |
12521 次 |
| 最近记录: |