您当前的位置: 首页 > 

柳鲲鹏

暂无认证

  • 0浏览

    0关注

    4642博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

用ffmpeg在命令行下,对文件进行转码H264

柳鲲鹏 发布时间:2018-09-15 09:52:10 ,浏览量:0

  领导安排了一批视频,准备进行切图。结果程序识别不了。

  怎么办?转码。

  用什么转?领导说用ffmpeg。

  怎么转?不好意思,吾亦不知。

  奈何?网上搜索之。

 

  • 先安装ffmpeg

  吾是有奔头系统:

sudo apt-get install ffmpeg

 

  • 用命令行进行转码

  其实这个first.data是什么格式,吾亦不知。让ffmpeg自己识别好了。

ffmpeg -i first.data -vcodec h264 -preset fast -b:v 2000k hello.h264

  preset参数,画质从差到好(编解码工作量从低到高),分别是:ultrafast、superfast、veryfast、faster、fast、medium、slow、slower、veryslow、placebo(有的版本是不能用的,自己查支持哪些参数)

  • 有哪些codec
ffmpeg -decoders | grep h264

ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --disable-asm --disable-x86asm --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-cflags=-fPIC --extra-ldflags=-L/usr/local/cuda/lib64
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
 VFS..D h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 decoder wrapper (codec h264)
 V..... h264_cuvid           Nvidia CUVID H264 decoder (codec h264)

从图中可以看到,codec h264 

 

 

关注
打赏
1665724893
查看更多评论
立即登录/注册

微信扫码登录

0.0532s