OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Video Encoder Settings, What works best (or at all)?
JerryAttrix
post Dec 24 2005, 03:07 AM
Post #1





Group: Members
Posts: 11
Joined: 6-December 04
Member No.: 5,802



I've been experimenting with various mencoder options (on my SuSE 9.3 PC) to get something that works optimally on the Z. A typical command is

mencoder $1 -o $2.avi -ovc lavc -lavcopts vcodec=mpeg4:vhq:vqmin=2:vqmax=20:vmax_b_frames=2:vbitrate=192:vqcomp=0.6:vpass=
-vf scale=320:240,eq=6 -oac mp3lame -lameopts abr:br=64:aq=1 -srate 24000

but XMMS plays the result with the sound leading the video by a second or more. Also I'd like to run full-screen but the results are always jerky. On Cacko using kino I had some success by rotating the video and sizing to 480x640, but everything I encoded recently played with no video at all, which was the main reason I moved to pdaXrom.

Does anyone have a recommendation?
Go to the top of the page
 
+Quote Post
urielka
post Dec 24 2005, 04:35 AM
Post #2





Group: Members
Posts: 178
Joined: 13-September 05
Member No.: 8,099



run it by using mplayer -vo bvdd -vm name.avi
by command line it should run the best.
i use this:
CODE
mencoder $1 -srate 24000 -vop scale=320:240 -o z.$1 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=320:vhq:acodec=mp3:abitrate=64  -sws 2 -oac lavc

the diffrence is that i use 320 for video bitrate and u use 192 does 192 is good quality?
Go to the top of the page
 
+Quote Post
Meanie
post Dec 24 2005, 05:21 AM
Post #3





Group: Members
Posts: 2,808
Joined: 21-March 05
From: Sydney, Australia
Member No.: 6,686



QUOTE(urielka @ Dec 24 2005, 10:35 PM)
run it by using mplayer -vo bvdd -vm name.avi
by command line it should run the best.
i use this:
CODE
mencoder $1 -srate 24000 -vop scale=320:240 -o z.$1 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=320:vhq:acodec=mp3:abitrate=64  -sws 2 -oac lavc

the diffrence is that i use 320 for video bitrate and u use 192 does 192 is good quality?
*


if you want better quality then you can use 2 phase encoding with the following options:

1st phase -

mencoder $1 -o $2 -oac copy -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=1 -ffourcc DX50

2nd phase -

mencoder $1 -o $2 -srate 22050 -oac mp3lame -lameopts mode=3:cbr:br=24 -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=2 -ffourcc DX50
Go to the top of the page
 
+Quote Post
urielka
post Dec 24 2005, 06:44 AM
Post #4





Group: Members
Posts: 178
Joined: 13-September 05
Member No.: 8,099



will it be as good as 320 kbit rate?
Go to the top of the page
 
+Quote Post
JerryAttrix
post Dec 27 2005, 09:11 AM
Post #5





Group: Members
Posts: 11
Joined: 6-December 04
Member No.: 5,802



QUOTE(urielka @ Dec 24 2005, 12:35 PM)
run it by using mplayer -vo bvdd -vm name.avi
the diffrence is that i use 320 for video bitrate and u use 192 does 192 is good quality?

Nope; it's pretty poor. I only did it to pack as much as possible in (though looking at 2-phase results I see I wasn't saving anything). But I don't worry about the picture too much; I use it mainly for foreign language videos where the sound is the key.

I did the 2-phase encoding as recommended and the results are exceptional. However, XMMS still plays the sound faster than the video. Going to the console results in the following:

# mplayer -vo bvdd -vm /mnt/card/bg01.avi
Failed to open /dev/rtc: Device or resource busy (it should be readable by the user.)
Playing /mnt/card/bg01.avi
Cache fill: 0.00% (0 bytes) AVI file format detected.
VIDEO: [FMP4] 320x240 24bpp 25.000 fps 193.2 kbps (23.6 kbyte/s)
Clip info:
Software: MEncoder SuSE Linux 9.3 (i686)-Packman-3.3.5
=======================================
Requested audio codec family [mp3] (afm=mp3lib) not available.
Enable it at compilation.
Opening audio decoder: [libmad] libmad audio decoder
AUDIO: 24000 Hz, 2 ch, s161e, 8.0 kbit/1.04% (ratio: 1000->96000)
Selected audio codec: [mad] (libMAD MPEG layer 1-2-3)
=======================================
Error opening/initializing the selected video_out (-vo) device.
Exiting...

I can't find bvdd listed; what is it?
Go to the top of the page
 
+Quote Post
pgas
post Dec 27 2005, 09:35 AM
Post #6





Group: Members
Posts: 1,099
Joined: 17-December 03
From: Athens, Greece
Member No.: 1,210



I'm not a specialist but I think that with a 860 you should use -vo w100 and not -vo bvdd, also add -nortc to the list of options.

