Media Tips and Tricks

Media Tips and Tricks

Gina Harris (Intel)的头像
86 帖子 / 0 new
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
Thai Le (Intel)的头像

Thank you for sharing this cool flash video player.Thisfeature of streaming videos from multiple serverscanbe useful for mobile users. Are you the developer of this player?

-Thai

hyacinth的头像

Hello, Thai! I'm just interested in such kind of topic.

efovargue的头像

Could you tell me howthis player be integrated into websites?

Emma

Thai Le (Intel)的头像
Thanks for sharing this guide. Do you have any MID development that you could share in this forum? -Thai
avensue的头像

Excellent post... thanks a lot

woleakande的头像

Excellent post,I also appreciate your great work.

Can we have some idea ortips on some fundamentals. Iknow am not to request for the skeletal framework but just some.

woleakande的头像

Can the softwrae convert to mp3 and mp4.

If not do you have such that can do this.

Thanks.

woleakande的头像

Hi hope2010s,

Am pleased to see your post on codec,but how can you help with some tutorials on converting video and audio files from one format to the other.

E.g converting from .wav to mp4 etc.

Thanks.

woleakande的头像

Hi groove75,

I like your post but do you know(of course i know u do) that any other PC with Bluetooth can acces your files and docs and every other thing your are sharing with others.Hence,caution should be imposed and if possible this use of Bluetooth should be disregarded.

Thanks.

woleakande的头像

Even the Bluetooth protocol in the winsoc programming can actually be used to make Bluetooth perform wonders.

greentea09的头像

How to convert/rip Blu-ray dvd to avi format with Blu ray to AVI Converter?

BestHD Blu-ray To AVI Converter supports converting blu-ray disks (BD) DVDs to AVI-H264, AVI-DivX, AVI-XviD, AVI-MPEG-4, AVI-MS MPEG-4, AVI-MPEG, AVI-WMV with excellent quality and amazing speed.

Step 1: Import Blu-Ray or general DVD
Click File->Add Blu-Ray/DVD or directly Click "" button to load Blu-Ray/ DVD into Blu-ray To AVI Converter, the file titles would be shown in the information list.

Step 2: Rip Blu-ray DVD
Click Action->convert or directly Click "" button to start convert you'll see the ripping process of Blu-ray To AVI with amazing speed. A moment later, you'll get your satisfactory conversion.

More details: http://www.besthdsoft.com/Guide/bluraytoaviguide.html

--------------------------

Blu-ray Ripper || Blu-ray* || Blu-ray DVD Copy || Blu-ray Converter || Blu-ray DVD Converter

jimmy8765的头像

Pavtube YouTube Converter is an extremely easy-to-use downloader and converter which can download, convert and play FLV/F4V videos from YouTube, Myspace, Yahoo, Google, etc with unrivalled speed and quality. With it, you will feel very convenient to convert any FLV/F4V to other formats like MP4, MKA, WAV, AC3, MKV, FLV, MP3, M4A, 3GP, AVI, MOV, MPG, etc, so that you can playback them on your iPod, iPhone, PSP, Zune, Blackberry, 3G phones, or any other portable devices. Whats more, it supports auto sniffer, which will let you choose to automatically detect and download web online video (*.flv,*f4v) from YouTube.com, Google.com, Yahoo.com, etc, and also supports playing the downloaded and converted video with independent player.

maidniew的头像

Many people have iPhone right now but few of them can really enjoy it besides making phone call. Today i recommend you a really nice iPhone tool: Aiseesoft iPhone Software Pack

it can:
1. Convert DVD and any video/audio to iPhone compatible video/audio formats
Aiseesoft iPhone Software Pack can convert any DVD/video/audio to iPhone/iPhone (3G) MP4, H.264, as well as the MP3, AAC, WAV, M4A audio

2. Transfer PC files to iPhone, iPhone to PC, and between iPhone
Backup iPhone files to PC directly, import files or folder from PC to iPhone, even transfer between different iPhone with the help of iPhone Transfer software.

3. Make any time length iPhone ringtone by iPhone Ringtone Maker
Assist you to make ringtone for your iPhone, iPhone (3G) from your own video and audio sources in any time length by specifying the start time and end time or dragging the slide bar.

4. Also it can do Trim, Crop, Merge, Snapshot, Choose audio track, subtitles and other video editing functions.

if you are a Mac user:
here is Mac iPhone Software Pack

hyacinth的头像

Introduction:
HD Button Plugin of Moyea Web Player enables you to add a HD button on the dock of the web FLV player (which customized with Moyea Web Player), so that player users can easily start or close HD video playing by click it at any time.

Key Features:
Easily switch to start or close HD video playing.
The HD button on the dock can be set to hide automatically when video is being played.
The customized HD FLV player also supports playing HD streaming video.

Notice: If the HD video is a streaming video, the RTMP plugin also need to be included in player

Limitation of free trial version:
A watermark with hyperlink appears at the right of the custom HD FLV player

About Moyea Web Player:
Moyea Web Player is a Flash video player creator. With it, you can easily make customized Flash video player with playlist and full screen features for website.

Where this plugin appears:
After installed, this HD button Plugin will appear on the following interface of Moyea Web Player.

How to implement above demo?

Situation 1 (dont have FLV player yet):

In this situation, you can easily add the HD button to your custom FLV player when customizing it with Moyea Web Player, you only need to click the plugin, make some settings and click Submit button on the following interface.

Note: When customizing HD FLV Player, only normal video need to be added into Moyea Web Player, the HD video you only need to put in somewhere of your web server and put its path onto the following HD Button Settings interface.

Term interpretations (How to name the HD video?):

1. {dir} indicates the HD video and normal video are in the same directory, if not, the directory should be written out, e.g.: http://yourdonaim.com/hd-video/{name}{ext}{arg}

2. {name} indicates this part of HD video name is the same as the normal video name, if not, the HD video name should be written out, e.g.: {dir}hdvideoname{ext}{arg} indicates HD video name is "hdvideoname{ext}".

3. {ext} indicates the extension of HD video is the same as the normal video, if not, the extension should be written out, e.g.: if the extension is MP4, then the path will be {dir}{name}.mp4{arg}

4. {arg} indicates the argument of HD video is the same as the normal video, if not, then the path will includes the argument of HD video, e.g.: {dir}{name}{ext}?v=3

5. {dir}{name}-hd{ext}{arg} indicates the forepart of HD video name is the same as the normal video name, the extension and the argument of HD video are the same as the normal video, and they are in the same directory

Situation 2 (already have a FLV player which customized with Moyea Web Player)

In this situation, to make the HD button work in the existed FLV player, you need to put a folder named plus (contains a plugin file hdbutton.swf) and a file addonslist.xml in the same folder with the player files.

The plus folder with an hdbutton.swf file and the addonslist.xml file can be easily generated with Moyea Web Player.

However, if you don't want to generate the plus folder and the addonslist.xml file with Moyea Web Player, then you could build them by yourself.

In default, the code of the addonslist.xml file as below:

Code:
<?xml version="1.0"?>

The hdbutton.swf file is the plugin, if Moyea web Player was installed in your C: disc and the plugin is free trial version, you could get it from C:Documents and SettingsAdministratorMy DocumentsMoyeaWebPlayeraddonsfree.

However, if the plugin is registered version, then you could get the file from C:Documents and SettingsAdministratorMy DocumentsMoyeaWebPlayeraddonsyourdomain

francisd的头像

Very Useful! Thanks a lot for sharing.

Walking Canes | Limoges | Venetian Masks | Sculptures

Thai Le (Intel)的头像

Great post! For future video related topics, please post it under the Media Tips and Tricks.

Thanks,

-Thai Le

hyacinth的头像

1. Editable template of player skin
There is an opportunity for registered users of Moyea Web Player to customize their own-style player skins, because Moyea Web Player offers a free editable template of player skin to its registered users.

About Moyea Web Player:
Moyea Web Player on playerdiy.com is a Flash video player creator. With it, you can easily make customized Flash video player with playlist and full screen features for website.
Tutorial is here:
http://www.playerdiy.com/support/tut...eo-player.html
Customize the skin and playback options of web FLV player:
http://www.playerdiy.com/configuration/

If you are the registered user who wants to make your own-style web FLV player skins, you could select a player skin you are interested from the skin list, and then email us its name, your order ID and your registered email address, so that we can send you an editable template of the player skin you selected ASAP.

The tutorial about making the customized player skin works in Moyea Web Player

2. Editable template for "User define area"
When the value of "User define area" is not "none", there will be an area, on which you could place your ad or other information, on the right of player. Moyea Web Player offers a free editable template for the "User define area", users could click here to download it.

3. More templates of player skin are coming. Please keep on eye on this page.

Source is http://www.playerdiy.com/configurati...templates.html

jimmy8765的头像

In purpose of help you guys to have further understanding of the Blu-ray decryption programs, I have collected and summarized three of them which are frequently in use in this post, namely Pavtube Blu-Ray Ripper, AnyDVD HD, and MakeMKV. The main features of the three applications are listed in the following paragraphs, hope these contents are informative to all of you.

1. Pavtube Blu-ray Ripper

Key Features:

- Read almost all protected DVDs and Blu-ray discs.

- Decrypt and convert Blu-ray disc in one step.

- Rip and convert DVD and Blu-ray files to many other popular audio and video formats like AVI, ASF, MPEG, MP4, WMV, MKV, MOV, FLV, SWF, RM, 3GP, AAC, AC3, MP3, OGG, WAV, WMA, M4A, etc., HD video formats are also included.

- Support directly copying DVDs (*.vob) and Blu-rays (*.m2ts) to the hard drive of your PC without quality loss and recoding.

- Support adjusting video and audio parameters like bit rate, frame rate, aspect ratio, etc. to downsize DVDs and Blu-Ray files.

- Allow users using system existing codec to rip DVDs and Blu-ray discs.

- Support VFW codec and 5.1 channel output.

- Simple editing functions.

- With user friendly preview window.

- Guarantee audio and video in sync.

- No additional software is required for conversion or decryption.

2. AnyDVD HD

AnyDVD HD comes with same functionality as AnyDVD, but with additional features for full Blu-ray Disc and HD DVD support, including decryption of Blu-ray (BD+ and AACS) and HD DVD (AACS) movies.

Key features:

- Same features as regular AnyDVD.

- Be able to remove encryption (AACS), BD+ copy protection, and region codes from Blu-ray Discs.

- Removes encryption (AACS) from HD DVDs.

- Output ISO or .TS, .M2TS files

- Watch movies over digital display connection, without HDCP-compliant graphics card and without HDCP-compliant display.

Limitations:

- Without format conversion function, users need to rely on the third party software to transfer format, spend too much.

- No downsizing function, the decrypted files occupy too much storage space.

- No custom settings to adjust bit rate, frame rate, etc.

- Without preview window.

3. MakeMKV (freeware)

Key features:

- Ignore region restrictions and remove copy protections to read DVDs and Blu-ray discs.

- Preserve all video, audio tracks and chapters information.

- No additional software is required for conversion or decryption.

- Fast conversion speed.

- Convert DVDs and Blu-rays to the format of MKV.

Limitations:

- Read Blu-ray discs selectively only, some are, and some are not.

- Output MKV files only.

- Sometimes there are audio and video out of sync issues.

- Without preview window.

- Unable to resize.

Well, end up now, hope it helps, and any criticism is appreciated.

more info http://www.pavtube.com/blu-ray-ripper/

inigong的头像

Thank you so much for the tip. I will try to do this to the websites I am currently developing. I am creating a website that will serve as fund raising site for street children. And the earnings from Adsense will also be a great help in increasing the funds we earn for them.

hyacinth的头像

Introduction:
Google Analytics Plugin allows you to track events within the flash video player, which created with Moyea Web Player on playerdiy.com. With it, the tracking results of the player events like play, pause, stop, complete, can be easily viewed in Google analytics account, and you can easily know how the users operate the player, which video is more popular.

Where this Google Analytics Plugin appears:
After install this plugin, it will appears on the following interface of Moyea Web Player.

Tutorial about how to use this Google Analytics Plugin:

Its very easy to make this Google Analytics Plugin work in the generated flash video player, no any js code involved, Please track out the following two examples.

About Moyea Web Player:
It is an easy-to-use FLV player creator, with which, customizing skinning streaming FLV player and FLV player (flash video player) for website only needs a few mouse-clicks. And the created player can be easily edited via flashvars code.
Its official website is:
http://www.playerdiy.com/

Example 1:

If want to make this Google analytics plugin to check the events of an unexisted flash video player, when customize the flash video player, only 2 extra steps are needed:

Step 1: Register a Google analytics account, add a website profile and get the Google analytics tracking ID (UA-xxxxxx-x) of the website.

Step 2: Fill the Analytics Tracking ID forum with the tracking ID and submit.

Note: The Virtual Directory Name on the setting page is helpful for viewing information of the player events in Google analytics account, it can be anything you want it to.

Example 2:
If want to track the events of an existed flash video player, you need to put a folder named plus (contains a plugin file googlytics.swf) and a file addonslist.xml in the same folder with the player files.

The plus folder with a googlytics.swf file and the addonslist.xml file can be easily generated with Moyea Web Player.

However, if you don't want to generate the plus folder and addonslist.xml file with Moyea Web Player, then you could build them by yourself.

The code of the addonslist.xml file as below:

<?xml version="1.0"?>

The googlytics.swf file is the plugin, if Moyea web Player was installed in your C: disc, then you can get it from C:Documents and SettingsAdministratorMy DocumentsMoyeaWebPlayeraddonsfree

Note: Please replace UA-xxxxxx-x with your Google analytics tracking ID.

Thai Le (Intel)的头像
As there are more and more MID devices available in the market, there will always be a demand for content for them....Thanks for sharing this guide. Do you have any MID development that you could share in this forum? -Thai
avensue的头像
Great stuff buddy..... nice tips... thanks and keep it up
jimmy8765的头像

To enable Blu-ray .m2ts streams to be available for playback on a PC or some popular portable multimedia players like iPod, iPhone, PSP, etc., the way of Windows users is to make use of AnyDVD HD to remove Blu-ray copyright protections as well as the region codes in the first step, and then have access to an M2TS converter to do format conversion in the second step. Apart from this method, another way is also practical, that is taking advantage of a Blu-ray ripper directly to complete this process once and for all. Since not everybody is clearly about the two ways, also because I have enough spare time currently, I will present the two solutions in a detailed way in this post, and hope it would be of some help for you guys who are hunting for this info.

Solution 1: with the help of AnyDVD HD and an M2TS Converter

What you will need:

- A Windows PC with a built-in Blu-ray drive or an external BD drive.

- AnyDVD HD

- Pavtube MTS/M2TS Converter

How-To:

1. Insert your Blu-ray disc to the BD drive, and run AnyDVD HD to remove copyright protections and region codes of your disc, no matter what kinds of protections your BD discs adopted, BD+, or AACS, AnyDVD HD is capable of dealing with them. Then you will get unprotected.m2ts files after the access of AnyDVD HD.

If you just want to watch the .m2ts files on your PC, you can use VLC media player, KMPlayer, or whatever to open these files for playback. If you need import them to your portable devices for playing, you should go on with the following step to do format conversion. Additionally, according to my own experience, VLC and KMPlayer sometimes are choppy while playing .m2ts files, suppose you want to watch them smoothly, format conversion is also recommended.

2. Convert .m2ts files to your wanted format (fit for your media players or portable devices)

In this step, Pavtube MTS/M2TS Converter will fully perform its functionality.

Step 1: Click "Add" button to input .m2ts files to this program

Step 2: Select output format and set destination folder

Click the pull down menu of "Format" to choose an output format according to your end use, this application provides a wide range of HD and SD formats output:

HD formats including .mkv, .mp4, .avi, .mov, .mpg, .ts, .wmv, etc.

SD formats including .avi, .mp4, .mkv, .mov, .wmv, .3gp, .flv, .f4v, .swf, .asf, .m4v, .vob, etc.

The output files can be added to iPod, iPhone, PSP, PS3, Xbox 360,Apple TV, Blackberry, Gphone, Zune, , Creative Zen, Archos, Nokia, Adobe Premiere, Sony Vegas, Windows Movie Maker, iMovie, Final Cut Express, Final Cut Pro, etc. for playback or editing.

Meanwhile, if you dislike using the default save path to store the output files, you can click the folder icon at the opposite side of "Output" to specify where to locate them.

Step 3: Click "Settings" button to adjust audio and video parameters

Codec name, bit rate, frame rate, sample rate, aspect ratio, and audio channels are all changeable in the popup window.

Step 4: Click "Convert" button to start conversion

Once finished, the generated files can be found out while clicking on "Open" button effortlessly. And then you can do whatever you like with the output files.

Solution 2: with the help of Pavtube Blu-Ray Ripper:

What you will need:

- A Windows PC with a built-in Blu-ray drive or an external BD drive.

- Pavtube Blu-Ray Ripper

