maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   tablet-encode 2.20 (https://talk.maemo.org/showthread.php?t=25926)

Frank Banul 2008-12-31 20:28

tablet-encode 2.20
 
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 2009-01-01 00:01

Re: tablet-encode 2.20
 
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

albright 2009-01-01 17:03

Re: tablet-encode 2.20
 
sorry to jump in off-topic, but is there any way
that tablet-encode can grab subtitles?

stangri 2009-01-02 01:32

Re: tablet-encode 2.20
 
I'm sure you guys have reasons to use the mencoder, but you are aware of the wonderful Knots application, aren't you?

Jaffa 2009-01-03 15:04

Re: tablet-encode 2.20
 
Quote:

Originally Posted by albright (Post 253905)
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?

Jaffa 2009-01-03 15:07

Re: tablet-encode 2.20
 
Quote:

Originally Posted by stangri (Post 253957)
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.

mtron 2009-01-12 08:40

Re: tablet-encode 2.20
 
Quote:

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 2009-01-12 16:05

Re: tablet-encode 2.20
 
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.

albright 2009-01-12 19:03

Re: tablet-encode 2.20
 
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 2009-01-15 15:07

Re: tablet-encode 2.20
 
Quote:

Originally Posted by albright (Post 256905)
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.

qole 2009-01-15 17:51

Re: tablet-encode 2.20
 
Hey Jaffa, you'd better start figuring out a new name for your application :)

Only a few more months left before an app with "tablet" in the name may sound a bit obsolete... :D

Jaffa 2009-01-15 20:45

Re: tablet-encode 2.20
 
Yup. A problem indeed. Especially since it was only around N810 launch time that I finally renamed it from '770-encode'.

'video-encode' is a bit generic. Perhaps I should have a competition? A free copy of the entire mediautils suite for the best suggestion!

qole 2009-01-15 23:06

Re: tablet-encode 2.20
 
I considered stuff like mobile-encode, maemo-transcode, transcodr, vidpacker, video2go, etc, etc....

But then it occurred to me... What if the new RX-51 can just play everything except maybe full 1080p? Wow... The specs suggest that it should be able to handle video a lot better than the current tablets. So maybe tablet-encode will be unnecessary for the next generation... On the other hand, maybe HD video will become so ubiquitous in the next few years that we'll still need to do a lot of transcoding...

Lord Raiden 2009-01-16 02:27

Re: tablet-encode 2.20
 
lol. If it's using mencoder to resize and reencode the movie, why not just skip a step and just use mencoder directly. That's what I've been doing. I've also found that by doing that I can batch my work for faster conversions.

Jaffa 2009-01-16 13:46

Re: tablet-encode 2.20
 
Quote:

Originally Posted by qole (Post 257931)
I considered stuff like mobile-encode, maemo-transcode, transcodr, vidpacker, video2go, etc, etc....

"transcodr"'s quite nice. Can't use anything involving "maemo", as it's against the trademark policy.

Quote:

But then it occurred to me... What if the new RX-51 can just play everything except maybe full 1080p? Wow... The specs suggest that it should be able to handle video a lot better than the current tablets. So maybe tablet-encode will be unnecessary for the next generation... On the other hand, maybe HD video will become so ubiquitous in the next few years that we'll still need to do a lot of transcoding...
Indeed. No device discount for RX-64 for me! ;-/

However, there's still a place for ripping DVDs and transcoding for space purposes.

Jaffa 2009-01-16 13:49

Re: tablet-encode 2.20
 
Quote:

Originally Posted by Lord Raiden (Post 257966)
lol. If it's using mencoder to resize and reencode the movie, why not just skip a step and just use mencoder directly. That's what I've been doing. I've also found that by doing that I can batch my work for faster conversions.

Because the "step" you want to skip saves you making bitrate calculations, aspect ratio calculations, DVD title investigations and so on.

What do you mean by "batch your work"? tablet-encode (the command line version, not the GUI) can take multiple inputs and transcode to a single output directory.

e.g. to rip all the episodes of a TV series DVD (in the best language for the current user), but none of the special features to an N810 mounted over USB:

Code:

tablet-encode --episodes dvd: /media/disk0/MyDocs/.video/

GeneralAntilles 2009-01-16 13:54

Re: tablet-encode 2.20
 
Quote:

Originally Posted by qole (Post 257931)
But then it occurred to me... What if the new RX-51 can just play everything except maybe full 1080p?

No what-if about it. 720p is working just fine with only CPU-side NEON optimizations on the Beagle Board right now. ;)

Quote:

Originally Posted by Jaffa (Post 258056)
"transcodr"'s quite nice. Can't use anything involving "maemo", as it's against the trademark policy.

Well, encoder-for-maemo would work. ;)

qole 2009-01-16 17:12

Re: tablet-encode 2.20
 
Quote:

Originally Posted by Jaffa (Post 258056)
Can't use anything involving "maemo", as it's against the trademark policy.

Also, a name with maemo as the first word suggests that it runs in the maemo environment. I like the way GA's going with "encoder-for-maemo" but it is a rather plain name.

qwerty12 2009-01-16 17:16

Re: tablet-encode 2.20
 
encode-or-die. Now, who dares to tell me that that is plain? :P :D

GeneralAntilles 2009-01-16 18:07

Re: tablet-encode 2.20
 
Quote:

Originally Posted by qole (Post 258086)
I like the way GA's going with "encoder-for-maemo" but it is a rather plain name.

Hehe, it's Nokia's recommended alternative to "Maemo x", what else would you expect? ;)

attila77 2009-03-11 02:04

Re: tablet-encode 2.20
 
Quote:

Originally Posted by qole (Post 257931)
But then it occurred to me... What if the new RX-51 can just play everything except maybe full 1080p? Wow... The specs suggest that it should be able to handle video a lot better than the current tablets. So maybe tablet-encode will be unnecessary for the next generation... On the other hand, maybe HD video will become so ubiquitous in the next few years that we'll still need to do a lot of transcoding...

Sorry about bringing back the dead (looking for some tablet-encode data), but there is one more reason. Depending on the architecture, transcoded video means less CPU usage, which can translate to longer battery life. And battery life as a criteria never gets obsolete :)

Lord Raiden 2009-03-11 03:43

Re: tablet-encode 2.20
 
Yeah, plus with a 4" screen, even if the hardware is beefier, and you can play video back at 1080p, you're still not going to see the difference. Anything over DVD quality resolution is really not going to show any improvement. I actually have a whole bunch of videos encoded at 480x200 to work on the tablet, and they look just fine. And the difference in quality between 480x200 and 720x480 (dvd) is nill from what I can best tell. Or at least not enough to even be of any reason concern.


All times are GMT. The time now is 11:04.

vBulletin® Version 3.8.8