dsz90288 2016-03-30 21:35
浏览 70
已采纳

FFMPEG版本0.6.5视频旋转

I am writing a php code to rotate the video using ffmpeg 0.6.5 (This is the version installed on the client's web-server). Unfortunately, I have not been able to find any documentation for this version of ffmpeg.

Here is the command for ffmpeg I have written using few references I could find online.

/usr/bin/ffmpeg -vfilters 'rotate=90' -i /hsphere/local/home/testdomain.com/ffmpeg-php-class-master/examples/media/nsa.mp4 /hsphere/local/home/testdomain.com/ffmpeg-php-class-master/examples/media/output.mp4

The error for this command -

array(18) { [0]=> string(67) "FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers" [1]=> string(74) " built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)" [2]=> string(649) " configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab" [3]=> string(35) " libavutil 50.15. 1 / 50.15. 1" [4]=> string(35) " libavcodec 52.72. 2 / 52.72. 2" [5]=> string(35) " libavformat 52.64. 2 / 52.64. 2" [6]=> string(35) " libavdevice 52. 2. 0 / 52. 2. 0" [7]=> string(35) " libavfilter 1.19. 0 / 1.19. 0" [8]=> string(35) " libswscale 0.11. 0 / 0.11. 0" [9]=> string(35) " libpostproc 51. 2. 0 / 51. 2. 0" [10]=> string(135) "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/hsphere/local/home/testdomain.com/ffmpeg-php-class-master/examples/media/nsa.mp4':" [11]=> string(11) " Metadata:" [12]=> string(26) " major_brand : mp42" [13]=> string(23) " minor_version : 0" [14]=> string(39) " compatible_brands: mp42mp41isomavc1" [15]=> string(60) " Duration: 00:00:11.44, start: 0.000000, bitrate: 2163 kb/s" [16]=> string(124) " Stream #0.0(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 2160 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc" [17]=> string(24) "Unrecognized option 'vfilters'" } int(1)

The main part of the error is the last line - [17]=> string(24) "Unrecognized option 'vfilters'" } int(1)

I have tried using -vf as well instead of vfilters and I get the same error.

Could someone please help me with any pointers? I am open to any other technique to rotate video orientation. I have to rotate and save the video in the correct orientation.

Thank you!

展开全部

  • 写回答

1条回答 默认 最新

  • doujiku1028 2017-10-17 22:26
    关注

    I abandoned the idea of using ffmpeg as my hosting server wouldn't support the latest version. Instead I used native android and ios libraries to determine the orientation of the video and rotate it if required automatically before uploading it to the server. Also the native libraries support in compression on the device before uploading.

    As @LordNeckbeard in the comments of my query pointed out, it was not worth wasting time working on the older version of ffmpeg.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥20 游戏mod是如何制作的
  • ¥15 关于#hadoop#的问题:按照老师上课讲的步骤写的
  • ¥20 有人会用这个工具箱吗 付fei咨询
  • ¥30 成都市武侯区住宅小区兴趣点
  • ¥15 Windows软实时
  • ¥15 自有服务器搭建网络隧道并且负载均衡
  • ¥15 opencv打开dataloader显示为nonetype
  • ¥15 MacOS 80端口外网无法访问
  • ¥50 js逆转反解密-会的来
  • ¥15 wrodpress如何调取数据库并展示
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部