VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Hello folks,
    Iam trying to convert image from GIF to JPG using FFMPEG ,the following commands which i tried

    D:\FFMpeg\FFMpeg_Latest>ffmpeg -i "C:\Documents and Settings\Admin\Desktop\Natur
    e.gif" -y -s 174x96 -pix_fmt rgb24 "C:\Documents and Settings\Admin\Desktop\Natu
    re.jpg"

    But i got C:\Documents and Settings\Admin\Desktop\Nature.gif: could not find codec paramet
    ers

    Can anybody send me the command line for converting GIF to JPG......
    Thanks in Advance!
    Quote Quote  
  2. This works for me:
    Code:
    ffmpeg -i INPUT.GIF -y -s 174x96 -pix_fmt yuvj420p OUTPUT.JPG
    Using rgb instead of yuvj420p gave an warning message but it still created the jpg file.
    Quote Quote  
  3. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date: Aug 2000
    Location: Sweden
    Search Comp PM
    I'm moving you to our video encoding section as ffmpegx is not same as ffmpeg.
    Quote Quote  
  4. Member johns0's Avatar
    Join Date: Jun 2002
    Location: canada
    Search Comp PM
    Wouldn't it be more simple to open the gif with paint and save as jpg?
    I think,therefore i am a hamster.
    Quote Quote  
  5. Originally Posted by johns0 View Post
    Wouldn't it be more simple to open the gif with paint and save as jpg?
    Maybe he has lots of them. In which case automation is in order. The command line I gave could be used with minor modifications in a batch file to convert all gif files in a folder to jpg. Even all gif files in a folder tree.
    Quote Quote  
  6. Member johns0's Avatar
    Join Date: Jun 2002
    Location: canada
    Search Comp PM
    There's other programs that can do batch gif to jpg as well such as irfanview.
    I think,therefore i am a hamster.
    Quote Quote  
  7. Here's a batch file that will convert all gif files in the folder the bat file is in, and all sub folders down from there, to jpg files with the same base name. The original gif files are left untouched. Animated gifs will result in a jpg file with a single frame.

    Code:
    dir/b/s *.gif >giflist.txt
    for /F "delims=;" %%F in (giflist.txt) do "c:\program files\ffmpeg\bin\ffmpeg.exe"  -i "%%F" -y -s 174x96 -pix_fmt yuvj420p "%%~dF%%~pF%%~nF.jpg"
    del giflist.txt
    Change the path to ffmpeg.exe if necessary.
    Last edited by jagabo; 7th Jan 2014 at 20:19.
    Quote Quote  
  8. AviDemux can save as a sequence of images.
    Quote Quote  
  9. http://luci.criosweb.ro/riot/

    Much easier, batch support, and can be integrated into GIMP.
    Last edited by transporterfan; 7th Jan 2014 at 23:30.
    Quote Quote  



Similar Threads