无法使用ffmpeg在Windows中录制没有音频的视频

时间:2017-01-20 06:38:01

标签: ffmpeg

我正在使用ffmpeg在Windows上录制桌面。如果我在PC上播放音频,当我尝试录制而不播放任何音频时,我无法获得所需的输出文件。

使用以下命令开始录制

"-f gdigrab -framerate 10 -i desktop -f dshow -i audio="virtual-audio-capturer" -ac 2 -ar 44100 -acodec aac -ab 192k -pix_fmt yuv420p -r 30 -vcodec h264 -crf 27 -preset ultrafast -f mp4 Recording_2017-18-1--18-42-12.mp4"

在cmd行中获得以下输出

[gdigrab @ 037abaa0] Capturing whole desktop as 1600x900x32 at (0,0)
[gdigrab @ 037abaa0] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1484893527.269157, bitrate: 460804 kb/s
    Stream #0:0: Video: bmp, bgra, 1600x900, 460804 kb/s, 10 fps, 1000k tbr, 1000k tbn, 1000k tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, dshow, from 'audio=virtual-audio-capturer:':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[libx264 @ 052e50a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 052e50a0] profile Constrained Baseline, level 4.0
[libx264 @ 052e50a0] 264 - core 148 r2744 b97ae06 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=27.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'fileName.mp4':
  Metadata:
    encoder         : Lavf57.61.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1600x900, q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.70.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 192 kb/s
    Metadata:
      encoder         : Lavc57.70.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 052e7360] Qavg: nan
Exiting normally, received signal 2.

输出文件为1 kb。

0 个答案:

没有答案