|
| To: | "MPlayer usage questions, feature requests, bug reports" <mplayer-users@xxxxxxxxxxxx> |
| Subject: | Re: [MPlayer-users] How do you play multiple audio files as acontinuous stream? |
| From: | "Richard Bromley" <rbromley256@xxxxxxxxx> |
| Date: | Wed, 26 Jul 2006 10:49:51 -0700 |
| Delivered-to: | itdp@localhost |
| Delivered-to: | mplayer-users@mplayerhq.hu |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;b=iRa//chnVL5I1LxL4UizFaIQU7XuFsWJUjE3HaTnha4p86GCdvb3qIstT357G6reNwvNWLmlUmMkIV3bQwrYm5Ci/4gRiufUliP9lZvk35B9WJwODr9+riEFat79cO5syBZUmr3/EbcYUJYxw5h7M4gDjLKPBiqTswDZYRP4t18= |
| In-reply-to: | <44C70B2D.5010208@fatooh.org> |
| References: | <1f4734040607251409y7f48edactce95af9c2a73dda5@mail.gmail.com><44C69C77.6070006@fatooh.org><1f4734040607252103xf43a622gb288cd15c737942a@mail.gmail.com><44C70B2D.5010208@fatooh.org> |
soxmix mixes the two files, which means you'll hear them both at once. What you want to do is concatenate them, which regular sox does.
$ sox 1.mp3 2.mp3 - | mplayer -
That still won't work, though, so don't expect the above command to work. sox silently errors out with an exit status 2, which isn't very helpful. The problem is, sox determines the output format based on the output filename you provide. If the filename is -, sox doesn't know if you want wav, ogg, or what. You can manually specify the format and make sox happy.
$ sox 1.mp3 2.mp3 -t wav - | mplayer -
...however, now mplayer isn't happy. It wants to seek when opening the file, but can't do that when reading from stdin, so the above command will fail too. There might be some way to make that work, but it's probably not worth it, since you still won't be able to seek when you want to. As long as you have the disk space, just write a temporary file:
$ sox 1.mp3 2.mp3 out.wav ; mplayer out.wav ; rm out.wav
Now, I've been assuming this whole time that you're going to be joining files with the same sample rate and format. If they were all made as part of a matching set, then that is almost certainly the case, but if they aren't then sox will get mad. Working around that is kind of a headache, so unless anybody needs me to explain, I'd just as soon leave that issue alone.
-Corey _______________________________________________ MPlayer-users mailing list MPlayer-users@xxxxxxxxxxxx http://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Thanks very much for your solution. Actually, using the method of piping sox's output to mplayer worked fine for me, aside from one warning printed by sox. Of course, since MPlayer reads the audio from stdin, no keystrokes are recognized, but that's not a problem when I just want to listen to the stream from beginning to end.
Thanks again for your help. _______________________________________________ MPlayer-users mailing list MPlayer-users@xxxxxxxxxxxx http://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
| [Prev in Thread] | Current Thread | [Next in Thread] |