Pavtube Blu-Ray Ripper is an independent and professional utility to rip both Blu-ray discs and general DVDs to your wanted HD or SD media formats. With full Blu-ray disc support, it is able to remove copyright protections of your BD disc, no matter BD+, or AACS, even MKB Version > 10 is supported as well. With advanced audio technology, it is capable of reading all audio tracks of a BD disc, including Dolby TureHD Audio and DTS-HD Master Audio, which will never let you miss the mother tongue of the movie.

1. Insert your BD disc to the drive, and then run Pavtube Blu-Ray Ripper

2. Rip BD files to your wanted formats, directly copy is supported.

Step 1: Click "DVD Rom", "DVD Folder" or "IFO/ISO" to load Blu-ray .m2ts files

Step 2: Select output format and set save path

Click the drop-down list of "Format" to select your needed output format, and click the folder icon at the end of "Output" to specify the destination folder.

Step 3: Adjust audio and video parameters

Click "Settings" button, then you will be able to adjust bit rate, aspect ratio, frame rate, sample rate, audio channel in the popup window.

Step 4: Click "Convert" button to start Blu-ray ripping

Once the ripping task is completed, you can find out the output files via clicking on "Open" button.

The second solution seems more convenient, but if you already have an AnyDVD HD, you can consider adopting the first solution certainly. If you have none of them, then the second one would be a better choice. Compare with AnyDVD HD, this Blu-Ray Ripper is more powerful, taking removing copy protections aside, it allows users ripping BD disc to whatever format they want, as well as supports adjusting customized settings like bit rate, frame rate, resolution, audio track, etc to downsize your Blu-ray movie. Also, its much less cost is also a consideration, no more than $45 USD. Well, hope this helps.

software2010的头像

Pavtube Blu-Ray Ripper is the best blu-ray ripper. They offer free trial.

and other blu-ray ripper software are good too.

there are 3 top blu-ray ripper you can choose

hope2010s的头像

As far as I know, some people use AnyDVD to remove protections of their Blu-ray discs firstly, and then use an MTS/M2TS Converter to convert the .m2ts BD files into their wanted media formats. This is a definitely complicated matter, and why don't they choose a one-stop Blu-ray converter to do it once and for all? I guess that they may have not found a proper application to do this at all. Well, to assist you guys to simplify the conversion procedures, its my pleasure here to share a pretty good Blu-ray converter to you all, hope it will be of great help for you who are searching for this solution just right.
The application I recommend is BestHD Blu-ray converter , which can remove BD protections as well as do format conversion simultaneously without audio and video out of sync issues. All right, lets have a look at its detailed instruction together now.
Step 1: Load Blu-ray files into BestHD Blu-ray converter

Step 2: Select output format and Audio and subtitle language
As soon as BD files are loaded, you can click the drop-down list at the end of Profile to select output format according to your end use of these files. For instance, you can select format for your iPod, iPhone, PSP, Apple TV, or other devices, or directly copy them to the hard drive of your PC, or remux them to other formats without recode, etc.

Step 3: Set advanced settings
PressSettingsbutton, the interface as below will pop up, on which you can adjust the video size, video quality, channel, audio quality, and specify the output path and Output settings.ClickOKto confirm the settings.It is worth mentioning that, BestHD Soft support for automatic shutdown after conversion finished .

Step 4: Start Blu-ray ripping
Click Start button, then BestHD Blu-ray converter will start ripping your Blu-ray files automatically. With multithread technology, this program can finish the ripping task 1.5 to 2 times faster than other similar software.therefore, it ensures you needn't wait around for a long time.

Well, finished. From now on, you no longer need use both AnyDVD and an MTS/M2TS Converter to deal with your BD files. Hope my post here it really informative to all of you, good luck.

Good News: BestHD Blu-ray Converter new upgrades and 15% of the profit concession sales to repay customers' ardent supports,The excellent products include popular and powerful software like Blu-ray converter ,Blu-ray DVD converter ,etc. For detailed info, please visit the link attached as below:
http://www.besthdsoft.net

New Features about new version 2.11.25

1. Improved the incompatibility with 64-bit operating systems.
2. Added the subtitle function.
3. Added the selection of 5.1 audio (6 channels) for AVI and MKV.
4. Fixed the problem of incomplete conversion for particular discs.

hope2010s的头像

Do you know Blu-ray? Do you know the differentiation of DVD and Blu-ray?
Have you seen Blu-ray movies? Do you know the wonders of Blu-ray?
Blu-ray has unimagined high-definition, unique large storage capacity and high safety! As a new generation of DVD format, it is in many movie companies and the general publics good graces with his unique advantage. Nowadays, seven studos of the eight major studios support Blu-ray. they are Disney, twentieth century fox, Warner Brothers, Paramount pictures, SONY, MGM and lion door. For users, more and more consumers begin to experience the surprise of Blu-ray.
But it cannot spread rapidly in popularity among consumers because of its high prices! However HD DVD still occupies the market share with its lower prices and compatibility. For this reason, many manufacturers have combine the two and produce one player that can play Blu-ray and HDDVD. But they also stop production because of cost problems and another problems.
Are there other measures that can neither spent a lot of money nor enjoy wonderful visual feast brought by Blu-ray? The answer is Blu-ray converter. What can it do? It can help you convert the Blu-ray discs to another popular video and audio formats on the market, for example HDDVD, AVI, MPEG, MP3, MP4, etc. So you only need to buy a Blu-ray disc and convert it. Then you can appreciate it on the other players while you need not to buy Blu-ray player. It can save a lot of expenses.
Now I introduce a few common Blu-ray converter simply and hope it can help people solve some problems.

1.Blu-ray Converter
The biggest advantage of this Blu-ray converter is his powerful fuctions. It gathers almost all common video and audio format and you can convert Blu-ray and common DVD format to another popular video and audio files with it, for example, AVI, MPEG, MP3, MP4, ACC etc. Of course, it's price is higher relative. Blu ray Converter is a real BIG MAC.

2.Blu-ray DVD Converter
Blu-ray DVD converter can help you convert Blu-ray DVD Movie and general DVD movie to iPod, iPhone, Gphone, PSP, PS3, Xbox360, Pocket PC, 3GP Mobile Phone or any other MP4 player, such as iRiver, Archos, Creative Zen Vision and more.

3..Blu-ray to AVI Converter
The main function of this Blu-ray converter is that covnerts blu-ray format files to AVI files, so that we can enjoy the Blu-ray film on more video players that support AVI format. Blu ray to AVI is really benefit and inexpensive.

4..Blu-ray to MP4 Converter
This converter can help you convert the Blu ray to MP4 video formats so we can watch Blu-ray movies on our MP4 player and MP5 Player. There are powerful practicability

5.Blu-ray to MPEG Converter
Everyone can know this converter as same as two software on the front that would convert Blu-ray movies to MPEG format alone. The MPEG format is very popular so Blu ray to MPEG is very grateful.

6.Blu-ray to HD Video Converter
This software is appear for solving the contradiction between Blu-ray and HDDVD. If you have the Blu ray to HD Converter, you dont need to buy Blu-ray Player. And you can convert Blu-ray to HDDVD by it then feel the visual feast on existing HDDVD players Brought by Blu-ray film.

7.Blu-ray to MP3 Converter
Do you want to collect those beautiful background music in Blu-ray movies? Blu ray to MP3 can realize you desire completely. It can extract audio files from the Blu-ray movies including MP3, ACC ,etc. And it is a very exquisite conversion software.

8.Blu-ray to PS3/PSP Converter
Convert Blu-ray and general DVD to PSP or PS3 formats, as PSP MPEG-4 (*.MP4), PSP AVC Video, PS3 MPEG-4 (*.MP4) and PSP Audio (*.MP3).

9.Blu-ray to wmv Converter
BestHD Blu-ray To WMV Converter allows you to preview the movie before converting, clip any movie segment freely and simply, snapshot the images in preview, shut down the computer automatically after converting finished, convert files in batches, etc.

10.Blu-ray to ipod Converter
Blu-Ray To iPod converter can convert Blu-Ray DVD To iPodincluding iPod MP4 ( iPod MPEG-4 AVC Codec) and iPod MP3

Above ten softwares have their advantages. Some of the software fuction is rich, other is specific. They can convert Blu-ray movies to almost all popular multimedia files and keep the original definition. They are some common Blu-ray converter. Of course, there are some other software, such as Blu ray to iPod, Blu ray to PS3, Blu ray to WMV, etc. If you need it and you can search them on the Internet. Many companies develop similar software, such as Audiotoolsfactory, Aiseesoft, Xilisoft, Wondershare,etc, you can choose appropriate software according to your need.
The era of Blu-ray has arrived. We're very honored to experience the joy and convenience brought by the high definition, large storage. We cannot miss it!

Above content comes from: http://besthdsoft.wordpress.com/

jimmy8765的头像

Rich video resources on YouTube are definitely attractive; therefore, there are numerous people to download these files as their own collections everyday, meanwhile, you will notice that it is not an easy thing to find a proper YouTube converter to work for you, especially to get a freeware or a nice consumer converter for Mac. If you Google it, you will get many freeware for Windows, while for Mac, there is rare. For doing some favors to Mac users, I have tried a number of YouTube converters for Mac, and written a summary here, hope you can find what you want among them.

Top 1: Pavtube YouTube Converter for Mac

It is unbelievable easy-to-use for Mac users (including the newest Snow leopard users).Import the URL of YouTube, click OK, and then choose an output video format. Yes, finished! It supports outputting a wide range of formats, such as MP4, 3GP, MPEG-4, AVI, MPG, MOV, 3G2, VOB, MP3, AAC, FLAC, MKA, OGG, WAV, AC3, M4A, etc. for playback on popular gadgets like iPod, iPhone, iPhone 3G cell phones, Apple TV, PSP, BlackBerry, Creative Zen, iRiver, Zune, etc.
Compare with the other converters, the obvious advantage of Pavtube YouTube Converter for Mac is that it can ensure audio and video match very well, so users do not need worry about the converted video quality. In addition, this converter adopts multithreading technology, which enables its downloading and conversion speed to be faster than any other YouTube converters.
Moreover, it also supports batch conversion for YouTube videos, just choose the tasks you want to convert as many as possible, and then you can let the program convert multiple files simultaneously, which will remarkably save your time and energy.

Free download

Top 2: Freeware Tube TV

TubeTV is a free program designed for Mac, it can not only enable users to search for, and save YouTube and many other flash videos, but also can convert these videos to other format suitable for playback on portable devices like Apple TV, iPhone, and iPod.
A built in search bar and web browser help you conveniently locate your favorite videos from YouTube or other video sharing sites. If desired, TubeTV can add exported movies directly to iTunes and set appropriate comment tags enabling you to create a smart playlist. Alternately, double clicking on a converted video file will open it in iTunes or drag and drop a saved video file on to QuickTime Player to view it locally.
Comparatively, it is compatible well with iTunes, however, when it comes to batch conversion speed and the range of output types of video formats, it is inferior to Pavtube YouTube Converter for Mac.

Free download

Top 3: Free YouTube Converter for Mac

Free YouTube Converter for Mac is undoubtedly a great choice to convert YouTube videos to popular video and audio formats such as AVI, WMV, MP4, MPEG, H.264/AVC, MOV, RM, 3GP, 3GP2, VOB, AAC, FLV and other video and audio formats. Download YouTube videos and then convert them via this converter. After that you can enjoy these YouTube videos on various portable devices such as iPod Touch, iPod Nano, iPhone, Zune, Apple TV, Black Berry, DVD Player, Sony, LG and other 3GP mobile phones.
Free YouTube Converter for Mac has more output formats than Tube TV, while it lacks powerful support for batch conversion, besides this, its conversion speed also needs improvement. But because it is free, we may give more forgiveness to it.

Free download

Top 4: Free YouTube to iPhone Converter for Mac

Free YouTube to iPhone Converter can easily convert YouTube videos to iPhone on Mac, and its output formats including [b]WAV, M4A, AAC, MPEG, and H.264. What is more, it also can convert YouTube to videos that can be played not only on iPhone but also on iPod, iPod touch, iPod Nano, Apple TV, MP4 Player, and MP3 Player.[/b]
Compare with the above three programs, this one is uniquely designed for transferring YouTube video files to iPhone, and although it announces that the resulted files are also workable on iPod, Apple TV, MP4 Player, and MP3 Player, the fact that the numbers of its output file formats is limited can not be changeable.

Free download

Top 5: Free YouTube to iPod Converter for Mac

Free YouTube to iPod Converter for Mac is a nice choice for assisting iPod fans to enjoy YouTube videos. Because it is capable of converting YouTube videos to iPod compatible formats including MPEG-4, H.264, MP3, and MP4, so that iPod users would not be troubled by format issues.
The same with the above mentioned Free YouTube to iPhone Converter for Mac, this converter is also specially designed for converting YouTube video files to a certain device, not for iPhone, but for iPod only, and the output formats of it are also not as many as that of the above mentioned former three converters, thus, this point has limited its application scope to some extent as well.

Free download

During the course of my test, I have not found any spyware and adware in these above mentioned software; therefore you can download them according to your own preference at will.

hope2010s的头像

How To Convert or Rip Blu-ray DVD to HD AVI, HD WMV, HD MPEG, HD MOV Video format with BestHD Blu-ray To HD Video Converter?

Have you ever been confused about how to convert or rip Blu-ray dvd movies to HD (High Definition) videos such as HD WMV, HD MOV, HD AVI, HD H.264/MPEG-4 AVC, MPEG-2 TS HD Video, etc.? Here we'd like to introduce you a powerful and easy-to use Blu-ray to HD Video Converter software - BestHD Blu-Ray To HD Video which can help you rip and convert Blu-ray movies to all popular HD and SD videos with high video and audio quality.

During using course, I think there are many profits to be praised! The followings are some ranks I list!

Convert Blu-ray and general DVD movie to more HD Video formats, as HD AVI, HD MPEG-4, HD MPEG-4 AVCHD MOV, HD MPEG-2 TS, HD MPEG2, HD WMV.
Set begin and end time to convert any part you like
Convert with higher definition and conversion speed.
Preview your movies.
Select windows mode you like after conversion from output settings.
Capture beautiful pictures from your movie to enrich your collection.

More info you can visit: http://www.besthdsoft.com

More Blu-ray Ripper software reviews: http://blurayripper.blogspot.com/

More Related Products : * Blu-ray* * Blu-ray To HD Video * Blu-ray Converter * Blu-ray To AVI *

hope2010s的头像

Blu-ray has a number of advantages that other video formats do not have, such as high-definition, large-capacity, etc, but the market and consumer can not accept it truly for its high price. Perhaps only some consumers that like to try new things and rich people will buy it. Most people would choose HD-DVD or ordinary DVD. However, if we still want to see Blu-ray movies, what can we do?

However, it is no longer had to worry about this issue now. We find the Blu-Ray*. Blu Ray Ripper is developed and applied to the market firstly by BestHDsoft. It develops this powerful but easy-to-use Blu Ray Ripping based solid technical. This Blu-Ray Ripper software can Rip Blu-ray and general dvd of two kinds offile formats, and it satisfy everyone's demands fully. So we dont need to purchase Blu-ray player after buying a Blu-ray Disc, and we enjoy high-definition Blu-ray movies as well. We can rip Blu-ray movies to other any video and audio formats we want with it, so that we can enjoy the Blu-ray movies at any time give us pleasure.

Compared with the functional power, the operation of this Blu Ray* is very easy for everyone. Whatever you contacted with video converter or not previously, you can quickly master it at all.

Having said that, Is this product really good? Its your decision. So hurry to try it! I believe that it will not let you down!

More info you can visit: http://www.besthdsoft.com

More Blu-ray Ripper software reviews: http://blurayripper.blogspot.com/

More Related Products :Blu-Ray Ripper, Blu-Ray To AVI, Blu-Ray To iPod, Blu-Ray To MP3, Blu-Ray To MP4, Blu-Ray To MPEG, Blu-Ray To PS3, Blu-Ray To WMV, Blu-Ray To HD Video, Blu-ray Converter, Blu-ray DVD Converter.

hope2010s的头像

Have you ever been confused about how to convert or rip Blu-ray dvd movies to HD (High Definition) videos such as HD WMV, HD MOV, HD AVI, HD H.264/MPEG-4 AVC, MPEG-2 TS HD Video, etc.? Here we'd like to introduce you a powerful and easy-to use Blu-ray to HD Video Converter software - BestHD Blu-Ray To HD Video which can help you rip and convert Blu-ray movies to all popular HD and SD videos with high video and audio quality.

During using course, I think there are many profits to be praised! The followings are some ranks I list!

Convert Blu-ray and general DVD movie to more HD Video formats, as HD AVI, HD MPEG-4, HD MPEG-4 AVCHD MOV, HD MPEG-2 TS, HD MPEG2, HD WMV.
Set begin and end time to convert any part you like
Convert with higher definition and conversion speed.
Preview your movies.
Select windows mode you like after conversion from output settings.
Capture beautiful pictures from your movie to enrich your collection.

