Opened 12 years ago
Closed 12 years ago
#1401 closed defect (invalid)
ffplay: Muted when going to foreign tty but continues playing when coming back.
Reported by: | John | Owned by: | |
---|---|---|---|
Priority: | minor | Component: | ffplay |
Version: | 0.11 | Keywords: | tty pulseaudio |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
How to reproduce
Invoke ffplay from somewhere (console with exported DISPLAY=:0 or from KDE4)
% ffplay file.mp3 % ffplay http://url.com/file.mp3 % ffplay -nodisp file.mp3 % ffplay -nodisp http://url.com/file.mp3
Then switch to another tty via Ctrl-Alt-F1 / Ctrl-Alt-F7 / Ctrl-Alt-F10 etc.
Whenever I go to a tty with me logged in, the play continues. Going to ttys with nobody logged in or another user (root) the sound stops and, if invoked with window, it looks as if one little phrase would be repeated many times.
In the 1st image you see: normal operation
In the 2nd image you see:
- Start of ffplay on tty7, hearing sound
- Going to a tty which wasn't logged in and hearing nothing
- going back to tty7 and hearing sound again and then taking a screen shot.
(The window decoration looks normal on my screen, but the 'import' command seems to mangle the ffplay window decoration.)
Additional information
% ffplay -version ffplay version N-40844-g0e82d31 built on May 19 2012 15:26:37 with gcc 4.6.2 configuration: --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --shlibdir=/usr/lib64 --disable-stripping --enable-pthreads --disable-shared --enable-avfilter --enable-static --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-nonfree --enable-postproc --enable-shared --enable-libdc1394 --enable-libtheora --enable-libschroedinger --enable-libvpx --enable-gpl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-x11grab --enable-ffplay libavutil 51. 53.100 / 51. 53.100 libavcodec 54. 21.101 / 54. 21.101 libavformat 54. 5.100 / 54. 5.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 74.102 / 2. 74.102 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 12.100 / 0. 12.100 libpostproc 52. 0.100 / 52. 0.100
Another version (same bug):
% ffplay -version ffplay version 0.11 built on Jun 3 2012 15:12:12 with gcc 4.6.2 configuration: --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --shlibdir=/usr/lib64 --disable-stripping --enable-pthreads --disable-shared --enable-avfilter --enable-static --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-nonfree --enable-postproc --enable-shared --enable-libdc1394 --enable-libtheora --enable-libschroedinger --enable-libvpx --enable-gpl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-x11grab --enable-ffplay --disable-outdev=sdl libavutil 51. 54.100 / 51. 53.100 libavcodec 54. 23.100 / 54. 21.101 libavformat 54. 6.100 / 54. 5.100 libavdevice 54. 0.100 / 53. 4.100 libavfilter 2. 77.100 / 2. 74.102 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 12.100 libpostproc 52. 0.100 / 52. 0.100
Another related error (reproducible)
When I made the screen shot, I had another ffplay running on tty2 on a http mp3 stream. after quitting the windowed ffplay and waiting some time and then randomly switching between "mute" ttys and "playing" ttys and going back to tty7 (window manager), I had about 2 seconds of sound an then the tty2 ffplay was mute too (but still counted seconds!)
Attachments (2)
Change History (9)
by , 12 years ago
Attachment: | screen.png added |
---|
comment:1 by , 12 years ago
Comment 1: related to #1402
Comment 2: My system: OpenSUSE 12.1; Kernel 3.1.10-1.9-desktop
comment:2 by , 12 years ago
Keywords: | mute display removed |
---|
Not reproducible here (ffplay continues to play no matter if the tty has no user or if root is logged in) on Opensuse 10.3.
comment:3 by , 12 years ago
Maybe an audio driver issue, or some magical intelligence (the user whose tty is active owns the sound)
Can you try it with different SDL_AUDIODRIVER combinations? (alsa, pulse, dsp, dma)
Can you try if other players using similar audio drivers behave the same way? (VLC, mplayer)
Can you try it with uninstalled, or disabled pulseaudio?
comment:4 by , 12 years ago
I made some testing, here are the results:
Chosing SDL driver
- SDL_AUDIODRIVER ist defaulted to "pulse"; foreign ttys don't work
- With SDL_AUDIODRIVER="alsa" foreign work either because the default alsa device is the pulseaudio server
- dsp, dma don't give me any sound
(See attached log file which was taken without .asoundrc)
Other players
- vlc had the same problem, but I was able to chose my hardware directly in vlc settings. Then it worked on all consoles.
Disabling pulseaudio
- With an own .asoundrc redirecting the sound to the hardware directly all works fine
About this ticket
Does that mean that this isn't a bug of ffmpeg? Shall I submit a pulseaudio bug?
Or is this a feature of pulseaudio?
Log file
me@machine:~/Dokumente> ffplay -nodisp http://url.com/stream.mp3 ffplay version 0.11 Copyright (c) 2003-2012 the FFmpeg developers ... [mp3 @ 0x7f0764000de0] Header missing Last message repeated 1 times [mp3 @ 0x7f07640008c0] max_analyze_duration 5000000 reached at 5015510 [mp3 @ 0x7f07640008c0] Estimating duration from bitrate, this may be inaccurate Input #0, mp3, from 'http://url.com/stream.mp3': Duration: N/A, start: 0.000000, bitrate: 128 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s [mp3 @ 0x7f0764000de0] Header missing ^C 123 (ffplay -nodisp http://url.com/stream.mp3) me@machine:~/Dokumente> echo $SDL_AUDIODRIVER pulse 0 (echo $SDL_AUDIODRIVER) me@machine:~/Dokumente> export SDL_AUDIODRIVER=alsa 0 (export SDL_AUDIODRIVER=alsa) me@machine:~/Dokumente> ffplay -nodisp http://url.com/stream.mp3 ffplay version 0.11 Copyright (c) 2003-2012 the FFmpeg developers ... [mp3 @ 0x7f7788003740] Header missing [mp3 @ 0x7f7788003020] max_analyze_duration 5000000 reached at 5015510 [mp3 @ 0x7f7788003020] Estimating duration from bitrate, this may be inaccurate Input #0, mp3, from 'http://url.com/stream.mp3': Duration: N/A, start: 0.000000, bitrate: 128 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s [mp3 @ 0x7f7788003740] Header missing ^C 123 (ffplay -nodisp http://url.com/stream.mp3) me@machine:~/Dokumente> export SDL_AUDIODRIVER=dsp 0 (export SDL_AUDIODRIVER=dsp) me@machine:~/Dokumente> ffplay -nodisp http://url.com/stream.mp3 ffplay version 0.11 Copyright (c) 2003-2012 the FFmpeg developers ... [mp3 @ 0x7f7f380088a0] Header missing [mp3 @ 0x7f7f380008c0] max_analyze_duration 5000000 reached at 5015510 [mp3 @ 0x7f7f380008c0] Estimating duration from bitrate, this may be inaccurate Input #0, mp3, from 'http://url.com/stream.mp3': Duration: N/A, start: 0.000000, bitrate: 128 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s SDL_OpenAudio: http://url.com/stream.mp3: could not open codecs ^C 123 (ffplay -nodisp http://url.com/stream.mp3) me@machine:~/Dokumente> export SDL_AUDIODRIVER=dma 0 (export SDL_AUDIODRIVER=dma) me@machine:~/Dokumente> ffplay -nodisp http://url.com/stream.mp3 ffplay version 0.11 Copyright (c) 2003-2012 the FFmpeg developers ... [mp3 @ 0x7f7d880088a0] Header missing [mp3 @ 0x7f7d880008c0] max_analyze_duration 5000000 reached at 5015510 [mp3 @ 0x7f7d880008c0] Estimating duration from bitrate, this may be inaccurate Input #0, mp3, from 'http://url.com/stream.mp3': Duration: N/A, start: 0.000000, bitrate: 128 kb/s Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s SDL_OpenAudio: http://url.com/stream.mp3: could not open codecs ^C 123 (ffplay -nodisp http://url.com/stream.mp3) me@machine:~/Dokumente>
comment:5 by , 12 years ago
Its definitely a feature of pulseaudio then.
I did some googling and there are several complaints about this:
http://www.redhat.com/archives/rhl-devel-list/2008-September/msg01607.html
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/213149
Since this bug is a driver issue and there is nothing we can do about it I will close this as invalid if it's OK with you.
comment:7 by , 12 years ago
Keywords: | pulseaudio added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
1st image: normal operation