bvdd is for C1000/3000/3100
Go to the top of the page
 
+Quote Post
grog
post Feb 6 2006, 03:49 AM
Post #7





Group: Members
Posts: 692
Joined: 27-January 04
From: Canada
Member No.: 1,564



QUOTE(Meanie @ Dec 24 2005, 07:21 AM)
if you want better quality then you can use 2 phase encoding with the following options:

1st phase -

mencoder $1 -o $2 -oac copy -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=1 -ffourcc DX50

2nd phase -

mencoder $1 -o $2 -srate 22050 -oac mp3lame -lameopts mode=3:cbr:br=24 -vf scale=320:240,eq2=1.0:1.0:0.03:1.0 -sws 2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=248:vpass=2 -ffourcc DX50
*

Hey Meanie. I'm trying your tip on my poodle, and while the video is a lot better than this one phase command that I tried:

CODE
mencoder %1 -srate 24000 -ofps 15 -sws 2 -ovc lavc -vf scale=320:240,eq2=1.0:0.6:0.1:0.7 -lavcopts vcodec=mpeg4:vhq:vbitrate=150 -lameopts cbr:br=64:mode=3 -vop scale=320:240 -oac mp3lame -ffourcc XVID -o %2

I'm having the same problem as JerryAttrix that the audio is out of phase. Any suggestions? thks
Go to the top of the page
 
+Quote Post
adf
post Feb 6 2006, 04:57 PM
Post #8





Group: Members
Posts: 2,821
Joined: 13-September 04
From: Wasilla Ak.
Member No.: 4,572



try divx 5, like meanie did, or try ffmpeg.

Have you tried avidemux2? I find it really handy.
Go to the top of the page
 
+Quote Post
grog
post Feb 6 2006, 07:24 PM
Post #9





Group: Members
Posts: 692
Joined: 27-January 04
From: Canada
Member No.: 1,564



QUOTE(adf @ Feb 6 2006, 06:57 PM)
try divx 5, like meanie did, or try ffmpeg

I'm trying some videos, using fourcc XVID. Is this what you mean?

QUOTE
Have you tried avidemux2?  I find it really handy.
*

As opposed to mencoder you mean? No, but I'll check it out.

Another thing I tried was playing the videos with opie-mediaplayer2/xine. No luck yet; gave the error there was no demuxer available. I'm trying the above XVID in hopes that'll fix that.
Go to the top of the page
 
+Quote Post
dbowden
post Feb 25 2006, 08:39 PM
Post #10





Group: Members
Posts: 48
Joined: 23-May 05
From: Detroit, Mi
Member No.: 7,194



QUOTE(grog @ Feb 6 2006, 06:49 AM)
I'm having the same problem as JerryAttrix that the audio is out of phase. Any suggestions? thks


It does seem to be an encoding issue.

I noticed the same thing myself, but only on one video I encoded using the instructions at: http://www.cs.unc.edu/~hensley/zaurus/encode.html.

Videos I downloaded from the web seem to work OK, as did another video I encoded using the exact same method (2nd track on the DVD worked OK, 1st track was off).

I fixed it by adjusting the audio delay by about 2.2 seconds. The command line option is "-delay -2.2", so for that video, I use:
mplayer -vo bvdd -vm -delay -2.2 videoname.avi

I used the commands + and - during playback to find out the correct setting. It may vary for you.

Hope this helps,

David
Go to the top of the page
 
+Quote Post
datajerk
post Feb 26 2006, 08:11 AM
Post #11





Group: Members
Posts: 219
Joined: 14-February 04
Member No.: 1,861



I no longer have problems with 320x240, 512bit, 30 frames/sec and Kino/Cacko 1.23 on my c860 using:

CODE
mencoder $1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320x240,rotate=1 -ovc lavc -lavcopts -ofps 30000/1001 vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=1 -oac copy -sws 2 -o output.avi

mencoder $1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320x240,rotate=1 -ovc lavc -lavcopts -ofps 30000/1001 vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=2 -oac copy -sws 2 -o output.avi

I have not had the time to find the best options for highest quality output, but the above did fix all my audio sync problems with TiVo content. It's spot on and looks great. A similar setup also worked for my kids video iPod, i.e. no audio sync issues.

