ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

ffplay使用帮助说明

2021-11-06 21:35:05  阅读:300  来源: 互联网

标签:帮助 set format 说明 video ffplay 播放 size


ffplay命令行使用指南


  • 简单的媒体播放器

  • 用法:ffplay [options] input_file

  • 查看官方帮助文档ffplay -h

    • Main options
    • Advanced options
    • AVOptions

播放多媒体文件

  1. 播放本地文件
    • ffplay test.flv
    • ffpaly -window_title "test window" test.flv # 指定播放窗口名称
  2. 播放网络流
    • ffplay rtmp://58.200.131.2:1935/livetv/cctv6
  3. 禁用音频或者视频
    • ffplay -an test.flv # 禁用音频
    • ffplay -vn test.flv # 禁用视频
  4. 指定解码器
    • ffplay -vcodec h264 test.flv # 指定h264解码器
  5. 播放YUV数据
    • ffplay -pixel_format yuv420p -video_size 1280x720 -framerate 5 1280x720_yuv420p.yuv
  6. 播放RGB数据
    • ffplay -pixel_format rgb24 -video_size 1280x720 -framerate 5 1280x720_rgb24.rgb
  7. 播放pcm数据
    • ffplay -ar 44100 -ac 2 -f s16le 44100_2_s16le.pcm

注:

  • window_title

    -window_title window title set window title

  • h264 mpeg4

    Codecs:
    D..... = Decoding supported
    .E.... = Encoding supported
    ..V... = Video codec
    ..A... = Audio codec
    ..S... = Subtitle codec
    ...I.. = Intra frame-only codec
    ....L. = Lossy compression
    .....S = Lossless compression

    DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_v4l2m2m h264_vaapi )
    DEV.L. mpeg4 MPEG-4 part 2 (decoders: mpeg4 mpeg4_v4l2m2m ) (encoders: mpeg4 mpeg4_v4l2m2m )

  • an vn

    -an disable audio
    -vn disable video

  • pixel_format | pix_fmt

    • ffplay 使用的参数为pixel_format,ffmpeg使用的参数是pix_fmt
    • -pixel_format <string> .D....... set video pixel format
  • s | video_size

    • ffplay使用的是video_size, ffmeg使用的参数是s
    • -s size set frame size (WxH or abbreviation)
  • framerate

    • -framerate <video_rate> .D....... set framerate (frames per second) (default "25")
  • ar ac

    • ar <int> ED..A.... set audio sampling rate (in Hz) (from 0 to INT_MAX) (default 0)
    • -ac <int> ED..A.... set number of audio channels (from 0 to INT_MAX) (default 0)
  • f

    • -f fmt force format

播放选项

选项 说明 原文
-x width 强制显示宽度 .D....... Initial x coordinate. (from 0 to INT_MAX) (default 0)
-y height 强制显示高度 .D....... Initial y coordinate. (from 0 to INT_MAX) (default 0)
-video_size size 帧尺寸 设置显示帧存储(WxH格式),仅适用于类似原始YUV等没有包含帧大小(WxH)的视频 .D....... A string describing frame size, such as 640x480 or hd720. (default "vga")
-pixel_format format 设置像素格式 .D....... set video pixel format
-fs 以全屏模式启动 force full screen
-an 禁用音频 disable audio
-vn 禁用视频 disable video
-sn 禁用字幕 diable subtitling
-ss pos 根据设置的位置进行定位播放 seek to a given position in seconds
-t duration 设置播放视频/音频时长 play "duration" seconds of audio/video
-bytes val 以字节为单位进行定位播放 seek by bytes 0=off 1=on -1=auto
-seek_interval interval 自定义左/右键定位拖动间隔 set seek interval for left/right keys, in seconds
-nodisp 关闭图形显示,不显示视频。。。 disable graphical display
-volume volume 设置起始音量 set startup volume 0=min 100=max
-f fmt 强制使用指定格式解码 force format
-window_title title 设置窗口标题(默认为文件名) set window title
-loop number 设置播放循环次数 set number of times the playback shall be looped
-showmode mode 设置显示模式,可用的模式值: 0 显示视频,
1 显示音频波形,2 显示音频频谱。缺省为0,如果视频不存在则自动
选择2
select show mode (0 = video, 1 = waves, 2 = RDFT)
-vf filter_graph 设置视频滤镜 set video filters
-af filter_graph 设置音频滤镜 set audio filters

标签:帮助,set,format,说明,video,ffplay,播放,size
来源: https://www.cnblogs.com/faithlocus/p/15518520.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有