Need Help With Using Ffmpeg As An External Encoder To Virtualdub For Animated Gifs

Discussion in 'Software' started by Jesse Newell, Apr 24, 2016.

  1. Jesse Newell

    Jesse Newell MajorGeek

    Hope someone here is familiar with VirtualDub and its external encoders.

    I have no idea what I'm doing. I click on Options, External Encoders, the Encoders tab, double-click Animated GIF, and under Edit External Encoder Profile, it says,

    Type: Video Encoder

    Program: C:\ffmpeg\bin\ffmpeg.exe

    Command arguments: -f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -vf scale=640:-1:sws_dither=a_dither -r 10 -pix_fmt rgb8 -loop 0 "%(tempvideofile)" (total gibberish to me)

    Output filename: %(outputname).gif

    Launch parameters: Interpret non-zero return code as error Checked
    Redirect standard output to log Checked
    Redirect standard error to log Checked
    Delete output file before starting Unchecked

    I don't know anything about ffmpeg or how it works but all I want is a single line translation of the following two commands that VirtualDub will understand if I paste it into the command arguments field.

    ffmpeg -i input.ext -vf palettegen palette.png
    ffmpeg -i input.ext -i palette.png -lavfi paletteuse output.gif

    Is that possible?
     
  2. foogoo

    foogoo Major "foogoo" Geek

  3. Jesse Newell

    Jesse Newell MajorGeek

  4. MaxTurner

    MaxTurner Banned

    Maybe you should post on the forum related to using ffmpeg - no doubt users there are using them all the time.
    If you click on the hyperlink for ffmpeg you posted you will find the user forum. As you said, you know nothing about ffmpeg or how it works so people who do use it may well be best placed to help.
     
  5. Jesse Newell

    Jesse Newell MajorGeek

    I have posted on that forum but they're incredibly slow to respond. So I thought posting here might increase my chances.
     
  6. MaxTurner

    MaxTurner Banned

    Well, at least one person earlier made an effort to suggest an alternative method. On a generalist forum like this it's likely to be even slower than a focussed forum like the ffmpeg one. Having said that, in the first post there is no simple or clear everyday explanation of what you are actually trying to do, so that makes it even harder to get a useful response.
    Good luck
     
  7. Jesse Newell

    Jesse Newell MajorGeek

    I want VirtualDub to create an animated gif for me using those two ffmpeg commands I posted but I need to translate those two commands into a single line of code that VirtualDub will understand.
     
  8. MaxTurner

    MaxTurner Banned

    Maybe you just need to research it a bit more as there are plugins for VirtualDub to input ffmpeg.
     
  9. Jesse Newell

    Jesse Newell MajorGeek

    I know. And I have all those plugins installed. But I need to know how to paste in those two commands so VirtualDub will understand them. Every time I try translating them, I just get an "anonymous pipe" error, whatever that means.
     
  10. foogoo

    foogoo Major "foogoo" Geek

    Ok, so why not just the export option? What benefit is ffmpeg to the gif?
    What are you trying to do exactly? convert png to gif?
     

    Attached Files:

  11. Eldon

    Eldon Major Geek Extraordinaire

    What input file(s) are you using?
     
  12. Jesse Newell

    Jesse Newell MajorGeek

    ffmpeg produces much higher quality gifs than vdub's basic gif option.

    Um, no. I'm trying to convert videos to high quality gifs.
     
  13. Jesse Newell

    Jesse Newell MajorGeek

    I have a load of plugins installed into VirtualDub so it can now accept pretty much any kind of video. avi, mpg, mp4, mkv, mov, flv, whatever. If you look at my original post, you'll see what it says in the command arguments field for Animated GIF. I wanna replace what it says there with these.

    ffmpeg -i input.ext -vf palettegen palette.png
    ffmpeg -i input.ext -i palette.png -lavfi paletteuse output.gif

    But those are two lines. I can't put two lines into the command arguments field. So I wanna know how to translate those into one line.
     
  14. Eldon

    Eldon Major Geek Extraordinaire

  15. Jesse Newell

    Jesse Newell MajorGeek

    I don't necessarily need to use VirtualDub. I just need to know whether what I want to do with it is possible.
     
  16. MaxTurner

    MaxTurner Banned

    The difficulty is that you are, mostly, very unclear about what you precisely want when you post a question here. Foogoo gave you a suggestion at the beginning based on that paucity of information and you didn't reply clearly why it wouldn't meet your needs. You are repeating that now. If you only said PRECISELY what is is you want to do you would get better help. But that is down to you. Clarity is the key and that is your friend.
     
  17. foogoo

    foogoo Major "foogoo" Geek

    Plus ffmpeg will make them any way...https://davidwalsh.name/convert-video-gif
    To convert the entire video to GIF, use the following command:
    ffmpeg -i small.mp4 small.gif
    To convert just a portion of a video clip to GIF, use the following command:
    ffmpeg -t 3 -ss 00:00:02 -i small.webm small-clip.gif
    The snippet above directs ffmpeg to create a GIF 3 seconds long starting at 2 seconds into the video.
    The default conversion doesn't appear to be high quality, so you can configure the bitrate via another parameter:
    ffmpeg -i small.mp4 -b 2048k small.gif

    What do these commands do? why do you need to create a palette and use it as a filter?
    ffmpeg -i input.ext -vf palettegen palette.png
    ffmpeg -i input.ext -i palette.png -lavfi paletteuse output.gif
     
    Last edited: Apr 26, 2016
  18. Jesse Newell

    Jesse Newell MajorGeek

    I don't understand what's unclear. What paucity of information? I gave as much information as I could. Surely it's obvious "PRECISELY" what I want. I don't want to use the command arguments that VirtualDub currently uses to create animated gifs. I want to use these,

    ffmpeg -i input.ext -vf palettegen palette.png
    ffmpeg -i input.ext -i palette.png -lavfi paletteuse output.gif

    But those are two lines. I can't just paste two separate lines into the command arguments field. That field will only take one line. So I want to translate those two commands into one.
     
  19. Jesse Newell

    Jesse Newell MajorGeek

    Thanks but I'd never want to use ffmpeg to trim out a part of a video for an animated gif. I'll only ever use it to convert already trimmed videos. And the default conversion quality is good enough for me. I tried altering the bit rate and couldn't really detect any difference. I know I can just use ffmpeg instead of VirtualDub but ffmpeg is command-line. Command-line's just too much work for me. I don't want to bother with a lot of typing. I just want to be able to load a video into VirtualDub and, through VirtualDub, call on ffmpeg to convert the video into an animated gif through those two commands. But, in order to do that, I have to put those two commands into that command arguments field. But that field will only take one line. So how do I translate those two commands into one line?
     
  20. foogoo

    foogoo Major "foogoo" Geek

    Again, why do you need those lines? Do you know what they do? Why not Open VDub call ffmpeg using a line from above?
    ffmpeg -i small.mp4 -b 2048k small.gif
    How about you provide links to you ffmpeg plugin download location so we can see it first hand?
    Also, there are ffmpeg guis out there too.
     
  21. Jesse Newell

    Jesse Newell MajorGeek

    Of course. They create an animated gif to the quality standard I'm looking for. I don't understand anyway why anyone would need to know why I need those lines. Surely they can either be translated so vdub would understand them or they can't.

    Because I don't know how. Whole point of the thread. Every time I try just pasting in a command, I get some kind of error message, so I'm assuming they can't just be pasted in as they are. They must need to be translated so vdub will understand them without giving me an error message.

    https://ffmpeg.zeranoe.com/builds/win32/static/

    The folder dated 7th May 2015.

    I don't understand why that information's necessary. Surely ffmpeg is ffmpeg is ffmpeg.

    I can't figure any of those out. Which is why I wanna use VirtualDub. Just paste those two commands in in such a way that vdub won't output an error message and just leave it like that then. So I can load any video I want and create a good enough animated gif from it.
     
  22. foogoo

    foogoo Major "foogoo" Geek

    No where did you get the plugin for VDub?
     
  23. Jesse Newell

    Jesse Newell MajorGeek

    I have no idea. It's too far back in the mists of time. ANYWAY, I FINALLY got an answer to this from that other forum. I was told that to do what I want would require creating a two-pass processing script. **** it. I have no idea what that means and I don't care to know either. I'll just stick to accessing ffmpeg from the command prompt. It's a chore but every other option's too complicated. Thanks anyway.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds