Bug 375503 - MP4 render doesn't play in any program
Summary: MP4 render doesn't play in any program
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: 3.1.1
Platform: Microsoft Windows Microsoft Windows
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-24 15:45 UTC by yuknowmyemailnow
Modified: 2017-11-24 19:48 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Kra Animation File (61 bytes, text/plain)
2017-02-02 02:16 UTC, yuknowmyemailnow
Details
Mp4 file (No audio) (53 bytes, text/plain)
2017-02-02 02:17 UTC, yuknowmyemailnow
Details
Mp4 file (No audio) (1016.19 KB, video/mp4)
2017-02-02 02:23 UTC, yuknowmyemailnow
Details
Mp4 (With audio) (1.05 MB, video/mp4)
2017-02-02 02:25 UTC, yuknowmyemailnow
Details
Codec information of the file in question (39.37 KB, image/png)
2017-02-02 09:54 UTC, Dmitry Kazakov
Details
Proposed solution (287.44 KB, image/png)
2017-02-02 10:00 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yuknowmyemailnow 2017-01-24 15:45:31 UTC
When I render animations into MP4, the video doesn't play no matter what I open it with. The example video for rendering in Krita's release notes also doesn't play for me. 

I'm on Windows 10. FFmpeg version: 3.2.2 (Got it from https://ffmpeg.zeranoe.com/builds/ suggested in Krita's render documentation)
Gif rendering works fine, and ogg also works. Mkv rendering does the same thing as MP4, where the video doesn't play.
Comment 1 Benedict W Mogendi 2017-01-25 19:56:28 UTC
I have the exact same problem. I use Windows 10, and i downloaded the FFmpeg file from the render document. 

Everything works except for rendering videos...
Comment 2 yuknowmyemailnow 2017-02-01 23:15:39 UTC
Tried out Krita 3.1.2 for a short time and when rendering MP4 with audio the screen was black, but the audio was playing. So the animation still doesn't show up in the render, but sound seems to.
Comment 3 wolthera 2017-02-01 23:50:27 UTC
Can any of you attach a sample file? So a sample animation as a kra and as an mpeg file? That'd be super useful to us.
Comment 4 yuknowmyemailnow 2017-02-02 02:16:04 UTC
Created attachment 103758 [details]
Kra Animation File
Comment 5 yuknowmyemailnow 2017-02-02 02:17:25 UTC
Created attachment 103759 [details]
Mp4 file (No audio)
Comment 6 yuknowmyemailnow 2017-02-02 02:23:58 UTC
Created attachment 103760 [details]
Mp4 file (No audio)
Comment 7 yuknowmyemailnow 2017-02-02 02:25:40 UTC
Created attachment 103761 [details]
Mp4 (With audio)
Comment 8 yuknowmyemailnow 2017-02-02 02:27:28 UTC
Attached a kra file, one render without audio, and one render with audio. Both renders were done with 3.1.2. Still Windows 10 and FFmpeg version: 3.2.2. If there's anything else you need, let me know.

Ironically, it plays in Dropbox after uploading it there. But on my computer I'm still getting a black screen no matter what I open it with. (even Firefox) Also still unable to play the render example video on Krita 3.1 release notes page.

Side note about the audio. Earlier I was using an Mp3 and it was glitching badly with playback within Krita (not in render), but for this one I used a Wav and it seemed to work fine.
Comment 9 Dmitry Kazakov 2017-02-02 09:52:39 UTC
It seems like the default codec for encoding Audio in ffmpeg is too new/experimental. The attached file plays fine on Linux (Firefox + VLC) though.

We have two options: 
1) Allow the user to choose the encoding format for inputs
2) Tell the users to update their codecs :(
Comment 10 Dmitry Kazakov 2017-02-02 09:54:21 UTC
Created attachment 103768 [details]
Codec information of the file in question

The codec information doesn't have anything suspicious though...
Comment 11 Dmitry Kazakov 2017-02-02 10:00:20 UTC
Created attachment 103769 [details]
Proposed solution

Hi, youknowmymailnow!

Could you please try playing with these options in attachment? Selecting base10 or baseline should probably fix the problem for you...
Comment 12 yuknowmyemailnow 2017-02-02 13:49:57 UTC
Both high10 and baseline worked. If you don't mind me asking, what does changing those profile options do to the video?
Comment 13 Dmitry Kazakov 2017-02-02 14:47:17 UTC
(In reply to yuknowmyemailnow from comment #12)
> Both high10 and baseline worked. If you don't mind me asking, what does
> changing those profile options do to the video?

They tell ffmpeg to use older versions of h264 codec for compressing the video. The difference between these versions is really subtle: older versions might work slower and has worse quality and compression, but they are recognized by a broader range of devices/players. Basically, you have two options: 

1) Install the most modern codecs to your computer. Afair, there are a lot of "codec packs" available on Windows. Mind you, these videos might still not play on some (older) hardware players.

2) Just use older codecs by choosing lower profiles.
Comment 14 yuknowmyemailnow 2017-02-02 14:59:55 UTC
(In reply to Dmitry Kazakov from comment #13)
> They tell ffmpeg to use older versions of h264 codec for compressing the
> video. The difference between these versions is really subtle: older
> versions might work slower and has worse quality and compression, but they
> are recognized by a broader range of devices/players. Basically, you have
> two options: 
> 
> 1) Install the most modern codecs to your computer. Afair, there are a lot
> of "codec packs" available on Windows. Mind you, these videos might still
> not play on some (older) hardware players.
> 
> 2) Just use older codecs by choosing lower profiles.

Okay. Thank you!
Comment 15 Halla Rempt 2017-02-02 15:49:07 UTC
I guess we should make the oldest one default, and then close this bug.
Comment 16 Benedict W Mogendi 2017-02-17 20:13:41 UTC
Thanks for the help everyone! (In reply to Dmitry Kazakov from comment #13)
> (In reply to yuknowmyemailnow from comment #12)
> > Both high10 and baseline worked. If you don't mind me asking, what does
> > changing those profile options do to the video?
> 
> They tell ffmpeg to use older versions of h264 codec for compressing the
> video. The difference between these versions is really subtle: older
> versions might work slower and has worse quality and compression, but they
> are recognized by a broader range of devices/players. Basically, you have
> two options: 
> 
> 1) Install the most modern codecs to your computer. Afair, there are a lot
> of "codec packs" available on Windows. Mind you, these videos might still
> not play on some (older) hardware players.
> 
> 2) Just use older codecs by choosing lower profiles.

Thank you!! This worked for me as well
Comment 17 wolthera 2017-05-23 15:28:37 UTC
Dmitry, boud, is this pushed yet?
Comment 18 Halla Rempt 2017-05-24 07:16:47 UTC
I don't think Dmitry reads his bugzilla mail at the moment... I don't know; probably not. Let's ping him on irc.
Comment 19 wolthera 2017-11-24 19:48:25 UTC
Added info about the correct profile to the manual.