On Thu, Aug 30, 2018 at 9:35 AM Joel Nash <joeln...@xuuki.co.uk> wrote:
> As I'm editing film on the RPI melt doesn't yet playback smoothly so
> instead, I use omxplayer to playback film after making edits with melt.
>
> To specify a point in time in melt one uses frames. However omxplayer can
> only go as specific as seconds.
>
> So, on playback using omxplayer ill say to start at 02:05 (for example).
>
> and this will mean ill have to go (125 seconds * 23.976025 fps)
> to know where to tell melt to start playback.
> This was the exact command i used.
>
> melt cut1.mp4 in=2997.5 out=3117.4 -consumer avformat:cut2.mp4
> vcodec=libxvid b=5000k
>
>
You are using frame units for time values, and MLT does not support more
than frame precision. Thus, those values are truncated:
duration = 3117 - 2997 + 1 = 121 frames ~= 5.05 sec
> on playback however of the new cut2.mp4 file with omxplayer the footage
> includes what previously equated to 122 mabybe 123 seconds omplayer.
>
I think you mean frames instead of seconds. You should use something
besides omxplayer to get the output duration. Something like melt -consumer
xml or ffprobe.
> Why is this inaccuracy happening?
>
>
MP4 uses temporal compression with codec delays. This can make outputs
slightly longer than expected when draining the codec. One frame in my test
using:
melt -profile atsc_1080p_2398 noise: in=2997 out=3117 -consumer
avformat:test.mp4
ffprobe shows test.mp4 as 5.08 sec and melt shows length 122 frames.
If you change the output to intra-only with uncompressed audio (I don't
give a shit if raspberry pi can play it or not):
melt -profile atsc_1080p_2398 noise: in=2997 out=3117 -consumer
avformat:test.mkv vcodec=ffv1 acodec=pcm_s16le
Then, ffprobe reports 5.05 sec and melt shows length 121 frames, which is
spot on.
Next, if I use ffmpeg 4.0.2 to convert that output to H.264/AAC MP4:
ffmpeg -i test.mkv test2.mp4
Then, ffprobe shows 5.07 sec and melt shows length 122 frames - same as MLT
MP4 output.
If that MP4 output bothers you enough, you can take it up with ffmpeg-devel.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel