maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Tablet-encode & mencoder (https://talk.maemo.org/showthread.php?t=12249)

JeffElkins 2007-11-25 17:09

Tablet-encode & mencoder
 
Andrew,

These are my results using current svn version of tablet-encode as compared to 'straight' mencoder. I may well not have used tablet-encode to it's best advantage.

Code:


filesize:70833360
the_counter_clock_incident.tb.avi
Produced with tablet-encode -o --preset=best

Video and audio rapidly lose sync. Video appears jerky.
Only playable with mplayer.

AVI file format detected.
VIDEO:  [DIVX]  320x240  24bpp  23.976 fps  273.4 kbps (33.4 kbyte/s)
Clip info:
 Software: MEncoder 2:1.0~rc2-0ubuntu1~gutsy1
[nokia770] Nokia N800 hardware detected
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Trying to force audio codec driver family dspmp3...
Opening audio decoder: [dspmp3] MP3 audio pass-through for Nokia 770/N800
(fake decoder)
ADecoder preinit failed :(
ADecoder init failed :(
Trying to force audio codec driver family libmad...
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
AO: [sdl] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [nokia770] 320x240 => 320x240 Planar YV12  [fs] [zoom]
[nokia770] Using ARM JIT YUV420 scaler (quality=2) to scale 320x240 =>
320x240


============================

filesize:134529848
 the_counter_clock_incident.nk.avi
produced by:
mencoder -vf scale=320:240 -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 $1 -o $2.avi

Audio and video remain in sync. Video is smooth.
Playable with both mplayer and Nokia media player.


Cache fill:  0.00% (0 bytes)
AVI file format detected.
VIDEO:  [FMP4]  320x240  24bpp  23.976 fps  571.8 kbps (69.8 kbyte/s)
Clip info:
 Software: MEncoder 2:1.0~rc2-0ubuntu1~gutsy1
[nokia770] Nokia N800 hardware detected
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Trying to force audio codec driver family dspmp3...
Opening audio decoder: [dspmp3] MP3 audio pass-through for Nokia 770/N800
(fake decoder)
ADecoder preinit failed :(
ADecoder init failed :(
Trying to force audio codec driver family libmad...
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
AO: [sdl] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [nokia770] 320x240 => 320x240 Planar YV12  [fs] [zoom]
[nokia770] Using ARM JIT YUV420 scaler (quality=2) to scale 320x240 => 320x240


aflegg 2007-11-25 20:08

Re: Tablet-encode & mencoder
 
Thanks very much for this.

Is this being played back on an N800? Using OS2007 or OS2008?

When you say "only playable with mplayer", do you mean it plays back well with mplayer or that it suffers from the problems you describe and Media Player won't touch it at all? If the latter, does it give an error message?

JeffElkins 2007-11-25 20:46

Re: Tablet-encode & mencoder
 
I'm using OS2008 on an N800.

The file won't play at all with the Nokia media player, but oddly enough no error message. Media player goes into zoom mode, but the video never starts.


Playback with mplayer gives alightly jerky video and the sound is badly out of sync with the video.

Serge 2007-11-25 20:58

Re: Tablet-encode & mencoder
 
I remember having problems with '-noidx' option in some older version of 770-encode.pl script. After removing this option, everything got much better. Is it really needed?

JeffElkins 2007-11-25 21:22

Re: Tablet-encode & mencoder
 
Quote:

Originally Posted by Serge (Post 99804)
I remember having problems with '-noidx' option in some older version of 770-encode.pl script. After removing this option, everything got much better. Is it really needed?

Good call.

Code:

#  push @params, ($options{"index"} ? '-forceidx' : '-noidx');
After commenting out the line above, audio/video are back in sync.

Nikem 2007-11-25 21:32

Re: Tablet-encode & mencoder
 
Yeah, I removed the '-noidx' option too, because else I couldn't skip in the videos.

JeffElkins 2007-11-25 21:37

Re: Tablet-encode & mencoder
 
One other change...

I changed:

Code:

push @params, '-ffourcc', 'DIVX';
To:
Code:

push @params, '-ffourcc', 'FMP4';
and the output file plays in both mplayer and Nokia media player.

aflegg 2007-11-25 22:12

Re: Tablet-encode & mencoder
 
Interesting. Thanks for all the comments, I'll integrate these changes in the next version. I can't remember why -noidx was in there. It won't be any longer :-)

Jeff, did you see a difference in playback performance between the two FOURCCs?

aflegg 2007-11-25 22:20

Re: Tablet-encode & mencoder
 
Jeff,

Could you do me a favour, and also `dd if=the_counter_clock_incident.tb.avi of=fragment.avi bs=1M count=20' and send me the result?

If you need somewhere to FTP it, let me know.

Many thanks in advance,

Andrew

JeffElkins 2007-11-25 22:25

Re: Tablet-encode & mencoder
 
Quote:

Originally Posted by aflegg (Post 99834)
Jeff, did you see a difference in playback performance between the two FOURCCs?

Performance seems about the same. The only difference is that FMP4 works with both players: Nokia's and mplayer.

BTW, tablet-encode just did an excellent job on ST2:Wrath of Khan. 400Mb and the aspect ratio/playback is perfect.


All times are GMT. The time now is 23:06.

vBulletin® Version 3.8.8