Ffmpeg to convert gif to webm with reverse function

前端 未结 2 1018
野性不改
野性不改 2021-01-15 03:41

I\'m trying to convert a gif file to webm file using the below which works fine however I’m wondering is it also possible to reverse it as well using ffmpeg or would I need

2条回答
  •  有刺的猬
    2021-01-15 03:58

    The script posted here might help you. This one seems to be in bash but ripping the commands should work on Windows as well. https://github.com/WhatIsThisImNotGoodWithComputers/ffmpeg-webm-scripts

    These are the relevant lines of code (note that they need to edited for your setup):

    ffmpeg -i "${INPUT_FILE}" -ss $START_TIME -to $TO_TIME -an -qscale 1 $TEMP_FOLDER/%06d.jpg
    cat $(ls -r $TEMP_FOLDER/*jpg) | ffmpeg -f image2pipe -vcodec mjpeg -r 25 -i - -c:v libvpx -crf 20 -b:v $FRAMERATE $CROPSCALE -threads 0 -an $OUTPUT_FILE
    

    You basically have to convert all stills to jpgs and then back into webm, but in reverse order.

提交回复
热议问题