06-06-2017 03:57 AM - edited 06-06-2017 04:02 AM
How can I convert Audio (.wav) and video files to readable string (text) in labVIEW? I am using the LabVIEW 2015 & USRP 2932/NI USRP N210.
here I am attaching a VI, in this VI I am getting the string of float numbers. Is there any method by which I can convert this string to readable text or directly from the waveform received I can get the readable string. Please let me know.
06-06-2017 04:01 AM
hi rinks,
sorry to be pedantic, but why would you convert a video to string?
video is a binary format, at least for me it makes no sense to strip all nonprintable chars and have the rest as string.
06-06-2017 04:05 AM
As I am transmittiing a video file but my VI takes the string input that's why I need to convert the video into readable text string.
Is there any other method?
kindly let me know.
06-06-2017 04:09 AM
As u said video is a binary format so how could I extract the binary array of the video?
06-06-2017 06:15 AM
@Rinks wrote:
As I am transmittiing a video file but my VI takes the string input that's why I need to convert the video into readable text string.
Is there any other method?
kindly let me know.
Way to little information to make even a reasonable guess what would be the best solution.
Which VI does take a string input?
Why do you talk about readable text string for a binary file format? There could be many ways of making a readable text string such as taking each byte and printing the hex value of this in the text string. I doubt that this is what you want to to, but just saying.
Maybe your function wants really text, maybe it just wants a binary byte array represented as a string (quite possible as there are a few LabVIEW functions that traditionally use strings when they should really have used a byte array instead).
Tell use what you want to do with the video file, what functions you want to use to process it, etc, etc.
06-06-2017 11:31 AM
In the attached zip file, there is packet transmitter and packet receiver code which is taking string (text) input but I need to transmit video input. How can I transmit the video file from transmitter to receiver?
If there is any other way to do this kindly let me know.
06-06-2017 11:49 AM
So the real question you are asking is:
How do I transmit a .wav file (which is an audio format - how did we get to talking about video?) using the uploaded code?
06-06-2017 12:00 PM
I guess you could just use the Read from Text File? Function, convert it into an array of bytes and then use the Number to Decimal String to convert it into something readable. Then do the opposite at the other end. But that seems hugely inefficient to me.
This seems like a classic case of "When all you have is a hammer, all problems look like nails." I recommend getting - or making - the right tool for the job.
06-08-2017 01:24 AM
Hello, In the attached file I m converting the audio input to readable string and from the input waveform get back audio file as output but in this I m getting very much noise or the string is not the exact string? How can I remove the noise or how to get the exact string?
Audio is also in binary format but i am unable to find the binary format of audio file. kindly help me.
06-08-2017 08:47 AM
@Rinks wrote:
Hello, In the attached file I m converting the audio input to readable string and from the input waveform get back audio file as output but in this I m getting very much noise or the string is not the exact string? How can I remove the noise or how to get the exact string?
Audio is also in binary format but i am unable to find the binary format of audio file. kindly help me.
I have no idea what this code is supposed to do, but it's not doing what you said it should do. I'll give you a starting point. Forget about transmission for now. Concentrate on encoding the file to a string format. (Simple if it just needs to be a stream of bytes, but a bit complicated if it has to be ASCII.) Then concentrate on decoding back into binary. (Again, simple if just a byte stream, a bit complicated if ASCII). Only after success should you even worry about using the software you've provided.