For DVDs an -ofps of 24000/1001 may solve the problem. I have not tried DVDs yet. Other settings for -ofps, using -noskip, and 3 pass encoding (don't ask me to recall all combinations) created the audio sync issues.

I don't know about newer units (c1000, c3xxx), but the c860 performs much better with prerotation.

On playback I did have to add to Kino General/Advanced options/Options for mplayer '-fs' to get full screen. Under Video, uncheck all tabs, except Drop frames and Disable aspect ratio correction. And, overclock on playback.

The actual playback options are:
CODE
-slave -nortc -quict -ac -mp3 -noaspect -vo w100 -nodouble -dr -framedrop -nocache -fs file...

I hope this helps. I have been fighting audio sync problems for months.

Lastly I read that 640x480 is possible with good performance with c[13]??? models. I plan to upgrade when the next releases. Does any know if you have to prerotate to get good performance with c[13]??? models?
Go to the top of the page
 
+Quote Post
grog
post Mar 2 2006, 05:34 PM
Post #12





Group: Members
Posts: 692
Joined: 27-January 04
From: Canada
Member No.: 1,564



QUOTE(datajerk @ Feb 26 2006, 10:11 AM)
I no longer have problems with 320x240, 512bit, 30 frames/sec and Kino/Cacko 1.23 on my c860 using:

CODE
mencoder $1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320x240,rotate=1 -ovc lavc -lavcopts -ofps 30000/1001 vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=1 -oac copy -sws 2 -o output.avi

mencoder $1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320x240,rotate=1 -ovc lavc -lavcopts -ofps 30000/1001 vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=2 -oac copy -sws 2 -o output.avi
*

I've modified the lines so that they'll (almost) run on my 'doze box:

CODE
c:\progra~1\mplayer\mencoder %1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320:240,rotate=1 -ovc lavc -lavcopts -ofps 30000/1001 vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=1 -oac copy -sws 2 -o %2

c:\progra~1\mplayer\mencoder %1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320:240,rotate=1 -ovc lavc -lavcopts -ofps 30000/1001 vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=2 -oac copy -sws 2 -o %2

But I can't get past this error:

CODE
F:\zvids>encode-movie infile.avi avi outfile.avi
MEncoder 1.0pre7-3.4.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Northwood (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi
Option lavcopts: Unknown suboption -ofps

Exiting... (error parsing cmdline)

I don't see 'frameno.avi' anywhere on the command line, and I've used the '-ofps' options in other attempts. Any ideas anyone? thks
Go to the top of the page
 
+Quote Post
adf
post Mar 2 2006, 07:24 PM
Post #13





Group: Members
Posts: 2,821
Joined: 13-September 04
From: Wasilla Ak.
Member No.: 4,572



hmmm. Maybe a codec issue?

Which reminds me... I had less luck with Xvid than I did with ffmpeg. Xvid, imho looks better on a large screen, &tc... playback on a z with ffmpeg encoding and mplayer has been better in my experience.

I recommend avidemux2 as it is a handy gui based app --easier to tinker on if you encode intermmitently and have that "wtf did i do to make this work just so last time?" experience, like I do.

I also have done better with ogg audio and a .ogm wrapper. at the very least you can get away with compressing the audio a bit further and shunting the little extra bit of space you saved to the video stream.
Go to the top of the page
 
+Quote Post
datajerk
post Mar 2 2006, 08:27 PM
Post #14





Group: Members
Posts: 219
Joined: 14-February 04
Member No.: 1,861



My bad. I C&P the command wrong. Switch -ofps 30000/1001 with the vcodec=... line.

Command should be:
CODE
c:\progra~1\mplayer\mencoder %1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320:240,rotate=1 -ovc lavc -lavcopts  vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=2 -ofps 30000/1001 -oac copy -sws 2 -o %2
Go to the top of the page
 
+Quote Post
grog
post Mar 5 2006, 09:40 AM
Post #15





Group: Members
Posts: 692
Joined: 27-January 04
From: Canada
Member No.: 1,564



QUOTE(datajerk @ Mar 2 2006, 10:27 PM)
My bad
*

Thanks for the update. I've been playing & tweaking & reading man pages & docs over the last week & finally came up with this. I's the same as yours except that my 5600 didn't seem to like mencoder doing the pre-rotate, so I took that out & I removed the extra '-oac copy' option, which I wasn't sure why you had it in there although it doesn't seem to break anything.

CODE
c:\progra~1\mplayer\mencoder %1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320:240 -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=1 -ofps 30000/1001 -sws 2 -o %2

c:\progra~1\mplayer\mencoder %1 -oac mp3lame -lameopts cbr:br=128:mode=0 -vf pp=lb,scale=320:240 -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vbitrate=512:vpass=2 -ofps 30000/1001 -sws 2 -o %2

And here's the mplayer options I use to play. The mad audio codec seems to works better for me & my mplayer doesn't have w100 so I swtiched to fbdev. Ihe input is so that my key settings for playing mp3's don't effect movie playback. I'll even 'chvt 1' & play them in a separate virtual terminal 'cause there's some minor artifacts on the screen when I play in a gui terminal.

CODE
mplayer -nortc -quiet -ac mad -noaspect -vo fbdev -nodouble -dr -framedrop -nocache -fs -brightness 20 -input conf=/dev/null $@

Thanks again
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th December 2014 - 07:07 AM