2

i am a little new at ffmpeg.

Have a video script ( ClipBucket ) and would like to know how to add -movflags +faststart to the script to take advantage of this for .mp4 videos being converted.

here is the code ffmpeg.class.php. Not sure where I can add this to work properly

https://github.com/arslancb/clipbucket/tree/master/upload/includes/classes/conversion

ffmpeg.class.php and conversion.class.php

Seems to be the correct file(s), just not sure where to add it

Thanks so much in advance.

Spiro

Muhammad Hassaan
  • 7,296
  • 6
  • 30
  • 50
Spirog
  • 46
  • 4

1 Answers1

0

You should alter the file format assignments wherever they occur:

    # file format
    if(isset($p['format']))
        $opt_av .= " -movflags +faststart -f {$p['format']} ";
Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Hi thanks for reply, just one quick question, how to verify that this is working ? is there a way via ssh using ffmpeg ?? to see if it worked for all new videos I upload. I have altered all areas that have the code above. – Spirog May 22 '17 at 05:29
  • Check the first 72 bytes of the output and see if the string `moov` is found. – Gyan May 22 '17 at 06:13
  • 645.9kbits/s dup=0 drop=6 speed=0.901x frame= 186 fps= 24 q=28.0 size= 541kB time=00:00:07.17 bitrate= 618.0kbits/s dup=0 drop=6 speed=0.912x [mp4 @ 0x23fd580] Starting second pass: moving the moov atom to the beginning of the file frame= 194 fps= 23 q=-1.0 Lsize= 564kB time=00:00:08.30 bitrate= 556.6kbits/s dup=0 drop=7 speed=0.964x video:561kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.533687% – Spirog May 22 '17 at 06:38