MP3 playback issues with DirectX when MP3 has album art encoded - delphi

I'm using the Clootie DirectShow9 headers with Delphi 2007. I created a wrapper component that plays audio and video. All is good until I get an MP3 that has album art encoded in it. The mp3 files like this just will not play. I do not get an error message from my code when I call pMediaControl.Run;. pMediaControl is IMediaControl. They just do not start playing. I many other MP3 files that are not encoded with album art and they play fine. There must be something I'm missing but I cannot figure it out.
These art encoded mp3 files play OK in WMP and Winamp on the same PC.
Can someone shed some light on this for me?
Thanks

I have also hit that one (or was it VFW_E_UNSUPPORTED_STREAM).
It's because the metadata is currupted, or when the image-size is very big.
(editing the Tag in Winamp sometimes helps)

I read a little about Media Foundation and it and look like it is available only on Vista and up. I need Windows XP support for now.
I'm going to use the bass.dll and the delphi wrapper unit. I've done some testing already and all my problem mp3 files play with bass.
I wanted to stay away from using a third party component / dll but my time to finish this project is getting slim.
http://www.un4seen.com
The download includes many Delphi samples. So far the library has worked great.

Related

How to make a basic Media player to play a video in avi format?

I want to play a video in Delphi.
This is the code that I've got:
if OpenDialog1.Execute then
begin
MediaPlayer1.FileName:=OpenDialog1.FileName;
MediaPlayer1.Open;
MediaPlayer1.Display:=pnlVideo;
MediaPlayer1.Play;
end;
But I get an error message:'The specified file cannot be played on the specified MCI device.The file may be corrupt, not in the correct format or no available file handler available for this format.'
The format of the video that I use is avi.
All help is appreciated.
There is a compatibility issue with the media player component in Delphi on our "modern" computers. I'm not tech savvy on what exactly the problem is :P. It is best to make your own component in Delphi to play media.
This link can help you make a Windows Media Player component, or you can adjust it to make another active X media player component - such as VLC.
https://chapmanworld.com/windows-media-player-in-delphi/
I hope this will help. :D

PPTx with embedded video play on iOS

I am making an application which should be able to play any videos embedded in a PPTx. Currently using Quicklook Framework for iOS I am able to see the text or any images but not able to play the video. I thought of one solution as, Converting the PPTx to zip and then parse the XML files to give the video and then play, which doesn't look very practical as it needs to be done for every file where the structure keeps changing with very slide/PPT Slideshark is able to play videos embedded in a PPT. Any Ideas on how to achieve this ?
Converting PPTs into HTML5 is one of the solution.

How to copy audio stream using FFMpeg API ( not a command line tool )

I'm developing some Video Editing Apps on Android.
the objective of the app is "Editing Videos on Android".
and...
I'm just completed making video file using some images.
but.. I can't attach audio into the video.
my method is same as follows.
1.VideoStream, audio stream creation using AVFormatContext
2.Movie encoding in video stream was successful
3.Encode codec open in audio stream was successful
4.Set sample format to AV_SAMPLE_FMT_FLTP
5.Sample rate and channel was set same as source audio
6.Choose appropriate Decoder and read packet
7.Convert packets using swr_converter, setting same as sample format
8.Encode converted data
9.memory deallocation
10.END!
Problem is here:
Video of finally created video file was normally played. but the Audio wasn't.
It heared like weird. It have many noises and plays slowly.
I've googled with many keywords but they only say about "FFmpeg command line usage".
I wanna make with FFMpeg API. not a Command line tool.
Please help.
Your question is vague without some kind of code to go along with it, as trust me there are a lot of things that can go wrong when using ffmpeg's libraries directly (and on Windows there is no debuging). Unfortunately ffmpeg's libraries are not well documented so it is generally best to read the source code for ffmpeg in order to use its libraries. Find the equivalent command line options to perform what you want and track that through ffmpeg's source to see the library calls.

MediaPlayer.Play method throwing DRM exception?!

I'm trying to add background music to my XNA 4-based Windows game. When I do
Song bgm = Content.Load<Song>("bgm");
MediaPlayer.Play(bgm);
in the MyGame.LoadContent method, I get an InvalidOperationException with the message "Song playback failed. Please verify that the song is not DRM protected. DRM protected songs are not supported for creator games." The song is in MP3 format and is not protected. I tried using a WAV instead and the result was the same.
It seems I'm not the only one having this problem. But the closest thing I've found to a solution is "use XACT".
Any ideas?
Edit: Also, why is my code snippet not syntax highlighted? It's highlighted in preview.
The problem in my case was that I had uninstalled Windows Media Player. For what it's worth, I'm running Windows 7 Professional 64-bit. I reinstalled WMP via the Windows Features dialog and the problem went away immediately. I didn't even have to restart.
The problem for me was that I was missing the ID_CAP_MEDIALIB capability in my WMAppManifest.xml.
<Capability Name="ID_CAP_MEDIALIB"/>
Hope this helps.

Buffering in Blackberry

Currently I am working on the application for which I have to use audio buffering. Please tell me how I can achieve this task as I am trying myself.
read this Buffer and play streamed media
Also, there's a great example in the Blackberry SDK, which shows buffered playback of a MP3 file.
Take a look in the 'samples' folder of JDE/Eclipse Plugin.

Resources