Log in

View Full Version : Mencoder freezing at first second


resle
13th July 2007, 18:14
Hi,
I just went through a bizarre problem (http://forum.doom9.org/showthread.php?p=1021457#post1021457) that in the end, like I've been suggested, was a hardware issue.

Now that I've fixed that, I'm batch transcoding FRAPS movies to xvid avi files using mencoder. Every few movies, let's say more or less 1 every 3-4 movies, mencoder encodes only the first second of it. No matter what the encoding options are, I tried everything - it just won't encode more than the first second alone.

It behaves like this: finishes the first second... stops for a while without outputting anything, then quits with no errors, and correctly finalizes the avi file.
Just for the record, I also tried using lavc instead of xvid.. same thing.




...
update: it's not really "the first second" but the first 25 frames.. I've tried forcing a different framerate but nothing changes.

CWR03
13th July 2007, 23:09
Are you encoding these on the same machine on which the video was captured? You'll need FRAPS installed to view or re-encode the video since it uses a proprietary codec.

resle
14th July 2007, 11:25
Yes FRAPS is on the same machine. Btw as I wrote, this happens only on some of the movies, despite the fact that all of them are coming from the same source (fraps capture). If I re-capture the same "flawed" movie, it keeps being "flawed".

Dark Shikari
15th July 2007, 07:12
Mencoder is codec-independent, as it uses its own internal libraries... is it possible that its FRAPS codec isn't working right?

resle
16th July 2007, 09:04
Another "update": MPLAYER, too, only decodes the first 25 frames, then it stops.

Other players/encoders work just fine so it's a mplayer/mencoder core issue I'd say.

mitsubishi
16th July 2007, 09:27
Have you got avisynth installed?

Maybe you'll have some luck running in through directshow.

Create a text file video.avs
DirectShowSource("C:\fraps_video.avi")

and then pass "video.avs" as the source to mencoder.

resle
16th July 2007, 10:19
Wow! That worked, thank you a lot! This is what I call a Voodoo Solution.. can you explain me what made you think that running through directshow could help? Thanks a lot again

mitsubishi
16th July 2007, 11:11
Because the problem is with mencoder's internal fraps codec. By using avisynth you use fraps own codec. It may be better to use AVISource thinking about it, as DS sometimes has it's own issues.

resle
16th July 2007, 14:11
I don't know if it's a DS issue... but when I pass through video.avs the audio track vanishes into thin air. *sigh* .... trying "AVISource" now (Which I suppose to be an AviSynth plugin, right?)

Edit: Nothing ... even using "AVISource("c:\blabla.avi")" the audio is eaten at some point. Tried both -oac mp3lame and -oac copy ... same result. Any other suggestions I may follow?

Last edit: Just for the records, I used DirectShowSource, AViSource, OpenDMLSource, and all of them specifying the audio=true parameter. Still nothing. Mplayer, when feed with the .avs files, reports a simple "No Audio"..

foxyshadis
16th July 2007, 21:24
You can try:
mencoder avisynth.avs -oac null -ovc xvid fraps.avi -oac mp3lame -ovc null -o final.avi

Might work, might crash, I don't know.

Mateo227
27th July 2007, 20:21
Hi,
Thanks for the idea, Foxyshadis, but unfortunately Mencoder does not recognize the null command on my machine.

While trying to encode from AVS to WMV, I experience the same problem as Resle, where there is no sound in the final WMV output. I have put my script at the bottom of this post in case someone can help me outta this jam.

I have been using Buzzqw's AutoMen GUI program and do not have this problem if I load any other file type besides AVS, which leads me to believe this is an AVIsynth-Mencoder compatability issue.

If anyone can help me get Mencoder to output sound from an AVS file without using AVI2Wav it would be awesome!!

******mencoder -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -vf scale=400:300 -o SubTest6.wmv -ovc lavc -lavcopts vcodec=wmv2 -af volnorm=2 -oac mp3lame -lameopts aq=5:abr:preset=256 SUBLIME.avs*****

setarip_old
28th July 2007, 00:08
@resle

Hi!

Did you do anything differently when capturing the problematic files versus those that convert without problems?

Mateo227
30th July 2007, 18:16
Nope, AutoMen uses a consistent .BAT file to convert all file types, so the only information that changed was the file type.

setarip_old
31st July 2007, 02:25
@Mateo227

Please look carefully at my previous post - It is not addressed to you. It is addressed to the threadstarter, "resle"...