Page 1 of 1

mp3 encoding on Linux

PostPosted: Wed Mar 03, 2021 6:56 pm
by Devonavar
I was pleased to see this note in the release notes for Resolve Studio 17:
Decoding and encoding mp3 audio in Linux.


I'm pleased to note that importing mp3s works flawlessly.

I still can't figure out how to export files with mp3s. Mp3 doesn't show up as an option in the deliver page, I'm still restricted to IEEE Float and Linear PCM. Am I missing something simple, or is this option not enabled as advertised?

Re: mp3 encoding on Linux

PostPosted: Wed Mar 03, 2021 7:27 pm
by smunaut
Yeah same here ... can't see any option to encode to mp3.
And I'm using Studio, release 17.0

Re: mp3 encoding on Linux

PostPosted: Thu Mar 04, 2021 3:56 pm
by peter.quiel
Encoding MP3 files works for me, but I can't encode it in container format.
MP3 isn't shown in the audio codec export drop down as well.

Know issue? Anything I can do?

Re: mp3 encoding on Linux

PostPosted: Thu Mar 04, 2021 7:31 pm
by Devonavar
peter.quiel wrote:Encoding MP3 files works for me, but I can't encode it in container format.
MP3 isn't shown in the audio codec export drop down as well.

Know issue? Anything I can do?


I can't even get that far. Even selecting "Audio Only" doesn't give me the option, but thanks for the tip that container format changes which export options are available. It sounds to me like this should be reported as a bug ... probably all that needs to happen is mp3 needs to be added as an export option for containers that support it.

Re: mp3 encoding on Linux

PostPosted: Thu Mar 04, 2021 8:56 pm
by peter.quiel
Ohh sorry. I meant decoding.

I can put a mp3 file into my media pool and decode it. But I can't decode the audio of a mov with h264 or h265 file.
The video is decoded, but I can't hear anything.

The log says:
```
position: 439440 - Failed to decode the audio samples
```
for each position that can't be decoded.

For encoding: I don't see mp3 at all. If I choose MP4 as a container format, I can't select any audio codec.

Re: mp3 encoding on Linux

PostPosted: Fri Mar 05, 2021 1:42 am
by Shrinivas Ramani
Peter, Devon,

If you cannot decode mp3 audio from specific clips, please add a link containing
a. a diagnostic log archive (see FAQ)
b. a sample clip that cannot be decoded.

Please also include a fuller description of your system and software - CPU, GPU, RAM, operating system, drivers, Resolve version, Studio/Free, peripherals etc. We do encourage posters to keep this information in their user signature to provide immediate context.

Regards
Shrinivas

Re: mp3 encoding on Linux

PostPosted: Sat Mar 06, 2021 11:18 pm
by Devonavar
Shrinivas Ramani wrote:Peter, Devon,

If you cannot decode mp3 audio from specific clips, please add a link containing
a. a diagnostic log archive (see FAQ)
b. a sample clip that cannot be decoded.

Please also include a fuller description of your system and software - CPU, GPU, RAM, operating system, drivers, Resolve version, Studio/Free, peripherals etc. We do encourage posters to keep this information in their user signature to provide immediate context.

Regards
Shrinivas


Thanks Shrinivas! As per my original post (and the title of the thread), I have no problems *decoding* mp3s. I'm wondering about *encoding* them, which is listed in the changelog as newly supported. Should I assume the changelog is incorrect and only decoding works?

Re: mp3 encoding on Linux

PostPosted: Sat Mar 06, 2021 11:33 pm
by Devonavar
peter.quiel wrote:I can put a mp3 file into my media pool and decode it. But I can't decode the audio of a mov with h264 or h265 file.
The video is decoded, but I can't hear anything.


Sorry if this is stating the obvious, but you can't assume that the audio codec in an h.264 or h.265 mov file is mp3 based. In fact, usually it's not, but .mov supports almost every audio codec under the sun, so it could be anything. From the sound of it, you have a file with an unsupported audio codec (not surprising, since on Linux, that is most of them). The most commonly used audio codec with h.264/h.265 would be AAC which is ... not supported.

Your best bet is transcoding just the audio to PCM. This is a decent guide for doing it automatically and in-place: https://passthroughpo.st/painless-linux ... -workflow/

Re: mp3 encoding on Linux

PostPosted: Mon Mar 08, 2021 7:08 pm
by peter.quiel
Devonavar wrote:Sorry if this is stating the obvious, but you can't assume that the audio codec in an h.264 or h.265 mov file is mp3 based. In fact, usually it's not, but .mov supports almost every audio codec under the sun, so it could be anything. From the sound of it, you have a file with an unsupported audio codec (not surprising, since on Linux, that is most of them). The most commonly used audio codec with h.264/h.265 would be AAC which is ... not supported.


Good point and your right, h.264/h.265 it's often AAC. In this case I transcoded the files my self and I used h.265 vcodec, mp3 acodec in a mov container.

And sorry for hijacking this thread, because it's about encoding mp3. That doesn't work (can't select it on the export page) on my machine as well.

I will create an example clip and provide all information needed to trace down the cause.

Re: mp3 encoding on Linux

PostPosted: Wed Mar 10, 2021 9:53 pm
by smunaut
Still nothing in 17.1 Studio AFAICT.

Re: mp3 encoding on Linux

PostPosted: Thu Mar 11, 2021 5:52 am
by Peter Chamberlain
Sorry, i've updated the read me above. Encoding is not included.
It was a cut and paste error in the docs.

Re: mp3 encoding on Linux

PostPosted: Thu Mar 11, 2021 6:54 am
by smunaut
Oh :/
Unfortunate, but thanks for the update, at least we can stop looking for it.

Well I guess better get decoding than encoding. At least the plugin architecture should allow to work around it.

Re: mp3 encoding on Linux

PostPosted: Fri Mar 12, 2021 11:41 pm
by Devonavar
Peter Chamberlain wrote:Sorry, i've updated the read me above. Encoding is not included.
It was a cut and paste error in the docs.


Thank you for confirming. Decoding is much appreciated!