Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-04-2010, 12:28 PM   #1
Registered: Jul 2005
Posts: 33

Rep: Reputation: 15
mplayer doesn't play some asf files


I use mplayer to record streaming audio and save the streams by:

mplayer -dumpstream http://server-address:[port] -dumpfile stream-1000.asf

I usually don't have any problems, but sometimes mplayer might get killed unexpectedly, or terminate the process due to network errors. In short, sometimes the asf files are not closed properly.

When I try to listen those incomplete asf files via mplayer, I get an error message complaining about unknown audio format so I suspect the problem is with the asf headers.

If I try to open the same asf files using amarok however, they play just fine. I'm wondering how I can force mplayer to fix the broken headers(if that's really the case), or ignore the errors and use a specific driver/decoder.

I'm pasting the error messages below. Thanks in advance.

MPlayer dev-SVN-r26940
CPU: Intel(R) Core(TM)2 Quad  CPU   Q9300  @ 2.50GHz (Family: 6, Model: 23, Stepping: 7)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing stream-1000.asf.
RAWDV file format detected.
VIDEO:  [DVSD]  720x480  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] This driver only supports the 3Dfx Banshee, Voodoo3 and Voodoo 5.
s3fb: 8 bpp output is not supported
Requested video codec family [qdv] (vfm=dshow) not available.
Enable it at compilation.
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdv] vfm: ffmpeg (FFmpeg DV decoder)
Opening audio decoder: [libdv] Raw DV Audio Decoder
Unknown/missing audio format -> no sound
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Cannot find codec 'dvaudio' in libavcodec...
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x56444152.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar 411P)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar 411P as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 0xb2e130]BICUBIC scaler, from yuv411p to yuv420p using MMX2
[swscaler @ 0xb2e130]using 4-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xb2e130]using 4-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xb2e130]using 1-tap MMX "scaler" for vertical scaling (YV12 like)
[swscaler @ 0xb2e130]720x480 -> 720x480
VO: [xv] 720x480 => 720x480 Planar YV12 
AC EOB marker is absent pos=64
AC EOB marker is absent pos=64
AC EOB marker is absent pos=64
AC EOB marker is absent pos=68
AC EOB marker is absent pos=64
AC EOB marker is absent pos=64
AC EOB marker is absent pos=64
AC EOB marker is absent pos=64
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).
Failed to kill(18075,27) (error 3).

Last edited by zirtik; 05-04-2010 at 03:50 PM.
Old 05-05-2010, 07:15 AM   #2
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
what distro? If it is Debian try using mplayer and ffmepg from the repo as the versions in the "official" repos are crippled due to licensing issues. Might want to try updating your mplayer as well.

MPlayer dev-SVN-r26940 looks rather old. Also check what video and audio codecs you have mplayr using.

Mine says MPlayer SVN-r31128 (C) 2000-2010 MPlayer Team
$ apt-cache policy mplayer
Installed: 2:1.0~rc3+svn20100503-0.0
Candidate: 2:1.0~rc3+svn20100503-0.0
Version table:
*** 2:1.0~rc3+svn20100503-0.0 0
500 unstable/main Packages

my mplayer gui.conf
enable_audio_equ = "no"
vo_driver = "xv"
vo_panscan = "0.000000"
vo_doublebuffering = "yes"
vo_direct_render = "no"
vo_dxr3_device = "/dev/em8300-0"
v_framedrop = "0"
v_flip = "-1"
v_ni = "no"
v_idx = "-1"
vf_pp = "no"
vf_autoq = "0"
vf_lavc = "no"
ao_driver = "alsa"
ao_volnorm = "no"
softvol = "no"
ao_surround = "no"
ao_extra_stereo = "no"
ao_extra_stereo_coefficient = "1.000000"
dvd_device = "/dev/dvd"
cdrom_device = "/dev/cdrom"
osd_level = "1"
sub_auto_load = "yes"
sub_unicode = "no"
ass_enabled = "no"
ass_use_margins = "no"
ass_top_margin = "0"
ass_bottom_margin = "0"
sub_pos = "100"
sub_overlap = "no"
font_factor = "0.750000"
font_text_scale = "3.500000"
font_osd_scale = "4.000000"
font_blur = "2.000000"
font_outline = "2.000000"
font_autoscale = "3"
cache = "no"
cache_size = "2048"
playbar = "yes"
load_fullscreen = "no"
show_videowin = "yes"
stopxscreensaver = "yes"
autosync = "no"
autosync_size = "0"
gui_skin = "default"
gui_save_pos = "yes"
gui_main_pos_x = "839"
gui_main_pos_y = "903"
gui_video_out_pos_x = "320"
gui_video_out_pos_y = "272"
equ_band_00 = "0.000000"
equ_band_01 = "0.000000"
equ_band_02 = "0.000000"
equ_band_03 = "0.000000"
equ_band_04 = "0.000000"
equ_band_05 = "0.000000"
equ_band_06 = "0.000000"
equ_band_07 = "0.000000"
equ_band_08 = "0.000000"
equ_band_09 = "0.000000"
equ_band_10 = "0.000000"
equ_band_11 = "0.000000"
equ_band_12 = "0.000000"
equ_band_13 = "0.000000"
equ_band_14 = "0.000000"
equ_band_15 = "0.000000"
equ_band_16 = "0.000000"
equ_band_17 = "0.000000"
equ_band_18 = "0.000000"
equ_band_19 = "0.000000"
equ_band_20 = "0.000000"
equ_band_21 = "0.000000"
equ_band_22 = "0.000000"
equ_band_23 = "0.000000"
equ_band_24 = "0.000000"
equ_band_25 = "0.000000"
equ_band_26 = "0.000000"
equ_band_27 = "0.000000"
equ_band_28 = "0.000000"
equ_band_29 = "0.000000"
equ_band_30 = "0.000000"
equ_band_31 = "0.000000"
equ_band_32 = "0.000000"
equ_band_33 = "0.000000"
equ_band_34 = "0.000000"
equ_band_35 = "0.000000"
equ_band_36 = "0.000000"
equ_band_37 = "0.000000"
equ_band_38 = "0.000000"
equ_band_39 = "0.000000"
equ_band_40 = "0.000000"
equ_band_41 = "0.000000"
equ_band_42 = "0.000000"
equ_band_43 = "0.000000"
equ_band_44 = "0.000000"
equ_band_45 = "0.000000"
equ_band_46 = "0.000000"
equ_band_47 = "0.000000"
equ_band_48 = "0.000000"
equ_band_49 = "0.000000"
equ_band_50 = "0.000000"
equ_band_51 = "0.000000"
equ_band_52 = "0.000000"
equ_band_53 = "0.000000"
equ_band_54 = "0.000000"
equ_band_55 = "0.000000"
equ_band_56 = "0.000000"
equ_band_57 = "0.000000"
equ_band_58 = "0.000000"
equ_band_59 = "0.000000"
Old 05-05-2010, 07:54 AM   #3
Senior Member
Registered: Feb 2003
Distribution: debian
Posts: 2,750
Blog Entries: 1

