Solved minidlna cannot play some mkv files on roku ultimate

I have tried converting the files with ffmpeg. That does not work. I checked the codec with ffprob, it seems the codecs are supported by roku, but the file does not work, I am not getting any sound.

Here is the command I used:
ffmpeg -i input.mkv -c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -c:a ac3 output.mp4

The conversion process takes too long anyway. I think I am going to go back to jellyfin, but I would like to stay with minidlna.

Does anybody have any ideas?
 
Last edited:
media file support is always hit or miss with commercial play devices.

start with a short, simple, mkv with low quality a/v rates first. Also might try aac instead of ac3 and limit the bitrates.
 
I think you're starting in the wrong end trying to solve this issue...

First of all, what are "the files"?
mediainfo will generate useful information, you probably don't need to re-encode video.

Transcoding takes quite a bit of processing power, hardware acceleration helps a lot in that regard but I'm not sure what "slow" implies and using -preset slow will not improve overall performance. It's recommended to use fast or even veryfast presets for real time transcoding but at the expense of efficiency.
 
some transcodes i use, no idea what it does for minidlna,

Code:
ffmpeg -i input.mkv  -c:v libxvid -q:v 5 -q:a 5 -c:a aac output.mkv

Code:
    ffmpeg -i "$input" \
           -map 0:v:0 \
           -map 0:a:1 \
           -vf "format=yuv420p" \
           -c:v libx264 \
           -profile:v high \
           -level 4.1 \
           -crf 22 \
           -c:a aac \
           -b:a 512k \
           "$output"
 
media file support is always hit or miss with commercial play devices.

start with a short, simple, mkv with low quality a/v rates first. Also might try aac instead of ac3 and limit the bitrates.
Yep, it's part of why I went to the effort of switching to jellyfin for that.

However, https://support.roku.com/article/share-media-over-usb-or-network , does have a list of a bunch of he supported settings, although I personally don't bother with transcoding, I just choose whatever setting works for me and stick to that. If I ever do start trying to stream over the net, I might change though.
 
I think you're starting in the wrong end trying to solve this issue...

First of all, what are "the files"?
mediainfo will generate useful information, you probably don't need to re-encode video.

Transcoding takes quite a bit of processing power, hardware acceleration helps a lot in that regard but I'm not sure what "slow" implies and using -preset slow will not improve overall performance. It's recommended to use fast or even veryfast presets for real time transcoding but at the expense of efficiency.

By "the files" I meant some mkv files. I was referencing my subject line. By slow I mean it takes about 20 minutes to convert a 20 minute video.
 
some transcodes i use, no idea what it does for minidlna,

Code:
ffmpeg -i input.mkv  -c:v libxvid -q:v 5 -q:a 5 -c:a aac output.mkv

Code:
    ffmpeg -i "$input" \
           -map 0:v:0 \
           -map 0:a:1 \
           -vf "format=yuv420p" \
           -c:v libx264 \
           -profile:v high \
           -level 4.1 \
           -crf 22 \
           -c:a aac \
           -b:a 512k \
           "$output"

For some reason, I am having trouble with both of those.
With the first I get:
[vost#0:0 @ 0x1e2efea8e500] Unknown encoder 'libxvid'
[vost#0:0 @ 0x1e2efea8e500] Error selecting an encoder
Error opening output file output.mkv.
Error opening output files: Encoder not found
With the second I get:
Stream map '' matches no streams.
To ignore this, add a trailing '?' to the map.
Failed to set value '0:a:1' for option 'map': Invalid argument
Error parsing options for output file output.mkv.
Error opening output files: Invalid argument
 
I tried converting to aac. No help. I still have no audio. And the conversion takes about 20 minutes.
I think I am just going to go with Jellyfin.
For me, Jellyfin is overkill. I don't need or want many of the features. But, at least it transcodes.
 
By "the files" I meant some mkv files. I was referencing my subject line. By slow I mean it takes about 20 minutes to convert a 20 minute video.
What I'm trying to say is that you might do more processing than required and in general your choice of codes and container is technically not wrong but rather odd and I can see devices having issues with it.
 
Can you post here which video and audio codecs are used in the original encoded file as given by vlc ?

I am sorry, I did not record that information. I think I mentioned earlier in the thread. The codecs that I found were supposed to work on roku, but they didn't. I have already moved on to Jellyfin.
BTW: Jellyfin works, but does not look right on Amazon Fire Smart TV. Works fine on Roku.
 
By "the files" I meant some mkv files. I was referencing my subject line. By slow I mean it takes about 20 minutes to convert a 20 minute video.
MKV is a container, what I'm asking about is what the video (format) is and audio as it may only be a matter of remuxing rather than transcoding which is why I'm asking about mediainfo output. I don't care about the file name...
 
By slow I mean it takes about 20 minutes to convert a 20 minute video.
That really depends on the hardware that you use for conversion. If the metal's specs are barely adequate for playback of the file, then the conversion process will be slow. And, if you have a very high-res video (like 1080p or above), that also slows down the conversion, because the machine has a bigger file to digest. Like at 480p, a 20-minute file is about 150 MB. At 1080p, a 20-minute file can be 300 MB or more.

I tried using an all-in-one solution like Jellyfin for watching my own collection. And came to the conclusion that systems that organize and play the movie collection are just out of their depth when they tack on transcoding as well. VLC (multimedia/vlc) is great for playing just about everything under the sun, but when it comes to transcoding, it does a pretty crappy job. Handbrake (multimedia/handbrake) is great for conversion, but I would not use Handbrake for playback as well. And sometimes, conversions just come out crappy, and you gotta decide what kind of tradeoffs you wanna make.

If OP wants to use Amazon Fire TV, that would take pretty much converting the entire movie collection. Figure out file specs that look right on the AFTV, and be prepared to sink a fair amount of time into converting the movies.
 
Back
Top