Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #233475 > unrolled thread
| Started by | "Susmita/Rajib" <bkpsusmitaa@gmail.com> |
|---|---|
| First post | 2021-03-25 13:10 +0100 |
| Last post | 2021-03-25 21:30 +0100 |
| Articles | 19 — 10 participants |
Back to article view | Back to linux.debian.user
Re: how to record sound to mp3 "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2021-03-25 13:10 +0100
Re: how to record sound to mp3 Long Wind <longwind2@yahoo.com> - 2021-03-25 13:30 +0100
Re: how to record sound to mp3 <tomas@tuxteam.de> - 2021-03-25 13:40 +0100
Re: how to record sound to mp3 David Wright <deblis@lionunicorn.co.uk> - 2021-03-25 17:10 +0100
Re: how to record sound to mp3 Nicolas George <george@nsup.org> - 2021-03-25 17:50 +0100
Re: how to record sound to mp3 ghe2001 <ghe2001@protonmail.com> - 2021-03-25 18:00 +0100
Re: how to record sound to mp3 [wav, for those who can] David Wright <deblis@lionunicorn.co.uk> - 2021-03-25 23:00 +0100
Re: how to record sound to mp3 [wav, for those who can] Nicolas George <george@nsup.org> - 2021-03-25 23:30 +0100
Re: how to record sound to mp3 [wav, for those who can] <tomas@tuxteam.de> - 2021-03-26 08:40 +0100
Re: how to record sound to mp3 [wav, for those who can] Michael Lange <klappnase@freenet.de> - 2021-03-26 09:50 +0100
Re: how to record sound to mp3 [wav, for those who can] Michael Lange <klappnase@freenet.de> - 2021-03-26 10:20 +0100
Re: how to record sound to mp3 [wav, for those who can] David Wright <deblis@lionunicorn.co.uk> - 2021-03-26 17:10 +0100
Re: how to record sound to mp3 [wav, for those who can] Linux-Fan <Ma_Sys.ma@web.de> - 2021-03-26 00:20 +0100
Re: how to record sound to mp3 Long Wind <longwind2@yahoo.com> - 2021-03-25 19:40 +0100
Re: how to record sound to mp3 Greg Wooledge <greg@wooledge.org> - 2021-03-25 19:50 +0100
Re: how to record sound to mp3 Nicolas George <george@nsup.org> - 2021-03-25 20:00 +0100
Re: how to record sound to mp3 Greg Wooledge <greg@wooledge.org> - 2021-03-25 20:20 +0100
Re: how to record sound to mp3 Nicolas George <george@nsup.org> - 2021-03-25 21:00 +0100
Re: how to record sound to mp3 Celejar <celejar@gmail.com> - 2021-03-25 21:30 +0100
| From | "Susmita/Rajib" <bkpsusmitaa@gmail.com> |
|---|---|
| Date | 2021-03-25 13:10 +0100 |
| Subject | Re: how to record sound to mp3 |
| Message-ID | <BWwYh-3q7-1@gated-at.bofh.it> |
Please install (if not already) gnome-sound-recorder and set up settings there itself. You could even record on the fastest recording option feasible for your system, and then use soundconverter to convert the sound to mp3. Best.
[toc] | [next] | [standalone]
| From | Long Wind <longwind2@yahoo.com> |
|---|---|
| Date | 2021-03-25 13:30 +0100 |
| Message-ID | <BWxhD-3wP-3@gated-at.bofh.it> |
| In reply to | #233475 |
[Multipart message — attachments visible in raw view] — view raw
Thanks to all that reply! now i modify my requirement tohow to use arecord to record sound being played to wav file i use buster, how to set default sound recording source?in early debian distro(stretch?) sound mixer can be used to set recording source PS: i use twm, i'm afraid that gnome recorder isn't good choice for me
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-03-25 13:40 +0100 |
| Message-ID | <BWxrk-3A8-1@gated-at.bofh.it> |
| In reply to | #233478 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Mar 25, 2021 at 12:20:56PM +0000, Long Wind wrote: > Thanks to all that reply! > now i modify my requirement tohow to use arecord to record sound being played to wav file > i use buster, how to set default sound recording source?in early debian distro(stretch?) sound mixer can be used to set recording source > PS: i use twm, i'm afraid that gnome recorder isn't good choice for me Ah -- twm. Fond memories. I upgraded to Fvwm :-) Back on topic: I see you have a minimalistic setup. Perhaps you need alsamixer/amixer to learn about your sources and get the sound routing right. Sorry, I'm a bit tight on time, otherwise I'd play a bit around to see whether it works. If you are playing something with mplayer, perhaps you don't need a recording app at all -- (see mplayer's "-ao" option, for "audio output". Something around mplayer ... -ao "mp3:file=foo.mp3" might just work for you). Cheers - t
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2021-03-25 17:10 +0100 |
| Message-ID | <BWAIy-5Ls-9@gated-at.bofh.it> |
| In reply to | #233478 |
On Thu 25 Mar 2021 at 12:20:56 (+0000), Long Wind wrote:
> now i modify my requirement to how to use arecord to record sound being played to wav file
That makes it easier as there's less work for the CPU to do.
> i use buster, how to set default sound recording source?
One way is to run alsamixer in an xterm.
Help is in the top-right corner.
$ arecord -l will give you a list of capture devices.
To record, you could type, for example, in another xterm:
$ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav
where 10 gives you ten seconds; 0 gives you infinite (^C to stop),
cd gives higher quality (44100) than the default,
dat would give you the more modern 48000,
-v … gives a crude VU meter,
0,0 is the bit you have to determine from arecord -l
⮤ device
⮤ card (usually 0, but matters if you have, say, PCH and HDMI).
While arecord is running, you can play with the sliders for levels,
including monitoring with speakers/headphones, and changing the
capture device with <SPACE BAR>.
> in early debian distro (stretch?) sound mixer can be used to set recording source
Yes, I used to use aumix, but that's OSS (passé), not ALSA.
> PS: i use twm, i'm afraid that gnome recorder isn't good choice for me
If you can't get ALSA to work, you might have to use pulseaudio instead.
I believe that can overcome a card's limitations through software.
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | Nicolas George <george@nsup.org> |
|---|---|
| Date | 2021-03-25 17:50 +0100 |
| Message-ID | <BWBlg-5Zw-13@gated-at.bofh.it> |
| In reply to | #233492 |
[Multipart message — attachments visible in raw view] — view raw
David Wright (12021-03-25): > > now i modify my requirement to how to use arecord to record sound being played to wav file > To record, you could type, for example, in another xterm: > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav This command does not record the sound being played. Regards, -- Nicolas George
[toc] | [prev] | [next] | [standalone]
| From | ghe2001 <ghe2001@protonmail.com> |
|---|---|
| Date | 2021-03-25 18:00 +0100 |
| Message-ID | <BWBuY-62x-15@gated-at.bofh.it> |
| In reply to | #233495 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, March 25, 2021 10:40 AM, Nicolas George <george@nsup.org> wrote: > David Wright (12021-03-25): > > > > now i modify my requirement to how to use arecord to record sound being played to wav file > > > To record, you could type, for example, in another xterm: > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav Have you tried Audacity? GUI, but works good (you need to install the mp3 library to save to mp3). -- Glenn English -----BEGIN PGP SIGNATURE----- Version: ProtonMail wsBzBAEBCAAGBQJgXMENACEJEJ/XhjGCrIwyFiEELKJzD0JScCVjQA2Xn9eG MYKsjDKEdwgAl0gm+YUMCCknEjtCKj3i6iZloZtoKYwoxUEcRlxPEsbWPaDe EA0AqwGH5kXz+hrgdcAIQmEiDq3Pc+cHOq0vLX9fAvTbwW9mSdcyGfCti5DU awM7S8rmEj5lDTbn8veMdEr0hnM8c9mmTFEF0hmyTtYm4krnk/RXj/73zJso a8dVHL1GvPa09xR7oQQeRcyrvCQgjvCSiu+6AygapmzWl4yHuxZcWjPciYgZ j9uL3/Hwzxy7tZVHa9AGR9O1J09IgOdM4VghepJcDowO3KVGDYJfiryjActY sjZ7XJ7PQbnGGxhGNpR/I23qyCGwfA2ebsfVfYcCn+u1euNNYoXFag== =QEOi -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2021-03-25 23:00 +0100 |
| Subject | Re: how to record sound to mp3 [wav, for those who can] |
| Message-ID | <BWGbf-H4-1@gated-at.bofh.it> |
| In reply to | #233495 |
[Multipart message — attachments visible in raw view] — view raw
On Thu 25 Mar 2021 at 17:40:51 (+0100), Nicolas George wrote: > David Wright (12021-03-25): > > > now i modify my requirement to how to use arecord to record sound being played to wav file > > > To record, you could type, for example, in another xterm: > > > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav > > This command does not record the sound being played. … on your machine. That's why I wrote "If you can't get ALSA to work…". You're a candidate for pulseaudio, I assume. AFAICT, this recording facility is getting harder to find on most computers, if you're not prepared to fork out for a sound card. I've been fortunate, in that just as my ancient Pentium III expired, I have acquired a Dell Precision T3500 which has a well endowed (integrated) sound card. I'm still finding my way round it: for example, it also has HDMI playback, but I haven't yet worked out how to exploit it. The machine has one DVI output and two DisplayPorts, so I need to find a DisplayPort/HDMI adapter to see if that would yield anything. It also has two Capture devices, and I don't know whether that means there are two independent sound paths. If so, then I should be able to record from the browser to one file, and from a TV (my UK one has headphone output) or the Roku remote control to another file at the same time. Anyway, I just recorded a bit of audio from Abbey Road (the live webcam¹, not the album), and printed the settings of all the controls (attached). AIUI at present, the critical section is at the end, specifically: Simple mixer control 'Input Source',0 Capabilities: cenum Items: 'Mic' 'Line' 'Stereo Mix' Item0: 'Stereo Mix' IOW, I'm recording from the mixer. ¹ https://www.abbeyroad.com/Crossing Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Nicolas George <george@nsup.org> |
|---|---|
| Date | 2021-03-25 23:30 +0100 |
| Subject | Re: how to record sound to mp3 [wav, for those who can] |
| Message-ID | <BWGEh-16L-7@gated-at.bofh.it> |
| In reply to | #233515 |
[Multipart message — attachments visible in raw view] — view raw
David Wright (12021-03-25): > > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav > > This command does not record the sound being played. > … on your machine. On no machine, unless specifically configured, which is not trivial at all. It would be helpful if people around here learned to read carefully the questions before trying to answer them. If they did, they would have noticed that the question was not to record the ambient sound but the sound BEING PLAYED. To achieve it requires either a hardware connection between the output and the input of the sound controller or the collaboration of the sound driver. Regards, -- Nicolas George
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2021-03-26 08:40 +0100 |
| Subject | Re: how to record sound to mp3 [wav, for those who can] |
| Message-ID | <BWPey-6Lz-3@gated-at.bofh.it> |
| In reply to | #233517 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Mar 25, 2021 at 11:22:35PM +0100, Nicolas George wrote: > David Wright (12021-03-25): > > > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav > > > This command does not record the sound being played. > > … on your machine. > > On no machine, unless specifically configured, which is not trivial at > all. No idea about pulse. For ALSA, there's alsaloop, which comes with a man page. Part of alsa-utils. No need of playing with cable loops. > It would be helpful if people around here learned to read carefully the > questions before trying to answer them [...] (I was on the verge of making a snarky comment to that, but I'll bite my tongue). Cheers - t
[toc] | [prev] | [next] | [standalone]
| From | Michael Lange <klappnase@freenet.de> |
|---|---|
| Date | 2021-03-26 09:50 +0100 |
| Subject | Re: how to record sound to mp3 [wav, for those who can] |
| Message-ID | <BWQkh-7rP-1@gated-at.bofh.it> |
| In reply to | #233544 |
Hi, On Fri, 26 Mar 2021 08:38:02 +0100 <tomas@tuxteam.de> wrote: > On Thu, Mar 25, 2021 at 11:22:35PM +0100, Nicolas George wrote: > > David Wright (12021-03-25): > > > > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav > > > > This command does not record the sound being played. > > > … on your machine. > > > > On no machine, unless specifically configured, which is not trivial at > > all. > > No idea about pulse. For ALSA, there's alsaloop, which comes with a > man page. Part of alsa-utils. No need of playing with cable loops. another possibility: when the snd-mixer-oss module is loaded, (at least here) when using the OSS mixer device there is a "Vol" control which roughly appears to be the OSS equivalent to Alsa's "Master" control, however the "Vol" control has an additional "Capture" switch. Now, when I set "Vol" as capture device, the audio output will be used as input for recording. Recording level can be adjusted with the "PCM" mixer control. Of course, the presence of this "Vol" control may depend on the sound card / driver in use. Oddly, there seems to be no such easy way to achieve the same result with alsamixer/amixer. Plus, I don't know how to switch the OSS capture device programmatically (if this is important for the OP's purpose). Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. I thought my people would grow tired of killing. But you were right, they see it is easier than trading. And it has its pleasures. I feel it myself. Like the hunt, but with richer rewards. -- Apella, "A Private Little War", stardate 4211.8
[toc] | [prev] | [next] | [standalone]
| From | Michael Lange <klappnase@freenet.de> |
|---|---|
| Date | 2021-03-26 10:20 +0100 |
| Subject | Re: how to record sound to mp3 [wav, for those who can] |
| Message-ID | <BWQNj-7Uj-5@gated-at.bofh.it> |
| In reply to | #233547 |
On Fri, 26 Mar 2021 09:47:28 +0100
Michael Lange <klappnase@freenet.de> wrote:
> Plus, I don't know how to switch the OSS capture
> device programmatically (if this is important for the OP's purpose).
uh, got it.
$ aumix -v R
sets "Vol" as capture device.
Regards
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
A man either lives life as it happens to him, meets it head-on and
licks it, or he turns his back on it and starts to wither away.
-- Dr. Boyce, "The Menagerie" ("The Cage"), stardate
unknown
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2021-03-26 17:10 +0100 |
| Subject | Re: how to record sound to mp3 [wav, for those who can] |
| Message-ID | <BWXc6-3xa-7@gated-at.bofh.it> |
| In reply to | #233517 |
On Thu 25 Mar 2021 at 23:22:35 (+0100), Nicolas George wrote: > David Wright (12021-03-25): > > > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav > > > This command does not record the sound being played. > > … on your machine. > > On no machine, unless specifically configured, which is not trivial at > all. I'm afraid it's my PCs that are making a liar of you. > It would be helpful if people around here learned to read carefully the > questions before trying to answer them. If they did, they would have > noticed that the question was not to record the ambient sound but the > sound BEING PLAYED. What, you think that I left the speakers running so that the microphone could record them? Or did you think that the sound of Thursday evening traffic in St John's Wood would carry across six timezones? Or you think that's it's impossible that I should have been able to record sound the computer is playing (from whatever source, external or internal) on an OOTB PC for over twenty years? Is that why you're shouting? Anyway, back to talking about PCs. > To achieve it requires either a hardware connection > between the output and the input of the sound controller That's my understanding. Using the terminology of the High Definition Audio Specification (Revision 1.0a June 17, 2010), there is presumably a link from the § 7.2.3.4 Mixer (Summing Amp) Widget output to the § 7.2.3.5 Selector (Multiplexer) Widget. This link in inside the Widget Interconnection "Cloud" of Figure 49, Module-Based Codec Architecture. "The exact number of possible inputs to each widget is determined by design;" (§ 7.1.1), which is why you can't just conjure up any facility on any PC. But the machine is no more "specifically" configured than any PC which has HDA and a mobo: the vendor (Intel on my old one, Dell on the new) decides how much of the architecture they will implement. And the modern way seems to be to go cheap, particularly with consumer-grade. OK, this one's a decent machine, but it's still a 10-yr old cast off. Perhaps take a look at the specification and see how much is left open to the vendor. Hence the need for scripts like alsa-info to tell you exactly what you've bought with any given "sound card". This PC was not cheap when it was bought, largely because it's supposed to be fast: it was bought for students to run geophysics programs on. You can now pick them up for just over $100. If I ever have to hand it back, I might just do that. It'll be the first computer I've ever bought. > or the > collaboration of the sound driver. I assume by this that you're talking about pulseaudio. That's why I've mentioned it each and every time. (This is the third—should I put it in my signature?) I can't advise how the OP might use it, because *I* don't¹. But perhaps that's not expected here—one just replies "pulseaudio" like the people saying "audacity" or "sox" or whatever. Finally, who's the audio expert round here? I posted what I think is a determining factor for just vanilla ALSA and the card to work with my command line. Presumably there's a definitive answer to this? Do *you* have it? ¹ self-imposed simplicity: no PA, no OSS. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Linux-Fan <Ma_Sys.ma@web.de> |
|---|---|
| Date | 2021-03-26 00:20 +0100 |
| Subject | Re: how to record sound to mp3 [wav, for those who can] |
| Message-ID | <BWHqF-1FR-1@gated-at.bofh.it> |
| In reply to | #233515 |
[Multipart message — attachments visible in raw view] — view raw
David Wright writes: > On Thu 25 Mar 2021 at 17:40:51 (+0100), Nicolas George wrote: > > David Wright (12021-03-25): [...] > > > To record, you could type, for example, in another xterm: > > > > > > $ arecord -d 10 -f cd -v -v -v -D plughw:0,0 /tmp/audiofile.wav > > > > This command does not record the sound being played. > > … on your machine. That's why I wrote "If you can't get ALSA to work…". > You're a candidate for pulseaudio, I assume. Not sure about that command above (no means to try it just now), but _with_ PulseAudio, I can record the sound that is being played back just fine by means of "monitor" audio devices. E.g. I have the following command to record my screen (`0:v`), the "monitor" device (`1:a`) and a microphone (`2:a`): exec ffmpeg -video_size 1600x1200 -framerate 12 -f x11grab -i :0.0+0,0 -f pulse -ac 2 -i 0 -f pulse -i 1 -c:v libvpx-vp9 -deadline realtime -b:v 2M -c:a libvorbis -map 0:v -map 1:a -map 2:a "recording.webm" adapted from these two sources: -> https://trac.ffmpeg.org/wiki/Capture/Desktop -> https://askubuntu.com/questions/682144/capturing-only-desktop-audio-with-ffmpeg It may of course be true that the hardware _does_ support/accellerate this monitoring capability, but it does not seem to be entirely uncommon a feature? Here, it even works inside virtual machines :) Btw. the existence of monitor devices can be checked in `pavucontrol` where under "Output" it lists two monitor devices here: One for the HDMI output and one for the "Built-in Analog Stereo" Output. > AFAICT, this recording facility is getting harder to find on most > computers, if you're not prepared to fork out for a sound card. > I've been fortunate, in that just as my ancient Pentium III expired, > I have acquired a Dell Precision T3500 which has a well endowed > (integrated) sound card. > > I'm still finding my way round it: for example, it also has HDMI > playback, but I haven't yet worked out how to exploit it. The machine > has one DVI output and two DisplayPorts, so I need to find a > DisplayPort/HDMI adapter to see if that would yield anything. [...] As far as I can tell, DisplayPort can transport audio without the need for an HDMI adapter. Here, a Radeon Pro W5500 graphics card is connected to a Dell U2713HM display which has one HDMI, DP, VGA and DVI input each. The W5500 is connected to the DisplayPort and if I play sound to the "HDMI" output, the display outputs that sound through its headphones socket. Similar to your case, there are no HDMI ports on the graphics card. In my case, it is only DisplayPorts. HTH Linux-Fan öö
[toc] | [prev] | [next] | [standalone]
| From | Long Wind <longwind2@yahoo.com> |
|---|---|
| Date | 2021-03-25 19:40 +0100 |
| Message-ID | <BWD3H-74B-1@gated-at.bofh.it> |
| In reply to | #233492 |
[Multipart message — attachments visible in raw view] — view raw
zhou@debian:~$ arecord -l **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 2: ALC662 rev1 Alt Analog [ALC662 rev1 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 Thank David and Nicolas!but Nicolas is right, David's command doesn't worki think keyword here is playbackto get David's instruction to work, i need audio cable to connect sound card's output to sound card's input, (this isn't perfect solution) , but i can't find such cable right now i may try pulseaudio i ask other question: which command can merge two mp3 file?this command is mp3 file version of DOS command "copy file1+file2 file3"
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-03-25 19:50 +0100 |
| Message-ID | <BWDdo-78D-5@gated-at.bofh.it> |
| In reply to | #233505 |
On Thu, Mar 25, 2021 at 06:29:43PM +0000, Long Wind wrote: > i ask other question: which command can merge two mp3 file?this command is mp3 file version of DOS command "copy file1+file2 file3" The Unix version of that is: cat file1 file2 > file3 However, this is NOT something you can do with MP3 files. They are not designed to be concatenated. (Ogg Vorbis files *are*. MP3 files aren't.) I tried this: unicorn:~$ apt-cache search concatenate mp3 poc-streamer - MP3/Ogg multicast/HTTP streamer and MP3 cutting tool You can check that out, or try your own searches. Or wait for other people to respond with suggestions.
[toc] | [prev] | [next] | [standalone]
| From | Nicolas George <george@nsup.org> |
|---|---|
| Date | 2021-03-25 20:00 +0100 |
| Message-ID | <BWDn4-7c1-1@gated-at.bofh.it> |
| In reply to | #233506 |
[Multipart message — attachments visible in raw view] — view raw
Greg Wooledge (12021-03-25): > However, this is NOT something you can do with MP3 files. They are not > designed to be concatenated. (Ogg Vorbis files *are*. MP3 files aren't.) It's the other way around. Pure MP3 files are just a concatenation of self-delimited packets, concatenation will just work. MP3 files will usually have ID3 and/or XING packets for metadata at the beginning or the end, concatenation will include them, and the metadata will be invalid, but it will not prevent the file from being played. On the other hand, Ogg files are NOT concatenable, even those that contain only Vorbis audio. Some player will ignore the discontinuity at the concatenation points, but not all. Also, let it be said that: decoding playing, recording and encoding audio files to concatenate them is a terrible idea, because it will lose quality both because of the decoding-encoding step and because of the numeric-analog-numeric step. Regards, -- Nicolas George
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2021-03-25 20:20 +0100 |
| Message-ID | <BWDGp-7yp-11@gated-at.bofh.it> |
| In reply to | #233507 |
On Thu, Mar 25, 2021 at 07:51:42PM +0100, Nicolas George wrote: > On the other hand, Ogg files are NOT concatenable, even those that > contain only Vorbis audio. Some player will ignore the discontinuity at > the concatenation points, but not all. I was told *by the developer* (Monty, in #vorbis IRC long ago) that Ogg Vorbis files were designed for this. A few Google searches to provide supporting evidence: https://linux.die.net/man/1/oggz-merge If you want to create a file containing some Ogg files sequenced one after another, then you should simply concatenate them together using cat. In Ogg this is called "chaining". If you cat Ogg Vorbis I audio files together, then the result will also be a compliant Ogg Vorbis file. https://hydrogenaud.io/index.php?topic=114262.0 Chaining in an ogg container is as simple as it gets. Just concatenate two separate ogg files together, the result is a chained file. However, I will note that there *are* players that don't handle chained Ogg Vorbis files properly. So, make sure you test with the actual player you intend to use.
[toc] | [prev] | [next] | [standalone]
| From | Nicolas George <george@nsup.org> |
|---|---|
| Date | 2021-03-25 21:00 +0100 |
| Message-ID | <BWEj7-7YY-3@gated-at.bofh.it> |
| In reply to | #233510 |
[Multipart message — attachments visible in raw view] — view raw
Greg Wooledge (12021-03-25): > I was told *by the developer* (Monty, in #vorbis IRC long ago) that > Ogg Vorbis files were designed for this. Yes, I know concatenation is supposed to be a feature, but they messed it up. You may not know, but the expert consensus is that, although the codec Vorbis was excellent, and Opus even better, the design of the format Ogg was terrible. The non-working concatenation is not the worse part. The worse part is probably that supporting any new codec in Ogg requires code, and non-trivial code even. Look at this: http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=blob;f=libavformat/oggparseopus.c Compare to what it takes to support the same codec in Matroska: http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=commit;h=30549294ef0f796d48b1ffa482bd9315d4dbb83c > However, I will note that there *are* players that don't handle > chained Ogg Vorbis files properly. So, make sure you test with the > actual player you intend to use. If concatenation really did work, it would work with all players, because they would not even be able to detect it happened. But it is worse than that, it is not weird players not handling the format correctly that do not work. Concatenation works with players that play it fast and loose with the format and fails with players that support it completely, because they take the serial id of the streams into account. Regards, -- Nicolas George
[toc] | [prev] | [next] | [standalone]
| From | Celejar <celejar@gmail.com> |
|---|---|
| Date | 2021-03-25 21:30 +0100 |
| Message-ID | <BWEM9-8nW-5@gated-at.bofh.it> |
| In reply to | #233507 |
On Thu, 25 Mar 2021 19:51:42 +0100 Nicolas George <george@nsup.org> wrote: > Greg Wooledge (12021-03-25): > > However, this is NOT something you can do with MP3 files. They are not > > designed to be concatenated. (Ogg Vorbis files *are*. MP3 files aren't.) > > It's the other way around. Pure MP3 files are just a concatenation of > self-delimited packets, concatenation will just work. > > MP3 files will usually have ID3 and/or XING packets for metadata at the > beginning or the end, concatenation will include them, and the metadata > will be invalid, but it will not prevent the file from being played. > > On the other hand, Ogg files are NOT concatenable, even those that > contain only Vorbis audio. Some player will ignore the discontinuity at > the concatenation points, but not all. > > Also, let it be said that: decoding playing, recording and encoding > audio files to concatenate them is a terrible idea, because it will lose > quality both because of the decoding-encoding step and because of the > numeric-analog-numeric step. The FFmpeg wiki has some very useful information on concatenating media files where a simple 'cat' won't work - I use its 'concat demuxer' regularly to contatenate MP4 files (Android starts a new video file when a 4GB limit is hit): https://trac.ffmpeg.org/wiki/Concatenate Celejar
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web