Log in

View Full Version : Different length of video and audio in same containerfile?


ukulele
16th October 2012, 14:44
Hi, I'm quite new at encoding videos but tried some things so far. Basicly, I use MeGUI and SUPER, with both I ran into a problem I still couldn't figure out.

The existing file is a desktop video (including sound) and has been recorded uncompressed with hypercam 2.27

MediaInfo:

Allgemein
Complete name : C:\_Daten\test.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 906 MiB
Duration : 29s 491ms
Overall bit rate : 258 Mbps

Video
ID : 0
Format : RGBA
Codec ID : 0x00000000
Codec ID/Info : Basic Windows bitmap format. 1, 4 and 8 bpp versions are palettised. 16, 24 and 32bpp contain raw RGB samples
Duration : 13s 880ms
Bit rate : 545 Mbps
Width : 1 064 Pixel
Height : 640 Pixel
Display aspect ratio : 1,663
Frame rate : 25,000 FPS
Bit depth : 8 bits
Bits/(Pixel*Frame) : 32.000
Stream size : 901 MiB (99%)

Audio
ID : 1
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 29s 491ms
Bit rate mode : konstant
Bit rate : 1 411,2 Kbps
Channel(s) : 2 Kanäle
Sampling rate : 44,1 KHz
Bit depth : 16 bits
Stream size : 4,96 MiB (1%)
Interleave, duration : 174 ms (4,34 Video-Frames)


My problem seems to start here: I get a video with 13s and an audio stream of about 29s. If I play it with VLC, it runs fine. The video seems to be "streched" over the whole 29s, still it runs in the same speed as recorded.

If I convert this to mp4 with h264 (wich is the target format), I get either a video of about 13s and the sound cut off or, in most cases, a 29s video where the last frame is shown for the rest of the video. I tried with different formats, audio and video codecs, with MeGUI or SUPER. I'm not sure if the original file is invalid at some point or the encoder just needs to be told about how to handle the different video length, so I seek help :-)

Thx for any input

PS: If usefull, I can post step-by-step how I use MeGUI in this case.

setarip_old
16th October 2012, 15:42
Hi!

I believe you can/should first use VirtualDub to match the audio duration to the video duration...

Asmodian
16th October 2012, 22:09
Did you do the original recording at 25fps? I wonder if hypercam 2.27 does VFR recordings?

What happens if you use a video frame rate of 11,766 fps?

ukulele
17th October 2012, 08:41
@setarip: I will try that later, thx

@Asmodian: yes, 25fps were recorded in hypercam. The default setting is 10 fps I think, maybe that would work better. Setting frames in MeGUI to 11,766 doesn't seem to change anything, I did that before. Actually, he seems just to ignore it.

ukulele
17th October 2012, 15:10
With virtaul dub I matched the video duration to the audio duration. It also saved my AVI from RGBA to RGB, wich would be nessessary anyway. It runs fine through MeGUI now, it just seems that the video is constantly a little behind. I'm gonna make some more test recordings to figure that out.

ukulele
18th October 2012, 13:32
So now I figured it out.

It's all about storage speed. The real fps value represents the maximum framerate the hdd or the bus can handle. If I use only 5 fps Hypercam nearly reaches this rate on a usb 2.0 connected hard disk. My testfile was recorded on a notebook internal drive wich made up to 89 MBit/s.

I'm going to pimp one of our office PCs with a RAID 0 or something to get fps up. Sadly, Hypercam seems to have trouble with ATI Radeon Drivers, but I'm not yet sure about it.

setarip_old
21st October 2012, 18:36
With virtaul dub I matched the video duration to the audio duration.Glad to hear that my suggestion worked for you.

You're welcome ;>}

ukulele
24th October 2012, 09:07
Now I got a 2nd file of the same type recorded with 20fps (real rate acording to virtualdub 19.979fps) that I want to cut with virtualdub. Seems like you can't change framerate and cut in one step - all I get then is a blackscreen (even if the video stream is shown in mediainfo and vlc fileinfo). I'm going to test this in 2 steps today, can take a while :)

setarip_old
24th October 2012, 17:16
@ukulele Now I got a 2nd fileWhat software and procedures did you use to initially create this file?