08-26-2008
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.
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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)
Discussion started by: sablot
1 Replies
2. UNIX for Dummies Questions & Answers
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)
Discussion started by: taurian1234
4 Replies
3. UNIX for Dummies Questions & Answers
Can someone help with following problem?
I'm trying to watch the stream video.
mplayer SRTV - Main Air
MPlayer SVN-r24130 (C) 2000-2007 MPlayer Team
CPU: AMD Sempron(tm) Processor 2800+ (Family: 15, Model: 44, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1... (1 Reply)
Discussion started by: mirusnet
1 Replies
4. What is on Your Mind?
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)
Discussion started by: cassj
5 Replies
5. Shell Programming and Scripting
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)
Discussion started by: locoroco
1 Replies
6. BSD
Just wondering -- is there a way to play a song in iTunes from the terminal app? (1 Reply)
Discussion started by: Straitsfan
1 Replies
7. UNIX for Beginners Questions & Answers
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)
Discussion started by: colt
12 Replies
LEARN ABOUT DEBIAN
cdde.xml
cdde.xml(5) cdde.xml(5)
NAME
cdde.xml - Configuration file for cdde
DESCRIPTION
When cdde is run for the first time, an example xml configuration file (~/.cdde.xml) is created for you:
<?xml version="1.0"?>
<cdde delay="5000000">
<drive path="/dev/cdrom">
<audio command="echo An audio cd was inserted."/>
<data command="echo A data cd was inserted."/>
<dvd command="echo A dvd was inserted."/>
<vcd command="echo A vcd was inserted."/>
<svcd command="echo A svcd was inserted."/>
<blank command="echo A blank cdr/dvdr was inserted."/>
<mixed command="echo A mixed (audio/data) cd was inserted."/>
</drive>
</cdde>
This default file is not very useful, and so I suggest you to edit it to your needs before running cdde again. You may add as many drive
entries, or commands as you like. If multiple entries are found for a type of disc then all entries will be run in the order they are
found.
The specific device in use can be passed to the command with one of the following special tags:
%dev% - is replaced with the device name of the cdrom that
just had a disc inserted
%mnt% - is replaced with the listed mount point for the
cdrom that just had a disc inserted
Note: %mnt% is determined through your fstab (usually located in /etc) file. If you do not have a listing for each <drive> in the fstab
this will cause problems.
This way, you can tell your video player which device to use when playing a VCD, for example.
EXAMPLE
This is an example of ~/.cdde.xml file:
<?xml version="1.0"?>
<cdde delay="5000000">
<drive path="/dev/cdroms/cdrom0"/>
<audio command="xmms %mnt%"/>
<data command="mount %mnt%"/>
<dvd
command="xterm -iconic -e mplayer -fs -xineramascreen 1 -dvd 1"/>
<vcd
command="xterm -iconic -e mplayer -fs -xineramascreen 1 -vcd 1"/>
<svcd
command="xterm -iconic -e mplayer -fs -xineramascreen 1 -vcd 1"/>
<blank command="gcombust"/>
<mixed command="mount %mnt%"/>
</drive>
</cdde>
FILES
~/.cdde.xml
SEE ALSO
cdde(1)
AUTHORS
Eric Lathrop <eric@ericlathrop.com>
Stanislav Maslovski <stanislav.maslovski@gmail.com>
WEBSITE
For the latest release of cdde, see:
http://cdde.sourceforge.net/
Eric Lathrop 0.3.1 cdde.xml(5)