最简单的基于FFmpeg的视频播放器 2
Simplest FFmpeg Player 2
雷霄骅 Lei Xiaohua
leixiaohua1020@126.com
中国传媒大学/数字电视技术
Communication University of China / Digital TV Technology
http://blog.csdn.net/leixiaohua1020
第2版使用SDL2.0取代了第一版中的SDL1.2
Version 2 use SDL 2.0 instead of SDL 1.2 in version 1.
本程序实现了视频文件的解码和显示(支持HEVC,H.264,MPEG2等)。
是最简单的FFmpeg视频解码方面的教程。
通过学习本例子可以了解FFmpeg的解码流程。
项目包含两个工程:
simplest_ffmpeg_player:标准版,FFmpeg学习的开始。
simplest_ffmpeg_player_su:SU(SDL Update)版,加入了简单的SDL的Event。
备注:
标准版在播放视频的时候,画面显示使用延时40ms的方式。这么做有两个后果:
(1)SDL弹出的窗口无法移动,一直显示是忙碌状态
(2)画面显示并不是严格的40ms一帧,因为还没有考虑解码的时间。
SU(SDL Update)版在视频解码的过程中,不再使用延时40ms的方式,而是创建了
一个线程,每隔40ms发送一个自定义的消息,告知主函数进行解码显示。这样做之后:
(1)SDL弹出的窗口可以移动了
(2)画面显示是严格的40ms一帧
This software is a simplest video player based on FFmpeg.
Suitable for beginner of FFmpeg.
Solutions contains 2 Project:
simplest_ffmpeg_player:Standard Version, suitable for biginner.
simplest_ffmpeg_player_su:SU(SDL Update)Version, Add SDL Event.
Remark:
Standard Version use's SDL_Delay() to control video's frame rate, it has 2
disadvantages:
(1)SDL's Screen can't be moved and always "Busy".
(2)Frame rate can't be accurate because it doesn't consider the time consumed
by avcodec_decode_video2()
SU(SDL Update)Version solved 2 problems above. It create a thread to send SDL
Event every 40ms to tell the main loop to decode and show video frames.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
H2.64_ffmpeg_解码显示rgb图像 (223个子文件)
compile_cl.bat 670B
H.264_decode_display.cpp 5KB
avcodec-55.dll 18.06MB
avformat-55.dll 5.1MB
avfilter-4.dll 1.94MB
avdevice-55.dll 1.28MB
SDL2.dll 984KB
swscale-2.dll 424KB
avutil-52.dll 409KB
swresample-0.dll 270KB
postproc-52.dll 119KB
H.264_decode_display.exe 33KB
simplest_ffmpeg_player.vcxproj.filters 1KB
cuc_ieschool.flv 912KB
.gitignore 75B
SDL_opengl.h 633KB
avcodec.h 176KB
SDL_opengles2.h 131KB
avformat.h 99KB
avfilter.h 57KB
SDL_haptic.h 39KB
opt.h 35KB
SDL_video.h 33KB
SDL_render.h 33KB
pixfmt.h 28KB
SDL_events.h 26KB
frame.h 23KB
SDL_audio.h 20KB
SDL_hints.h 20KB
SDL_surface.h 19KB
intreadwrite.h 18KB
avio.h 18KB
avdevice.h 17KB
SDL_pixels.h 15KB
SDL_scancode.h 15KB
SDL_keycode.h 15KB
mem.h 14KB
old_pix_fmts.h 14KB
SDL_stdinc.h 14KB
common.h 14KB
pixdesc.h 13KB
SDL_test_fuzzer.h 13KB
avstring.h 13KB
swscale.h 12KB
swresample.h 12KB
old_codec_ids.h 11KB
SDL_assert.h 11KB
SDL_gamecontroller.h 11KB
SDL_thread.h 10KB
log.h 10KB
samplefmt.h 10KB
buffer.h 10KB
channel_layout.h 9KB
SDL_atomic.h 9KB
avutil.h 9KB
SDL_joystick.h 8KB
_mingw.h 8KB
imgutils.h 8KB
bprint.h 8KB
buffersink.h 8KB
SDL_mouse.h 7KB
SDL_rwops.h 7KB
parseutils.h 7KB
SDL_syswm.h 7KB
SDL_system.h 7KB
SDL_mutex.h 7KB
dict.h 7KB
SDL_keyboard.h 6KB
vdpau.h 6KB
SDL_log.h 6KB
xvmc.h 6KB
SDL_endian.h 6KB
stdint.h 6KB
inttypes.h 6KB
SDL_shape.h 6KB
version.h 6KB
SDL_config.h 6KB
SDL.h 5KB
timecode.h 5KB
eval.h 5KB
SDL_filesystem.h 5KB
mathematics.h 5KB
SDL_version.h 5KB
SDL_test_common.h 5KB
buffersrc.h 5KB
error.h 5KB
cpu.h 5KB
fifo.h 5KB
SDL_test_md5.h 5KB
SDL_messagebox.h 5KB
version.h 5KB
SDL_main.h 5KB
SDL_platform.h 4KB
audio_fifo.h 4KB
attributes.h 4KB
SDL_test_harness.h 4KB
rational.h 4KB
begin_code.h 4KB
SDL_rect.h 4KB
vda.h 4KB
共 223 条
- 1
- 2
- 3
资源评论
- buyaozaiai2020-04-08没有库文件
zccyman
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功