我的意见如下:
Input #0, mpeg, from 'D:\Videos\2015.mpg':
Duration: 01:49:08.74, start: 0.220000, bitrate: 4940 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg), 720x576 [SAR 16:15 DAR 4:3], max. 7500 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s
不到2小时,该文件几乎是4GB。这是典型的(甚至可能比典型的稍差)VHS质量,散布空白屏幕几分钟(因此需要VBR)。
CPU是4核Inteal 3770K:MMX2 SSE2Fast SSSE3 SSE4.2 AVX
问题:我应该使用什么ffmpeg参数将此输入合理地快速转换为MP4(H264 / AAC)(比实际速率快几倍,即对于此文件不超过30分钟)并将文件大小减少至少一半。我猜质量是一个较小的问题,因为无论如何它都是VHS撕裂,并且有大量的静态和文物。我应该使用哪些命令行开关(对于Windows)?
编辑/ UPDATE /背景故事:
在提出建议后,我正在详细阐述...... 我本来喜欢直接使用ffmpeg将VHS视频捕获到MP4中,但问题是我的捕获设计驱动程序配置/安装如下:
C:\Tools\video.tools\ffmpeg-20151123-git-12a419d-win64-static\bin>ffmpeg -loglevel verbose -list_options true -f dshow -i video="ezcap Video Grabber" -loglevel verbose
ffmpeg version N-76822-g12a419d Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-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.100 / 57. 16.100
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[dshow @ 0000018baeadb920] DirectShow video device options (from video devices)
[dshow @ 0000018baeadb920] Pin "Video YUV Out" (alternative pin name "2")
[dshow @ 0000018baeadb920] pixel_format=uyvy422 min s=160x120 fps=25 max s=720x576 fps=25
[dshow @ 0000018baeadb920] pixel_format=uyvy422 min s=160x120 fps=29.97 max s=720x486 fps=29.97
[dshow @ 0000018baeadb920] pixel_format=uyvy422 min s=160x120 fps=29.97 max s=720x480 fps=29.97
[dshow @ 0000018baeadb920] Pin "Audio PCM Out" (alternative pin name "3")
[dshow @ 0000018baeadb920] Crossbar Switching Information for ezcap Video Grabber:
[dshow @ 0000018baeadb920] Crossbar Output pin 0: "Video Decoder" related output pin: 1 current input pin: 1 compatible input pins: 1 2
[dshow @ 0000018baeadb920] Crossbar Output pin 1: "Audio Decoder" related output pin: 0 current input pin: 5 compatible input pins: 5
[dshow @ 0000018baeadb920] Crossbar Input pin 0 - "Video Tuner" related input pin: 4
[dshow @ 0000018baeadb920] Crossbar Input pin 1 - "Video Composite" related input pin: 5
[dshow @ 0000018baeadb920] Crossbar Input pin 2 - "S-Video" related input pin: 5
[dshow @ 0000018baeadb920] Crossbar Input pin 3 - "Video YRYBY" related input pin: 5
[dshow @ 0000018baeadb920] Crossbar Input pin 4 - "Audio Tuner" related input pin: 0
[dshow @ 0000018baeadb920] Crossbar Input pin 5 - "Audio Line" related input pin: 1
问题是没有单独的DirectShow音频设备 - 只有视频设备(同时具有视频和音频引脚)。 ffmpeg似乎有问题尝试使用这样的设置捕获视频+音频:
ffmpeg -loglevel verbose -f dshow -i video="ezcap Video Grabber":audio="ezcap Video Grabber" test5.mp4
ffmpeg version N-76822-g12a419d Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-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.100 / 57. 16.100
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[dshow @ 0000017449b7c0e0] Could not find audio only device with name [ezcap Video Grabber] among source devices of type audio.
[dshow @ 0000017449b7c0e0] Searching for audio device within video devices for ezcap Video Grabber
[dshow @ 0000017449b7c0e0] Could not run graph (sometimes caused by a device already in use by other application)
video=ezcap Video Grabber:audio=ezcap Video Grabber: Input/output error
因此,我被迫使用捕获设备附带的软件:ArcSoft ShowBiz,它完成了这项工作,但由于设置和用户界面复杂,并且因为它产生的是MPEG2而不是更紧凑的MP4,因此不是最佳。
ffmpeg
这对于准确答案是必要的。另外,你是如何创建mpg文件的?如果你能通过重新捕获磁带并使用无损(或几乎无损)的中间文件或通过直接管道传输来跳过有损,中间mpg步骤ffmpeg
。