Nazralte 0 Posted February 24, 2018 Posted February 24, 2018 We recently bought a 4k TV, and of course I want to watch 4k movies. I did the research and the PCs we have aren't strong enough to transcode 4k movies. So I did more research and figured the fastest and somewhat easiest way was to use ffmpeg to change the MKV movies to MP4, so there is no transcoding. The first thing I realized is I would also have to change the audio to AC3, since MP4 doesn't support TrueHD, which is what's used in the files. So, what I have tried is this. I used ffmpeg to first change the audio. After that is complete I changed it from MKV to MP4. This did seem to work. On the PC, it plays at the proper speed and everything, so the video seems like it is fine. However, when streaming to the Roku Emby app, it plays too fast. The audio is normal speed, its just the video that is playing too fast. Hopefully one of you fine folks will say its a simple issue to fix. Thanks
Luke 42079 Posted February 25, 2018 Posted February 25, 2018 Hi, how exactly did you go about changing the video? I realize you're concluding that the video is fine based on successful playback on the TV, but it might just be that the video player on your PC is more robust than the video player that's built into Roku.
Nazralte 0 Posted February 25, 2018 Author Posted February 25, 2018 As I stated, I used ffmpeg to convert both the audio and video. I used the command line process. First for audio, second for video. ffmpeg -i video.mkv -map 0 -vcodec copy -scodec copy -acodec ac3 videoAC3.mkv ffmpeg -i video.mkv -codec copy video.mp4 I do have the latest roku streaming stick, which is designed for 4k. Like I said, the video is moving fast, but the audio is staying the correct normal speed. I tested playing the video through a browser on the LAN. I had to set it to 1080p quality, but it did play at the correct speed. So it seems to be an issue with the app or roku picking up something wrong (i would guess). Almost like it's not capping the fps at the correct 23.9 and just running it as fast as it can stream. Problem is I really have no clue how to diagnose the problem.
Nazralte 0 Posted February 25, 2018 Author Posted February 25, 2018 Well, as far as I am aware, it is. The reason to change the video from MKV to MP4 was because our PCs don't have a good enough CPU to handle a 4k transcode.
Luke 42079 Posted February 25, 2018 Posted February 25, 2018 Ok unfortunately we're subject to the capabilities of the Roku player. If it is direct playing then the issue will need to be reported to Roku. We can obviously fix it on the fly with transcoding, but it sounds like that's not what you want.
Nazralte 0 Posted February 25, 2018 Author Posted February 25, 2018 I did a test this morning using the Roku Media Player. The video played fine on there, so whatever is happening to cause the video to play too fast has something to do with Emby. I can only guess that it's reading something wrong on the video file itself maybe. The reason I think this is because I had used Handbrake to create an MP4 (from the same original video file) and that video played fine over Emby. Only when I did the conversion with the ffmpeg console commands did I get the video playing too fast, and only over the roku Emby app it seems. Looking at the ffmpeg remux logs, I do notice one thing. There are 3 videos I am comparing. The video I created with Handbrake (video 1), the video where only the audio was changed (video 2), finally the video where the format was changed (video 3). Both the Handbrake video and the audio change only video shows that the audio stream is ac3. The video where I changed the format to mp4 is mp3 for some reason. Just to be clear, (video 3) was created from (video 2). So I am not sure why it's changing the ac3 to mp3. I attached those 3 logs. Maybe there is something else going on as well that may be the cause of this. Handbrake.txt ffmpeg audio change.txt ffmpeg Format Change.txt
ebr 16184 Posted February 25, 2018 Posted February 25, 2018 If you send a log from the app we can confirm what your device is reporting but the reason that would happen would be because the device is saying it won't support an AC3 stream in an mp4 container. I've never seen anything like this reported before but we are stream copying the video in all cases. Perhaps there is a bug or configuration problem in ffmpeg that is causing the video to be copied incorrectly when the audio is being converted.
Nazralte 0 Posted February 25, 2018 Author Posted February 25, 2018 The log file was sent. Let me also try and be super clear as to what I'm doing / done. To start with, the original video is a .264, 4k, trueHD audio, MKV file. Since my PC isn't strong enough to transcode, I am trying to make it an MP4 with AC3 audio. First attempt was using Handbrake. While this option did work, I found out that it always re-encodes so the quality might not be as good. Plus it takes 5 hours to do. Second and preferable option is using ffmpeg in command line form. Since MP4 doesn't support TrueHD audio, I first used this command line ffmpeg -i video.mkv -map 0 -vcodec copy -scodec copy -acodec ac3 videoAC3.mkv to change the audio from TrueHD to AC3. (note, when playing this video the AC3 audio does get used according to the log file namd Audio change) Then I used this command line ffmpeg -i video.mkv -codec copy video.mp4 to change it from MKV to MP4. It is after this step that the log file labeled format change shows emby changing the audio from Ac3 to mp3. Plus, the video runs faster than normal but the audio does not. So I can only guess that something is happening with that conversion, I just don't know what or what I can do to fix it. (update) So, when I was trying to use my PC as a DNLA server to test out how the video ran with the Roku Media Player, I renamed the folder I keep these videos in. Today I went into Emby and removed the old library and added the renamed folder. Now, when I ran the video, it was actually a little stuttery. Checking the log it is now playing the AC3 audio. The only thing I can figure is that when I added the video to begin with, Emby server read something wrong on that file, and now when it re scanned the library it picked everything up correctly. Now I just need to figure out why its a bit stuttery when it should just be streaming and not transcoding anything..
Nazralte 0 Posted February 25, 2018 Author Posted February 25, 2018 Ah, I found it. I see a post from last week or so about someone having the same issue (transcoding) and it looks like its saying the video resolution isn't supported and that is going to be fixed soon. Good to know. Hopefully this will take care of all my issues. And something else I will put in here in case anyone else runs into my same issue. I did the ffmpeg conversions in the same folder that I used as the Emby library. Now, I don't know if that was part of the problem, but I do intend on doing the conversions in a different folder and then dropping the competed video into the Emby library.
Luke 42079 Posted February 25, 2018 Posted February 25, 2018 It defeats the purpose of your original change though if we're still going to transcode your newly converted file, right?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now