0
votes

I've used Flowplayer Flash successfully with .f4v Flash video files, but when I try to use .mp4 files, I get a weird problem: the videos play fine but they are cut short. I have six MP4 videos with durations ranging from 7:19 to 14:34, and the durations played by Flowplayer range from 0:10 to 5:03, but always the same for each individual video.

But it is not totally arbitrary. I made a spreadsheet and found that the duration truncated from each video is 7:09, except the longest one which is 14:18. So what's happening is that the video's duration in seconds is taken modulo 429 (7 minutes, 9 seconds).

Why in the world does this happen??

Here's my Flowplayer setup:

<a id="player" href="/path/to/video_1.mp4" style="display: block; max-width: 1440px;"></a>

<script>
flowplayer('player', '/Static/flowplayer/flowplayer-3.2.18.swf', {
    clip: {
        autoPlay: false,
        autoBuffering: true
    },
});
</script>
1

1 Answers

0
votes

Using exiftool, I found that the behavior wasn't Flowplayer's fault; it was corrupt metadata which probably crept in during the conversion to MP4. I found these values:

Duration                        : 0:11:23
Track Duration                  : 0:11:23
Media Duration                  : 0:04:13

That last one is incorrect, and Flowplayer was taking it seriously. I fixed the files with the following ffmpeg command:

ffmpeg -i video_1.mp4 -vcodec copy -acodec copy video_1_fixed.mp4

More info here.


EDIT: My client converted these files from WMV to MP4 before sending them to me. I don't know what software they used, but I'm still very curious why modulo 429 arithmetic would be involved. Any ideas?