More info you can visit: http://www.besthdsoft.com

More Blu-ray Ripper software reviews: http://blurayripper.blogspot.com/

More Related Products : * Blu-ray* * Blu-ray To HD Video * Blu-ray Converter * Blu-ray To AVI *

hope2010s的头像

As far as I know, some people use AnyDVD to remove protections of their Blu-ray discs firstly, and then use an MTS/M2TS Converter to convert the .m2ts BD files into their wanted media formats. This is a definitely complicated matter, and why don't they choose a one-stop Blu-ray converter to do it once and for all? I guess that they may have not found a proper application to do this at all. Well, to assist you guys to simplify the conversion procedures, its my pleasure here to share a pretty good Blu-ray converter to you all, hope it will be of great help for you who are searching for this solution just right.
The application I recommend is BestHD Blu-ray converter , which can remove BD protections as well as do format conversion simultaneously without audio and video out of sync issues. All right, lets have a look at its detailed instruction together now.
Step 1: Load Blu-ray files into BestHD Blu-ray converter

Step 2: Select output format and Audio and subtitle language
As soon as BD files are loaded, you can click the drop-down list at the end of Profile to select output format according to your end use of these files. For instance, you can select format for your iPod, iPhone, PSP, Apple TV, or other devices, or directly copy them to the hard drive of your PC, or remux them to other formats without recode, etc.

Step 3: Set advanced settings
PressSettingsbutton, the interface as below will pop up, on which you can adjust the video size, video quality, channel, audio quality, and specify the output path and Output settings.ClickOKto confirm the settings.It is worth mentioning that, BestHD Soft support for automatic shutdown after conversion finished .

Step 4: Start Blu-ray ripping
Click Start button, then BestHD Blu-ray converter will start ripping your Blu-ray files automatically. With multithread technology, this program can finish the ripping task 1.5 to 2 times faster than other similar software.therefore, it ensures you needn't wait around for a long time.

Well, finished. From now on, you no longer need use both AnyDVD and an MTS/M2TS Converter to deal with your BD files. Hope my post here it really informative to all of you, good luck.

Good News: BestHD Blu-ray Converter new upgrades and 15% of the profit concession sales to repay customers' ardent supports,The excellent products include popular and powerful software like Blu-ray converter ,Blu-ray DVD converter ,etc. For detailed info, please visit the link attached as below:
http://www.besthdsoft.net

New Features about new version 2.11.25

1. Improved the incompatibility with 64-bit operating systems.
2. Added the subtitle function.
3. Added the selection of 5.1 audio (6 channels) for AVI and MKV.
4. Fixed the problem of incomplete conversion for particular discs.

chuntian8577的头像

We often watch interesting and wonderful videos on YouTube, but the problem is if I want to enjoy the videos from YouTube on my portable devices, what should I do and how can I do this?

Now with this powerful program-Cucusoft YouTube mate, which can help you download, play, convert and manage your favorite YouTube videos, now enjoy your favorite YouTube videos on your portable devices is so easy!

Make preparation: Download and install Cucusoft YouTube Mate

Part 1: How to play YouTube Videos on local hard disk.

Step1: Click "Add" Button .
Step2: Select the files you would like to play. You can select multiple files one time. All the files will be displayed in the play list.
Step3: Select one item you would like to play, click "Play" button to play it. Or, you can direct double click the clip in the play list.

Part 2: How to download YouTube Videos

Step1: Use an Internet Brower (IE, Firefox) to navigate YouTube. If you would like to download current YouTube Video, please go to Address Bar and press "Ctrl+C" to copy the URL in the Address Bar field.
Step2: Go to Cucusoft YouTube Mate, click "Download" Button, a download setting dialog will pop up. Please press "Ctrl+V" to paste previous URL in to Video URL field.
Step3: Click "OK" button, the download item will be added in the download list.
Step4: After the item status becomes "Downloading Done", you can play it offline or convert it to other video formats.

Part 3: How to Converter YouTube videos.

Step 1: Click "Add" Button to select the files you would like to convert. You can select multiple files one time. All the files will be displayed in the play list.
Step 2: Click "Profile" dropdown list to select a profile you need.
Step 3: If you need to set an new output folder, please click the "..." button right of "Output Folder" to select a new one.
Step 4: Click "Convert" button to start conversion..
In short while, the conversion will be finished.

If you want to get a more statisfactory enjoying of the Youtube video which has been convertered, now this tool- Aiseesoft Total Video Converter which have powerful video editting functions can meet your need.

Step 1: Download and install
Aiseesoft Total Video Converter

Step 2: Click "Add File" button to select the video you want to edit

The editting functions includes

1.Video Joiner.

If you want to merge several videos into one file you can choose them and click the "Merge into one file" to do it.

2.Video Cutter.

If you just want converter a clip of your video, then you can use the "Trim" icon to set the Start time and End time of the clip or you can directly drag the slide bar to the accurate position.

3.Video Crop

By using the "Crop" function you can crop the black edge of your video and you can also drag the line around the video image to adjust your video to portable devices..

4: Capture your favorite image.

If you like the current image of the video you can use the "Snapshot" option. Just click the "Snapshot" button the image will be saved and then click the "Open" button next to "Snapshot" button to open your picture.

Now you can easily enjoy your favorite YouTube videos on our portable devices, what are you waiting for? Just have a try and get a wonderful experience!
More:
Now many useful guides, tips, articles, tutorials are available on macsoftreviews. If you want to learn the tutorial about how to use a DVD Ripper, DVD Converter, Video Converter and so on. You can check the Helpful guide page.

Rajkumar的头像

Dear All,

I am working on Intel atom board (z530 1.60GHz) . Here I am trying to see the CPU utilization of mplayer with VAAPI support i followed steps given in below website
http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/

But while running application with ./mplayer -vo vaapi -va vaapi this option i am getting the following error

[vo_vaapi] vaInitialize(): invalid VADisplay
Error opening/initializing the selected video_out (-vo) device.

can any one give sugisition.

Thanks in advance

Regards
Raj

blowdata4u的头像

Added:

trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch

Log:
- Added VLC VAAPI patch to the build system but did not include it in the
build.

Added:
trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch
==============================================================================
--- (empty file)
+++
trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch

