0

I use mplayer principally to play audio files from the Linux console. Most of the time, mplayer happily shows me the duration of the file and the runtime so far (note: I've paused both playbacks just to let me copy/paste the output):

jim@brisbane /public/podcasts/AmateurRadio/Linux in the Ham Shack $ mplayer lhs150.ogg 
MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
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 lhs150.ogg.
libavformat version 56.40.101 (external)
libavformat file format detected.
[lavf] stream 0: audio (vorbis), -aid 0, LHS Episode #150: The Sesquicentennial
Load subtitles in ./
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 56.60.100 (external)
AUDIO: 44100 Hz, 1 ch, floatle, 80.0 kbit/5.67% (ratio: 10000->176400)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)
==========================================================================
AO: [pulse] 44100Hz 1ch floatle (4 bytes per sample)
Video: no video
  =====  PAUSE  =====
A:  16.4 (16.3) of 5404.9 ( 1:30:04.9)  0.4% 

You can see, above, that I am 16.4 seconds in out of 5404.9, but more importantly, I can see that the podcast in this case is 1:30:04.9 in duration.

jim@brisbane ~/hobart/server/podcasts/MUSIC/PODCASTS/Linux in the Ham Shack $ mp lhs203.ogg 
MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
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 lhs203.ogg.
libavformat version 56.40.101 (external)
libavformat file format detected.
[mjpeg @ 0x7f6a2fda03c0]Changeing bps to 8
[lavf] stream 0: audio (vorbis), -aid 0, LHS Episode #203: Choosing Your Linux Distribution
[lavf] stream 1: video (mjpeg), -vid 0
VIDEO:  [MJPG]  300x300  0bpp  90000.000 fps    0.0 kbps ( 0.0 kbyte/s)
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 1 ch, floatle, 80.0 kbit/5.67% (ratio: 10000->176400)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)
==========================================================================
AO: [pulse] 44100Hz 1ch floatle (4 bytes per sample)
Starting playback...
[mjpeg @ 0x7f6a2fda03c0]Changeing bps to 8
Movie-Aspect is 1.00:1 - prescaling to correct movie aspect.
VO: [vdpau] 300x300 => 300x300 Planar YV12 
Movie-Aspect is 1.00:1 - prescaling to correct movie aspect.
VO: [vdpau] 300x300 => 300x300 Planar YV12 
No pts value from demuxer to use for frame!
pts after filters MISSING
A:3615.6 V:  53.8 A-V:3561.850 ct:  0.025   0/  0  0%  0%  2.4% 0 0 1.50x 
  =====  PAUSE  =====

This episode differs by popping up a little window with a logo of the podcast (Linux in the Ham Shack), so it seems mplayer is treating it as a video file of some sort instead of a plain audio file. Note also, however, that the output does not show the duration of the file anymore. In fact, the text display is totally different.

I don't need the text display to be identical, but I do want to see the time remaining. Is there some way to force this to work?

If you want sample audio files, I used Linux in the Ham Shack episodes #150 and #203. (I have nothing to do with this podcast except being a listener.)

I run Debian/Ubuntu/Mint but OS seems to have little to do with this.

Suggestions? Thanks!

1

Just disable the video output:

mplayer -novideo lhs243.ogg

  • That did it. Somehow, poring through the entire man page, I didn't find that option. Thank you. – Jim MacKenzie Sep 2 '18 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.