douqingji3026 2014-04-16 07:27
浏览 192

FFMPEG视频转换为FLV而不会失去质量?

I am using below command in php for converting all videos to flv. It's working proper but quality is bad after conversion. I want to retain quality after conversion.

$wide=$file['video']['resolution_x'];
$tall=$file['video']['resolution_y']; 

exec("ffmpeg -i test.anyformate  -ar 22050 -ab 32 -f flv -s ".$wide."x".$tall." flvideo/$vid.flv");
  • 写回答

1条回答 默认 最新

  • douzuan2814 2014-04-16 07:32
    关注

    I believe you can do this, but you have to compile FFmpeg and x264 (codec) yourself and achieve the lossless conversion like this:

    ffmpeg -i input.avi -acodec libfaac -ab 96k -ac 2 -vcodec libx264 -vpre hq -crf 22 -threads 0 output.flv

    The steps are detailed here: http://ubuntuforums.org/showthread.php?t=1249838&p=7850605#post7850605

    评论

报告相同问题?

悬赏问题

  • ¥15 php 将rtmp协议转hls协议,无法播放
  • ¥15 miniconda安装不了
  • ¥20 python代码编写
  • ¥20 使用MPI广播数据遇到阻塞
  • ¥15 TinyMCE如何去掉自动弹出的“链接…”工具?
  • ¥15 微信支付转账凭证,如何解决
  • ¥15 在win10下使用指纹登录时,界面上的文字最后一个字产生换行现象
  • ¥20 使用AT89C51微控制器和MAX7219驱动器来实现0到99秒的秒表计数,有开始和暂停以及复位功能,下面有仿真图,请根据仿真图来设计c语言程序
  • ¥15 51单片机 双路ad同步采样
  • ¥15 使用xdocreport 生成word