Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.raspberry-pi > #20284 > unrolled thread
| Started by | neverland@GoodeveCa.net (Pete) |
|---|---|
| First post | 2019-06-13 21:38 +0000 |
| Last post | 2019-06-14 09:25 +0100 |
| Articles | 7 — 5 participants |
Back to article view | Back to comp.sys.raspberry-pi
mpg123 to audio jack? neverland@GoodeveCa.net (Pete) - 2019-06-13 21:38 +0000
Re: mpg123 to audio jack? Roger Bell_West <roger+csrp201906@nospam.firedrake.org> - 2019-06-13 22:56 +0000
Re: mpg123 to audio jack? "A. Dumas" <alexandre@dumas.fr.invalid> - 2019-06-14 07:04 +0200
Re: mpg123 to audio jack? neverland@GOODEVEca.net (Pete) - 2019-06-14 21:21 +0000
Re: mpg123 to audio jack? "A. Dumas" <alexandre@dumas.fr.invalid> - 2019-06-15 10:06 +0200
Re: mpg123 to audio jack? neverland@GOODEVEca.net (Pete) - 2019-06-16 18:27 +0000
Re: mpg123 to audio jack? The Natural Philosopher <tnp@invalid.invalid> - 2019-06-14 09:25 +0100
| From | neverland@GoodeveCa.net (Pete) |
|---|---|
| Date | 2019-06-13 21:38 +0000 |
| Subject | mpg123 to audio jack? |
| Message-ID | <qdufp2$1lg9$1@gioia.aioe.org> |
In a previous thread I mentioned that I'm using omxplayer to play audio (streams), but others said they were just using mpg123, which seems more reasonable. However, I'm feeding the audio to my sound system through the audio jack, and I can't get mpg123 to do that. It insists on going through HDMI, which I usually don't want. (I log in via SSH from other machines) I assume I'm likely being stupid, but I've been playing for a while without luck. Can somebody help? Thanks, -- Pete --
[toc] | [next] | [standalone]
| From | Roger Bell_West <roger+csrp201906@nospam.firedrake.org> |
|---|---|
| Date | 2019-06-13 22:56 +0000 |
| Message-ID | <20190613235549.0431847428708387@firedrake.org> |
| In reply to | #20284 |
On 2019-06-13, Pete wrote: >I assume I'm likely being stupid, but I've been playing >for a while without luck. Can somebody help? Sorry, I just use mpv, which seems to do the right thing pretty much automatically. (And has a reasonably well-documented configuration interface for when it doesn't.)
[toc] | [prev] | [next] | [standalone]
| From | "A. Dumas" <alexandre@dumas.fr.invalid> |
|---|---|
| Date | 2019-06-14 07:04 +0200 |
| Message-ID | <qdv9tq$u2n$1@dont-email.me> |
| In reply to | #20284 |
Pete wrote, on 13-06-2019 23:38: > In a previous thread I mentioned that I'm using omxplayer > to play audio (streams), but others said they were just > using mpg123, which seems more reasonable. However, I'm > feeding the audio to my sound system through the audio > jack, and I can't get mpg123 to do that. It insists > on going through HDMI, which I usually don't want. > (I log in via SSH from other machines) > > I assume I'm likely being stupid, but I've been playing > for a while without luck. Can somebody help? The player program doesn't determine where the output goes, the system does that. In a terminal window: amixer cset numid=3 1 where the second parameter is: 0=auto (default), 1=jack, 2=hdmi Doesn't need sudo and persists across reboots. I think it can also be set via raspi-config (which does need sudo, although maybe not for this setting, I never tried).
[toc] | [prev] | [next] | [standalone]
| From | neverland@GOODEVEca.net (Pete) |
|---|---|
| Date | 2019-06-14 21:21 +0000 |
| Message-ID | <qe134t$1atg$1@gioia.aioe.org> |
| In reply to | #20286 |
In article <qdv9tq$u2n$1@dont-email.me>, A. Dumas <alexandre@dumas.fr.invalid> wrote: > >The player program doesn't determine where the output goes, the system >does that. In a terminal window: > >amixer cset numid=3 1 > >where the second parameter is: 0=auto (default), 1=jack, 2=hdmi >Doesn't need sudo and persists across reboots. I think it can also be >set via raspi-config (which does need sudo, although maybe not for this >setting, I never tried). Ahh. I have vague memories now of going through that when I was trying to get omxplayer to output to the jack. It *didn't* work there, because it turns out that with omxplayer you have to use the "--adev local" option to redirect the output. I guess it doesn't use alsa. As sometimes I do want audio out via hdmi -- playing a video for instance -- it's probably more convenient to stick with omxplayer, as there's really nothing wrong with the job it does. Thanks. -- Pete --
[toc] | [prev] | [next] | [standalone]
| From | "A. Dumas" <alexandre@dumas.fr.invalid> |
|---|---|
| Date | 2019-06-15 10:06 +0200 |
| Message-ID | <qe28uk$1ge$1@dont-email.me> |
| In reply to | #20288 |
Pete wrote, on 14-06-2019 23:21: > A. Dumas <alexandre@dumas.fr.invalid> wrote: >> The player program doesn't determine where the output goes, the system >> does that. In a terminal window: >> >> amixer cset numid=3 1 >> >> where the second parameter is: 0=auto (default), 1=jack, 2=hdmi >> Doesn't need sudo and persists across reboots. I think it can also be >> set via raspi-config (which does need sudo, although maybe not for this >> setting, I never tried). > > Ahh. I have vague memories now of going through that when I was > trying to get omxplayer to output to the jack. It *didn't* work > there, because it turns out that with omxplayer you have to use > the "--adev local" option to redirect the output. I guess it > doesn't use alsa. Yes, I wasn't precise: omxplayer is special, it speaks to hardware directly. I'm not sure how it determines a default output path if you don't specify it on the command line. Maybe simply hdmi always? > As sometimes I do want audio out via hdmi -- playing a video for instance -- > it's probably more convenient to stick with omxplayer, as there's really > nothing wrong with the job it does. You can use the amixer command to set it to jack once (and for all), for mpg123 with alsa, and use "--adev hdmi" for video's? Short option "-o hdmi" works too. Or if output to jack is the exception, make a bash file: #!/usr/bin/env bash # set alsa output to jack amixer cset numid=3 1 # play the file mpg123 $* # set alsa output to hdmi amixer cset numid=3 2 Save it as e.g. myplayer, make it executable: "chmod 755 myplayer" and move it to /usr/local/bin/ (requires sudo). Then call it as you would mpg123 but with the new name. The commandline parameters get passed on. I prefer mpd+mpc, by the way, because it plays streams, playlists and libraries. But mpg123 is more convenient for single files occasionally, I suppose.
[toc] | [prev] | [next] | [standalone]
| From | neverland@GOODEVEca.net (Pete) |
|---|---|
| Date | 2019-06-16 18:27 +0000 |
| Message-ID | <qe61mv$lte$1@gioia.aioe.org> |
| In reply to | #20289 |
In article <qe28uk$1ge$1@dont-email.me>, A. Dumas <alexandre@dumas.fr.invalid> wrote: >Pete wrote, on 14-06-2019 23:21: >> As sometimes I do want audio out via hdmi -- playing a video for instance -- >> it's probably more convenient to stick with omxplayer, as there's really >> nothing wrong with the job it does. > >You can use the amixer command to set it to jack once (and for all), for >mpg123 with alsa, and use "--adev hdmi" for video's? Short option "-o >hdmi" works too. Or if output to jack is the exception, make a bash file: I thought of doing something like that (I use scripts for playing streams of course) but, as I say, nothing's really broke... > >I prefer mpd+mpc, by the way, because it plays streams, playlists and >libraries. But mpg123 is more convenient for single files occasionally, >I suppose. Something else to investigate. Thanks, -- Pete --
[toc] | [prev] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2019-06-14 09:25 +0100 |
| Message-ID | <qdvlmf$ig7$4@dont-email.me> |
| In reply to | #20284 |
On 13/06/2019 22:38, Pete wrote:
> In a previous thread I mentioned that I'm using omxplayer
> to play audio (streams), but others said they were just
> using mpg123, which seems more reasonable. However, I'm
> feeding the audio to my sound system through the audio
> jack, and I can't get mpg123 to do that. It insists
> on going through HDMI, which I usually don't want.
> (I log in via SSH from other machines)
>
> I assume I'm likely being stupid, but I've been playing
> for a while without luck. Can somebody help?
>
> Thanks,
>
> -- Pete --
>
Mine goes via pulseaudio and alsa.
I cant remember how I made sure that alsa went to my Pi DAC and not the
HDMI.
--
"First, find out who are the people you can not criticise. They are your
oppressors."
- George Orwell
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.raspberry-pi
csiph-web