doucuodan0897 2015-08-11 08:30
浏览 971

使用php ffmpeg将720p Mp4转换为480p

I need to covert 720p or 1080p video to 480p mp4 video , i found below code

ffmpeg -i input -vf scale=-1:480 -vcodec mpeg4 -qscale 3 output.mp4

and please help me , i am unable to give it INPUT VIDEO ex.

$video='/path/to/mp4/video';
exec('ffmpeg -i $video -vf scale=-1:480 -vcodec mpeg4 -qscale 3 output.mp4');

why above code is not working

  • 写回答

1条回答 默认 最新

  • dslh32311 2018-07-20 22:15
    关注

    i used that code and it worked flawless. maybe you werent in the dir with the vid files? or something? you should replace YOURVID.mkv with your file OR /path/to/your/file.mkv as well as replace /path/to/output.mkv with the file name or a file path to the converted output 480p file. easiest thing to do though is be in the dir with the original 720p/1080p video and just use the filename.mkv then output it to that same dir by just using an output.file.name.mkv and not a path. then all files will be in that one directory. i may have over explained it. sorry. lol. and THANK YOU for posting this. it did, indeed, work great for me on my freebsd machine with ffpmeg installed.

    ffmpeg -i YOURVID.mkv -vf scale=-1:480 -vcodec mpeg4 -qscale 3 /path/to/new/output.mp4
    

    I have an old 32bit Intel Atom Acer netbook, its not much good for anything. I have batocera installed on it and i need 480p video to play on it.

    P.S. with a 320GB HDD, the prev mentioned netbook, some retro game roms and some 480p video files makes an excellent mobile entertainment center.

    评论

报告相同问题?

悬赏问题

  • ¥15 arduino控制ps2手柄一直报错
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥85 maple软件,solve求反函数,出现rootof怎么办?
  • ¥15 求chat4.0解答一道线性规划题,用lingo编程运行,第一问要求写出数学模型和lingo语言编程模型,第二问第三问解答就行,我的ddl要到了谁来求了
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题