Rep: Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549
You have a number of initial complaints that have options to disable to not get those complaints. Which you could pass every time that you run mplayer or put into /etc/mplayer/mplayer.conf. Stuff like -nolirc and the likes. More or less cosmetic, but it can help make the application launch faster. At a minimum lower the stdout content to make it easier to find relevant information quicker.

$ mplayer -list-options | grep -i "^\ no"

-nolirc -nolircc -nojoystick

maybe even -vo null if you don't want to actually watch it at the point of capture. It seems to be trying to use -vo dfbmga or something and settling on something else. mplayer -vo help to list your options which could be dependent on where/how your version of mplayer was compiled.

You might try breaking -dumpstream into it's parts. -dumpaudio and -dumpvideo. Although I'm not sure how / if that'll work simultaneously. But with -dumpaudio you can specify -dumpfile which makes audio headers where there might otherwise be none. Or you might be able to edit the file in post to fix the issue.

$ mplayer <FILE> -dumpaudio -dumpfile something.raw
$ ffmpeg -i <FILE> -vn -acodec copy something.raw

$ sox -t raw --endian little -s -2 -c 2 -r 48000 something.raw something.wav

The parameters of which might vary depending on what format the source is. aplay is semi-good at helping you figure that out in a trial and error sort of way.

$ aplay -t wav -f S16_LE -c 2 -r 48000 something.raw

there's even a few shortcuts for common types

$ aplay -f cd something.raw
$ aplay -f dat something.raw

Although more about editing than what you're probably looking for. You might try a script with named pipes to use another encoder and just use mplayer as the decoder. If you're going to archive the stuff in a format other than what is broadcast it could save you a step in post. And might also be a workaround for when mplayer fails as the encoder will see the end of input and finish the file semi-properly. Semi only because the lengths of audio and video might not match. A bit cpu needy if you have an older computer, but most newer ones 3GHz + multiple cores should do fine. And there's a few codecs that don't require a lot of cpu horsepower (relatively). Although dumping straight to file is generally the cheapest in terms of system resources.

Old 05-05-2010, 12:12 PM   #4
Registered: Jul 2005
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks both for the replies. I tried to play the same files on my laptop (Ubuntu 10.04) with "MPlayer SVN-r1.0~rc3+svn20090426-4.4.3" and it worked. However, I do all of the recordings on my office PC (Debian), and I don't have root control so I can't update using the repo.

I'm wondering how Amarok can play them, probably because it is using a different codec. Can I just locate those codecs and use them with mplayer by the --codecs-file option?
Old 05-05-2010, 01:05 PM   #5
Registered: Jul 2005
Posts: 33

Original Poster
Rep: Reputation: 15

I ended up installing the nightly build from the official mplayer web page under a local directory I have write access. It was probably a codec issue due to some repos being crippled as craigevil pointed out.

Old 05-10-2010, 05:54 PM   #6
Registered: Jul 2005
Posts: 33

Original Poster
Rep: Reputation: 15
-- Update 2--

I found the following post in the mplayer mailing list archives from five years ago very helpful:

In case it becomes unavailable, adding the "-aid 0" option solved the problem.

Last edited by zirtik; 05-10-2010 at 05:55 PM.


audio, mplayer, streaming

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to play ASF files in xine JosephS Linux - Software 1 03-13-2010 02:56 PM
How do I make the media players play .asf files? xSTELLA Linux - Newbie 11 07-08-2005 01:12 AM
howto play .asf files in mplayer or kaffine? greythorne SUSE / openSUSE 6 06-26-2005 05:09 AM
mplayer cannot play audio (asf) and wmv in firefox caneforever97 Linux - Newbie 8 04-23-2004 11:45 AM
I can't get .asf files to play in mplayer..... garymansell Linux - Software 0 07-10-2003 08:21 AM

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration