即使存在Ubuntu 12.04,FFmpeg也无法识别预设 [英] FFmpeg cannot recognize a preset even though it does exist Ubuntu 12.04

查看:232
本文介绍了即使存在Ubuntu 12.04,FFmpeg也无法识别预设的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了ffmpeg和x264,其中包含了本文档中的步骤: http:// ffmpeg。 org / trac / ffmpeg / wiki / UbuntuCompilationGuide

I have installed ffmpeg and x264 folloowing the steps in this documentation :http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide

现在我有这行执行:

sudo /usr/bin/ffmpeg -i input_file.flv -f flv -vcodec libx264 -vpre normal -r 25 -s 0x0 -aspect 1.7777777777778 -padcolor 000000 -padtop 0 -padbottom 0 -padleft 0 -padright 0 -acodec libfaac -ab 128000 -ar 22050 output_file.flv

Input #0, flv, from 'WIN! Jwow.flv':
  Metadata:
    starttime       : 0
    totalduration   : 101
    totaldatarate   : 865
    bytelength      : 10897460
    canseekontime   : true
    sourcedata      : BD58B2E43HH1338284027987695
    purl            : 
    pmsg            : 
  Duration: 00:01:40.66, start: 0.000000, bitrate: 877 kb/s
    Stream #0.0: Video: h264 (Main), yuv420p, 640x360, 745 kb/s, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0.1: Audio: aac, 44100 Hz, stereo, s16, 131 kb/s
**File for preset 'normal' not found**

我有以下目录中的预设:

I have the presets in the the following directories:

/usr/share/ffmpeg
/usr/local/share/ffmpeg
/home/user/.ffmpeg
/usr/local/src/ffmpeg/presets

仍然得到相同的错误: 未找到预设正常的文件

And still getting the same error: File for preset 'normal' not found

这里有什么问题?

额外信息 - thi当我做ffmpeg -version时,我得到的是

Extra info - this is what i get when i do ffmpeg -version

ffmpeg version git-2012-05-31-60de761
built on May 31 2012 15:54:11 with gcc 4.6.3
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab


推荐答案

好消息是,您使用的是最近的ffmpeg和x264。坏消息是你使用的是过时的语法。 FFmpeg开发非常活跃,语法更改确实发生,当前语法相当于您的命令是:

The good news is that you're using a recent ffmpeg and x264. The bad news is that you are using outdated syntax. FFmpeg development is very active and syntax changes do occur, the current syntax equivalent of your command is:

ffmpeg -i input_file.flv -vcodec libx264 -preset medium -crf 23 -acodec libfaac -aq 100 -ar 22050 output_file.flv

我删除了所有多余的东西。为什么要填0,什么是将输出的大小调整为0x0?在大多数情况下,您不需要更改帧率,因此我也删除了 -r

I removed all of the superfluous stuff. Why pad with a value of 0? What is resizing the output to 0x0? You don't need to change the frame rate in most cases so I removed -r as well.

I建议使用 -aq (或 -q:a ,相同的东西不同的声明方式),而不是<$ c使用libx264与 -crf 的libfaac的$ c> -b:a 。它类似于 faac -q 100 这是它的默认值。

I recommend using -aq (or -q:a, same thing different way of declaring it) instead of -b:a for libfaac when using libx264 with -crf. It's similar to faac -q 100 which is its default.

对于预设ffmpeg不使用文本文件模拟标准x264预设,但现在直接通过libx264访问它们。请参阅 x264 --fullhelp 以获取预设列表,但忽略安慰剂预设,因为它是完全浪费时间。基本用法是使用您有耐心的最慢预设。

As for presets ffmpeg does not use text files to emulate the standard x264 presets anymore but now accesses them directly via libx264. See x264 --fullhelp for a list of presets but ignore the placebo preset as it is a complete waste of time. Basic usage is to use the slowest preset you have patience for.

我添加了 -crf 选项来控制视频质量。默认值为23.较低的值是较高的质量,合理的范围是18-24。基本用法是使用最高的价值,仍然给您一个可以接受的品质。请参阅 FFmpeg:终极视频和音频操作工具,以获得更详细的解释。

I added the -crf option to control the video quality. Default value is 23. A lower value is a higher quality and a sane range is 18-24. Basic usage is to use the highest value that still gives you an acceptable quality. See FFmpeg: The ultimate Video and Audio Manipulation Tool for a more detailed explanation.

这篇关于即使存在Ubuntu 12.04,FFmpeg也无法识别预设的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