Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally just remux, not reencode MP3 #30

Closed
Crissov opened this issue Oct 14, 2019 · 5 comments
Closed

Optionally just remux, not reencode MP3 #30

Crissov opened this issue Oct 14, 2019 · 5 comments
Labels
wontfix Something which won't be implemented or fixed

Comments

@Crissov
Copy link

Crissov commented Oct 14, 2019

If Iʼm reading FFMpegNativeConverter.java correctly, audio streams are only kept unchanged if they are already in AAC format. The standardized MP4 container format does support remuxed MP3 streams although Iʼm not sure which players do, iTunes in particular. FFmpeg seems to support this as well with -codec:a copy.

By the way, I could not see -f ipod being documented (anymore), perhaps it should be changed to -f mp4.

@yermak
Copy link
Owner

yermak commented Oct 15, 2019

Hi Crissov,

Thanks for your notes.
As for -f ipod, indeed it’s not properly documented feature, and it was needed to workaround early apple ipod issues - e.g. as described here https://www.metaltoad.com/blog/iphone-video-streaming-drupals-file-system. I used to find other evidences of it. I need to look in more details, it but it seems that on earlier version of ffmpeg output was different. I will need to retest output with different options on legacy ipod classic to verify.

As for mp4 container - you are absolutely correct, but i never seen m4b audiobook which contained mp3 codec inside, as far as i am concerned books normally encoded with AAC or ALAC.
If you can give me scenario why this could be needed, i will consider adding this - otherwise please feel free to fork. Probably we could add list of just remux format to config - thus you could customize it for yourself.
Note: i’m not trying to build universal audio convertor, but as simple as possible (for end user) audiobook convertor software.

@Crissov
Copy link
Author

Crissov commented Oct 15, 2019

Like many others, I have several older audiobooks that consist of a bunch of individual MP3 files (for chapters). Only remuxing them into an MP4 container, instead of first transcoding them to AAC, should be much faster. The resulting MP3-in-MP4 file size will probably be larger than AAC-in-MP4, but not take more space than the individual MP3 files I have now (especially on an HDD with large clusters). The audio quality, however, will not improve with AAC, but stay the same at best.

If iTunes and other players have no problems with MP3-in-MP4 files, which is something I have not tested yet, I would see no need for the transcoding step, but I understand that others would also warmly welcome the file size decrease by using a more efficient codec like AAC.

@yermak
Copy link
Owner

yermak commented Oct 17, 2019

Hi Crissov,
I tryied to remux mp3 into mp4 container, however, -f ipod parameter required to workaround some apple specific gives following result from ffmpeg:
[ipod @ 0000025ab1c68c40] Could not find tag for codec mp3 in stream #0, codec not currently supported in container

It seems ipod is not really mp4 container.
Switching to -f mp4 actually works, but this will require compatibility tests.
So, benefits are not clear for me - as reincoding is quite fast.

@yermak yermak added the wontfix Something which won't be implemented or fixed label Mar 31, 2020
@yermak yermak added feature to vote Feature which requires active community support to be implemented and removed wontfix Something which won't be implemented or fixed labels Nov 3, 2020
@yermak
Copy link
Owner

yermak commented Nov 3, 2020

@Crissov ,
As a workaround, i could suggest mering all mp3 into 1 single mp3. You will lose chapters functionality, this feature #100 is requested, but not on roadmap yet.

@yermak yermak added wontfix Something which won't be implemented or fixed and removed feature to vote Feature which requires active community support to be implemented labels Nov 3, 2020
@yermak
Copy link
Owner

yermak commented Nov 3, 2020

I will close this issue, as i prefer to have 1-2-1 mapping between output containers and codecs:
mp3-mp3
m4b-aac
ogg-opus

@yermak yermak closed this as completed Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Something which won't be implemented or fixed
Projects
None yet
Development

No branches or pull requests

2 participants