MP4 support

I have seen threads here from the past where some have asked for MP4 support and even gone as far to change file extensions to achieve this. I don’t need to play the video part, but I have about 10,000 MP4 videos that would be amazing if I could play the audio in Roon.

With Roon being so complete, is there a plugin or something that could achieve this?

I think you need to elaborate since MP4 is a container for video and Roon is an audio player. Although the container includes supported audio formats including AAC, ALAC, FLAC, and MP3, Roon may not recognise these. Even when the extenstion is changed to M4A the underlying codec may not be unsupported or Roon cannot determine the codec type because Roon lacks some metadata features, e.g. audio books.

You may fare better using media converter of ffmpeg to extract the audio.

To summarize what I wrote above

10,000 mp4 video files.

I want to play the audio in Roon.

I fully understand Roon is “not a video player” even though I think it supports video files in Tidal in some capacity that I have not explored.

To clarify better from above, I read a post about changing the extension to get it to work. I did not actually do this as that was from 2016-2017. It would also break a lot of things as that 2016 user figured out, I knew it would.

I understand that Roon is a high res audio player. I want to be able to see the mp4 files in Roon browser and play the audio. That may be a feature request, and I am sure I am maybe 1 of 10 in this situation, which is why it is probably not there already.

It just seems like the ingredients are so close to being there. I literally wouldn’t need another player if this could happen. All media in one spot.

I also understand that Roon is more about Audiophile playback, but if it can play AAC (and it does) there has to be similar mp4 abilities in there.

I attempted to explain that MP4 is a container, not a codec, and can contain both video and audio codecs, some that are proprietary.

It seems that you want Roon to process MP4 files that contain both video and audio? Currently, Roon does support audio-only MP4, i.e., M4A, so long as the codec is supported, e.g., AAC, ALAC, FLAC, MP3 etc.

Obviously the request is for native .mp4 support, but if you or anyone else wants a workaround while you wait for that…

--

Where are the .mp4 files from?

Given the volume I’m guessing ripped from YouTube or similar? If so they are likely to contain AAC which Roon will play if wrapped in an audio container like .m4a (the audio equivalent of a .mp4 video container).

What platform are you using? What is your technical expertise?

The simplest option to just use a desktop app like dBpoweramp to re-mux or re-encode the files to an audio format Roon supports.

If you’re technically minded:

Two routes:

  1. Make a shadow directory structure of .m4a files

Use ffmpeg to make a recursive mirrored directory structure alongside your video directory, and just re-mux, rather than re-encode, the audio into a .m4a container.

ffmpeg -nostdin -i input.mp4 -vn -c:a copy -map_metadata 0 output.m4a

You’ll most likely want to wrap this in a find statement along with some parallelism

find /path/to/videos -name ‘*.mp4’ -print0 |
parallel -0 -j6 ‘ffmpeg -nostdin -loglevel error -i {} -vn -c:a copy -map_metadata 0 “{.}.m4a” || echo “FAILED: {}” >> ~/remux_failures.log’

You probably also want to set this up as an automated job so with some better debugging / logging so that it can watch for new .mp4 files and convert them automatically / periodically.

Personally I’d get your favourite LLM Claude, Chat GPT etc, to help you write and test the above code, and put the resultant files in a mirrored directory structure and keep it in sync, don’t just copy what I have pasted. It’s purely there as an example, not final code.

Don’t set Roon to watch the shadow directory until you have created the initial 10,000 .m4a files.

Before you run anything test it out on a tiny test set / keep a backup of your original files.

  1. Use a transcoding filesystem

Rather than re-encode every file as a .m4a file in a shadow directory, you could use a FUSE based virtual transcoding filesystem.

On paper this sounds like the perfect solution, but unless you disable the ‘audio analysis’ setting in Roon’ this route will try and re-encode (and cache) every video file when the happens, which probably isn’t what you want.

--

One last thing to note with both solutions (workarounds?).

If the files originated from YouTube or similar they’ve probably got very messy metadata and will end up in Roon as un-indexed, so this is likely the bigger issue even once you solve the 'How can I get Roon to play the audio form my video files" problem.

This would also be the case if Roon supported the playback of audio tracks within an .mp4 container natively, which I expect is another reason they have bene reluctant to do that.

2 Likes

They are not YouTube or any other public rips. They are all legit purchases with higher quality bit rate. It’s why I don’t want to and won’t re-rip them. They are also tied to hundreds of iTunes playlists that Roon could show them in, which I would lose if they change form. Beyond that, I agree with you Jamie.

It would be great if Roon could comment on if there were any plans. But again, I know I am a special case. Which is why I am looking at gaining access to them in Roon in other ways.

With much respect to your technical knowledge mjw, I could care less the technical specs of container etc. The building blocks are here and the ask is clear. See and play mp4 audio in Roon as Jamie summarizes.

As for technical, very technical. Maybe not to your level, but with 10,000 legit purchases, this is clearly something I have done for over 15 years. Platform source should not matter, but I doubt they have AAC in there. I’ll take a look with media info tonight.

I like where you are going and will try to digest more of that workaround tonight. Thanks for contributing new ideas instead of debating technicals.

Maybe not, but you have shared very little about these files, and for all we know they may have DRM or some other proprietary and unsupported codec. MP4 support is simply too broad a definition because it is just a container.

Without details, you are unlikely to recieve votes from the community–and you haven’t voted either.

Fair, there is no DRM, I know they play in VLC and other video playback software options.

I am new to these forums, I am not sure I saw a poll

You should to try them in another music player.

Voting is at the top of the screen.

I did mention that I regularly use them in VLC and other video applications like DJ software where DRM is not supported.

I would like to add that there is a reason I can’t talk about where Pro play licensed music videos come from that just happen to remain dormant in my library every other day of the year. I can share details about the files too, I am just at work at my full time job. But where I buy them you need a business, as I did have and will reopen again. You could not just go get some to test for me. They are straight from labels and meant for DJ/VJ performance. Probably $15,000 of assets here.

Thank you for the tip on the poll, I will add my vote.

Here is a sample file, and Jamie was right AAC is in this file. But with 10,000 files and multiple sources, I don’t expect that to remain the same.

Hopefully this is enough to prove I actually possess MP4 files that could be playable with no DRM mjw.