The Technodrome Forums

The Technodrome Forums (http://forums.thetechnodrome.com/index.php)
-   Everything Else (http://forums.thetechnodrome.com/forumdisplay.php?f=30)
-   -   Gif Tutorial (http://forums.thetechnodrome.com/showthread.php?t=46258)

Martin 02-15-2014 10:48 AM

Gif Tutorial
 
I didn't know where to put it, so I'll just post it here. Let's get started, shall we? Btw, just a heads up most of the pics you'll see down here are pretty high res (1920x1080), so beware. You can open up the images in a new tab so it's not as annoying. Here is a link to the gallery I put up on imgur btw.

What you'll need: A demuxer (this actually is sort of optional, you might need it or not depending on what format is the file you are trying to make gifs out of), a video editing software (I'll be using Adobe Premiere, but anything that has the ability to cut out parts of a video file will do), and Adobe Photoshop.

Demuxing: So why is this important? Well, there are some video formats which you cannot import into some video editors. One example of this is the mkv format, but, fear not, here is where the demuxer comes in. Mkv is basically a 'container' format, which means that inside of them there is usually a video file (with no audio), an audio track, and there might also be a subtitle track in there. The demuxer lets us extract these tracks so we can edit them independently.

The demuxer I use is called tsMuxer, and can be found here. You'll see me using an older version, but that's just cause I wasn't aware there was a new one out.

So, if you've got a file you cannot import into your video editor such as mkv, follow these steps. For other formats such as mp4, avi, etcetera, jump over this section.

Step 1: Fire up tsMuxer GUI

Step 2: Hit the add button and select your video file

Step 3: Select just the video file out of the track list (as shown above) and hit the start muxing button

This part might take a couple seconds (or minutes?). I've got a pretty fast computer so I literally have no idea if this is actually a slow process.

And you are done. Now I want you to pay close attention to that last image you just saw, cause there is some important information there such as the video resolution, which we will be using later.


Extracting the video

Now we are gonna extract the video fragments we want to make gifs out of. As I mentioned earlier, I'll be using Adobe Premiere for this, but feel free to use whatever you have at your disposal.

Step 1: Fire up Adobe premiere and click the create a new project button

Step 2: When the new project prompt appears, ignore the general tab and jump right over to settings. Feel free to edit the project and sequence names.

Step 3: Edit the fields as shown below. Make sure that the resolution matches the one of your source video (if your video is 1280x720, the resolution should be that one as well). I'll be using 1916x1076 cause apparently that's the resolution the tmnt eps come in.

Step 4: Import your source file (if you had to do the demuxing process I explained before, your source file will be the demuxed video)

You can import video by going to file->import as shown above, or just by hitting Ctrl+I.

Step 5: Double click on the file you just imported to load it up on the source window, and then proceed to scour the file for gif material


Martin 02-15-2014 10:49 AM

Step 6: Once you've settled on what you want to make a gif out of, you'll have to mark it out so you can export it. Go to the beginning of the scene you picked, and then go back some more. We are doing this to make sure we don't accidentally cut out a part of the scene. The video editor is kind of buggy sometimes when it comes to frame by frame stuff, so we have to leave a safety margin before, and after the scene we want. Usually about half a second on either side is enough to prevent any problems.

To mark in and mark out stuff, you just have to hit 'I' to mark in the start of the sequence, and 'O' to mark out the end of it. Think about it as making a selection. You can alternatively use the second and third buttons (from left to right) that are located under the video screen on the left side of the screen.

Side note: Something I've been wondering about is the reason of these bugs. I originally associated to a problem with the program itself, or perhaps the video file. Now I'm thinking that perhaps setting the frame rate of the video to 23.976 instead of, idk, 24, might be what is actually causing these hiccups. Meh, maybe someday I'll test this hypothesis.

Step 7: Once you've selected what you want, press ',' or alternative the insert button (third one from right to left on the same panel as before). You'll see the fragment you selected appear in the track panel on the lower right.

If you wish, you can check here if everything came out as you planned. If not, edit the marks and try again.

Step 8: It's time to export your video

Go to File->Export->Media, or alternatively press 'Ctrl+M'. An export settings prompt will come up.

Step 9: Edit the export settings as shown below. Also edit your output resolution so your exported video doesn't end up being ginormous. Feel free to use any resolution you like here. Don't worry about getting it right here. If it ends up being too big, you can always downsize it later on in photoshop.

Step 10: Now you can either hit export, which will export your file right on the spot and you'll have to wait till it is done, or you can hit queue, which will open up a new program in which all your queued files are displayed. The advantage of this is that you can select multiple fragments of video, queue them up, and export them all at the same time when you are done, eliminating the wait of having to export them individually. Btw, when I was making this, I tried to use the export button, and I was getting a pixelated video for some reason. I used the queue button and it exported just fine. So keep that in mind just in case.

This is the program that opens up if you queue something. To start the exporting you just have to hit the green play button.

Martin 02-15-2014 10:49 AM

Photoshop

Now we are actually going to make the gif.

Step 1: Import the video fragment. To do so, go to File->Import->Video Frames to Layers

Step 2: A prompt will come up. Here you can choose to import the whole thing, or you can use the sliders (as shown below) to trim out a specific part of the sequence. That is especially handy if you left huge margins, or if the sequence is too long and you want to select only a part of it. Again, leave a margin though, cause you can always trim more later.

Once it's imported, you'll notice that a timeframe panel has appear at the bottom of the screen. Here you'll see all the frames that make the animation. You can hit the play button to check if everything is alright. I strongly suggest you do this cause sometimes there is a hiccup in the process and a couple frames end up being repeated, or even end up out of order for some reason, and you'll have to correct that by hand. No easy way out of that one! If you spot something weird in the animation, you'll have to go frame by frame fishing for the hiccup. It happens quite often, so you know.

Step 3: Now we are gonna erase our 'margin' frames (the ones we left there so we didn't lose any frames from the sequence we want to gif). To do so, we have to select the frames we want to get rid of in the timeframe (ctrl and shift here work as they do in your file browser btw; hit the first frame and then hold shift and press the last one you want to select to make a large selection). Then press the little garbage bin that is bellow the frames in that same panel. Do not hit the delete key cause that will only erase what's in the selected layer, which is a complete different thing to the timeframe we are currently using.

Now you can make all the changes you wish. You can reduce the resolution, add filters, subtitle it, etc. I can show how I do subtitles later on if anyone is curious about it.

Step 4: Time to save our gif. Go to File->Save for web, as shown below.

The prompt shown above will pop up. Few things I want to point out. Bottom left, you can see how big in size your gif will be once you export it with the current settings. Now, look what happens to the file size if I change the dither from a 100% to, say, 99%.

Quite a difference, don't you think? Now let's see what happens if we bring down the amount of colors used to 128.

There are plenty of things you can tweak in this screen that will affect your file size. The amount of colors the gif has, the dither setting (which I recommend never setting to a 100% cause it's ridiculous how much that impacts in the file size).I want to say that, even though you can reduce the file size by tweaking this settings a bit, it's not a magical method by any stretch of the imagination. There is a limit to it, and usually when you try to overdo it, the end result ends up looking really bad. Something you can do when the gif is too big is to reduce its resolution (you can do so from that prompt actually if you change the values on the bottom right, alternative you can do it from image->image size), or trim it down to something more manageable. Sometimes even getting rid of a couple frames is enough to reduce the file size considerably. Splitting the sequence into multiple gifs is another way to do it. You just gotta have some common sense to be able to judge where you should cut, and where you should not.

Step 5: Save it! You can then upload it to tumblr or imgur (for reference imgur takes files up to 2mb). I highly suggest you sign up for a free account so you can keep a backlog of your stuff.

All done!

Shark_Blade 02-15-2014 04:05 PM

Thanks a lot Martin!

I'll give it a roll. :D

Shark_Blade 02-16-2014 12:14 AM

http://i.imgur.com/a5xkbgk.gif

My first gif.

My heart is weeping cause I did it for HOURS. I have MKV files but for some reason Premiere Pro won't install/uncooperative with me. Repeat a few times and still no result. I tried converting via Windows Movie Maker and Vegas Movie Studio but they won't accept MKV. So I found a youtube video in avi, stick it in photoshop and that's the result. There's a few crashes and unsaved files going down the drain along the way.. This also means that I can't do gifs for any episodes of TMNT in MKV files (in my case, most of them..)

Can you show me how to put moving texts in animated gif? I know how to put static ones. For that gif I want to make Donnie says "She sells seashells by the seashore?" but one word at a time. I'm exhausted, I feel so pathetic. T_T

Martin 02-16-2014 12:36 AM

For mkv files you gotta do the demuxing thing I explained at the beginning! The gif looks great btw.
I'll throw something together on how to overlay text tomorrow (:

Shark_Blade 02-16-2014 01:04 AM

Yeah I totally did the demuxing. It's the Adobe Premiere that I'm unable to proceed. :(

Thanks for helping me out!

Anyway, here's a quickie I did.

Quote:

Originally Posted by Shark_Blade (Post 1212946)


Martin 02-16-2014 08:52 AM

Quote:

Originally Posted by Shark_Blade (Post 1212947)
Yeah I totally did the demuxing. It's the Adobe Premiere that I'm unable to proceed. :(

Thanks for helping me out!

Anyway, here's a quickie I did.

Yeah but what the demuxing does is create a new file that ends in '.ts'. It's not the mkv file the one you have to import, but the one you get after you demux the file.

Check where the muxer is outputting the files and use that in adobe premiere.

Nice gifs btw! You just need to sort this muxing thing out and you'll be on your way.

Martin 02-16-2014 10:22 AM

Subtitles!
 
So here is how I do them. Ginormous pics as usual, so beware.

Step 1: Select the top layer (panel from the right)

Step 2: Write your text.

Step 3: Change colors (I usually use the color picker to pick a color from the bandana)

Step 4: Now we are gonna center our text. To do that press 'Ctrl+R' to show the rulers, click on the left ruler and drag your mouse to the right. You'll see a cyan vertical line appear. If you move it close to the center of the image, it'll align to the center. Then, press 'Ctrl+T' to activate the transform tool, and move your text to the center. It's very important that you use the transform tool and not just drag it into place. Believe me on this one. You can do minor changes in position by hitting the arrow keys. Again, always move your text with transform enabled!

Step 5: Now we are gonna add a shadow to the background of the text so it can be see clearly despite what's behind it.

First, select the text. To do that, hold ctrl and click on the layer with the text.

Now we are gonna expand that selection. To do that, go to select->modify->expand (I strongly suggest you create a keyboard shortcut for this, cause if you start doing subtitles this way you'll be using it a lot).

We aren't gonna expand it too much though, one pixel is more than enough.
Now create a new layer, and fill it with black (to fill an area, make sure you've got black as your active color and press 'alt+backspace'.

Martin 02-16-2014 10:23 AM

Now pick the blur tool from the left panel, and blur the layer with the black outline a bit. Not too much though, just enough to smooth out the edges.
Now merge those suckers, and you are done!
Step 6: Move the text to its final position. You can change it later if it ends up out of place. Just remember to use the transform tool, and not just drag and drop.

Step 7: Select all the frames from the bottom panel, and then hide the two text layers

Step 8: Now the only thing left to do is select the frames where you want the text to show up, and make the layer visible again.

And all done!


Shark_Blade 02-17-2014 03:37 PM

Thanks again Martin, I'll give it another go. :D

Shark_Blade 02-17-2014 05:39 PM

http://i.imgur.com/PWOnUc2.gif
http://i.imgur.com/QSSNqY0.gif



I tried. :trazz: Pardon for the quality, it's the one I found on youtube. But I think I got the technique, thanks!

Martin 02-17-2014 06:21 PM

Don't mention it (:

demonsweat 04-29-2014 08:21 PM

Just found this... wow Martin, thanks for taking the time to do this! I'm gonna have to look over your process here and compare. :D

Martin 05-24-2014 03:08 PM

Quote:

Originally Posted by demonsweat (Post 1255748)
Just found this... wow Martin, thanks for taking the time to do this! I'm gonna have to look over your process here and compare. :D

Just bringing the power to the people :trazz:


All times are GMT -6. The time now is 10:02 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.