On Thu, Jun 5, 2014 at 9:28 AM, Hart, James <james.h...@schneider-electric.com> wrote: > Hello, I have a .mp4 file that I’d like to use in authoring, but something > blows up in the mlt chain which makes it unusable. > > First off, here’s a link to download all the files to reproduce the issue > along with logs: > > https://www.dropbox.com/sh/6hg2gsprf8sp5ze/AAA66Xc7A7ww3pcAk7FNl5uaa > > First, the original file testcase.mp4 was generated using VLC recording a > stream. The testcase.mp4 file will run find with VLC and preview correctly > using `melt testcase.mp4` and other video players.
testcase.mp4 is variable framerate. MLT does not properly support variable framerate sources. I think it should be OK for simple, sequential processing, but it may have problems when it comes to seeking or choosing a framerate when not specifying a -profile (many variable framerate files indicate 1000 fps). > My simple test case in linux using the melt command line is: melt Define "melt in linux." Don't bother now since that is not important for you, but keep that in mind when talking about software for Linux in general. > testcase.mp4 -consumer avformat:transcode-linux.mp4 Why no encoding parameters or preset? > The file produced is only a bit over 1k and only has blank frames for the > correct duration. The linux.log file is the debug output for this command. > > Now, interesting enough, if I do the exact same test case using qmelt in > windows, the resulting video file will have all the video frames but in VLC > the video will freeze after a few seconds in and it will jump forward later > near the end. The VLC logs indicate frames from several seconds in the > future are trying to be rendered during this frozen bit of time. The > generated video has the same issue in VLC in windows and linux. The > transcoded video does seem to work fine in other video players, including > qmelt command line. The resulting video is named transocde-win.mp4 in the > link and I added a win.log debug output file. > > So problem 1. This file cannot be consumed and transcoded correctly at all > using linux. This is less important to me as I have to currently use > windows. > > Problem 2. The produced file in windows from this source doesn’t work in one > of the most popular video players, VLC, for some reason. > I reproduced this using melt from Shotcut 14.06 and your command line. I do not know why VLC is complaining about the output MP4. However, I noticed that if I load testcase.mp4 into Shotcut and Encode using all defaults - not even choosing a preset - then the output plays fine in VLC. Adding "properties=x264-medium" also produces MP4 output that works with VLC. Why? First of all, running without a preset gives: [aac @ 0x10c97b000] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. The MLT avformat consumer has code that automatically sets the strict option if you specify an experimental codec explicitly, and the preset sets the audio codec. Thus, using the preset makes audio in the output, and somehow that makes VLC happier. But you don't want audio; so add "an=1" to the command line. Now, VLC is back to complaining. :-( Well, the default video bitrate is something extremely low like 200 Kb/s, and this is 800x600 @29.7 fps! Let's make this less challenging and get some better quality by adding "vb=2M" to the command line long with the "an=1". Now, VLC plays fine and does not complain. A test using ffmpeg command line shows increasing the bitrate was not required to make output compatible with VLC, but I do not know why. -- +-DRD-+ ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel