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.

    评论

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度