Hi all,
I have an application program which keeps reading an audio file from a directory one after the other , once a file is chosen it keeps sending data in terms of 60000 bytes to a specified socket. This is written into another file "x.mp3" and mplayer is called. Again next 60000 bytes are read and same procedure is followed till end of file.
here is my code which does the above work
I get the following message when mplayer is called , but works fine. Am not getting why I get that message which is highlighted in red.
Last edited by vino; 08-25-2008 at 10:30 AM..
Reason: added code tags
When mplayer can't find a proper mp3 block header where it expects it to be, it tries to "rewind" back in the data stream to try to get its footing. Sometimes that fails and it then has to walk over the data until it finds a header's signature again.
It's no big deal, and indicative of a sloppily-made mp3.
However, I see in your code that you're not checking how much data fread() returns, and then blindly write 60000 bytes on the socket. Think about the last chunk of data, it's not going to be exactly 60000 bytes. So you're writing extra garbage at the end of your streams.
You should use the value returned by fread() and use that as an argument to fwrite and sendto.
Hello, I was trying to compile Mplayer 1.3 using gcc 4.4, but I am getting LOTS of error messages when make reaches the pngdec.c file. These are the error messages.
libavcodec/pngdec.c:37:18: warning: zlib.h: No such file or directory
libavcodec/pngdec.c:82: error: expected... (12 Replies)
I have this problem using a script that uses mplayer. This is the error messages.
INFO: Mplayer Log
LOG: MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
LOG: mplayer: could not connect to socket
LOG: mplayer: No such file or directory
LOG: Failed to open LIRC support. You... (1 Reply)
Merry Christmas to the Greatest UNIX Forum on Earth!
This "UNIX Christmas Song" song has been around a while but it's still fun. :-)
#UNIX Christmas Song
better !pout !cry
better watchout
lpr why
santa claus <north pole >town
cat /etc/passwd >list
ncheck list
ncheck list
cat list... (5 Replies)
Hello,
How can i install the sound card on solaris 9.00 and also, how can i play MP3 and audio songs on solaris....
pls provide me the complete steps....
thnks (4 Replies)
hello.
I just installed OpenBSD3.5 and now am using gnome2.4.
i've installed mplayer from the openbsd.org packages directory and it seems to work with all kinds of media.
The trouble is, it plays all videos too fast. The picture rate is too high and sound is too fast, too.
I wonder if anyone... (1 Reply)