How do you display audio files like an imagepicker? I'm using the MPMediaplayer class but I can't get it to work. My requirement is to click on a tableviewcell, and have audio files appear like an imagepicker.
simple get the path of all audio files. and parse the name only from the path. store all the names in array and display in UITableView. just read about how to use nsfilemanager.
Related
I'm using ldap3.
I can connect and read all attributes without any issue, but I don't know how to display the photo of the attribute thumbnailPhoto.
If I print(conn.entries[0].thumbnailPhoto) I get a bunch of binary values like b'\xff\xd8\xff\xe0\x00\x10JFIF.....'.
I have to display it on a bottle web page. So I have to put this value in a jpeg or png file.
How can I do that?
The easiest way is to save the raw byte value in a file and open it with a picture editor. The photo is probably a jpeg, but it can be in any format.
Have a look at my answer at Display thumbnailPhoto from Active Directory in PHP. It's especially for PHP but the concept is the same for Python.
basically it's about either using the base64 encoded raw-data as data-stream or actually using a temporary file that is serverd (or used to determine the mime-type)
I'm building a project where people can upload files, I would like to then display those files in a browser where people can interact with them (vote, comment etc)
However, this means I need to programatically build the html depending on the format of the video or image. Is there a way to feed a file (or filename) into a library, and determine whether I need to display it in a video element or an image element? Even a list of video formats vs image formats would help but I haven't seen anything in regards to that.
No module can reliably determine the file type. The user could either change the extension or even the magic number of the file to obfuscate it. The only reliable way it to try to pass file to some image / video transcoder to let it decide or error out if the format is invalid. This way you know you are working with known formats since all files are transcoded to your specific extensions. That could be mp4 or png. I recommend using handbrake for videos and sharp for images. Leaving the NPM links down below:
https://www.npmjs.com/package/handbrake-js
https://www.npmjs.com/package/sharp
I'm writing in raw PHP on Linux using the tcpdf library.
The core question is that while creating a PDF with tcpdf I'd also like to kick off an audio file for the user...but tcpdf considers that TCPDF ERROR: Some data has already been output, can't send PDF file so I'm looking for a way to play an audio file at PDF generation without tcpdf considering that 'interfering output'.
I can successfully generate my wanted PDF within my browser using the tcpdf library and calls. But I would also like to play an audio when this happens - that might say "This is your generated PDF. You can print it now...etc"
So I'm wanting to put the HTML audio syntax within my php script.
However if I try to include an audio clause before the tcpdf->output, tcpdf will play the audio but say that output has happened before the tcpdf output and will not generate the PDF image. Flow stops after the tcpdf->output command - it successfully generates the PDF but it does not return for additional lines so I can't place the audio line after the output call.
So I guess I'm looking for a "hidden" audio although I've tried hidden attributes within the HTML audio syntax but still tcpdf flags it as "output has happened". Thank you.
Well, obviously, you can do that simply by
generate the PDF into file (not to the client directly -- 'F' switch).
output your audio file to the client and let it platy
output a link/Javascript redirection to the generated PDF file.
Because you didn't provide any code in your question I do not provide any either, but I believe it is already understandable.
I would like to convert .rm (RealPlayer Media) file to MP3 or another format?
First, I successfully managed that using VLC but the quality was not good. Then I tried the Real Alternative codec with DirectShow, this also worked ok, but then I found that the codec is no longer developed because RealNetworks sued the developer.
Now, I have installed the RealPlayer and I am trying to use it's DirectShow filters to convert .rm to .mp3 but without success:( (Actually after adding RealPlayer Transcode filter and choosing a file the GraphStudio crashes.)
Is there a legal way to programmatically convert .rm file to another format? How to make RealPlayer to programmatically convert files? Do you have any hints or examples, how to use RealPlayer Transcode filter? (I am new to DirectShow.)
UPDATE to make the question more concrete: How can I list implemented interfaces and its members of RealPlayer Transcode filter? I have not found any documentation:( (The GraphStudio says it has 0 pins and just common properties.)
You need to build a DirectShow graph to read and decode .rm, then compress audio into MP3 and write it into a file. This is similar to recompressing an AVI file, described in some detail on MSDN: Recompressing an AVI File. You just have audio without video there, and the container formats are different.
UPDATE: There is no way to reliably list implemented interfaces in COM. Sometimes you can find this out by checking the type library, however a lot of DirectShow filters are coming without it. Typically, you need an SDK header file from the filter vendor to get a definition of implemented so called 'private' interfaces.
I am now trying to write a music player using Gstreamer.I know that mp3 files are made up with frames (data frame and tag frame).what i want to do is extract the data frame and calculate its hash to identify a file. what should i do?
thinks in advince!
this all is done by gstremer mad element. So if you are writing application then use this element.
NOTE: mad element is comes inside gst-plugin-bad package which you can download from gstremer site