View Full Version : An avs command to convert all frames to key frames? (orig: mkv file)
Static//Shifter
31st December 2006, 21:52
Hello,
I was wondering if there was an avs command to convert each frame in a mkv file (h.264 codec) to a key frame? I'm told converting each mkv file to a loseless codec will solve this problem, but unfortunately I only have about 10 free gigs left on my HD ( and a total of about 18.5 gigs if I were to delete the 24 350MB mkv files), so I really don't think making each file a loseless codec is an option for me. So I believe these are my options:
#1. use a avs command that will make each frame a key fram using my original mkv files (if such a command exists)
#2. I don't really know. Any suggestions? I'd be willing to do anything as long as it doesn't involve buying a new HD :)
Thanks.
P.S. Does Premiere have a tool to make each frame a key frame? I would check this myself but I won't have access to my own computer for 2 more weeks.
chipzoller
1st January 2007, 00:12
Just out of curiosity, why would you want to do this?
tsp
1st January 2007, 01:09
there are no avisynth command for that as avisynth does not encode the video. It only delivers the uncompressed frames to the encoder (that is why avisynth is called a frame-server :) )
Zarxrax
1st January 2007, 01:52
In an avisynth script, every frame IS a keyframe.
davidhorman
1st January 2007, 03:42
Sounds like what you really want is a lossy keyframe-only codec, like MJPEG or DV.
David
Static//Shifter
1st January 2007, 07:35
Just out of curiosity, why would you want to do this?
The reason I want to do is so I can go frame by frame in Premiere without the frames being in incorrect order (I thought converting to a loseless codec would solve this problem)
In an avisynth script, every frame IS a keyframe.
Well if I'm loading the file through avisynth, why do the frames occasionally appear in incorrect order when previewing frame by frame. If you recall from my old thread, where I was asking why I was having the jerky video, you told me I needed to convert to a loseless codec. (Btw, I'm not insinuating that you were incorrect, or unhelpful, I'm just trying to make sure I understand).
foxyshadis
1st January 2007, 08:24
Lossless will be huge. You have a DVD burner? Burn some stuff and make room, they're going to be huge. Then install huffyuv of lagarith, load your avisynth into vdub, re-encode into one of the above (choosing fast recompress), and load your shiny new avi file into premiere.
MJPEG, DV, and specifically configured XviD can work if you really can't free up the space, as david mentioned.
Avisynth is all keyframes on the front, the part programs see, but it still has to rely on the decoder (from DirectShowSource) sending it frames properly on the back, and not all codecs/decoders are able to do that.
henryho_hk
1st January 2007, 14:45
The reason I want to do is so I can go frame by frame in Premiere without the frames being in incorrect order.
Incorrect order? Is your AVI in unpacked mode? You can use MPEG4Modifier to check. If it is, you can try converting it to packed mode (without reencode) and see if it works better:
1) Demux audio from the original AVI file (note if there is any offset/delay of audio).
2) Make it a packed bitstream using MPEG4 Modifier
3) Mux back original audio to the modified AVI (add offset/delay if needed).
Static//Shifter
1st January 2007, 21:02
Lossless will be huge. You have a DVD burner? Burn some stuff and make room, they're going to be huge. Then install huffyuv of lagarith, load your avisynth into vdub, re-encode into one of the above (choosing fast recompress), and load your shiny new avi file into premiere.
MJPEG, DV, and specifically configured XviD can work if you really can't free up the space, as david mentioned.
Avisynth is all keyframes on the front, the part programs see, but it still has to rely on the decoder (from DirectShowSource) sending it frames properly on the back, and not all codecs/decoders are able to do that.
Ok, I'll try this. I remember re-encoding the mkv's as an avi w/ xvid as the codec, and the frames were still out of order when I would slow the video down, but maybe it was because I didn't configure it properly.
I'll also try what henryho_hk said.
Thanks guys.
Zarxrax
1st January 2007, 21:08
If you recall from my old thread, where I was asking why I was having the jerky video, you told me I needed to convert to a loseless codec. (Btw, I'm not insinuating that you were incorrect, or unhelpful, I'm just trying to make sure I understand).
I didn't recall your old thread, that's why :p
But what foxyshadis said pretty much sums it up.
In your situation I think you are simply going to have to compromise somewhere. Like david said you might want to try DV or mjpeg codecs... it's lossy but I think it should be smaller than most lossless codecs. It really comes down to either make the space available, or settle for less than perfect quality. Even with mjpeg and dv though, I'm not sure you can get 24 episodes of anything into only 18gb.
I mentioned in the earlier thread if you really need all 24 things in premiere at one time. My guess is that you are either combining all 24 videos into 1 file for some reason, or more than likely you are creating a video that will in fact be much shorter than the sources combined. In the latter case, it is only necessary to have available footage that you will actually be using. For example, if you plan to create a video that is only 5 minutes long, you dont need to have 24 entire episodes in premiere... you go through before hand and clip out on the pieces you need, and put those in premiere. Hope that helps.
Static//Shifter
2nd January 2007, 09:27
I mentioned in the earlier thread if you really need all 24 things in premiere at one time. My guess is that you are either combining all 24 videos into 1 file for some reason, or more than likely you are creating a video that will in fact be much shorter than the sources combined. In the latter case, it is only necessary to have available footage that you will actually be using. For example, if you plan to create a video that is only 5 minutes long, you dont need to have 24 entire episodes in premiere... you go through before hand and clip out on the pieces you need, and put those in premiere. Hope that helps.
Right, it's just that the parts I need are scattered all over the files, so i'm not sure how well I'll be able to cut out stuff, or how much.
Anyways, I don't think I'll have to worry about this problem anymore, because I just took up Newegg's deal for buy one 500 GB Seagate for $209.00, get a free seagate 250 GB. So that should help a tad :)
Anyways, thanks for the help guys, especially you Zarxrax.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.