Я использую FFMPEG для конвертирования видео файлов в формат mpg. Преобразование отлично работает для аудио контента, но на выходе нет видео контента. Это параметры, которые я использую:
ffmpeg.exe -i "<Path to input file>" -y -s 640x360 -b:v 1024k -vcodec libx264 -r 29.7 -movflags faststart -pix_fmt yuv420p "output.mpg"
Я что-то пропустил?
Вот вывод консоли:
C:\Users\Sharun>"C:\Program Files\ImageMagick-6.8.8-Q16\ffmpeg.exe" -i "D:\SampleFiles\sampleavifile.avi" -y -s 640x360 -b:v 1024k -vcodec libx264 -r 29.7 -movflags faststart -pix_fmt yuv420p "D:\SampleFiles\eFileName.mpg"
ffmpeg version N-69711-g60bb893 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (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-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable- libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab le-zlib
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 21.102 / 56. 21.102
libavformat 56. 19.101 / 56. 19.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 10.100 / 5. 10.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[avi @ 00000000045bd060] non-interleaved AVI
[mpeg4 @ 00000000045bde40] looks like this file was encoded with (divx4/(old)xvi d/opendivx) -> forcing low_delay flag
Input #0, avi, from 'D:\SampleFiles\sampleavifile.avi':
Duration: 00:01:27.60, start: 0.000000, bitrate: 1064 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 135 6x732 [SAR 1:1 DAR 113:61], 1059 kb/s, 20 fps, 20 tbr, 20 tbn, 100 tbc
[libx264 @ 0000000004990520] using SAR=1017/976
[libx264 @ 0000000004990520] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000000004990520] profile High, level 3.0
[mpeg @ 00000000045bb280] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'D:\SampleFiles\eFileName.mpg':
Metadata:
encoder : Lavf56.19.101
Stream #0:0: Video: h264 (libx264), yuv420p, 640x360 [SAR 1017:976 DAR 113:6 1], q=-1--1, 1024 kb/s, 29.70 fps, 90k tbn, 29.70 tbc
Metadata:
encoder : Lavc56.21.102 libx264
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[mpeg4 @ 00000000046974a0] looks like this file was encoded with (divx4/(old)xvi d/opendivx) -> forcing low_delay flag
frame= 173 fps=0.0 q=0.0 size= 110kB time=00:00:04.07 bitrate= 221.2kbits/s
frame= 317 fps=315 q=0.0 size= 328kB time=00:00:08.92 bitrate= 301.1kbits/s
frame= 475 fps=314 q=0.0 size= 466kB time=00:00:14.24 bitrate= 268.0kbits/s
-------- omitted some lines in between
[libx264 @ 0000000004990520] ref B L0: 45.2% 31.7% 23.2%
[libx264 @ 0000000004990520] ref B L1: 72.3% 27.7%
[libx264 @ 0000000004990520] kb/s:288.20
C:\Users\Sharun>