Audio Codecs

makem

Member
I have come across some .mkv files (74) of them which use an Opus codec, an open source codec.

My Panasonic TV is unable to play these and neither can my Humaxes/ My s8 phone can but it means my phone is tied up for 74 hours!

I was wondering if it was possible to install this codec on a Humax?
 
The video and audio data path is controlled exclusively from within Humax's black box code, so whatever Linux codecs we might install would be unable to access the output stream. For the same reasons, we cannot alter or create our own screen output.
 
It's the standard explanation for everyone that says "can you... (do something that means substituting the standard Humax output streams)".
 
What is the question syntax to elicit a full explanation when I do not know if something can or cannot be done?

Btw., I never said, "Can you............".
 
If you really want to play the .mkv files anywhere but on your phone you will probably need to re-encode the files.
I know a 2000T will play .mkv files with AVC video stream and AAC audio. I'm assuming there is no problem with the FOX-T2 playing files in a Matroska container, and that the video stream is not a problem.
It is possible, using ffmpeg (free), to copy the video stream and just re-encode the audio (from opus to aac?). I'm sure it is possible to do the same using other video editing/processing software.
 
Yes, prior to purchasing my s8, I would use handbrake to re-encode some .mkv files and could do so in this case. However, the thought of re-encoding 74 episodes, each nearly an hour long forced the question.

My wife (iphone user), now hogs my phone with a usb plugged into it to mirror the movie to our 55" tv. (50 hours more to go :) )

Btw., I've had a number of various phones and this s8 has really impressed me with it's capabilities.
 
It crosses my mind that somebody on the forum is using Mediatomb to transcode audio on the fly. Maybe it would be possible to use a similar configuration to stream to the TV's DLNA client.
 
Well, well, why didn't I think of it before? (Don't answer)

My smart TV can access youtube and I have a keyboard for it. So, I can search easily and stream episodes straight from youtube! I have my phone back :)

Still not sure how the tv can deal with the Opus codec whilst streaming but not from a usb stick or a file on the tv hd.
 
I'm using linux aand I use youtube-dl to download the file. If I watch the download progress it downloads the parts separately, using ffmpeg to merge them into a .mkv file which I can then play with VLC media player. The result does not play on the tv or humax box, failing with the audio. It does play on the s8.

If I use VLC to find the codec used it says Opus. How it gets from .mp4 to Opus I do not know.

This is the output for a typical download which may be of interest:

makem@SSDtosh:~$ youtube-dl [address of share]
[youtube] u5fjEY-slh8: Downloading webpage
[youtube] u5fjEY-slh8: Downloading video info webpage
[youtube] u5fjEY-slh8: Extracting video information
WARNING: unable to extract uploader nickname
[youtube] u5fjEY-slh8: Downloading MPD manifest
[download] Destination: 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f137.mp4
[download] 100% of 490.81MiB in 01:23
[download] Destination: 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f140.m4a
[download] 100% of 38.31MiB in 00:06
[ffmpeg] Merging formats into "那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.mp4"
Deleting original file 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f137.mp4 (pass -k to keep)
Deleting original file 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f140.m4a (pass -k to keep)
makem@SSDtosh:~$
[youtube] u5fjEY-slh8: Downloading webpage
[youtube] u5fjEY-slh8: Downloading video info webpage
[youtube] u5fjEY-slh8: Extracting video information
WARNING: unable to extract uploader nickname
[youtube] u5fjEY-slh8: Downloading MPD manifest
[download] Destination: 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f137.mp4
[download] 100% of 490.81MiB in 01:23
[download] Destination: 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f140.m4a
[download] 100% of 38.31MiB in 00:06
[ffmpeg] Merging formats into "那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.mp4"
Deleting original file 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f137.mp4 (pass -k to keep)
Deleting original file 那年花開月正圓 _ Nothing Gold Can Stay 31【TV版】(孫儷、陳曉、何潤東等主演)-u5fjEY-slh8.f140.m4a (pass -k to keep)
makem@SSDtosh:~$
 
Last edited:
I just tried passing the -k and end up with an mp4 which I think will be playable on the tv or humax. Just waiting for the wife to release the tv lol.
 
Could your downloader have something to do with this issue? I have just downloaded the same file (same YouTube id) using 4K Video Downloader. It has options for downloading as mp4 with aac audio or mkv with Vorbis. I downloaded the 1080p mp4 and it has a bog standard aac video stream, but at 555MB it is larger than the file you obtained. I was also using linux.

Maybe all you need to do is change downloader (4k Video Downloader is excellent!).
 
Thank you for taking an interest.

I am able to obtain a playable .mp4 but I will try your suggestion. I still have 40 or so to go.

Just had a look at the web page hosting 4K Video Downloader and the program is not available from the repositories. I prefer to stay with the repositories so will pass on this one.

The file size I now get is up to 615MB

For anyone who may be interested in downloading from YouTube with youtube-dl :

I created a youtube-dl.conf file in ~/user/.config which directs the output as an .mp4 file to another HD which is shared with Windows, avoiding using the SSD /home:

--output "/media/WinData//%(title)s.%(ext)s"

The download command is:

youtube-dl -k [url of shared YouTube file]

The file url is obtained by selecting the 'Share' button below a YouTube video window and copying the address.
 
Nonetheless, I think you ought to look into the possibility that this "opus" codec is being artificially imposed. It doesn't sound like something most people would have installed by default.
 
I see this in youtube-dl's post-processing options:

"--audio-format FORMAT
Specify audio format: "best", "aac", "flac", "mp3", "m4a", "opus", "vorbis", or "wav"; "best" by default; No effect without -x"

Further on, I find this:

"By default youtube-dl tries to download the best available quality, i.e. if you want the best quality you don't need to pass any special options, youtube-dl will guess it for you by default."

Perhaps the software regards opus as its 'best' option and chooses it by default. I haven't encountered opus before, but I see that it claims to be exceptionally efficient compared with other codecs, so that would be a logical conclusion. You might try adding this parameter to force aac.

Reading (some of) the documentation, youtube-dl looks a bit like get_iplayer on steroids. I think I'll stick to 4KVD which does the job sans head-banging.
 
Last edited:
Thanks for that fenlander. I have just downloaded 10 Swedish movie files, two of which resulted in .mp4 and the remainder were mkv and not playable.

Using youtube-dl -F [video url] obtains the possible output formats available.

youtube-dl -k -f 18 [video url] produces an mp4

I tried adding --audio-format "m4a" in the .config but it didn't work. However, even if it did then it would need to be edited/checked for each download.

I understand why you stick to 4KVD.
 
Back
Top