我有一个视频连接应用程序,其中所有视频都转换为相同的格式。
我将640 * 360视频转换为1080 * 720,其中setsar = 1:1为
ffmpeg -i C:\ Users \ work \ Desktop \ Esocializ \ B.mp4 -s 1080 * 720 -ac 2 -vf setsar = 1: 1 -acodec aac -strict experimental B1.mp4。
但由于某些原因,它的价值被覆盖。
任何帮助都将不胜感激。
以下是我的控制台输出:
C:\Users\work\Downloads\ffmpeg-20151130-git-7b11eea-win64-static\ffmpeg-20151130
-git-7b11eea-win64-static\bin
>ffmpeg -i C:\Users\work\Desktop\Esocializ\B.mp4 -s 1080*720 -ac 2 -vf setsar=1:
1 -acodec aac -strict experimental B1.mp4
ffmpeg version N-76957-g7b11eea Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --
enable-lzma --enable-decklink --enable-zlib
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 17.100 / 6. 17.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\work\Desktop\Esocializ\B.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2015-02-11 06:48:50
Duration: 00:00:35.04, start: 0.000000, bitrate: 676 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yu
v420p, 640x360 [SAR 1:1 DAR 16:9], 577 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (def
ault)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 95 kb/s (default)
Metadata:
creation_time : 2015-02-11 06:48:50
handler_name : IsoMedia File Produced by Google, 5-11-2011
[Parsed_setsar_0 @ 000000f8a4c8bf20] num:den syntax is deprecated, please use nu
m/den or named options instead
[libx264 @ 000000f8a4919400] using SAR=32/27
[libx264 @ 000000f8a4919400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 000000f8a4919400] profile High, level 3.1
[libx264 @ 000000f8a4919400] 264 - core 148 r2638 7599210 - H.264/MPEG-4 AVC cod
ec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 r
ef=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_pski
p=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 dec
imate=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=
25 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
Output #0, mp4, to 'B1.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
encoder : Lavf57.19.100
Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1
080x720 [SAR 32:27 DAR 16:9], q=-1--1, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.16.101 libx264
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, flt
p, 128 kb/s (default)
Metadata:
creation_time : 2015-02-11 06:48:50
handler_name : IsoMedia File Produced by Google, 5-11-2011
encoder : Lavc57.16.101 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 64 fps=0.0 q=29.0 size= 40kB time=00:00:01.92 bitrate= 168.9kbits/
frame= 118 fps=115 q=29.0 size= 297kB time=00:00:03.87 bitrate= 626.4kbits/
frame= 166 fps=109 q=29.0 size= 589kB time=00:00:05.34 bitrate= 904.1kbits/
frame= 212 fps=104 q=29.0 size= 892kB time=00:00:06.80 bitrate=1074.1kbits/
frame= 250 fps= 98 q=29.0 size= 1201kB time=00:00:08.26 bitrate=1190.0kbits/
frame= 293 fps= 96 q=29.0 size= 1565kB time=00:00:09.72 bitrate=1318.0kbits/
frame= 335 fps= 94 q=29.0 size= 1897kB time=00:00:11.19 bitrate=1388.7kbits/
frame= 374 fps= 92 q=29.0 size= 2227kB time=00:00:12.56 bitrate=1452.5kbits/
frame= 418 fps= 91 q=29.0 size= 2623kB time=00:00:13.93 bitrate=1542.3kbits/
frame= 462 fps= 91 q=29.0 size= 2994kB time=00:00:15.11 bitrate=1622.5kbits/
frame= 499 fps= 89 q=29.0 size= 3306kB time=00:00:16.55 bitrate=1635.7kbits/
frame= 539 fps= 88 q=29.0 size= 3591kB time=00:00:18.01 bitrate=1632.5kbits/
frame= 579 fps= 88 q=29.0 size= 3886kB time=00:00:19.27 bitrate=1651.9kbits/
frame= 623 fps= 88 q=29.0 size= 4184kB time=00:00:20.48 bitrate=1673.4kbits/
frame= 660 fps= 87 q=29.0 size= 4497kB time=00:00:21.91 bitrate=1680.8kbits/
frame= 696 fps= 86 q=29.0 size= 4801kB time=00:00:23.28 bitrate=1688.8kbits/
frame= 742 fps= 86 q=29.0 size= 5119kB time=00:00:24.84 bitrate=1687.9kbits/
frame= 788 fps= 86 q=29.0 size= 5439kB time=00:00:26.30 bitrate=1693.7kbits/
frame= 831 fps= 86 q=29.0 size= 5736kB time=00:00:27.77 bitrate=1692.2kbits/
frame= 878 fps= 86 q=29.0 size= 6041kB time=00:00:29.23 bitrate=1692.7kbits/
frame= 930 fps= 87 q=29.0 size= 6325kB time=00:00:31.18 bitrate=1661.6kbits/
frame= 989 fps= 88 q=29.0 size= 6551kB time=00:00:32.99 bitrate=1626.4kbits/
frame= 1043 fps= 89 q=29.0 size= 6786kB time=00:00:34.64 bitrate=1604.5kbits/
frame= 1051 fps= 86 q=-1.0 Lsize= 7172kB time=00:00:35.03 bitrate=1676.7kbits
/s
video:6600kB audio:541kB subtitle:0kB other streams:0kB global headers:0kB muxin
g overhead: 0.433214%
[libx264 @ 000000f8a4919400] frame I:7 Avg QP:21.73 size: 19053
[libx264 @ 000000f8a4919400] frame P:1006 Avg QP:26.11 size: 6523
[libx264 @ 000000f8a4919400] frame B:38 Avg QP:27.27 size: 1616
[libx264 @ 000000f8a4919400] consecutive B-frames: 93.7% 4.2% 0.6% 1.5%
[libx264 @ 000000f8a4919400] mb I I16..4: 10.1% 82.1% 7.8%
[libx264 @ 000000f8a4919400] mb P I16..4: 3.3% 5.4% 0.6% P16..4: 22.7% 7.4
% 2.4% 0.0% 0.0% skip:58.2%
[libx264 @ 000000f8a4919400] mb B I16..4: 0.4% 0.4% 0.0% B16..8: 19.6% 2.1
% 0.3% direct: 0.4% skip:76.9% L0:45.9% L1:48.7% BI: 5.4%
[libx264 @ 000000f8a4919400] 8x8 transform intra:59.5% inter:77.2%
[libx264 @ 000000f8a4919400] coded y,uvDC,uvAC intra: 34.4% 45.3% 13.7% inter: 9
.7% 10.1% 0.3%
[libx264 @ 000000f8a4919400] i16 v,h,dc,p: 36% 50% 3% 11%
[libx264 @ 000000f8a4919400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 25% 26% 3% 4%
5% 4% 4% 4%
[libx264 @ 000000f8a4919400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 29% 17% 2% 4%
5% 4% 3% 2%
[libx264 @ 000000f8a4919400] i8c dc,h,v,p: 51% 25% 18% 6%
[libx264 @ 000000f8a4919400] Weighted P-Frames: Y:0.5% UV:0.4%
[libx264 @ 000000f8a4919400] ref P L0: 81.7% 10.7% 5.9% 1.7% 0.0%
[libx264 @ 000000f8a4919400] ref B L0: 92.3% 7.2% 0.5%
[libx264 @ 000000f8a4919400] ref B L1: 98.9% 1.1%
[libx264 @ 000000f8a4919400] kb/s:1543.06
[aac @ 000000f8a491dec0] Qavg: 686.824
C:\Users\work\Downloads\ffmpeg-20151130-git-7b11eea-win64-static\ffmpeg-20151130
-git-7b11eea-win64-static\bin
>ffmpeg -i B1.mp4
ffmpeg version N-76957-g7b11eea Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --
enable-lzma --enable-decklink --enable-zlib
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 17.100 / 6. 17.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'B1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.19.100
Duration: 00:00:35.06, start: 0.023220, bitrate: 1675 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x720
[SAR 32:27 DAR 16:9], 1543 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, flt
p, 126 kb/s (default)
Metadata:
handler_name : SoundHandler
At least one output file must be specified
C:\Users\work\Downloads\ffmpeg-20151130-git-7b11eea-win64-static\ffmpeg-20151130
-git-7b11eea-win64-static\bin
>
答案 0 :(得分:1)
要覆盖的值是正常的。您必须同时设置SAR和DAR:
-vf "setsar=sar=1/1,setdar=dar=3/2"