Notices


Reply
Thread Tools
Posts: 398 | Thanked: 301 times | Joined on Sep 2007 @ Texas
#1
Hi,

I was using tablet-encode for the first time today on a Mac and wanted to share some things that will hopefully help others save time.

I found that I had to build mencoder from source as I couldn't find an up to date binary. No big deal, default options are fine.

Perl is present by default so I didn't have to install that.

From here I tried to convert a DVD I had ripped to my hard drive. It wasn't obvious to me that I didn't need to tell mencoder to use the -dvd-device option as tablet-encode will detect this case based on the prescence of the VIDEO_TS folder. Nice touch but I missed this in the documentation.

Having figured that out, I then tried a best preset conversion and got a zero length file. There were some cryptic errors on the console but nothing too helpful. I finally tried running the same command line outside of tablet-encode and found that the lavc audio encoder wouldn't handle mp3.

It would be nicer if tablet-encode and mencoder gave the same output as it seems tablet-encode suppresses some useful information. In this case I found that I needed to install lame.

Back to google, compile from source, install lame.

Now tablet-encode finds that mencoder supports mp3lame and tries to use it. This resulted in another silent failure of mencoder for me. But I found that if I instead used lavc and told it to use libmp3lame that it then worked.

if ($options{'copy-audio'} or (($info->{aformat} || '') eq '85') && (($info->{abitrate} || 0) <= $preset->{abitrate})) {
push @params, '-oac', 'copy';
$af = '';

#} elsif (&mencoderSupports('oac')->{'mp3lame'}) {
# push @params, '-oac', 'mp3lame',
# '-lameopts', 'vbr=0:br='.$preset->{abitrate}.
# ($preset->{abitrate} < 64 ? ':mode=3' : '');
} else {
push @params, '-oac', 'lavc', '-lavcopts', 'acodec=libmp3lame:abitrate='.$preset->{abitrate};
}

Finally I had an avi and I tried several of the presets.

But not being satisfied with less than perfect, I tried 2 pass encoding and again found a silent failure. Running from the command line I found that mencoder didn't like a non zero minimum bit rate.

[mpeg4 @ 0x1023800]Warning min_rate > 0 but min_rate != max_rate isn't recommended!
[mpeg4 @ 0x1023800][lavc rc] Error: bitrate too low for this video with these parameters.
Could not open codec.

So I made the minimum rate zero.

':vrc_buf_size=450'.
#':vrc_minrate='.int($ovbitrate / 2).
':vrc_minrate='.int(0).
':vrc_maxrate='.max($ovbitrate * 1.25, 1000);

And now I can do a two pass encode.

I'm not sure why the player would require a minimum bit rate but I suppose it's possible.

Frank
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#2
Frank,

I haven't got a Mac anymore, so this testing is appreciated.

I'll see if I can do something about the error reporting in this case (and maybe even host an OS X binary of mencoder); and also test your patch on other platforms to see if it can be included.

Cheers,

Andrew
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
Posts: 145 | Thanked: 32 times | Joined on Dec 2007
#3
sorry to jump in off-topic, but is there any way
that tablet-encode can grab subtitles?
 
stangri's Avatar
Posts: 145 | Thanked: 18 times | Joined on Aug 2008 @ Vancouver, BC
#4
I'm sure you guys have reasons to use the mencoder, but you are aware of the wonderful Knots application, aren't you?
 

The Following User Says Thank You to stangri For This Useful Post:
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#5
Originally Posted by albright View Post
sorry to jump in off-topic, but is there any way
that tablet-encode can grab subtitles?
Grab from DVDs, or include separate subtitle files which may be alongside a video?

In the latter case, I believe the following should work (but I've never tested it. See man mencoder for more options):

Code:
tablet-encode -m-sub -mfoo.sub foo.avi foo.tablet.avi
As for the former, perhaps -m-sid -m... could help?
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#6
Originally Posted by stangri View Post
I'm sure you guys have reasons to use the mencoder, but you are aware of the wonderful Knots application, aren't you?
Apples and oranges. tablet-encode is designed to take a random video source (DVD, downloaded video, PVR recording) and produce a video you can put on your tablet for watching later.

There are two reasons for doing this, in general:
  1. Space: the tablets have limited space and there's no point filling up a couple of gig with a half-hour MPEG2 video recorded on your PVR
  2. Performance: the tablets have limited video playback performance, with a number of limitations including format, bitrate, resolution. With transcoding, a higher-resolution video such as a DVD can be shrunk down to a size and format to allow easy playback on your tablet in Media Player, Canola, MediaBox, UKMP etc.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
Posts: 43 | Thanked: 22 times | Joined on May 2008 @ EU
#7
Apples and oranges.
Not at all ! Knots can also be used to transcode a video on a server and then transfer it on the device to watch it later OR you can watch a video by on-demmand streaming if you have I-NET, so it does both!

Highly suggested app
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#8
Well, tablet-encode came before Knots :-p

Why does there have to be one perfect tool for everyone? With tablet-encode, I can have multiple profiles depending on usage; directly rip a movie (or a series of TV episodes) from a DVD in a single, simple command; transcode an online video or one I have to hand; etc.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 

The Following User Says Thank You to Jaffa For This Useful Post:
Posts: 145 | Thanked: 32 times | Joined on Dec 2007
#9
I find that the two pass option fails in 2.20. It just
leaves a size zero output file. 2.18 still works fine.
 
Jaffa's Avatar
Posts: 2,535 | Thanked: 6,681 times | Joined on Mar 2008 @ UK
#10
Originally Posted by albright View Post
I find that the two pass option fails in 2.20. It just
leaves a size zero output file. 2.18 still works fine.
Will look at correcting this tonight. Sorry for the inconvenience.
__________________
Andrew Flegg -- mailto:andrew@bleb.org | http://www.bleb.org
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:38.