Ffplay Player porting VC Project:ffplay for MFC

Source: Internet
Author: User
Tags rewind

This article introduces a self-made ffplay ported to VC under the open source Project:ffplayfor MFC. This project will migrate the Ffplay player (FFPLAY.C) in the FFmpeg project to the VC environment. And using MFC to do a simple set of interfaces. It is able to complete the basic process of a player playing video: Solution protocol, unpacking, video/audio decoding, AV synchronization, AV output.

Also includes some control functions: play, pause/resume, forward, rewind, stop, frame-by-frames playback. And some simple video stream analysis functions: Video decoding analysis and audio decoding analysis.

This program enables you to learn the principles of video player, as well as the SDL and Windows Messaging mechanisms.


Platform: VC2010

Class Library: FFmpeg. Mfc


Project Home

sourceforge:https://sourceforge.net/projects/ffplayformfc/

Github:https://github.com/leixiaohua1020/ffplaymfc

Open source China: Http://git.oschina.net/leixiaohua1020/ffplay-for-MFC


CSDN Project Download

Ffplay for MFC 1.0.0 (Stable)-This version uses the FFmpeg 2012 class library to stabilize

http://download.csdn.net/detail/leixiaohua1020/7452437

Ffplay for MFC 1.0.1--This version uses the FFmpeg May 2014 class Library, which supports HEVC and VP9. Stable under Debug. There are still problems at the moment of release.

http://download.csdn.net/detail/leixiaohua1020/7452493

Note: The issue under release has been suggested by netizens and solved. The workaround is as follows:

VCProject attribute, the linker->optimization->references option. Change to No (/OPT:NOREF).


Note: The above two items because of the mistake. One less SDL.dll file, go to SDL website

http://www.libsdl.org/download-1.2.php

Download a runtime libraries to


Add:

The original code of the project to introduce a simple: Ffplay for MFC code Memo

Update Record ==============================

Version 1.1 (2014.7.10)
* Part of the interface has been replaced

* Original project supports Unicode encoding

* Fixed bug in release

* Added two macros to define "Int64_min Int64_max" without installing WIN7SDK. There may be cases where the definition cannot be found.


Csdn also uploaded a copy: http://download.csdn.net/detail/leixiaohua1020/7764509

PUDN also sent a copy: http://www.pudn.com/downloads644/sourcecode/multimedia/detail2605167.html


I. Main interface

The main interface of the program is seen. At the top is the URL of the input. In the middle is a list of video references.

Below is the control button for the video.

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbgvpeglhb2h1ytewmja=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast "/>

1.1 Enter URL

Enter a URL box to enter the URL of the video.

The video source can be a local video or a network stream. Clicking the "File" button on the right side of the input box makes it easy to select local files and get their URLs (here is the path information).

In addition You can also drag and drop local video files directly into the dialog box. You can also get the URL to the video.

1.2 List of references

Package format number of parameters

INPUT type: Enter the transmission protocol used for AV. Example: Rtp,file (file), http,rtmp.

Package format: The package format used for AV. Example: AVI. Flv,mkv. RMVB.

Bit rate: The bitrate of the AV.

Example 1Mbps.

Duration: The length of time the audio is viewed.

MetaData: Visual audio meta-data information.

Number of video references

Output pixel format: decoded pixel data format. Example: yuv420p. Rgb24,uyvy.

Coding: Compression coding standard used in video. Example: H. MPEG2.

Frame rate: The number of video images per second. Example: 25fps.

Screen Size: The resolution of the screen. Example: 1920x1080,720x576.

Decoding analysis: Displays the specific information of each video frame as a list.

Audio number of references

Sample rate: The number of sample points per second.

Example: 44.1khz,48khz.

Coding method: The compression coding standard used in audio. Example: AAC. MP3. Wma.

Number of channels: number of channels.

Decode Analysis: Displays specific information for each audio frame as a list.

1.3 Control button

The control button includes: Start. Back off. Pause/resume, forward, stop, frame-by-screen, fullscreen.

In addition, this row controls the top of the button, including the video playback progress bar. You can control the playback of the video by dragging the progress bar.

two. Video playback form

Video playback is presented in SDL.


three. Video Decode analysis Form

The video decoding analysis form list shows some information about each video frame: ordinal, frame type, keyframe. The code stream sequence number. Pts. The different frame types are identified using different background colors: I-frames use red, p frames use blue, and B-frames use green.

What you see.


four. Audio decoding analysis Form

The Audio Decode Analysis form list shows some information about each audio frame: ordinal, size, pts, and so on. What you see.

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbgvpeglhb2h1ytewmja=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast "/>

Five. System Support Information Form

The System Support Information Form list displays support information for the system. Includes system support: protocol, encapsulation format, video decoder. Audio decoder. and other decoders (subtitle decoders). As seen in the Protocol list. The types of protocols supported by this program include Http,file, which can be seen. MMS,RTP and so on.


For example, from the package format list. It can be seen that the system supports package formats such as FLV. Each list includes an ordinal, short name. Full Name extensions, private data size, and so on.


Six. Menu

The menu on the upper end of the program includes richer options. Altogether divided into 6 parts of the function: file, playback control. Play the form. View, language. Help . The following are described separately.

file : Open the file.

Playback Control : The control function during video playback. Include: Play, pause/resume. Stop, play frames by frame, full screen. Also includes a variety of fast-forward rewind operations: Fast forward 10 seconds, 1 points, 10 points; rewind 10 seconds. 1 points, 10 points.

Playback form : Various options related to the playback form. Ability to set what the playback form displays, as well as the size and aspect ratio of the form. The playback form defaults to displaying the video screen. It is also able to graphically display audio information, including the waveform of the audio, as well as the rdft transform of the audio image.


The audio waveform graph shows what the effect sees:


The Rdft transform graph of audio shows what the effect sees:

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbgvpeglhb2h1ytewmja=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast "/>

views : Includes several forms in the program. Includes a video decoding analysis form, an audio decoding analysis form, and a system support information form.

language : includes several languages supported by the program.

Help : includes support information for the program.

Seven. English interface

The English interface of the system is seen.

Have the opportunity to add additional languages later.

Main interface

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbgvpeglhb2h1ytewmja=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast "/>

Video Decode Analysis Form

Audio Decode Analysis Form

System Support Information Form

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbgvpeglhb2h1ytewmja=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast "/>

Project Home
sourceforge:https://sourceforge.net/projects/ffplayformfc/
Github:https://github.com/leixiaohua1020/ffplaymfc
Open source China: Http://git.oschina.net/leixiaohua1020/ffplay-for-MFC

Ffplay Player porting VC Project:ffplay for MFC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.