Hey,
This is my first post on the forums, so I apologise if this is the wrong place.
My problem is that I have an AVI file 700MB, for a film just over 2hours long.
The video is quite jerky, and the sound is also pretty bad, probably as a product of the high compression used for such a long film.
I was wondering if there was a way to reduce the jerkiness or maybe
interpolate new frames somehow?
The info provided to me by GSpot:
DivX 3 Fast-Motion
640x256 (2.50:1) [=5:2]
23.976 FPS
mpeglayer3 (mp3) (0x0055) ISO/MPEG
96 kb/s (48/ch, stereo)
48000 Hz
Thanks in advance!
+ Reply to Thread
Results 1 to 19 of 19
-
-
Not really much you can do with something like that. 700Mb for 2hours plus means a pretty low bitrate. Unless you have the original source to capture from again I doubt anything will make any noticeable improvement. Garbage in = Garbage out.
It shouldn't play jerky though -
Thanks bugster,
Thats what I was worried about...
Its not that it plays jerky exactly, but its like it waits 1/8 second (or something) before it updates the frame... Its only just watchable.
Unfortunately I haven't got the sourceIf I did i would be able to solve it no probs!
-
You can try using VirtualDub to re-encode the file.
First just open the file and single step through frames of a known jerky part. If you see lots of duplicate frames the problem was in the original capture. If motions look fluid you might be able to fix the file.
If it looks fixable try "direct stream copy" for both the audio and video. That won't take long, won't degrade either the audio or video, and sometimes is enough to clean things up.
If that doesn't work try "full processing mode" for video and/or audio. Try the Xvid codec for video, and a fixed bitrate for mp3 audio.
You may just have codec imcompatabilities on your computer. Try updating any old ones, removing any you're not using. -
Well, stepping through the file in VirtualDub it still looks jerky. Its like every few frames, there's a duplicate maybe? Then it carries on playing smoothly for a few frames.
Could this be something to do with key frames? Not really sure what they are, but VirtualDub did throw up an error when it imported the file that it was an "unknown key frame type". (Though this could be because it is an incomplete download).
Will try your suggestions when I get the oppurtunity tho. -
If you see a pattern of 4 different frames followed by a duplicate you may have a telecined movie that has been deinterlaced by throwing away a field. Or it could be a 24 fps progressive movie crudely converted to 30 fps.
If the pattern is 5 different frames followed by a repeat it's a PAL video that's been crudely converted to NTSC.
In theory you could fix these problems but I don't know of any tools that will do it easily. -
Hi,
Newbie attempting to answer previous question by Junkmalle. If the case is as stated above, 1 very crude way to do it could be to do the following:
1. Use VirtualDub to convert the movie to a bitmap sequence
2. Write a program to delete off the extra 5th frame (you can tell by the filename).
3. Use VirtualDub to reconvert back the bitmap sequence to a movie.
Haven't tried it b4 and you definitely need a lot of diskspace for this one. Hope this helps. -
Thanks everyone so far.
Well, after playing around in VirtualDub, it seems that every 10 frames there are then two duplicate frames.
So the pattern goes:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, Duplicate, Duplicate, 1, 2, 3, 4....
Could tuckmeng's idea be applied to this problem?
And how much disk space would that need? Got about 15GB spare. -
Originally Posted by iknowkungfu
I see several problems with tuckmeng's idea.
1) You'll need something like 100 GB of free disk space to do it all at once.
2) The pattern you see may not be exactly the same all the way through the film.
3) After deleting the duplicate frames you'll probably have to rename the remaining frames to maintain consecutively numbered names.
4) VirtualDub can export the frames as BMP files but I don't think it has the ability to import them again as a movie. Ulead Media Studio Pro 7 can do it -- expensive program though.
Assuming the pattern is consistent through the entire movie, I wonder if it could be done as a filter in VirtualDub? Or via frame serving? -
1) No Chance!
2)As far as I can tell. the pattern is consitent. Tested it in the first second of the movie, and then 25 minutes in and it was exactly the same.
When more of the download is complete, I'll be able to test more, obviously, but my gut feeling is that it'll be consistent.
p.s. Something else I noticed was that at the start, the audio was quite poor in quality, but it improved dramatically later on. -
Thanks everyone for your contributions so far!
I now have the complete file.
After fixing some bad frames using VDub MP3, the loss of synch in the second half of the file has disappeared.
First idea:
Finding bad video frames basically searched the file and then logged the bad frames, which I then masked. Couldn't a similar (obviously not the same) technique be applied that would rewrite the duplicate frames with new interpolated ones?
Second idea:
I'm not sure how much effect this would have, but could I replace the second duplicate frame with the frame after it?
How much effect would this have? -
iknowkungfu,
I found an easy way to delete every N'th frame from a video. I had a video that had a pattern like 1-2-3-4-5-5..., every sixth frame was a duplicate of the one before it. The pattern repeated for full 20 minutes of the video. I took advantage of VirtualDub's dump frame rate conversion -- it simply deletes a frame every now and then to reduce the frame rate.
The input video was 29.97 fps. So I told VirtualDub to convert it to 24.974. This caused the program to drop every sixth frame. Then I had to make sure it dropped the right frame of the six. I did that by starting the conversion at different frames, first frame 0, then frame 1, frame 2, etc. I repeated this until the output file showed that the duplicate frame was the one that was tossed out. Once I found the right starting frame I encoded the entire 20 minute video. The results were perfect!
I needed to join that video with another that was 23.976 fps. So I used AVIFrate to change the AVI header to indicate the the movie was 23.976 fps. That made the video play back at the slower frame rate but the audio was still going at the old speed so it lost sync. I had to export the audio as a WAV file and change the duration (I used CoolEditPro, but many other audio editors have this function). After stretching the audio out it was back in sync and I joined the video with the new audio.
Since you need to delete a pair of frames you could do this twice. Given your 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, Duplicate, Duplicate pattern you could delete every 12'th frame in the first pass, then every 11'th frame in the second. In theory it should work... -
Thanks junkmalle!
Sorry but I'm still pretty new at this. Just looking at virtualDub.
How do I know what framerate to convert it to?
Its currently 23.976 fps.
How do I change the frame that the conversion begins from?
And do you mean "Frame Rate Conversion" or "Source Rate Adjustment"? -
Since you need to remove 2 consecutive frames out of 12 you need to make two passes over the entire video. In the first pass you will remove 1 out of 12, in the second 1 out of 11.
Starting with 23.976 fps, reduce the frame rate to 11/12 of that, 21.978 in the first pass. (1,2,3,4,5,6,7,8,9,10,10,10 --> 1,2,3,4,5,6,7,8,9,10,10).
Using the output from the first pass in the second pass, reduce the frame rate from 21.978 to 10/11 of that, 19.98. (1,2,3,4,5,6,7,8,9,10,10 --> 1,2,3,4,5,6,7,8,9,10).
You'll have to use Video "Full Processing" mode. For best results you'll want to use a lossless codec for the intermediate steps so as not to lose video quality until the final step. I used "uncompressed" -- but my 20 minute segment became a 30 GB file!
In VirtualDub, under the Video menu, select "Frame Rate..." In the "Frame rate conversion" section mark the "Convert to fps:" button and enter the frame rate. This should leave the audio in sync.
If the frame pattern you are seeing repeats perfectly through the entire video this should work. If there is any variation, for example only one duplicate frame somewhere in the middle, the pattern will be broken after the variation. You might have to break the video down into small sections and convert each section individually.
When I did this I marked off a small section (enough so that I could see the pattern in the result, say frames 0 to 1000) and converted it. I then started another instance of VirtualDub and viewed the result. If the wrong frame was deleted I incremented the starting frame in the first instance of VirtualDub (from 0 to 1) and repeated the conversion. I repeated this (starting frame from 1 to 2, 2 to 3, etc) until the correct frame was deleted, the converted the entire file starting from that point.
After thinking about this for a while it occured to me that it's theoretically possible to do the same thing, but as a single step, with TMPGEnc's Inverse Telecine function. You can manually supply the IVTC pattern (101010101010101010100000) using TMPGEnc's "Deal after this frame according to selected pattern" option. This will leave you with an output file marked with the wrong frame rate, but that could easily be fixed with AVIFrate. -
Thanks again for the pointers.
I'm trying to use your TMPGEnc idea.
After two botched attempts, I think I must be doing something wrong
Neither times did the
"IVTC pattern 101010101010101010100000"
work completely.
[b]However[\b] Looking at the frames in VirtualDub, it now seems to go for 23 frames with no problem, and then the 24th is a duplicate of 23!!!
Also, in the IVTC settings window, there's an fps drop-down, what should this be set to? I have a choice of 9.6, 12, 19.2, 24, 48.
I can see the duplicate frames in the IVTC settings window I can see the duplicate frames. Could I use this as a point of reference to "Deal after this frame according to selected pattern" ?
Additionally:
I forgot to mention that this is a widescreen movie:
640x256 (2.50:1) [=5:2]
How do I get it to keep the aspect ratio?
The audio was massively out of synch ever from the start (I can *probably* work that one out on my own).
Any further advice you can give would be much appreciated. -
Originally Posted by iknowkungfu
Originally Posted by iknowkungfu
Originally Posted by iknowkungfu
Originally Posted by iknowkungfu -
Sorry for the long delay in my response, but I have been away from home.
After about 20 attempts I simply cannot make the AVI output file from TMPGEnc playback properly. It may simply be that I've screwed up really obviously somewhere, but I'm too inexperienced to work out how/where.
I then applied the same idea to applying the pattern. After figuring out that if I applied it to eg "2b" it would become interlaced (I think thats the term) and unwatchable. I then proceeded to apply the pattern to only eg "2a" and cycled all the way to 10a without any improvement in the output file (in fact it was worse because extra frames were being lost).
btw: I only outputted the first minute or so and then used AVI Preview ( http://www.avipreview.com ) to play the file back.
So it seems I'm too stupid to do it that way!
Just trying to do it using your VirtualDub suggestion.
Have made one attempt, but, how do I "Increment the starting frame" in VDub? -
Originally Posted by iknowkungfu
101010101010101010100000
010101010101010101000001
101010101010101010000010
010101010101010100000101
101010101010101000001010
010101010101010000010101
101010101010100000101010
etc.
At each step I just took the first digit and moved it to the end, so there are 24 variations.
You can determine the proper pattern yourself by stepping through the thumbnails and picking out the good ones (no interlace lines). Then assign a 1 to the non-interlaced frames, 0 to the interlaced ones. If your video starts out all black, or a static title, you may have to go somewhere in the middle of the video to figure out the pattern. Then do a little math to figure out how to apply the pattern from the beginning.
Originally Posted by iknowkungfu
You can also use the "Mark In" tool on the main window to mark the first frame. For example, use the slider (or arrow keys) to move to frame 1, press Mark In, try the conversion. Move to frame 2, press Mark In, convert... -
Well after all this, removing the appropriate frames left me with... a slightly less jerky video.
Well thanks tuckmeng and junkmalle for your advice, particularly you junkmalle. Its just such a shame that it isn't salvageable.
It must just be a frame (or two) that was never sampled from the source...
I just hope this thread is useful to someone else with a same/similar problem.
thx J.
Similar Threads
-
Playback framerate irratic after MKV to DVD conversion
By turbines in forum SVCD2DVD & VOB2MPGReplies: 2Last Post: 13th May 2010, 15:28 -
No Audio In Encore/Bad Aspect Ratio/Bad Files/Bad ISO/Bad Everything
By koberulz in forum Newbie / General discussionsReplies: 35Last Post: 24th Jan 2010, 04:48 -
bad playback mini DV tape
By izzykatz in forum Newbie / General discussionsReplies: 4Last Post: 15th Aug 2009, 14:20 -
Playback is bad
By AMark in forum DVD & Blu-ray RecordersReplies: 7Last Post: 3rd Feb 2009, 12:00 -
Super fast video playback - framerate changing, timeshifting
By KOJV in forum Newbie / General discussionsReplies: 2Last Post: 6th Jun 2007, 23:20