Fri Jun 19 20:35:58 2009
@@ -0,0 +1,860 @@
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.c 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.c 2009-06-19
16:31:52.000000000 -0700
+@@ -129,6 +129,9 @@
+
+ add_integer( "ffmpeg-debug", 0, NULL, DEBUG_TEXT, DEBUG_LONGTEXT,
+ true )
++#ifdef HAVE_AVCODEC_VAAPI
++ add_bool( "ffmpeg-hw", true, NULL, HW_TEXT, HW_LONGTEXT, true )
++#endif
+
+ #ifdef ENABLE_SOUT
+ /* encoder submodule */
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.h
vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.h
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.h 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.h 2009-06-19
16:31:52.000000000 -0700
+@@ -127,6 +127,9 @@
+ "usually has a detrimental effect on quality. However it provides a
big "
+ "speedup for high definition streams." )
+
++#define HW_TEXT N_("Hardware decoding")
++#define HW_LONGTEXT N_("This allows hardware decoding when available.")
++
+ /*
+ * Encoder options
+ */
+@@ -257,3 +260,6 @@
+ # define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
+ #endif
+
++/* Uncomment it to enable compilation with vaapi (you also must change
the build
++ * system) */
++//#define HAVE_AVCODEC_VAAPI 1
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/Modules.am
vlc-1.0.0-rc4-new/modules/codec/avcodec/Modules.am
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/Modules.am 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/Modules.am 2009-06-19
16:31:52.000000000 -0700
+@@ -7,6 +7,7 @@
+ avutil.h
+ fourcc.c
+ chroma.c
++ vaapi.c
+ $(NULL)
+
+ if ENABLE_SOUT
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.c 1969-12-31
16:00:00.000000000 -0800
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.c 2009-06-19
16:31:52.000000000 -0700
+@@ -0,0 +1,487 @@
++/*****************************************************************************
++ * vaapi.c: VAAPI helpers for the ffmpeg decoder
++
*****************************************************************************
++ * Copyright (C) 2009 Laurent Aimar
++ * $Id$
++ *
++ * Authors: Laurent Aimar
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
02110-1301, USA.
++
*****************************************************************************/
++
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#include
++#include
++#include
++
++#ifdef HAVE_LIBAVCODEC_AVCODEC_H
++# include
++# include
++#elif defined(HAVE_FFMPEG_AVCODEC_H)
++# include
++#else
++# include
++#endif
++
++#include "avcodec.h"
++#include "vaapi.h"
++
++#ifdef HAVE_AVCODEC_VAAPI
++
++#include
++#include
++
++
++typedef struct
++{
++ VASurfaceID i_id;
++ int i_refcount;
++ unsigned int i_order;
++
++} vlc_va_surface_t;
++
++struct vlc_va_t
++{
++ /* */
++ Display *p_display_x11;
++ VADisplay p_display;
++
++ VAConfigID i_config_id;
++ VAContextID i_context_id;
++
++ struct vaapi_context hw_ctx;
++
++ /* */
++ int i_version_major;
++ int i_version_minor;
++
++ /* */
++ int i_surface_count;
++ unsigned int i_surface_order;
++ int i_surface_width;
++ int i_surface_height;
++ vlc_fourcc_t i_surface_chroma;
++
++ vlc_va_surface_t *p_surface;
++
++ VAImage image;
++
++};
++
++static int VaOpen( vlc_va_t *p_va, int i_codec_id );
++static void VaClose( vlc_va_t *p_va );
++
++static int VaCreateSurfaces( vlc_va_t *p_va, void **pp_hw_ctx,
vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height );
++static void VaDestroySurfaces( vlc_va_t *p_va );
++
++vlc_va_t *VaNew( int i_codec_id )
++{
++ vlc_va_t *p_va = calloc( 1, sizeof(*p_va) );
++ if( !p_va )
++ return NULL;
++
++ if( VaOpen( p_va, i_codec_id ) )
++ {
++ free( p_va );
++ return NULL;
++ }
++ return p_va;
++}
++void VaDelete( vlc_va_t *p_va )
++{
++ VaClose( p_va );
++ free( p_va );
++}
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ if( p_va->i_surface_width == i_width &&
++ p_va->i_surface_height == i_height )
++ return VLC_SUCCESS;
++
++ *pp_hw_ctx = NULL;
++ *pi_chroma = 0;
++ if( p_va->i_surface_width || p_va->i_surface_height )
++ VaDestroySurfaces( p_va );
++
++ if( i_width > 0 && i_height > 0 )
++ return VaCreateSurfaces( p_va, pp_hw_ctx, pi_chroma, i_width,
i_height );
++
++ return VLC_EGENERIC;
++}
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version )
++{
++ snprintf( psz_version, i_version, "%d.%d", p_va->i_version_major,
p_va->i_version_minor );
++}
++
++static int VaOpen( vlc_va_t *p_va, int i_codec_id )
++{
++ VAProfile i_profile;
++ int i_surface_count;
++
++ /* */
++ switch( i_codec_id )
++ {
++ case CODEC_ID_MPEG1VIDEO:
++ case CODEC_ID_MPEG2VIDEO:
++ i_profile = VAProfileMPEG2Main;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_MPEG4:
++ i_profile = VAProfileMPEG4AdvancedSimple;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_WMV3:
++ i_profile = VAProfileVC1Main;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_VC1:
++ i_profile = VAProfileVC1Advanced;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_H264:
++ i_profile = VAProfileH264High;
++ i_surface_count = 16+1;
++ break;
++ default:
++ return VLC_EGENERIC;
++ }
++
++ /* */
++ memset( p_va, 0, sizeof(*p_va) );
++
++ /* Create a VA display */
++ p_va->p_display_x11 = XOpenDisplay(NULL);
++ if( !p_va->p_display_x11 )
++ goto error;
++
++ p_va->p_display = vaGetDisplay( p_va->p_display_x11 );
++ if( !p_va->p_display )
++ goto error;
++
++ if( vaInitialize( p_va->p_display, &p_va->i_version_major,
&p_va->i_version_minor ) )
++ goto error;
++
++ /* Create a VA configuration */
++ VAConfigAttrib attrib;
++ memset( &attrib, 0, sizeof(attrib) );
++ attrib.type = VAConfigAttribRTFormat;
++ if( vaGetConfigAttributes( p_va->p_display,
++ i_profile, VAEntrypointVLD, &attrib, 1 ) )
++ goto error;
++
++ /* Not sure what to do if not, I don't have a way to test */
++ if( (attrib.value & VA_RT_FORMAT_YUV420) == 0 )
++ goto error;
++ if( vaCreateConfig( p_va->p_display,
++ i_profile, VAEntrypointVLD, &attrib, 1,
&p_va->i_config_id ) )
++ {
++ p_va->i_config_id = 0;
++ goto error;
++ }
++
++ p_va->i_surface_count = i_surface_count;
++
++ return VLC_SUCCESS;
++
++error:
++ return VLC_EGENERIC;
++}
++static void VaClose( vlc_va_t *p_va )
++{
++ if( p_va->i_surface_width || p_va->i_surface_height )
++ VaDestroySurfaces( p_va );
++
++ if( p_va->i_config_id )
++ vaDestroyConfig( p_va->p_display, p_va->i_config_id );
++ if( p_va->p_display )
++ vaTerminate( p_va->p_display );
++ if( p_va->p_display_x11 )
++ XCloseDisplay( p_va->p_display_x11 );
++}
++
++static int VaCreateSurfaces( vlc_va_t *p_va, void **pp_hw_ctx,
vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ assert( i_width > 0 && i_height > 0 );
++
++ /* */
++ p_va->p_surface = calloc( p_va->i_surface_count,
sizeof(*p_va->p_surface) );
++ if( !p_va->p_surface )
++ return VLC_EGENERIC;
++
++ /* Create surfaces */
++ VASurfaceID pi_surface_id[p_va->i_surface_count];
++ if( vaCreateSurfaces( p_va->p_display, i_width, i_height,
VA_RT_FORMAT_YUV420,
++ p_va->i_surface_count, pi_surface_id ) )
++ {
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ p_va->p_surface[i].i_id = VA_INVALID_SURFACE;
++ goto error;
++ }
++
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ p_surface->i_id = pi_surface_id[i];
++ p_surface->i_refcount = 0;
++ p_surface->i_order = 0;
++ }
++
++ /* Create a context */
++ if( vaCreateContext( p_va->p_display, p_va->i_config_id,
++ i_width, i_height, VA_PROGRESSIVE,
++ pi_surface_id, p_va->i_surface_count,
&p_va->i_context_id ) )
++ {
++ p_va->i_context_id = 0;
++ goto error;
++ }
++
++ /* Find a supported image chroma */
++ int i_fmt_count = vaMaxNumImageFormats( p_va->p_display );
++ VAImageFormat *p_fmt = calloc( i_fmt_count, sizeof(*p_fmt) );
++ if( !p_fmt )
++ goto error;
++
++ if( vaQueryImageFormats( p_va->p_display, p_fmt, &i_fmt_count ) )
++ {
++ free( p_fmt );
++ goto error;
++ }
++
++ vlc_fourcc_t i_chroma = 0;
++ VAImageFormat fmt;
++ for( int i = 0; i < i_fmt_count; i++ )
++ {
++ if( p_fmt[i].fourcc == VA_FOURCC( 'Y', 'V', '1', '2' ) ||
++ p_fmt[i].fourcc == VA_FOURCC( 'I', '4', '2', '0' ) )
++ {
++ i_chroma = VLC_FOURCC( 'I', '4', '2', '0' );
++ fmt = p_fmt[i];
++ }
++ /* TODO: It seems that these may also be available (but not
++ * with my setup):
++ * VA_FOURCC( 'N', 'V', '1', '2')
++ * VA_FOURCC( 'U', 'Y', 'V', 'Y')
++ * VA_FOURCC( 'Y', 'U', 'Y', 'V')
++ */
++ }
++ free( p_fmt );
++ if( !i_chroma )
++ goto error;
++ *pi_chroma = i_chroma;
++
++ /* Create an image for surface extraction */
++ if( vaCreateImage( p_va->p_display, &fmt, i_width, i_height,
&p_va->image ) )
++ {
++ p_va->image.image_id = 0;
++ goto error;
++ }
++
++ /* Setup the ffmpeg hardware context */
++ *pp_hw_ctx = &p_va->hw_ctx;
++
++ memset( &p_va->hw_ctx, 0, sizeof(p_va->hw_ctx) );
++ p_va->hw_ctx.display = p_va->p_display;
++ p_va->hw_ctx.config_id = p_va->i_config_id;
++ p_va->hw_ctx.context_id = p_va->i_context_id;
++
++ /* */
++ p_va->i_surface_chroma = i_chroma;
++ p_va->i_surface_width = i_width;
++ p_va->i_surface_height = i_height;
++ return VLC_SUCCESS;
++
++error:
++ VaDestroySurfaces( p_va );
++ return VLC_EGENERIC;
++}
++static void VaDestroySurfaces( vlc_va_t *p_va )
++{
++ if( p_va->image.image_id )
++ vaDestroyImage( p_va->p_display, p_va->image.image_id );
++
++ if( p_va->i_context_id )
++ vaDestroyContext( p_va->p_display, p_va->i_context_id );
++
++ for( int i = 0; i < p_va->i_surface_count && p_va->p_surface; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( p_surface->i_id != VA_INVALID_SURFACE )
++ vaDestroySurfaces( p_va->p_display, &p_surface->i_id, 1 );
++ }
++ free( p_va->p_surface );
++
++ /* */
++ p_va->image.image_id = 0;
++ p_va->i_context_id = 0;
++ p_va->p_surface = NULL;
++ p_va->i_surface_width = 0;
++ p_va->i_surface_height = 0;
++}
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff )
++{
++ VASurfaceID i_surface_id = (VASurfaceID)(uintptr_t)p_ff->data[3];
++
++ if( vaSyncSurface( p_va->p_display, p_va->i_context_id, i_surface_id
) )
++ return VLC_EGENERIC;
++
++ /* XXX vaDeriveImage may be better but it is not supported by
++ * my setup.
++ */
++
++ if( vaGetImage( p_va->p_display, i_surface_id,
++ 0, 0, p_va->i_surface_width, p_va->i_surface_height,
++ p_va->image.image_id) )
++ return VLC_EGENERIC;
++
++ void *p_base;
++ if( vaMapBuffer( p_va->p_display, p_va->image.buf, &p_base ) )
++ return VLC_EGENERIC;
++
++ for( int i_plane = 0; i_plane < p_picture->i_planes; i_plane++ )
++ {
++ const int i_src_plane = ((p_va->image.format.fourcc ==
VA_FOURCC('Y','V','1','2' )) && i_plane != 0) ? (3 - i_plane) : i_plane;
++ const uint8_t *p_src = (uint8_t*)p_base +
p_va->image.offsets[i_src_plane];
++ const int i_src_stride = p_va->image.pitches[i_src_plane];
++
++ uint8_t *p_dst = p_picture->p[i_plane].p_pixels;
++ const int i_dst_stride = p_picture->p[i_plane].i_pitch;
++
++ if( i_src_stride != i_dst_stride )
++ {
++ for( int i = 0; i < p_picture->p[i_plane].i_visible_lines;
i++ )
++ {
++ vlc_memcpy( p_dst, p_src, __MIN( i_src_stride,
i_dst_stride ) );
++ p_src += i_src_stride;
++ p_dst += i_dst_stride;
++ }
++ }
++ else
++ {
++ vlc_memcpy( p_dst, p_src,
p_picture->p[i_plane].i_visible_lines * i_src_stride );
++ }
++ }
++
++ if( vaUnmapBuffer( p_va->p_display, p_va->image.buf ) )
++ return VLC_EGENERIC;
++
++ return VLC_SUCCESS;
++}
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ int i_old;
++ int i;
++
++ /* Grab an unused surface, in case none are, try the oldest
++ * XXX using the oldest is a workaround in case a problem happens
with ffmpeg */
++ for( i = 0, i_old = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( !p_surface->i_refcount )
++ break;
++
++ if( p_surface->i_order < p_va->p_surface[i_old].i_order )
++ i_old = i;
++ }
++ if( i >= p_va->i_surface_count )
++ i = i_old;
++
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ p_surface->i_refcount = 1;
++ p_surface->i_order = p_va->i_surface_order++;
++
++ /* */
++ for( int i = 0; i < 4; i++ )
++ {
++ p_ff->data[i] = NULL;
++ p_ff->linesize[i] = 0;
++
++ if( i == 0 || i == 3 )
++ p_ff->data[i] = (void*)(uintptr_t)p_surface->i_id;/* Yummie */
++ }
++ return VLC_SUCCESS;
++}
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VASurfaceID i_surface_id = (VASurfaceID)(uintptr_t)p_ff->data[3];
++
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( p_surface->i_id == i_surface_id )
++ p_surface->i_refcount--;
++ }
++}
++
++#else
++
++vlc_va_t *VaNew( int i_codec_id )
++{
++ VLC_UNUSED(i_codec_id);
++ return NULL;
++}
++void VaDelete( vlc_va_t *p_va )
++{
++ VLC_UNUSED(p_va);
++ assert( 0 );
++}
++
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(psz_version); VLC_UNUSED(i_version);
++ assert(0);
++}
++
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(pp_hw_ctx); VLC_UNUSED(pi_chroma);
++ VLC_UNUSED(i_width); VLC_UNUSED(i_height);
++ assert(0);
++ return -1;
++}
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_picture); VLC_UNUSED(p_ff);
++ assert(0);
++ return -1;
++}
++
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_ff);
++ assert(0);
++ return -1;
++}
++
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_ff);
++ assert(0);
++}
++
++#endif
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.h
vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.h
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.h 1969-12-31
16:00:00.000000000 -0800
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.h 2009-06-19
16:31:52.000000000 -0700
+@@ -0,0 +1,43 @@
++/*****************************************************************************
++ * vaapi.h: VAAPI helpers for the ffmpeg decoder
++
*****************************************************************************
++ * Copyright (C) 2009 Laurent Aimar
++ * $Id$
++ *
++ * Authors: Laurent Aimar
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
02110-1301, USA.
++
*****************************************************************************/
++
++#ifndef _VLC_VAAPI_H
++#define _VLC_VAAPI_H 1
++
++typedef struct vlc_va_t vlc_va_t;
++
++vlc_va_t *VaNew( int i_codec_id );
++void VaDelete( vlc_va_t *p_va );
++
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version );
++
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height );
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff );
++
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff );
++
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff );
++
++#endif
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/video.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/video.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/video.c 2009-06-14
11:14:59.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/video.c 2009-06-19
16:36:25.000000000 -0700
+@@ -34,10 +34,14 @@
+ #include
+ #include /* BITMAPINFOHEADER
*/
+ #include
++#include
+
+ /* ffmpeg header */
+ #ifdef HAVE_LIBAVCODEC_AVCODEC_H
+ # include
++# ifdef HAVE_AVCODEC_VAAPI
++# include
++# endif
+ #elif defined(HAVE_FFMPEG_AVCODEC_H)
+ # include
+ #else
+@@ -45,6 +49,7 @@
+ #endif
+
+ #include "avcodec.h"
++#include "vaapi.h"
+
+
/*****************************************************************************
+ * decoder_sys_t : decoder descriptor
+@@ -85,6 +90,9 @@
+
+ /* */
+ bool b_flush;
++
++ /* VA API */
++ vlc_va_t *p_va;
+ };
+
+ /* FIXME (dummy palette for now) */
+@@ -101,6 +109,10 @@
+ static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
+ static void ffmpeg_NextPts( decoder_t * );
+
++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
++ const enum PixelFormat * );
++
++
+ static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
+ {
+ uint8_t *p = (uint8_t*)&fcc;
+@@ -115,7 +127,7 @@
+ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
+ AVCodecContext *p_context )
+ {
+- picture_t *p_pic;
++ decoder_sys_t *p_sys = p_dec->p_sys;
+
+ p_dec->fmt_out.video.i_width = p_context->width;
+ p_dec->fmt_out.video.i_height = p_context->height;
+@@ -125,10 +137,12 @@
+ return NULL; /* invalid display size */
+ }
+
+- if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) !=
VLC_SUCCESS )
++ if( !p_sys->p_va && GetVlcChroma( &p_dec->fmt_out.video,
p_context->pix_fmt ) )
+ {
+- /* we are doomed, but not really, because most codecs set their
pix_fmt much later */
+- p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
++ /* we are doomed, but not really, because most codecs set their
pix_fmt
++ * much later
++ * FIXME does it make sense here ? */
++ p_dec->fmt_out.video.i_chroma = VLC_FOURCC('I','4','2','0');
+ }
+ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
+
+@@ -166,9 +180,7 @@
+ p_dec->fmt_out.video.i_frame_rate_base = p_context->time_base.num;
+ }
+
+- p_pic = decoder_NewPicture( p_dec );
+-
+- return p_pic;
++ return decoder_NewPicture( p_dec );
+ }
+
+
/*****************************************************************************
+@@ -193,6 +205,7 @@
+ p_sys->psz_namecodec = psz_namecodec;
+ p_sys->p_ff_pic = avcodec_alloc_frame();
+ p_sys->b_delayed_open = true;
++ p_sys->p_va = NULL;
+
+ /* ***** Fill p_context with init values ***** */
+ p_sys->p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_codec
);
+@@ -319,6 +332,9 @@
+ p_sys->p_context->release_buffer = ffmpeg_ReleaseFrameBuf;
+ p_sys->p_context->opaque = p_dec;
+
++ if( var_CreateGetBool( p_dec, "ffmpeg-hw" ) )
++ p_sys->p_context->get_format = ffmpeg_GetFormat;
++
+ /* ***** misc init ***** */
+ p_sys->input_pts = p_sys->input_dts = 0;
+ p_sys->i_pts = 0;
+@@ -621,7 +637,7 @@
+ p_sys->i_late_frames = 0;
+ }
+
+- if( !b_drawpicture || !p_sys->p_ff_pic->linesize[0] )
++ if( !b_drawpicture || ( !p_sys->p_va
&& !p_sys->p_ff_pic->linesize[0] ) )
+ {
+ /* Do not display the picture */
+ p_pic = (picture_t *)p_sys->p_ff_pic->opaque;
+@@ -736,6 +752,9 @@
+
+ if( p_sys->p_ff_pic ) av_free( p_sys->p_ff_pic );
+ free( p_sys->p_buffer_orig );
++
++ if( p_sys->p_va )
++ VaDelete( p_sys->p_va );
+ }
+
+
/*****************************************************************************
+@@ -838,6 +857,14 @@
+
+ p_sys->b_delayed_open = false;
+
++ if( p_sys->p_va )
++ {
++ char psz_version[128];
++
++ VaVersion( p_sys->p_va, psz_version, sizeof(psz_version) );
++ msg_Info( p_dec, "Using VA API version %s for hardware
decoding.", psz_version );
++ }
++
+ return VLC_SUCCESS;
+ }
+
/*****************************************************************************
+@@ -849,7 +876,11 @@
+ {
+ decoder_sys_t *p_sys = p_dec->p_sys;
+
+- if( TestFfmpegChroma( p_sys->p_context->pix_fmt, -1 ) == VLC_SUCCESS )
++ if( p_sys->p_va )
++ {
++ VaExtract( p_sys->p_va, p_pic, p_ff_pic );
++ }
++ else if( TestFfmpegChroma( p_sys->p_context->pix_fmt, -1 ) ==
VLC_SUCCESS )
+ {
+ int i_plane, i_size, i_line;
+ uint8_t *p_dst, *p_src;
+@@ -899,11 +930,33 @@
+ ffmpeg_SetFrameBufferPts( p_dec, p_ff_pic );
+
+ /* */
+- p_ff_pic->opaque = 0;
++ p_ff_pic->opaque = NULL;
++
++ if( p_sys->p_va )
++ {
++ if( VaSetup( p_sys->p_va,
++ &p_sys->p_context->hwaccel_context,
&p_dec->fmt_out.video.i_chroma,
++ p_sys->p_context->width, p_sys->p_context->height ) )
++ {
++ msg_Err( p_dec, "VaSetup failed" );
++ return -1;
++ }
++
++ /* */
++ p_ff_pic->type = FF_BUFFER_TYPE_USER;
++ /* FIXME what is that, should give good value */
++ p_ff_pic->age = 256*256*256*64; // FIXME FIXME from ffmpeg
+
+- /* Not much to do in indirect rendering mode */
+- if( !p_sys->b_direct_rendering )
++ if( VaGrabSurface( p_sys->p_va, p_ff_pic ) )
++ {
++ msg_Err( p_dec, "VaGrabSurface failed" );
++ return -1;
++ }
++ return 0;
++ }
++ else if( !p_sys->b_direct_rendering )
+ {
++ /* Not much to do in indirect rendering mode */
+ return avcodec_default_get_buffer( p_context, p_ff_pic );
+ }
+
+@@ -1012,20 +1065,30 @@
+ AVFrame *p_ff_pic )
+ {
+ decoder_t *p_dec = (decoder_t *)p_context->opaque;
++ decoder_sys_t *p_sys = p_dec->p_sys;
++
++ if( p_sys->p_va )
++ {
++ VaUngrabSurface( p_sys->p_va, p_ff_pic );
+
+- if( !p_ff_pic->opaque )
++ /* */
++ for( int i = 0; i < 4; i++ )
++ p_ff_pic->data[i] = NULL;
++ }
++ else if( !p_ff_pic->opaque )
+ {
+ avcodec_default_release_buffer( p_context, p_ff_pic );
+- return;
+ }
++ else
++ {
++ picture_t *p_pic = (picture_t*)p_ff_pic->opaque;
+
+- picture_t *p_pic = (picture_t*)p_ff_pic->opaque;
+- decoder_UnlinkPicture( p_dec, p_pic );
++ decoder_UnlinkPicture( p_dec, p_pic );
+
+- p_ff_pic->data[0] = NULL;
+- p_ff_pic->data[1] = NULL;
+- p_ff_pic->data[2] = NULL;
+- p_ff_pic->data[3] = NULL;
++ /* */
++ for( int i = 0; i < 4; i++ )
++ p_ff_pic->data[i] = NULL;
++ }
+ }
+
+ static void ffmpeg_NextPts( decoder_t *p_dec )
+@@ -1052,3 +1115,53 @@
+ (2 * p_sys->p_context->time_base.den);
+ }
+ }
++
++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec,
++ const enum PixelFormat *pi_fmt )
++{
++ decoder_t *p_dec = p_codec->opaque;
++ decoder_sys_t *p_sys = p_dec->p_sys;
++
++ if( p_sys->p_va )
++ {
++ VaDelete( p_sys->p_va );
++ p_sys->p_va = NULL;
++ }
++
++ /* Try too look for a supported hw acceleration */
++ for( int i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
++ {
++ static const char *ppsz_name[PIX_FMT_NB] = {
++ [PIX_FMT_VDPAU_H264] = "PIX_FMT_VDPAU_H264",
++ [PIX_FMT_VAAPI_IDCT] = "PIX_FMT_VAAPI_IDCT",
++ [PIX_FMT_VAAPI_VLD] = "PIX_FMT_VAAPI_VLD",
++ [PIX_FMT_VAAPI_MOCO] = "PIX_FMT_VAAPI_MOCO",
++ [PIX_FMT_YUYV422] = "PIX_FMT_YUYV422",
++ [PIX_FMT_YUV420P] = "PIX_FMT_YUV420P",
++ };
++ msg_Dbg( p_dec, "Available decoder output format %d (%s)",
pi_fmt[i], ppsz_name[pi_fmt[i]] ?: "Unknown" );
++
++ /* Only VLD supported */
++ if( pi_fmt[i] == PIX_FMT_VAAPI_VLD )
++ {
++ msg_Dbg( p_dec, "Trying VA API" );
++ p_sys->p_va = VaNew( p_sys->i_codec_id );
++ if( p_sys->p_va )
++ {
++ /* FIXME this will disabled direct rendering
++ * even if a new pixel format is renegociated
++ *
++ * FIXME Try to call VaSetup when possible
++ * to detect errors when possible (later is too late) */
++ p_sys->b_direct_rendering = false;
++ p_sys->p_context->draw_horiz_band = NULL;
++ return pi_fmt[i];
++ }
++ msg_Warn( p_dec, "Failed to open VA API" );
++ }
++ }
++
++ /* Fallback to default behaviour */
++ return avcodec_default_get_format( p_codec, pi_fmt );
++}
++

http://www.blowdata4u.com

Rajkumar的头像
Quoting - raj.ece03

Dear All,

I am working on Intel atom board (z530 1.60GHz) . Here I am trying to see the CPU utilization of mplayer with VAAPI support i followed steps given in below website
http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/

But while running application with ./mplayer -vo vaapi -va vaapi this option i am getting the following error

[vo_vaapi] vaInitialize(): invalid VADisplay
Error opening/initializing the selected video_out (-vo) device.

can any one give sugisition.

Thanks in advance

Regards
Raj

Rajkumar的头像
Quoting - raj.ece03 Quoting - raj.ece03

Dear All,

I am working on Intel atom board (z530 1.60GHz) . Here I am trying to see the CPU utilization of mplayer with VAAPI support i followed steps given in below website
http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/

But while running application with ./mplayer -vo vaapi -va vaapi this option i am getting the following error

[vo_vaapi] vaInitialize(): invalid VADisplay
Error opening/initializing the selected video_out (-vo) device.

can any one give sugisition.

Thanks in advance

Regards
Raj

Rajkumar的头像
Quoting - blowdata4u Added:

trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch

Log:
- Added VLC VAAPI patch to the build system but did not include it in the
build.

Added:
trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch
==============================================================================
--- (empty file)
+++
trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch

Fri Jun 19 20:35:58 2009
@@ -0,0 +1,860 @@
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.c 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.c 2009-06-19
16:31:52.000000000 -0700
+@@ -129,6 +129,9 @@
+
+ add_integer( "ffmpeg-debug", 0, NULL, DEBUG_TEXT, DEBUG_LONGTEXT,
+ true )
++#ifdef HAVE_AVCODEC_VAAPI
++ add_bool( "ffmpeg-hw", true, NULL, HW_TEXT, HW_LONGTEXT, true )
++#endif
+
+ #ifdef ENABLE_SOUT
+ /* encoder submodule */
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.h
vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.h
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.h 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.h 2009-06-19
16:31:52.000000000 -0700
+@@ -127,6 +127,9 @@
+ "usually has a detrimental effect on quality. However it provides a
big "
+ "speedup for high definition streams." )
+
++#define HW_TEXT N_("Hardware decoding")
++#define HW_LONGTEXT N_("This allows hardware decoding when available.")
++
+ /*
+ * Encoder options
+ */
+@@ -257,3 +260,6 @@
+ # define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
+ #endif
+
++/* Uncomment it to enable compilation with vaapi (you also must change
the build
++ * system) */
++//#define HAVE_AVCODEC_VAAPI 1
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/Modules.am
vlc-1.0.0-rc4-new/modules/codec/avcodec/Modules.am
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/Modules.am 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/Modules.am 2009-06-19
16:31:52.000000000 -0700
+@@ -7,6 +7,7 @@
+ avutil.h
+ fourcc.c
+ chroma.c
++ vaapi.c
+ $(NULL)
+
+ if ENABLE_SOUT
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.c 1969-12-31
16:00:00.000000000 -0800
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.c 2009-06-19
16:31:52.000000000 -0700
+@@ -0,0 +1,487 @@
++/*****************************************************************************
++ * vaapi.c: VAAPI helpers for the ffmpeg decoder
++
*****************************************************************************
++ * Copyright (C) 2009 Laurent Aimar
++ * $Id$
++ *
++ * Authors: Laurent Aimar
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
02110-1301, USA.
++
*****************************************************************************/
++
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#include
++#include
++#include
++
++#ifdef HAVE_LIBAVCODEC_AVCODEC_H
++# include
++# include
++#elif defined(HAVE_FFMPEG_AVCODEC_H)
++# include
++#else
++# include
++#endif
++
++#include "avcodec.h"
++#include "vaapi.h"
++
++#ifdef HAVE_AVCODEC_VAAPI
++
++#include
++#include
++
++
++typedef struct
++{
++ VASurfaceID i_id;
++ int i_refcount;
++ unsigned int i_order;
++
++} vlc_va_surface_t;
++
++struct vlc_va_t
++{
++ /* */
++ Display *p_display_x11;
++ VADisplay p_display;
++
++ VAConfigID i_config_id;
++ VAContextID i_context_id;
++
++ struct vaapi_context hw_ctx;
++
++ /* */
++ int i_version_major;
++ int i_version_minor;
++
++ /* */
++ int i_surface_count;
++ unsigned int i_surface_order;
++ int i_surface_width;
++ int i_surface_height;
++ vlc_fourcc_t i_surface_chroma;
++
++ vlc_va_surface_t *p_surface;
++
++ VAImage image;
++
++};
++
++static int VaOpen( vlc_va_t *p_va, int i_codec_id );
++static void VaClose( vlc_va_t *p_va );
++
++static int VaCreateSurfaces( vlc_va_t *p_va, void **pp_hw_ctx,
vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height );
++static void VaDestroySurfaces( vlc_va_t *p_va );
++
++vlc_va_t *VaNew( int i_codec_id )
++{
++ vlc_va_t *p_va = calloc( 1, sizeof(*p_va) );
++ if( !p_va )
++ return NULL;
++
++ if( VaOpen( p_va, i_codec_id ) )
++ {
++ free( p_va );
++ return NULL;
++ }
++ return p_va;
++}
++void VaDelete( vlc_va_t *p_va )
++{
++ VaClose( p_va );
++ free( p_va );
++}
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ if( p_va->i_surface_width == i_width &&
++ p_va->i_surface_height == i_height )
++ return VLC_SUCCESS;
++
++ *pp_hw_ctx = NULL;
++ *pi_chroma = 0;
++ if( p_va->i_surface_width || p_va->i_surface_height )
++ VaDestroySurfaces( p_va );
++
++ if( i_width > 0 && i_height > 0 )
++ return VaCreateSurfaces( p_va, pp_hw_ctx, pi_chroma, i_width,
i_height );
++
++ return VLC_EGENERIC;
++}
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version )
++{
++ snprintf( psz_version, i_version, "%d.%d", p_va->i_version_major,
p_va->i_version_minor );
++}
++
++static int VaOpen( vlc_va_t *p_va, int i_codec_id )
++{
++ VAProfile i_profile;
++ int i_surface_count;
++
++ /* */
++ switch( i_codec_id )
++ {
++ case CODEC_ID_MPEG1VIDEO:
++ case CODEC_ID_MPEG2VIDEO:
++ i_profile = VAProfileMPEG2Main;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_MPEG4:
++ i_profile = VAProfileMPEG4AdvancedSimple;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_WMV3:
++ i_profile = VAProfileVC1Main;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_VC1:
++ i_profile = VAProfileVC1Advanced;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_H264:
++ i_profile = VAProfileH264High;
++ i_surface_count = 16+1;
++ break;
++ default:
++ return VLC_EGENERIC;
++ }
++
++ /* */
++ memset( p_va, 0, sizeof(*p_va) );
++
++ /* Create a VA display */
++ p_va->p_display_x11 = XOpenDisplay(NULL);
++ if( !p_va->p_display_x11 )
++ goto error;
++
++ p_va->p_display = vaGetDisplay( p_va->p_display_x11 );
++ if( !p_va->p_display )
++ goto error;
++
++ if( vaInitialize( p_va->p_display, &p_va->i_version_major,
&p_va->i_version_minor ) )
++ goto error;
++
++ /* Create a VA configuration */
++ VAConfigAttrib attrib;
++ memset( &attrib, 0, sizeof(attrib) );
++ attrib.type = VAConfigAttribRTFormat;
++ if( vaGetConfigAttributes( p_va->p_display,
++ i_profile, VAEntrypointVLD, &attrib, 1 ) )
++ goto error;
++
++ /* Not sure what to do if not, I don't have a way to test */
++ if( (attrib.value & VA_RT_FORMAT_YUV420) == 0 )
++ goto error;
++ if( vaCreateConfig( p_va->p_display,
++ i_profile, VAEntrypointVLD, &attrib, 1,
&p_va->i_config_id ) )
++ {
++ p_va->i_config_id = 0;
++ goto error;
++ }
++
++ p_va->i_surface_count = i_surface_count;
++
++ return VLC_SUCCESS;
++
++error:
++ return VLC_EGENERIC;
++}
++static void VaClose( vlc_va_t *p_va )
++{
++ if( p_va->i_surface_width || p_va->i_surface_height )
++ VaDestroySurfaces( p_va );
++
++ if( p_va->i_config_id )
++ vaDestroyConfig( p_va->p_display, p_va->i_config_id );
++ if( p_va->p_display )
++ vaTerminate( p_va->p_display );
++ if( p_va->p_display_x11 )
++ XCloseDisplay( p_va->p_display_x11 );
++}
++
++static int VaCreateSurfaces( vlc_va_t *p_va, void **pp_hw_ctx,
vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ assert( i_width > 0 && i_height > 0 );
++
++ /* */
++ p_va->p_surface = calloc( p_va->i_surface_count,
sizeof(*p_va->p_surface) );
++ if( !p_va->p_surface )
++ return VLC_EGENERIC;
++
++ /* Create surfaces */
++ VASurfaceID pi_surface_id[p_va->i_surface_count];
++ if( vaCreateSurfaces( p_va->p_display, i_width, i_height,
VA_RT_FORMAT_YUV420,
++ p_va->i_surface_count, pi_surface_id ) )
++ {
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ p_va->p_surface[i].i_id = VA_INVALID_SURFACE;
++ goto error;
++ }
++
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ p_surface->i_id = pi_surface_id[i];
++ p_surface->i_refcount = 0;
++ p_surface->i_order = 0;
++ }
++
++ /* Create a context */
++ if( vaCreateContext( p_va->p_display, p_va->i_config_id,
++ i_width, i_height, VA_PROGRESSIVE,
++ pi_surface_id, p_va->i_surface_count,
&p_va->i_context_id ) )
++ {
++ p_va->i_context_id = 0;
++ goto error;
++ }
++
++ /* Find a supported image chroma */
++ int i_fmt_count = vaMaxNumImageFormats( p_va->p_display );
++ VAImageFormat *p_fmt = calloc( i_fmt_count, sizeof(*p_fmt) );
++ if( !p_fmt )
++ goto error;
++
++ if( vaQueryImageFormats( p_va->p_display, p_fmt, &i_fmt_count ) )
++ {
++ free( p_fmt );
++ goto error;
++ }
++
++ vlc_fourcc_t i_chroma = 0;
++ VAImageFormat fmt;
++ for( int i = 0; i < i_fmt_count; i++ )
++ {
++ if( p_fmt[i].fourcc == VA_FOURCC( 'Y', 'V', '1', '2' ) ||
++ p_fmt[i].fourcc == VA_FOURCC( 'I', '4', '2', '0' ) )
++ {
++ i_chroma = VLC_FOURCC( 'I', '4', '2', '0' );
++ fmt = p_fmt[i];
++ }
++ /* TODO: It seems that these may also be available (but not
++ * with my setup):
++ * VA_FOURCC( 'N', 'V', '1', '2')
++ * VA_FOURCC( 'U', 'Y', 'V', 'Y')
++ * VA_FOURCC( 'Y', 'U', 'Y', 'V')
++ */
++ }
++ free( p_fmt );
++ if( !i_chroma )
++ goto error;
++ *pi_chroma = i_chroma;
++
++ /* Create an image for surface extraction */
++ if( vaCreateImage( p_va->p_display, &fmt, i_width, i_height,
&p_va->image ) )
++ {
++ p_va->image.image_id = 0;
++ goto error;
++ }
++
++ /* Setup the ffmpeg hardware context */
++ *pp_hw_ctx = &p_va->hw_ctx;
++
++ memset( &p_va->hw_ctx, 0, sizeof(p_va->hw_ctx) );
++ p_va->hw_ctx.display = p_va->p_display;
++ p_va->hw_ctx.config_id = p_va->i_config_id;
++ p_va->hw_ctx.context_id = p_va->i_context_id;
++
++ /* */
++ p_va->i_surface_chroma = i_chroma;
++ p_va->i_surface_width = i_width;
++ p_va->i_surface_height = i_height;
++ return VLC_SUCCESS;
++
++error:
++ VaDestroySurfaces( p_va );
++ return VLC_EGENERIC;
++}
++static void VaDestroySurfaces( vlc_va_t *p_va )
++{
++ if( p_va->image.image_id )
++ vaDestroyImage( p_va->p_display, p_va->image.image_id );
++
++ if( p_va->i_context_id )
++ vaDestroyContext( p_va->p_display, p_va->i_context_id );
++
++ for( int i = 0; i < p_va->i_surface_count && p_va->p_surface; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( p_surface->i_id != VA_INVALID_SURFACE )
++ vaDestroySurfaces( p_va->p_display, &p_surface->i_id, 1 );
++ }
++ free( p_va->p_surface );
++
++ /* */
++ p_va->image.image_id = 0;
++ p_va->i_context_id = 0;
++ p_va->p_surface = NULL;
++ p_va->i_surface_width = 0;
++ p_va->i_surface_height = 0;
++}
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff )
++{
++ VASurfaceID i_surface_id = (VASurfaceID)(uintptr_t)p_ff->data[3];
++
++ if( vaSyncSurface( p_va->p_display, p_va->i_context_id, i_surface_id
) )
++ return VLC_EGENERIC;
++
++ /* XXX vaDeriveImage may be better but it is not supported by
++ * my setup.
++ */
++
++ if( vaGetImage( p_va->p_display, i_surface_id,
++ 0, 0, p_va->i_surface_width, p_va->i_surface_height,
++ p_va->image.image_id) )
++ return VLC_EGENERIC;
++
++ void *p_base;
++ if( vaMapBuffer( p_va->p_display, p_va->image.buf, &p_base ) )
++ return VLC_EGENERIC;
++
++ for( int i_plane = 0; i_plane < p_picture->i_planes; i_plane++ )
++ {
++ const int i_src_plane = ((p_va->image.format.fourcc ==
VA_FOURCC('Y','V','1','2' )) && i_plane != 0) ? (3 - i_plane) : i_plane;
++ const uint8_t *p_src = (uint8_t*)p_base +
p_va->image.offsets[i_src_plane];
++ const int i_src_stride = p_va->image.pitches[i_src_plane];
++
++ uint8_t *p_dst = p_picture->p[i_plane].p_pixels;
++ const int i_dst_stride = p_picture->p[i_plane].i_pitch;
++
++ if( i_src_stride != i_dst_stride )
++ {
++ for( int i = 0; i < p_picture->p[i_plane].i_visible_lines;
i++ )
++ {
++ vlc_memcpy( p_dst, p_src, __MIN( i_src_stride,
i_dst_stride ) );
++ p_src += i_src_stride;
++ p_dst += i_dst_stride;
++ }
++ }
++ else
++ {
++ vlc_memcpy( p_dst, p_src,
p_picture->p[i_plane].i_visible_lines * i_src_stride );
++ }
++ }
++
++ if( vaUnmapBuffer( p_va->p_display, p_va->image.buf ) )
++ return VLC_EGENERIC;
++
++ return VLC_SUCCESS;
++}
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ int i_old;
++ int i;
++
++ /* Grab an unused surface, in case none are, try the oldest
++ * XXX using the oldest is a workaround in case a problem happens
with ffmpeg */
++ for( i = 0, i_old = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( !p_surface->i_refcount )
++ break;
++
++ if( p_surface->i_order < p_va->p_surface[i_old].i_order )
++ i_old = i;
++ }
++ if( i >= p_va->i_surface_count )
++ i = i_old;
++
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ p_surface->i_refcount = 1;
++ p_surface->i_order = p_va->i_surface_order++;
++
++ /* */
++ for( int i = 0; i < 4; i++ )
++ {
++ p_ff->data[i] = NULL;
++ p_ff->linesize[i] = 0;
++
++ if( i == 0 || i == 3 )
++ p_ff->data[i] = (void*)(uintptr_t)p_surface->i_id;/* Yummie */
++ }
++ return VLC_SUCCESS;
++}
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VASurfaceID i_surface_id = (VASurfaceID)(uintptr_t)p_ff->data[3];
++
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( p_surface->i_id == i_surface_id )
++ p_surface->i_refcount--;
++ }
++}
++
++#else
++
++vlc_va_t *VaNew( int i_codec_id )
++{
++ VLC_UNUSED(i_codec_id);
++ return NULL;
++}
++void VaDelete( vlc_va_t *p_va )
++{
++ VLC_UNUSED(p_va);
++ assert( 0 );
++}
++
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(psz_version); VLC_UNUSED(i_version);
++ assert(0);
++}
++
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(pp_hw_ctx); VLC_UNUSED(pi_chroma);
++ VLC_UNUSED(i_width); VLC_UNUSED(i_height);
++ assert(0);
++ return -1;
++}
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_picture); VLC_UNUSED(p_ff);
++ assert(0);
++ return -1;
++}
++
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_ff);
++ assert(0);
++ return -1;
++}
++
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_ff);
++ assert(0);
++}
++
++#endif
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.h
vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.h
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.h 1969-12-31
16:00:00.000000000 -0800
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.h 2009-06-19
16:31:52.000000000 -0700
+@@ -0,0 +1,43 @@
++/*****************************************************************************
++ * vaapi.h: VAAPI helpers for the ffmpeg decoder
++
*****************************************************************************
++ * Copyright (C) 2009 Laurent Aimar
++ * $Id$
++ *
++ * Authors: Laurent Aimar
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
02110-1301, USA.
++
*****************************************************************************/
++
++#ifndef _VLC_VAAPI_H
++#define _VLC_VAAPI_H 1
++
++typedef struct vlc_va_t vlc_va_t;
++
++vlc_va_t *VaNew( int i_codec_id );
++void VaDelete( vlc_va_t *p_va );
++
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version );
++
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height );
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff );
++
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff );
++
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff );
++
++#endif
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/video.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/video.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/video.c 2009-06-14
11:14:59.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/video.c 2009-06-19
16:36:25.000000000 -0700
+@@ -34,10 +34,14 @@
+ #include
+ #include /* BITMAPINFOHEADER
*/
+ #include
++#include
+
+ /* ffmpeg header */
+ #ifdef HAVE_LIBAVCODEC_AVCODEC_H
+ # include
++# ifdef HAVE_AVCODEC_VAAPI
++# include
++# endif
+ #elif defined(HAVE_FFMPEG_AVCODEC_H)
+ # include
+ #else
+@@ -45,6 +49,7 @@
+ #endif
+
+ #include "avcodec.h"
++#include "vaapi.h"
+
+
/*****************************************************************************
+ * decoder_sys_t : decoder descriptor
+@@ -85,6 +90,9 @@
+
+ /* */
+ bool b_flush;
++
++ /* VA API */
++ vlc_va_t *p_va;
+ };
+
+ /* FIXME (dummy palette for now) */
+@@ -101,6 +109,10 @@
+ static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
+ static void ffmpeg_NextPts( decoder_t * );
+
++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
++ const enum PixelFormat * );
++
++
+ static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
+ {
+ uint8_t *p = (uint8_t*)&fcc;
+@@ -115,7 +127,7 @@
+ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
+ AVCodecContext *p_context )
+ {
+- picture_t *p_pic;
++ decoder_sys_t *p_sys = p_dec->p_sys;
+
+ p_dec->fmt_out.video.i_width = p_context->width;
+ p_dec->fmt_out.video.i_height = p_context->height;
+@@ -125,10 +137,12 @@
+ return NULL; /* invalid display size */
+ }
+
+- if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) !=
VLC_SUCCESS )
++ if( !p_sys->p_va && GetVlcChroma( &p_dec->fmt_out.video,
p_context->pix_fmt ) )
+ {
+- /* we are doomed, but not really, because most codecs set their
pix_fmt much later */
+- p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
++ /* we are doomed, but not really, because most codecs set their
pix_fmt
++ * much later
++ * FIXME does it make sense here ? */
++ p_dec->fmt_out.video.i_chroma = VLC_FOURCC('I','4','2','0');
+ }
+ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
+
+@@ -166,9 +180,7 @@
+ p_dec->fmt_out.video.i_frame_rate_base = p_context->time_base.num;
+ }
+
+- p_pic = decoder_NewPicture( p_dec );
+-
+- return p_pic;
++ return decoder_NewPicture( p_dec );
+ }
+
+
/*****************************************************************************
+@@ -193,6 +205,7 @@
+ p_sys->psz_namecodec = psz_namecodec;
+ p_sys->p_ff_pic = avcodec_alloc_frame();
+ p_sys->b_delayed_open = true;
++ p_sys->p_va = NULL;
+
+ /* ***** Fill p_context with init values ***** */
+ p_sys->p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_codec
);
+@@ -319,6 +332,9 @@
+ p_sys->p_context->release_buffer = ffmpeg_ReleaseFrameBuf;
+ p_sys->p_context->opaque = p_dec;
+
++ if( var_CreateGetBool( p_dec, "ffmpeg-hw" ) )
++ p_sys->p_context->get_format = ffmpeg_GetFormat;
++
+ /* ***** misc init ***** */
+ p_sys->input_pts = p_sys->input_dts = 0;
+ p_sys->i_pts = 0;
+@@ -621,7 +637,7 @@
+ p_sys->i_late_frames = 0;
+ }
+
+- if( !b_drawpicture || !p_sys->p_ff_pic->linesize[0] )
++ if( !b_drawpicture || ( !p_sys->p_va
&& !p_sys->p_ff_pic->linesize[0] ) )
+ {
+ /* Do not display the picture */
+ p_pic = (picture_t *)p_sys->p_ff_pic->opaque;
+@@ -736,6 +752,9 @@
+
+ if( p_sys->p_ff_pic ) av_free( p_sys->p_ff_pic );
+ free( p_sys->p_buffer_orig );
++
++ if( p_sys->p_va )
++ VaDelete( p_sys->p_va );
+ }
+
+
/*****************************************************************************
+@@ -838,6 +857,14 @@
+
+ p_sys->b_delayed_open = false;
+
++ if( p_sys->p_va )
++ {
++ char psz_version[128];
++
++ VaVersion( p_sys->p_va, psz_version, sizeof(psz_version) );
++ msg_Info( p_dec, "Using VA API version %s for hardware
decoding.", psz_version );
++ }
++
+ return VLC_SUCCESS;
+ }
+
/*****************************************************************************
+@@ -849,7 +876,11 @@
+ {
+ decoder_sys_t *p_sys = p_dec->p_sys;
+
+- if( TestFfmpegChroma( p_sys->p_context->pix_fmt, -1 ) == VLC_SUCCESS )
++ if( p_sys->p_va )
++ {
++ VaExtract( p_sys->p_va, p_pic, p_ff_pic );
++ }
++ else if( TestFfmpegChroma( p_sys->p_context->pix_fmt, -1 ) ==
VLC_SUCCESS )
+ {
+ int i_plane, i_size, i_line;
+ uint8_t *p_dst, *p_src;
+@@ -899,11 +930,33 @@
+ ffmpeg_SetFrameBufferPts( p_dec, p_ff_pic );
+
+ /* */
+- p_ff_pic->opaque = 0;
++ p_ff_pic->opaque = NULL;
++
++ if( p_sys->p_va )
++ {
++ if( VaSetup( p_sys->p_va,
++ &p_sys->p_context->hwaccel_context,
&p_dec->fmt_out.video.i_chroma,
++ p_sys->p_context->width, p_sys->p_context->height ) )
++ {
++ msg_Err( p_dec, "VaSetup failed" );
++ return -1;
++ }
++
++ /* */
++ p_ff_pic->type = FF_BUFFER_TYPE_USER;
++ /* FIXME what is that, should give good value */
++ p_ff_pic->age = 256*256*256*64; // FIXME FIXME from ffmpeg
+
+- /* Not much to do in indirect rendering mode */
+- if( !p_sys->b_direct_rendering )
++ if( VaGrabSurface( p_sys->p_va, p_ff_pic ) )
++ {
++ msg_Err( p_dec, "VaGrabSurface failed" );
++ return -1;
++ }
++ return 0;
++ }
++ else if( !p_sys->b_direct_rendering )
+ {
++ /* Not much to do in indirect rendering mode */
+ return avcodec_default_get_buffer( p_context, p_ff_pic );
+ }
+
+@@ -1012,20 +1065,30 @@
+ AVFrame *p_ff_pic )
+ {
+ decoder_t *p_dec = (decoder_t *)p_context->opaque;
++ decoder_sys_t *p_sys = p_dec->p_sys;
++
++ if( p_sys->p_va )
++ {
++ VaUngrabSurface( p_sys->p_va, p_ff_pic );
+
+- if( !p_ff_pic->opaque )
++ /* */
++ for( int i = 0; i < 4; i++ )
++ p_ff_pic->data[i] = NULL;
++ }
++ else if( !p_ff_pic->opaque )
+ {
+ avcodec_default_release_buffer( p_context, p_ff_pic );
+- return;
+ }
++ else
++ {
++ picture_t *p_pic = (picture_t*)p_ff_pic->opaque;
+
+- picture_t *p_pic = (picture_t*)p_ff_pic->opaque;
+- decoder_UnlinkPicture( p_dec, p_pic );
++ decoder_UnlinkPicture( p_dec, p_pic );
+
+- p_ff_pic->data[0] = NULL;
+- p_ff_pic->data[1] = NULL;
+- p_ff_pic->data[2] = NULL;
+- p_ff_pic->data[3] = NULL;
++ /* */
++ for( int i = 0; i < 4; i++ )
++ p_ff_pic->data[i] = NULL;
++ }
+ }
+
+ static void ffmpeg_NextPts( decoder_t *p_dec )
+@@ -1052,3 +1115,53 @@
+ (2 * p_sys->p_context->time_base.den);
+ }
+ }
++
++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec,
++ const enum PixelFormat *pi_fmt )
++{
++ decoder_t *p_dec = p_codec->opaque;
++ decoder_sys_t *p_sys = p_dec->p_sys;
++
++ if( p_sys->p_va )
++ {
++ VaDelete( p_sys->p_va );
++ p_sys->p_va = NULL;
++ }
++
++ /* Try too look for a supported hw acceleration */
++ for( int i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
++ {
++ static const char *ppsz_name[PIX_FMT_NB] = {
++ [PIX_FMT_VDPAU_H264] = "PIX_FMT_VDPAU_H264",
++ [PIX_FMT_VAAPI_IDCT] = "PIX_FMT_VAAPI_IDCT",
++ [PIX_FMT_VAAPI_VLD] = "PIX_FMT_VAAPI_VLD",
++ [PIX_FMT_VAAPI_MOCO] = "PIX_FMT_VAAPI_MOCO",
++ [PIX_FMT_YUYV422] = "PIX_FMT_YUYV422",
++ [PIX_FMT_YUV420P] = "PIX_FMT_YUV420P",
++ };
++ msg_Dbg( p_dec, "Available decoder output format %d (%s)",
pi_fmt[i], ppsz_name[pi_fmt[i]] ?: "Unknown" );
++
++ /* Only VLD supported */
++ if( pi_fmt[i] == PIX_FMT_VAAPI_VLD )
++ {
++ msg_Dbg( p_dec, "Trying VA API" );
++ p_sys->p_va = VaNew( p_sys->i_codec_id );
++ if( p_sys->p_va )
++ {
++ /* FIXME this will disabled direct rendering
++ * even if a new pixel format is renegociated
++ *
++ * FIXME Try to call VaSetup when possible
++ * to detect errors when possible (later is too late) */
++ p_sys->b_direct_rendering = false;
++ p_sys->p_context->draw_horiz_band = NULL;
++ return pi_fmt[i];
++ }
++ msg_Warn( p_dec, "Failed to open VA API" );
++ }
++ }
++
++ /* Fallback to default behaviour */
++ return avcodec_default_get_format( p_codec, pi_fmt );
++}
++

http://www.blowdata4u.com

Rajkumar的头像
Quoting - raj.ece03 Quoting - blowdata4u Added:

trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch

Log:
- Added VLC VAAPI patch to the build system but did not include it in the
build.

Added:
trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch
==============================================================================
--- (empty file)
+++
trunk/gar-minimyth/script/mediaplayers/vlc/files/vlc-1.0.0-rc4-vaapi.patch

Fri Jun 19 20:35:58 2009
@@ -0,0 +1,860 @@
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.c 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.c 2009-06-19
16:31:52.000000000 -0700
+@@ -129,6 +129,9 @@
+
+ add_integer( "ffmpeg-debug", 0, NULL, DEBUG_TEXT, DEBUG_LONGTEXT,
+ true )
++#ifdef HAVE_AVCODEC_VAAPI
++ add_bool( "ffmpeg-hw", true, NULL, HW_TEXT, HW_LONGTEXT, true )
++#endif
+
+ #ifdef ENABLE_SOUT
+ /* encoder submodule */
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.h
vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.h
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/avcodec.h 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/avcodec.h 2009-06-19
16:31:52.000000000 -0700
+@@ -127,6 +127,9 @@
+ "usually has a detrimental effect on quality. However it provides a
big "
+ "speedup for high definition streams." )
+
++#define HW_TEXT N_("Hardware decoding")
++#define HW_LONGTEXT N_("This allows hardware decoding when available.")
++
+ /*
+ * Encoder options
+ */
+@@ -257,3 +260,6 @@
+ # define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
+ #endif
+
++/* Uncomment it to enable compilation with vaapi (you also must change
the build
++ * system) */
++//#define HAVE_AVCODEC_VAAPI 1
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/Modules.am
vlc-1.0.0-rc4-new/modules/codec/avcodec/Modules.am
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/Modules.am 2009-05-10
16:03:54.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/Modules.am 2009-06-19
16:31:52.000000000 -0700
+@@ -7,6 +7,7 @@
+ avutil.h
+ fourcc.c
+ chroma.c
++ vaapi.c
+ $(NULL)
+
+ if ENABLE_SOUT
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.c 1969-12-31
16:00:00.000000000 -0800
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.c 2009-06-19
16:31:52.000000000 -0700
+@@ -0,0 +1,487 @@
++/*****************************************************************************
++ * vaapi.c: VAAPI helpers for the ffmpeg decoder
++
*****************************************************************************
++ * Copyright (C) 2009 Laurent Aimar
++ * $Id$
++ *
++ * Authors: Laurent Aimar
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
02110-1301, USA.
++
*****************************************************************************/
++
++#ifdef HAVE_CONFIG_H
++# include "config.h"
++#endif
++
++#include
++#include
++#include
++
++#ifdef HAVE_LIBAVCODEC_AVCODEC_H
++# include
++# include
++#elif defined(HAVE_FFMPEG_AVCODEC_H)
++# include
++#else
++# include
++#endif
++
++#include "avcodec.h"
++#include "vaapi.h"
++
++#ifdef HAVE_AVCODEC_VAAPI
++
++#include
++#include
++
++
++typedef struct
++{
++ VASurfaceID i_id;
++ int i_refcount;
++ unsigned int i_order;
++
++} vlc_va_surface_t;
++
++struct vlc_va_t
++{
++ /* */
++ Display *p_display_x11;
++ VADisplay p_display;
++
++ VAConfigID i_config_id;
++ VAContextID i_context_id;
++
++ struct vaapi_context hw_ctx;
++
++ /* */
++ int i_version_major;
++ int i_version_minor;
++
++ /* */
++ int i_surface_count;
++ unsigned int i_surface_order;
++ int i_surface_width;
++ int i_surface_height;
++ vlc_fourcc_t i_surface_chroma;
++
++ vlc_va_surface_t *p_surface;
++
++ VAImage image;
++
++};
++
++static int VaOpen( vlc_va_t *p_va, int i_codec_id );
++static void VaClose( vlc_va_t *p_va );
++
++static int VaCreateSurfaces( vlc_va_t *p_va, void **pp_hw_ctx,
vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height );
++static void VaDestroySurfaces( vlc_va_t *p_va );
++
++vlc_va_t *VaNew( int i_codec_id )
++{
++ vlc_va_t *p_va = calloc( 1, sizeof(*p_va) );
++ if( !p_va )
++ return NULL;
++
++ if( VaOpen( p_va, i_codec_id ) )
++ {
++ free( p_va );
++ return NULL;
++ }
++ return p_va;
++}
++void VaDelete( vlc_va_t *p_va )
++{
++ VaClose( p_va );
++ free( p_va );
++}
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ if( p_va->i_surface_width == i_width &&
++ p_va->i_surface_height == i_height )
++ return VLC_SUCCESS;
++
++ *pp_hw_ctx = NULL;
++ *pi_chroma = 0;
++ if( p_va->i_surface_width || p_va->i_surface_height )
++ VaDestroySurfaces( p_va );
++
++ if( i_width > 0 && i_height > 0 )
++ return VaCreateSurfaces( p_va, pp_hw_ctx, pi_chroma, i_width,
i_height );
++
++ return VLC_EGENERIC;
++}
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version )
++{
++ snprintf( psz_version, i_version, "%d.%d", p_va->i_version_major,
p_va->i_version_minor );
++}
++
++static int VaOpen( vlc_va_t *p_va, int i_codec_id )
++{
++ VAProfile i_profile;
++ int i_surface_count;
++
++ /* */
++ switch( i_codec_id )
++ {
++ case CODEC_ID_MPEG1VIDEO:
++ case CODEC_ID_MPEG2VIDEO:
++ i_profile = VAProfileMPEG2Main;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_MPEG4:
++ i_profile = VAProfileMPEG4AdvancedSimple;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_WMV3:
++ i_profile = VAProfileVC1Main;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_VC1:
++ i_profile = VAProfileVC1Advanced;
++ i_surface_count = 2+1;
++ break;
++ case CODEC_ID_H264:
++ i_profile = VAProfileH264High;
++ i_surface_count = 16+1;
++ break;
++ default:
++ return VLC_EGENERIC;
++ }
++
++ /* */
++ memset( p_va, 0, sizeof(*p_va) );
++
++ /* Create a VA display */
++ p_va->p_display_x11 = XOpenDisplay(NULL);
++ if( !p_va->p_display_x11 )
++ goto error;
++
++ p_va->p_display = vaGetDisplay( p_va->p_display_x11 );
++ if( !p_va->p_display )
++ goto error;
++
++ if( vaInitialize( p_va->p_display, &p_va->i_version_major,
&p_va->i_version_minor ) )
++ goto error;
++
++ /* Create a VA configuration */
++ VAConfigAttrib attrib;
++ memset( &attrib, 0, sizeof(attrib) );
++ attrib.type = VAConfigAttribRTFormat;
++ if( vaGetConfigAttributes( p_va->p_display,
++ i_profile, VAEntrypointVLD, &attrib, 1 ) )
++ goto error;
++
++ /* Not sure what to do if not, I don't have a way to test */
++ if( (attrib.value & VA_RT_FORMAT_YUV420) == 0 )
++ goto error;
++ if( vaCreateConfig( p_va->p_display,
++ i_profile, VAEntrypointVLD, &attrib, 1,
&p_va->i_config_id ) )
++ {
++ p_va->i_config_id = 0;
++ goto error;
++ }
++
++ p_va->i_surface_count = i_surface_count;
++
++ return VLC_SUCCESS;
++
++error:
++ return VLC_EGENERIC;
++}
++static void VaClose( vlc_va_t *p_va )
++{
++ if( p_va->i_surface_width || p_va->i_surface_height )
++ VaDestroySurfaces( p_va );
++
++ if( p_va->i_config_id )
++ vaDestroyConfig( p_va->p_display, p_va->i_config_id );
++ if( p_va->p_display )
++ vaTerminate( p_va->p_display );
++ if( p_va->p_display_x11 )
++ XCloseDisplay( p_va->p_display_x11 );
++}
++
++static int VaCreateSurfaces( vlc_va_t *p_va, void **pp_hw_ctx,
vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ assert( i_width > 0 && i_height > 0 );
++
++ /* */
++ p_va->p_surface = calloc( p_va->i_surface_count,
sizeof(*p_va->p_surface) );
++ if( !p_va->p_surface )
++ return VLC_EGENERIC;
++
++ /* Create surfaces */
++ VASurfaceID pi_surface_id[p_va->i_surface_count];
++ if( vaCreateSurfaces( p_va->p_display, i_width, i_height,
VA_RT_FORMAT_YUV420,
++ p_va->i_surface_count, pi_surface_id ) )
++ {
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ p_va->p_surface[i].i_id = VA_INVALID_SURFACE;
++ goto error;
++ }
++
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ p_surface->i_id = pi_surface_id[i];
++ p_surface->i_refcount = 0;
++ p_surface->i_order = 0;
++ }
++
++ /* Create a context */
++ if( vaCreateContext( p_va->p_display, p_va->i_config_id,
++ i_width, i_height, VA_PROGRESSIVE,
++ pi_surface_id, p_va->i_surface_count,
&p_va->i_context_id ) )
++ {
++ p_va->i_context_id = 0;
++ goto error;
++ }
++
++ /* Find a supported image chroma */
++ int i_fmt_count = vaMaxNumImageFormats( p_va->p_display );
++ VAImageFormat *p_fmt = calloc( i_fmt_count, sizeof(*p_fmt) );
++ if( !p_fmt )
++ goto error;
++
++ if( vaQueryImageFormats( p_va->p_display, p_fmt, &i_fmt_count ) )
++ {
++ free( p_fmt );
++ goto error;
++ }
++
++ vlc_fourcc_t i_chroma = 0;
++ VAImageFormat fmt;
++ for( int i = 0; i < i_fmt_count; i++ )
++ {
++ if( p_fmt[i].fourcc == VA_FOURCC( 'Y', 'V', '1', '2' ) ||
++ p_fmt[i].fourcc == VA_FOURCC( 'I', '4', '2', '0' ) )
++ {
++ i_chroma = VLC_FOURCC( 'I', '4', '2', '0' );
++ fmt = p_fmt[i];
++ }
++ /* TODO: It seems that these may also be available (but not
++ * with my setup):
++ * VA_FOURCC( 'N', 'V', '1', '2')
++ * VA_FOURCC( 'U', 'Y', 'V', 'Y')
++ * VA_FOURCC( 'Y', 'U', 'Y', 'V')
++ */
++ }
++ free( p_fmt );
++ if( !i_chroma )
++ goto error;
++ *pi_chroma = i_chroma;
++
++ /* Create an image for surface extraction */
++ if( vaCreateImage( p_va->p_display, &fmt, i_width, i_height,
&p_va->image ) )
++ {
++ p_va->image.image_id = 0;
++ goto error;
++ }
++
++ /* Setup the ffmpeg hardware context */
++ *pp_hw_ctx = &p_va->hw_ctx;
++
++ memset( &p_va->hw_ctx, 0, sizeof(p_va->hw_ctx) );
++ p_va->hw_ctx.display = p_va->p_display;
++ p_va->hw_ctx.config_id = p_va->i_config_id;
++ p_va->hw_ctx.context_id = p_va->i_context_id;
++
++ /* */
++ p_va->i_surface_chroma = i_chroma;
++ p_va->i_surface_width = i_width;
++ p_va->i_surface_height = i_height;
++ return VLC_SUCCESS;
++
++error:
++ VaDestroySurfaces( p_va );
++ return VLC_EGENERIC;
++}
++static void VaDestroySurfaces( vlc_va_t *p_va )
++{
++ if( p_va->image.image_id )
++ vaDestroyImage( p_va->p_display, p_va->image.image_id );
++
++ if( p_va->i_context_id )
++ vaDestroyContext( p_va->p_display, p_va->i_context_id );
++
++ for( int i = 0; i < p_va->i_surface_count && p_va->p_surface; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( p_surface->i_id != VA_INVALID_SURFACE )
++ vaDestroySurfaces( p_va->p_display, &p_surface->i_id, 1 );
++ }
++ free( p_va->p_surface );
++
++ /* */
++ p_va->image.image_id = 0;
++ p_va->i_context_id = 0;
++ p_va->p_surface = NULL;
++ p_va->i_surface_width = 0;
++ p_va->i_surface_height = 0;
++}
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff )
++{
++ VASurfaceID i_surface_id = (VASurfaceID)(uintptr_t)p_ff->data[3];
++
++ if( vaSyncSurface( p_va->p_display, p_va->i_context_id, i_surface_id
) )
++ return VLC_EGENERIC;
++
++ /* XXX vaDeriveImage may be better but it is not supported by
++ * my setup.
++ */
++
++ if( vaGetImage( p_va->p_display, i_surface_id,
++ 0, 0, p_va->i_surface_width, p_va->i_surface_height,
++ p_va->image.image_id) )
++ return VLC_EGENERIC;
++
++ void *p_base;
++ if( vaMapBuffer( p_va->p_display, p_va->image.buf, &p_base ) )
++ return VLC_EGENERIC;
++
++ for( int i_plane = 0; i_plane < p_picture->i_planes; i_plane++ )
++ {
++ const int i_src_plane = ((p_va->image.format.fourcc ==
VA_FOURCC('Y','V','1','2' )) && i_plane != 0) ? (3 - i_plane) : i_plane;
++ const uint8_t *p_src = (uint8_t*)p_base +
p_va->image.offsets[i_src_plane];
++ const int i_src_stride = p_va->image.pitches[i_src_plane];
++
++ uint8_t *p_dst = p_picture->p[i_plane].p_pixels;
++ const int i_dst_stride = p_picture->p[i_plane].i_pitch;
++
++ if( i_src_stride != i_dst_stride )
++ {
++ for( int i = 0; i < p_picture->p[i_plane].i_visible_lines;
i++ )
++ {
++ vlc_memcpy( p_dst, p_src, __MIN( i_src_stride,
i_dst_stride ) );
++ p_src += i_src_stride;
++ p_dst += i_dst_stride;
++ }
++ }
++ else
++ {
++ vlc_memcpy( p_dst, p_src,
p_picture->p[i_plane].i_visible_lines * i_src_stride );
++ }
++ }
++
++ if( vaUnmapBuffer( p_va->p_display, p_va->image.buf ) )
++ return VLC_EGENERIC;
++
++ return VLC_SUCCESS;
++}
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ int i_old;
++ int i;
++
++ /* Grab an unused surface, in case none are, try the oldest
++ * XXX using the oldest is a workaround in case a problem happens
with ffmpeg */
++ for( i = 0, i_old = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( !p_surface->i_refcount )
++ break;
++
++ if( p_surface->i_order < p_va->p_surface[i_old].i_order )
++ i_old = i;
++ }
++ if( i >= p_va->i_surface_count )
++ i = i_old;
++
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ p_surface->i_refcount = 1;
++ p_surface->i_order = p_va->i_surface_order++;
++
++ /* */
++ for( int i = 0; i < 4; i++ )
++ {
++ p_ff->data[i] = NULL;
++ p_ff->linesize[i] = 0;
++
++ if( i == 0 || i == 3 )
++ p_ff->data[i] = (void*)(uintptr_t)p_surface->i_id;/* Yummie */
++ }
++ return VLC_SUCCESS;
++}
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VASurfaceID i_surface_id = (VASurfaceID)(uintptr_t)p_ff->data[3];
++
++ for( int i = 0; i < p_va->i_surface_count; i++ )
++ {
++ vlc_va_surface_t *p_surface = &p_va->p_surface[i];
++
++ if( p_surface->i_id == i_surface_id )
++ p_surface->i_refcount--;
++ }
++}
++
++#else
++
++vlc_va_t *VaNew( int i_codec_id )
++{
++ VLC_UNUSED(i_codec_id);
++ return NULL;
++}
++void VaDelete( vlc_va_t *p_va )
++{
++ VLC_UNUSED(p_va);
++ assert( 0 );
++}
++
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(psz_version); VLC_UNUSED(i_version);
++ assert(0);
++}
++
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(pp_hw_ctx); VLC_UNUSED(pi_chroma);
++ VLC_UNUSED(i_width); VLC_UNUSED(i_height);
++ assert(0);
++ return -1;
++}
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_picture); VLC_UNUSED(p_ff);
++ assert(0);
++ return -1;
++}
++
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_ff);
++ assert(0);
++ return -1;
++}
++
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff )
++{
++ VLC_UNUSED(p_va); VLC_UNUSED(p_ff);
++ assert(0);
++}
++
++#endif
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.h
vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.h
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/vaapi.h 1969-12-31
16:00:00.000000000 -0800
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/vaapi.h 2009-06-19
16:31:52.000000000 -0700
+@@ -0,0 +1,43 @@
++/*****************************************************************************
++ * vaapi.h: VAAPI helpers for the ffmpeg decoder
++
*****************************************************************************
++ * Copyright (C) 2009 Laurent Aimar
++ * $Id$
++ *
++ * Authors: Laurent Aimar
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
02110-1301, USA.
++
*****************************************************************************/
++
++#ifndef _VLC_VAAPI_H
++#define _VLC_VAAPI_H 1
++
++typedef struct vlc_va_t vlc_va_t;
++
++vlc_va_t *VaNew( int i_codec_id );
++void VaDelete( vlc_va_t *p_va );
++
++void VaVersion( vlc_va_t *p_va, char *psz_version, size_t i_version );
++
++int VaSetup( vlc_va_t *p_va, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,
++ int i_width, int i_height );
++
++int VaExtract( vlc_va_t *p_va, picture_t *p_picture, AVFrame *p_ff );
++
++int VaGrabSurface( vlc_va_t *p_va, AVFrame *p_ff );
++
++void VaUngrabSurface( vlc_va_t *p_va, AVFrame *p_ff );
++
++#endif
+diff -Naur vlc-1.0.0-rc4-old/modules/codec/avcodec/video.c
vlc-1.0.0-rc4-new/modules/codec/avcodec/video.c
+--- vlc-1.0.0-rc4-old/modules/codec/avcodec/video.c 2009-06-14
11:14:59.000000000 -0700
++++ vlc-1.0.0-rc4-new/modules/codec/avcodec/video.c 2009-06-19
16:36:25.000000000 -0700
+@@ -34,10 +34,14 @@
+ #include
+ #include /* BITMAPINFOHEADER
*/
+ #include
++#include
+
+ /* ffmpeg header */
+ #ifdef HAVE_LIBAVCODEC_AVCODEC_H
+ # include
++# ifdef HAVE_AVCODEC_VAAPI
++# include
++# endif
+ #elif defined(HAVE_FFMPEG_AVCODEC_H)
+ # include
+ #else
+@@ -45,6 +49,7 @@
+ #endif
+
+ #include "avcodec.h"
++#include "vaapi.h"
+
+
/*****************************************************************************
+ * decoder_sys_t : decoder descriptor
+@@ -85,6 +90,9 @@
+
+ /* */
+ bool b_flush;
++
++ /* VA API */
++ vlc_va_t *p_va;
+ };
+
+ /* FIXME (dummy palette for now) */
+@@ -101,6 +109,10 @@
+ static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
+ static void ffmpeg_NextPts( decoder_t * );
+
++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
++ const enum PixelFormat * );
++
++
+ static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
+ {
+ uint8_t *p = (uint8_t*)&fcc;
+@@ -115,7 +127,7 @@
+ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
+ AVCodecContext *p_context )
+ {
+- picture_t *p_pic;
++ decoder_sys_t *p_sys = p_dec->p_sys;
+
+ p_dec->fmt_out.video.i_width = p_context->width;
+ p_dec->fmt_out.video.i_height = p_context->height;
+@@ -125,10 +137,12 @@
+ return NULL; /* invalid display size */
+ }
+
+- if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) !=
VLC_SUCCESS )
++ if( !p_sys->p_va && GetVlcChroma( &p_dec->fmt_out.video,
p_context->pix_fmt ) )
+ {
+- /* we are doomed, but not really, because most codecs set their
pix_fmt much later */
+- p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
++ /* we are doomed, but not really, because most codecs set their
pix_fmt
++ * much later
++ * FIXME does it make sense here ? */
++ p_dec->fmt_out.video.i_chroma = VLC_FOURCC('I','4','2','0');
+ }
+ p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
+
+@@ -166,9 +180,7 @@
+ p_dec->fmt_out.video.i_frame_rate_base = p_context->time_base.num;
+ }
+
+- p_pic = decoder_NewPicture( p_dec );
+-
+- return p_pic;
++ return decoder_NewPicture( p_dec );
+ }
+
+
/*****************************************************************************
+@@ -193,6 +205,7 @@
+ p_sys->psz_namecodec = psz_namecodec;
+ p_sys->p_ff_pic = avcodec_alloc_frame();
+ p_sys->b_delayed_open = true;
++ p_sys->p_va = NULL;
+
+ /* ***** Fill p_context with init values ***** */
+ p_sys->p_context->codec_tag = ffmpeg_CodecTag( p_dec->fmt_in.i_codec
);
+@@ -319,6 +332,9 @@
+ p_sys->p_context->release_buffer = ffmpeg_ReleaseFrameBuf;
+ p_sys->p_context->opaque = p_dec;
+
++ if( var_CreateGetBool( p_dec, "ffmpeg-hw" ) )
++ p_sys->p_context->get_format = ffmpeg_GetFormat;
++
+ /* ***** misc init ***** */
+ p_sys->input_pts = p_sys->input_dts = 0;
+ p_sys->i_pts = 0;
+@@ -621,7 +637,7 @@
+ p_sys->i_late_frames = 0;
+ }
+
+- if( !b_drawpicture || !p_sys->p_ff_pic->linesize[0] )
++ if( !b_drawpicture || ( !p_sys->p_va
&& !p_sys->p_ff_pic->linesize[0] ) )
+ {
+ /* Do not display the picture */
+ p_pic = (picture_t *)p_sys->p_ff_pic->opaque;
+@@ -736,6 +752,9 @@
+
+ if( p_sys->p_ff_pic ) av_free( p_sys->p_ff_pic );
+ free( p_sys->p_buffer_orig );
++
++ if( p_sys->p_va )
++ VaDelete( p_sys->p_va );
+ }
+
+
/*****************************************************************************
+@@ -838,6 +857,14 @@
+
+ p_sys->b_delayed_open = false;
+
++ if( p_sys->p_va )
++ {
++ char psz_version[128];
++
++ VaVersion( p_sys->p_va, psz_version, sizeof(psz_version) );
++ msg_Info( p_dec, "Using VA API version %s for hardware
decoding.", psz_version );
++ }
++
+ return VLC_SUCCESS;
+ }
+
/*****************************************************************************
+@@ -849,7 +876,11 @@
+ {
+ decoder_sys_t *p_sys = p_dec->p_sys;
+
+- if( TestFfmpegChroma( p_sys->p_context->pix_fmt, -1 ) == VLC_SUCCESS )
++ if( p_sys->p_va )
++ {
++ VaExtract( p_sys->p_va, p_pic, p_ff_pic );
++ }
++ else if( TestFfmpegChroma( p_sys->p_context->pix_fmt, -1 ) ==
VLC_SUCCESS )
+ {
+ int i_plane, i_size, i_line;
+ uint8_t *p_dst, *p_src;
+@@ -899,11 +930,33 @@
+ ffmpeg_SetFrameBufferPts( p_dec, p_ff_pic );
+
+ /* */
+- p_ff_pic->opaque = 0;
++ p_ff_pic->opaque = NULL;
++
++ if( p_sys->p_va )
++ {
++ if( VaSetup( p_sys->p_va,
++ &p_sys->p_context->hwaccel_context,
&p_dec->fmt_out.video.i_chroma,
++ p_sys->p_context->width, p_sys->p_context->height ) )
++ {
++ msg_Err( p_dec, "VaSetup failed" );
++ return -1;
++ }
++
++ /* */
++ p_ff_pic->type = FF_BUFFER_TYPE_USER;
++ /* FIXME what is that, should give good value */
++ p_ff_pic->age = 256*256*256*64; // FIXME FIXME from ffmpeg
+
+- /* Not much to do in indirect rendering mode */
+- if( !p_sys->b_direct_rendering )
++ if( VaGrabSurface( p_sys->p_va, p_ff_pic ) )
++ {
++ msg_Err( p_dec, "VaGrabSurface failed" );
++ return -1;
++ }
++ return 0;
++ }
++ else if( !p_sys->b_direct_rendering )
+ {
++ /* Not much to do in indirect rendering mode */
+ return avcodec_default_get_buffer( p_context, p_ff_pic );
+ }
+
+@@ -1012,20 +1065,30 @@
+ AVFrame *p_ff_pic )
+ {
+ decoder_t *p_dec = (decoder_t *)p_context->opaque;
++ decoder_sys_t *p_sys = p_dec->p_sys;
++
++ if( p_sys->p_va )
++ {
++ VaUngrabSurface( p_sys->p_va, p_ff_pic );
+
+- if( !p_ff_pic->opaque )
++ /* */
++ for( int i = 0; i < 4; i++ )
++ p_ff_pic->data[i] = NULL;
++ }
++ else if( !p_ff_pic->opaque )
+ {
+ avcodec_default_release_buffer( p_context, p_ff_pic );
+- return;
+ }
++ else
++ {
++ picture_t *p_pic = (picture_t*)p_ff_pic->opaque;
+
+- picture_t *p_pic = (picture_t*)p_ff_pic->opaque;
+- decoder_UnlinkPicture( p_dec, p_pic );
++ decoder_UnlinkPicture( p_dec, p_pic );
+
+- p_ff_pic->data[0] = NULL;
+- p_ff_pic->data[1] = NULL;
+- p_ff_pic->data[2] = NULL;
+- p_ff_pic->data[3] = NULL;
++ /* */
++ for( int i = 0; i < 4; i++ )
++ p_ff_pic->data[i] = NULL;
++ }
+ }
+
+ static void ffmpeg_NextPts( decoder_t *p_dec )
+@@ -1052,3 +1115,53 @@
+ (2 * p_sys->p_context->time_base.den);
+ }
+ }
++
++static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_codec,
++ const enum PixelFormat *pi_fmt )
++{
++ decoder_t *p_dec = p_codec->opaque;
++ decoder_sys_t *p_sys = p_dec->p_sys;
++
++ if( p_sys->p_va )
++ {
++ VaDelete( p_sys->p_va );
++ p_sys->p_va = NULL;
++ }
++
++ /* Try too look for a supported hw acceleration */
++ for( int i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
++ {
++ static const char *ppsz_name[PIX_FMT_NB] = {
++ [PIX_FMT_VDPAU_H264] = "PIX_FMT_VDPAU_H264",
++ [PIX_FMT_VAAPI_IDCT] = "PIX_FMT_VAAPI_IDCT",
++ [PIX_FMT_VAAPI_VLD] = "PIX_FMT_VAAPI_VLD",
++ [PIX_FMT_VAAPI_MOCO] = "PIX_FMT_VAAPI_MOCO",
++ [PIX_FMT_YUYV422] = "PIX_FMT_YUYV422",
++ [PIX_FMT_YUV420P] = "PIX_FMT_YUV420P",
++ };
++ msg_Dbg( p_dec, "Available decoder output format %d (%s)",
pi_fmt[i], ppsz_name[pi_fmt[i]] ?: "Unknown" );
++
++ /* Only VLD supported */
++ if( pi_fmt[i] == PIX_FMT_VAAPI_VLD )
++ {
++ msg_Dbg( p_dec, "Trying VA API" );
++ p_sys->p_va = VaNew( p_sys->i_codec_id );
++ if( p_sys->p_va )
++ {
++ /* FIXME this will disabled direct rendering
++ * even if a new pixel format is renegociated
++ *
++ * FIXME Try to call VaSetup when possible
++ * to detect errors when possible (later is too late) */
++ p_sys->b_direct_rendering = false;
++ p_sys->p_context->draw_horiz_band = NULL;
++ return pi_fmt[i];
++ }
++ msg_Warn( p_dec, "Failed to open VA API" );
++ }
++ }
++
++ /* Fallback to default behaviour */
++ return avcodec_default_get_format( p_codec, pi_fmt );
++}
++

http://www.blowdata4u.com

Hi Thanq for your reply

but i am trying with MPlayer not with vlc.

duzyatko2yahoo.com的头像

Thanks for the good opportunity to learn from you posts.
regards
online essay service

hope2010s的头像

I have always wanted an iPod classic, but the price was really scary. I dont think I can afford that in the recent 3 months. So the only thing I did was taking my boyfriend to the iPod store "by Accident", then I almost looked at that iPod for 2 minutes, I guess he got my intention, so the next thing I did was waiting. I have to say that I am not proud of that, but I dont do that a lot, I only do it when I really like something and the price is way too high for me. All I need to do is going to the store with my BF accidently and staring at the thing I want, then, I know it will just show up when we have dinner or watching movie at home. It works all the time. So I was not surprised that the iPod I wanted for so long was lying in my Christmas socks. I like so much, and its capacity is like 160Gega Bytes. I can put all the things I like watching and listening in it. But I have to say I am really not good at electronic products, I copied all the things I like from my blue ray DVD to my iPod, but it didn't work, I couldn't play them. That really drove me crazy, I have to ask help from my boyfriend. Since he was working when I called him, he didn't answer, instead, he sent me a website address:http://www.besthdsoft.com.

I checked it, surprisingly, I found something is just designed for converting blu-ray to iPod. I was really excited about that, plus they were having 15% off discount at that time. What I also like about that BestHDsoft website was that the instruction was really useful for someone like me who knows nothing about electronic products, they even have images guiding people how to do it step by step. After I read those detail instructions, I decided to get one for myself. Now I am
always busy with watching the latest movies and listening to my favorite music, I guess my boyfriend is actually getting jealous because I spend so much time with my
iPod.

More info you can visit: http://www.besthdsoft.com

More Blu-ray Ripper software reviews: http://blurayripper.blogspot.com/

More Related Products :Blu-Ray Ripper, Blu-Ray To AVI, Blu-Ray To iPod, Blu-Ray To MP3, Blu-Ray To MP4, Blu-Ray To MPEG, Blu-Ray To PS3, Blu-Ray To WMV, Blu-Ray To HD Video.

carlhop85的头像

Hello,

I am Carl.This is my first visit to site.I am new to this site,but Ive enjoyed posting in your forums.I like your defination.You are doing very great work.In feature it will be benifited to all members.

Thank you very much and Stay connected with me.

r4i
gressy的头像

hi iam gerssy this is my first visit to site .Thanks for your information and good dafination.

greentea09的头像

Now many people own Sony Blue Ray Disc and want to extract it on computer movie clips or want to enjoy them on iPod or iPhone.but there are a lot of people don't know Where to find a best iPod converter and how to convert blue ray to MP4(iPod support MP4,H264 format)?Now I recommend you this Blue Ray to iPod converter-BestHD Blu-ray to iPod converter,It don't only support Blu-ray to iPod conversion.but also support general dvd to iPod conversion .This article can tell you how to convert blue ray to iPod.

Question: I have many Sony blue ray Disc and want to enjoy it on my iPod anywhere and anyway.
Answers:You need to convert and rip blue ray DVD to MP4 formats supported by iPod with a Blue Ray Ripper.

This guide tells you how to convert blue ray to iPod with Blue Ray Ripper or general DVD!

Software: BestHD blu-ray to iPod converter

How to transfer blu-ray disc movie to iPod with Blu-ray to iPod converter?

Step 1: Import Blu-Ray or general DVD
Click File->Add Blu-Ray/DVD or directly Click "Add Blu-ray" button to load Blu-Ray/ DVD into Blu-Ray To iPod Converter, the file titles would be shown in the information list.

Step 2: Select output format

Click "Profile" drop-down list to choose output format .

Step 3: Adjust video settings
Switch to Tools->Settings panel or directly Click "Settings" button , you can adjust the video size, video quality, channel, audio quality, and specify the output path. Click OK to confirm the settings.

Step 4: Rip Blu-ray DVD
Click Action->convert or directly Click "Start" button to start convert you'll see the ripping process of Blu-ray to the format supported by iPod with amazing speed. A moment later, you'll get your satisfactory conversion.

So if you want to share your Blu-Ray and general DVD movie or music on your iPod and capture the beuatilful pictures of movie, just use this software. What more you can get a discount if you buy it here:http://www.besthdsoft.com/order/blueraytoipod.html ,also you can download it here and just enjoy it. Good luck!

greentea09的头像

This is the step by step guide of BestHD Blu Ray To WMV Ripper to show you how to convert Blu-ray disc to WMV.

Blu-ray Disc (also known as Blu-ray or BD) is an optical disc storage medium designed to supersede the standard DVD format. Its main uses are for storing high-definition video, PlayStation 3 games, and other data, with up to 25 GB per single layered, and 50 GB per dual layered disc. The disc has the same physical dimensions as standard DVDs and CDs

How to convert Blu-ray to WMV file format and rip Bluray movies to WMV videos? You've come to the right place! The following Bluray to WMV ripper software and shareware can help you remove Blu ray AACS encryption, region codes and BD+ copy protection, and convert Blu-ray to WMV, rip Blu-ray to WMV movie with fast conversion speed. Just check this following blu-ray movie to WMV ripping guide now.

BestHD Blu-ray To WMV Converter allows you to preview the movie before converting, clip any movie segment freely and simply, snapshot the images in preview, shut down the computer automatically after converting finished, convert files in batches, etc.

http://www.besthdsoft.com/blu-ray-to-wmv-converter.html

Blu-ray To WMV Converter Official Site || Blu-ray To WMV Converter Guide

In this interface you can conduct a variety of operations such as setting the begin and end time for the conversion through the preview window capture the beuatilful pictures of movie setting the output parameter and more. Now ,let us explain step-by-step.

Step 1: Import Blu-Ray DVD or general DVD
Click File->Add Blu-Ray/DVD or directly Click "Add Blu-ray" button to load Blu-Ray/ DVD into Blu-Ray To WMV Converter, the file titles would be shown in the information list.

Step 2: Adjust video settings
Switch to Tools->Settings panel or directly Click "Settings" button , you can adjust the video size, video quality, channel, audio quality, and specify the output path. Click OK to confirm the settings.

Step 3: Rip Blu-ray DVD
Click Action->convert or directly Click "Start" button to start convert you'll see the ripping process of Blu-ray to the format which you need with amazing speed. A moment later, you'll get your satisfactory conversion.

Blu-ray to WMV Converter FREE Download

How To Rip Blu-ray To PSP

How To Rip Blu-ray To AVI

How To Rip Blu-ray To HD Video

gavin904的头像

Tnx for the information. I will start converting now.
RegCure Review

sarajohnson的头像

Great Software...

greentea09的头像

This is the step by step guide of BestHD Blu Ray To MP3 Converter/Ripper to show you how to convert blu ray disc to MP3

BestHD Blu-ray To MP3 Converter

Blu-Ray DVD To MP3 converter can help you share your Blu-Ray on more devices, like iPod, iPhone, MP3 player.

Blu-ray To MP3 Converter Extract your blu-ray disks (BD) or DVDs to MP3, WAV, WMA, OGG, AAC, AC3, M4A, MP2, AIFF, AU, etc., and supports shutting down the computer automatically, etc.

Set the begin and end time when you preview the file. Support batch and segment conversion. More settings for you to opt.

Click Here Blu-ray To MP3 Converter Official Site || Click Here Blu-ray To MP3 Converter Guide

http://www.besthdsoft.com/Guide/bluraytomp3guide.html

In this interface you can conduct a variety of operations such as setting the begin and end time for the conversion through the preview window ,capture the beuatilful pictures of movie,setting the output parameter and more. Now ,let us explain step-by-step.

Step 1: Import Blu-Ray or general DVD
Click File->Add Blu-Ray/DVD or directly Click "Add Blu-ray " button to load Blu-Ray/ DVD into Blu-Ray to MP3 Converter, the file titles would be shown in the information list.

Step 2: Select output format

Click "Profile" drop-down list to choose output format .

Step 3: Adjust video settings
Switch to Tools->Settings panel or directly Click "Settings" button , you can adjust the video size, video quality, channel, audio quality, and specify the output path. Click OK to confirm the settings.

Step 4: Rip Blu-ray DVD
Click Action->convert or directly Click "Start" button to start convert you'll see the ripping process of Blu-ray to the format which you need with amazing speed. A moment later, you'll get your satisfactory conversion.

BestHD Bluray to MP3 Converter FREE Download

BestHD Blu-Ray Ripper

Blu-Ray To AVI Converter

Blu-Ray To MPEG Converter

greentea09的头像

This is the step by step guide of BestHD Blu Ray To MPEG Ripper to show you how to convert Blu-ray disc to MPEG.

1. Free download at: BestHD Blu Ray To MPEG Ripper, install and launch.

The versatile Blu-ray to MPEG, Blu-ray to MPEG1, Blu-ray to MPEG2, Blu-ray to MPEG4 converter can help you convert among almost all key formats, edit blu-ray video, and burn DVD.

2. Load the Blu-ray movie files that you would like to rip by clicking on the 'Add Blu-ray.' button.

3.Click "Profile" drop-down list to choose output format.

4. Switch to Tools->Settings panel or directly Click "Settings" button , you can adjust the video size, video quality, channel, audio quality, and specify the output path. Click OK to confirm the settings.

5. Click on the 'Start' button. After a while, the software will rip Blu-ray DVD to MPEG format for you.

Bluray to MPEG Converter FREE Download

Blu-Ray Ripper

Blu-Ray To AVI Converter

Blu-Ray To MPEG Converter

zholy的头像

Michael Joseph Jackson, often referred to as The King of Pop, is the biggest-selling solo artist of all time, with over 750,000,000 sales. Jackson is an inductee of the Songwriters Hall of Fame, and double inductee to the Rock & Roll Hall of Fame. His awards include 8 Guinness World Records, 13 Grammy Awards, and 26 Billboard Awards.

When he passed away in the summer of 2009, Michael Jackson was in the midst of rehearsals for his final tour, an ambitious 50-date engagement It's hard not to watch This Is It without feeling a mixture of sorrow and elation.

"I never heard a single word about you,
Falling in love with you wasn't my plan
I never thought I would be your lover
C'mon just understand. this is it."
-- Michael Jackson "This Is It"

We love MJ so much and would like to watch "This Is It" when and where we want. I feel that one of the best way is rip it onto our iPod and iPhone. So I wrote this tutorial, hope it's helpful for all of you.

Things you'll need
1. Aneesoft* Pro
2. "This Is It" DVD video files

Step 1: Download & install Aneesoft* Pro
Download the free trial version, launch setup and follow instructions on screen. Using Aneesoft* Pro to rip and convert This Is It to MP4 video format is just moments away!

Step 2: Run Aneesoft* Pro and load the DVD to convert
Run* Pro in the following main widow, click "Load..." button on the toolbar to add "This Is It".

Step 3: Edit it (optional): crop, trim, add effects, add watermark
Trim Video:
You can capture your favorite video clips. Select the video, and then click the "Edit" button on the top. An Edit window will be prompted. Click the Start Point and End Point to keep your favourite parts of video in Aneesoft* Pro.

Crop Video:
Want to watch it in full screen, you may crop this videos to remove the black edges around it with this* Pro. Click "Crop" tab to open the Crop Video window, then check the "Enable Crop" option box. There are two methods availbale to crop the video: crop by a adjusting the crop frame and crop by setting the crop values. After you select an output aspect ratio and finish the crop, you can preview the final visual effect on the right "Output Preview" in real-time.

Set Effect:
If you want to adjust the video effect of it, you can click the "Effect" tab and then check "Enable Effect" option box. Drag each effect adjustment slider to set the video brightness and contrast. You can also choose a special effect from the Effect drop-down list to apply to it.

Add Watermark:
If you want to add watermark, you can click "Watermark" tab and then check "Enable Effect" option box. You may add Text or Image watermark onto it. If you want to add Text watermark for "This is it", like "I love you ! MJ !", click the Color or Font button to set the color and font your text. Drag and drop the text to anywhere you want. If you want to add image watermark, just check the Image option and select the image you want to add as watermark.

Step 4: Output Setup
Choose the most suitable output settings you want.

Step 5: Start ripping and converting DVD to MP4 video
Finally, click the big "Start" button to start converting it to MP4 video. Now, you can upload it onto your iPod or iPhone, and MJ will always be with you.

sarah-anne的头像
Quoting gressy
hi iam gerssy this is my first visit to site .Thanks for your information and good dafination.

me too this is my first time visiting this site and thank you for you have answered my questions.

Fashion is what you adopt in times you dont know who you are.

页面

登陆并发表评论。