FFMPEG Convert HTML 5 Video NOT Working

后端 未结 7 1729
悲哀的现实
悲哀的现实 2021-01-30 09:49

I am using FFMPEG to convert a video to .mp4, ,ogg, .webm so that it may be viewed in all HTML5 capable browsers using the video tag

7条回答
  •  离开以前
    2021-01-30 10:20

    Sorted it out, thanks for all the help :) I found the following:

    1. You need to download the latest ffmpeg + the presets:

    ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/static/

    2. You need to create a HOME environmetal variable:

    (a) www.moosechips.com/2009/08/installing-ffmpeg-binary-in-windows/

    (b) www.itechtalk.com/thread3595.html

    3. Copy the presets under the environmental variable folder

    4. You need to use the following commands to convert using ffmpeg:

    For mp4 (H.264 / ACC):

    ffmpeg -i INPUTFILE -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 "OUTPUTFILE.mp4"
    

    For webm (VP8 / Vorbis):

    ffmpeg -i "INPUTFILE"  -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 "OUTPUTFILE.webm"
    

    For ogv (Theora / Vorbis):

    ffmpeg -i "INPUTFILE" -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 "OUTPUTFILE.ogv"
    

提交回复
热议问题