|
|
|
03-27-2007, 01:37 PM
|
#21
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
Please Login to Remove!
Quote:
Originally Posted by tuxi
A question on the win32 codecs:
I copied the newest codecs into /usr/lib/win32. Some of the older codecs (with slightly different names) remain in the directory. Should I purge the directory and recopy the newest only? Thanks.
|
I always whack the entire thing and just unzip/rename the latest one when I do it, I don't try overwriting or any such mojo. Try that instead maybe? I don't think anything except mplayer/mencoder uses that directory so it's probably pretty safe.
|
Offline
|
|
03-30-2007, 05:25 PM
|
#22
|
New Member
Join Date: Mar 2007
Location: Katy, TX
Model: 8800
Carrier: AT&T
Posts: 7
|
After further thinking, it appears that the 8800's screen is 320x240 (whole screen, hence sort of true and OK for marketing). Sixty total pixels appear to be used for borders/controls at top and bottom in the media player. This leaves 180 pixels vertically for videos. On these assumptions, the correct sizes for 8800 videos are 16:9 - 320x180 and 4:3 - 240x180.
__________________
Tuxi
BlackBerry 8800
AT&T
BES (version unknown)
Windows XP, Ubuntu 8.10
|
Offline
|
|
03-30-2007, 11:24 PM
|
#23
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
Quote:
Originally Posted by tuxi
On these assumptions, the correct sizes for 8800 videos are 16:9 - 320x180 and 4:3 - 240x180.
|
I'm with ya - I just updated the scriptlet to list those rez; even though the 4:3 is the same for both, I left it called out in each section so there's no confusion.
BTW: this video converts superbly.
http://www.sadkermit.com/
|
Offline
|
|
06-06-2007, 03:41 PM
|
#24
|
Knows Where the Search Button Is
Join Date: Jun 2007
Model: 8100
PIN: N/A
Carrier: t-mobile
Posts: 16
|
this script is really quite nice. Thank you now I can watch what ever I want to on my 8100 although with its micro sized screen I am not so impelled - but I CAN if I want or need to, so thank you.
|
Offline
|
|
06-14-2007, 01:53 PM
|
#25
|
New Member
Join Date: Jun 2006
Location: Chicago
Model: 8100
Carrier: Tmobile
Posts: 7
|
Segmentation Fault?
Does anybody know what's going on here?
Every time I try to encode a video I get a segmentation fault.
Here's the output:
MEncoder 1.0pre8-4.0.3 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) XP 2200+ (Family: 6, Model: 8, Stepping: 0)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0x15cc1800
AVI file format detected.
VIDEO: [XVID] 624x352 12bpp 23.976 fps 999.3 kbps (122.0 kbyte/s)
[V] filefmt:3 fourcc:0x44495658 size:624x352 fps:23.98 ftime:=0.0417
================================================== ========================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
================================================== ========================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=240 h=135]
================================================== ========================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
================================================== ========================
VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
videocodec: libavcodec (240x136 fourcc=34504d46 [FMP4])
Writing header...3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.008 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 0.9s 22f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.086 [0:63]
Skipping frame!
Pos: 3.0s 73f ( 0%) 53.64fps Trem: 12min 76mb A-V:0.084 [316:64]
Skipping frame!
./vid2bb.sh: line 25: 19491 Segmentation fault mencoder "$FILE" -o "${FILE%.*}_bb.avi" -of avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=$VBR:acodec=mp3:abitrate=$AB R -vf scale=$RES
I'd really love to use this script, as it seems like the most simple solution to encoding files for the BB. I use an 8100 (Pearl) and I'm trying to do a 16:9 video.
|
Offline
|
|
06-14-2007, 05:23 PM
|
#26
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
You can use 'strace' and the direct commandline to help figure out where the problem might be. Run this:
Code:
strace mencoder (myvideo.avi) -o test_bb.avi" -of avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=230:acodec=mp3:abitrate=64 -vf scale=240:135
Replace (myvideo.avi) with your actual video, of course.
There will be gobs and gobs of output, but somewhere towards the end and the SIGSEGV (seg fault) should be something that looks interesting; it could be trying to open a file/directory and getting denied, calling a function that's getting an unexpected result, who knows. It'll be the first clue, though - what is making mencoder barf on your system?
|
Offline
|
|
06-14-2007, 06:03 PM
|
#27
|
New Member
Join Date: Jun 2006
Location: Chicago
Model: 8100
Carrier: Tmobile
Posts: 7
|
results of strace
Hm... I gave strace a try, and I'm not sure if this is gonna help, here's the output:
Code:
(a bunch of mumbo jumbo........)
write(4, "01wb\300\0\0\0\377\373Td\345\200\361\317\35a\350c\32\\"..., 1318) = 1318
) = 741, "Pos: 757.8s 18173f (30%) 45.15f"..., 74Pos: 757.8s 18173f (30%) 45.15fps Trem: 15min 87mb A-V:0.035 [222:64]
gettimeofday({1181861926, 500593}, NULL) = 0
read(3, "\325\337\253\21g\26\324\25.\216Qej\373\31\tZ\232\224u\274"..., 2048) = 2048
gettimeofday({1181861926, 503552}, NULL) = 0
gettimeofday({1181861926, 503630}, NULL) = 0
gettimeofday({1181861926, 503657}, NULL) = 0
gettimeofday({1181861926, 507858}, NULL) = 0
gettimeofday({1181861926, 509571}, NULL) = 0
gettimeofday({1181861926, 509612}, NULL) = 0
gettimeofday({1181861926, 509639}, NULL) = 0
write(4, "01wb\300\0\0\0\377\373Td\342\0001\2641\335hc\32\340\26"..., 1116) = 1116
) = 741, "Pos: 757.8s 18174f (30%) 45.15f"..., 74Pos: 757.8s 18174f (30%) 45.15fps Trem: 15min 87mb A-V:0.035 [222:64]
gettimeofday({1181861926, 510060}, NULL) = 0
gettimeofday({1181861926, 512664}, NULL) = 0
gettimeofday({1181861926, 512712}, NULL) = 0
gettimeofday({1181861926, 515877}, NULL) = 0
read(3, "\3206\224k\321~\237\355\353^\222\323\322\322\2655E\265"..., 2048) = 2048
read(3, "\5\232\277S\255\210\325c\234\342i\27\270\234\373\24\207"..., 2048) = 2048
read(3, "\275[\307\301\340?{\360<\7\370`\312\226V\17\223\0H\7\217"..., 2048) = 2048
gettimeofday({1181861926, 516127}, NULL) = 0
gettimeofday({1181861926, 516153}, NULL) = 0
gettimeofday({1181861926, 520664}, NULL) = 0
gettimeofday({1181861926, 522409}, NULL) = 0
gettimeofday({1181861926, 522452}, NULL) = 0
gettimeofday({1181861926, 522479}, NULL) = 0
write(4, "01wb\300\0\0\0\377\373Td\345\0001\2211`\341\1\22\354\25"..., 1428) = 1428
) = 741, "Pos: 757.9s 18175f (30%) 45.15f"..., 74Pos: 757.9s 18175f (30%) 45.15fps Trem: 15min 87mb A-V:0.035 [222:64]
gettimeofday({1181861926, 522847}, NULL) = 0
gettimeofday({1181861926, 525784}, NULL) = 0
gettimeofday({1181861926, 525836}, NULL) = 0
gettimeofday({1181861926, 529201}, NULL) = 0
read(3, "\350\221\365\223kfk\246\213\243h\252\304\322tY\250c\321"..., 2048) = 2048
gettimeofday({1181861926, 566902}, NULL) = 0
gettimeofday({1181861926, 567088}, NULL) = 0
gettimeofday({1181861926, 571192}, NULL) = 0
gettimeofday({1181861926, 572886}, NULL) = 0
gettimeofday({1181861926, 572929}, NULL) = 0
gettimeofday({1181861926, 572956}, NULL) = 0
write(4, "01wb\300\0\0\0\377\373Td\342\2011\2532^\340b\32\354\26"..., 1376) = 1376
) = 741, "Pos: 757.9s 18176f (30%) 45.15f"..., 74Pos: 757.9s 18176f (30%) 45.15fps Trem: 15min 87mb A-V:0.036 [222:64]
gettimeofday({1181861926, 573320}, NULL) = 0
gettimeofday({1181861926, 576081}, NULL) = 0
gettimeofday({1181861926, 576167}, NULL) = 0
gettimeofday({1181861926, 576194}, NULL) = 0
gettimeofday({1181861926, 580305}, NULL) = 0
gettimeofday({1181861926, 582086}, NULL) = 0
gettimeofday({1181861926, 582135}, NULL) = 0
gettimeofday({1181861926, 582163}, NULL) = 0
write(4, "01wb\300\0\0\0\377\373Td\346\214\342\f.\325\223\6\32`\26"..., 1170) = 1170
) = 741, "Pos: 758.0s 18177f (30%) 45.15f"..., 74Pos: 758.0s 18177f (30%) 45.15fps Trem: 15min 87mb A-V:0.035 [222:64]
gettimeofday({1181861926, 582589}, NULL) = 0
read(3, "E\343\264\32\275\344\202DI\320\305\0023N2\331\370\274\256"..., 2048) = 2048
gettimeofday({1181861926, 586108}, NULL) = 0
gettimeofday({1181861926, 586163}, NULL) = 0
gettimeofday({1181861926, 588933}, NULL) = 0
read(3, "\233|`\235\374a\223.O\247\276x3{8f\31\261\231}\234\363"..., 2048) = 2048
read(3, "i\20\371H`\323\16\357ET\214gu\253\336U\314[\32\377\221"..., 2048) = 2048
gettimeofday({1181861926, 589145}, NULL) = 0
gettimeofday({1181861926, 589171}, NULL) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
I should mention that the segmentation fault happens arbitrarily in the middle of encoding, not necessarily at the beginning. This particular file died at 30% completion. Earlier it died at 7%, and even before at around 25%. It's pretty much random.
Any suggestions?
|
Offline
|
|
06-14-2007, 06:20 PM
|
#28
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
Quote:
Originally Posted by NinjitsuStylee
I should mention that the segmentation fault happens arbitrarily in the middle of encoding, not necessarily at the beginning. This particular file died at 30% completion. Earlier it died at 7%, and even before at around 25%. It's pretty much random.
|
Hmmm, that smells like the file has "something" (whatever it may be) in the encoding that is tripping up mencoder. Since you indicate it's at random places and with different files (at least, that's what I gather) then maybe it's in one of the binaries used? (DLL, libavcodec, etc.) I notice you're also on an older mencoder, it's possible it's a bug that's been fixed -- my FC6 system here shows 1.0rc1-4.1.1.
Feel free to PM me a link to download a (small) sample video that's crashing on you and I'll run it through my stuff, see what happens. This would at least tell us if it's something in your rig that isn't being friendly...
|
Offline
|
|
06-14-2007, 06:36 PM
|
#29
|
New Member
Join Date: Jun 2006
Location: Chicago
Model: 8100
Carrier: Tmobile
Posts: 7
|
Actually, I just recently upgraded to MEncoder 1.0rc1-4.0.3 and also downloaded the most recent DLL stuff from the mplayer website, and I'm still having the same issues. Not sure how you got a more recent version...are you using one from SVN?
I'm on an Ubuntu Dapper system, btw. Not really sure if that makes a huge difference or not.
I haven't actually tried encoding a "small" video yet, I've mostly been attempting on hour-long TV shows (well 45 minutes without commercials).
Yea, it does seem like there's something in the video file that makes it hiccup. I've come to realize that it's not actually random places in the file, it's almost always the same place (for this particular file I'm doing, 30%-ish).
I'm going to try tinkering around with a few more things here, and if not I'll PM you some more info.
Thanks for all your help, btw
|
Offline
|
|
06-14-2007, 06:40 PM
|
#30
|
New Member
Join Date: Jun 2006
Location: Chicago
Model: 8100
Carrier: Tmobile
Posts: 7
|
Another update....I came back into the room before it segfaulted (what, it takes forever, I'm impatient >.<) and I noticed that it actually gets to about 43% before it segfaults. But look at this:
Code:
Pos: 0.9s 22f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.086 [0:63]
Skipping frame!
Pos: 3.0s 73f ( 0%) 52.11fps Trem: 12min 76mb A-V:0.084 [316:64]
Skipping frame!
Pos: 729.0s 17482f (29%) 50.09fps Trem: 14min 86mb A-V:0.083 [223:63]
Skipping frame!
./vid2bb.sh: line 26: 21227 Segmentation fault sudo mencoder "$FILE" -ffourcc XVID -o "${FILE%.*}_bb.avi" -of avi -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=$VBR:acodec=mp3:abitrate=$ABR -vf scale=$RES
Why would it revert back to 29% like that? Very strange...
|
Offline
|
|
06-14-2007, 07:01 PM
|
#31
|
New Member
Join Date: Jun 2006
Location: Chicago
Model: 8100
Carrier: Tmobile
Posts: 7
|
I managed to successfully encode a 1.7mb avi file and a 56.1mb avi file.
The one i'm having the segfaults with is a 348.8mb Xvid (the others were divx). Another file I had segfaults with is a 347.4mb Xvid file (both are HD quality 16:9 45-ish minute recordings), but the latter one gave me the segfault much later during the encode (it almost got the entire video done, except for the last few minutes).
I even added the -ffourcc XVID option to my script, and as you can see from my previous output post, I'm running the script as sudo (just to make sure there aren't any silly file write permission errors).
Still no go.
Any other suggestions?
|
Offline
|
|
06-14-2007, 09:38 PM
|
#32
|
New Member
Join Date: Jun 2006
Location: Chicago
Model: 8100
Carrier: Tmobile
Posts: 7
|
Hm.
I replaced FILE=$1 with FILE=myfile.avi
...and it worked.
/shrug
Guess we're good to go!
|
Offline
|
|
06-14-2007, 09:52 PM
|
#33
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
Quote:
Originally Posted by NinjitsuStylee
I replaced FILE=$1 with FILE=myfile.avi
...and it worked.
|
That's .... odd. Try changing it to FILE="$1", then remove the quotes around "$FILE" as the first param to mencoder, see what that does; it's odd in that it starts working, then stops (which you think would not be a quoting/filename problem).
My mencoder is whatever FreshRPMS ( http://freshrpms.net) happens to have, which is usually the latest available. To be honest I never even think about it, never having had a problem - the on here on Fedora 7 is '1.0rc1-4.1.2', even newer than that one on FC6 at work.
|
Offline
|
|
08-05-2007, 08:04 AM
|
#34
|
Knows Where the Search Button Is
Join Date: Feb 2007
Location: Texas
Model: 8100
Carrier: T-Mobile
Posts: 42
|
I've been using the script above for quite a while with minor tweaks here and there for aspect ratio and stuff like that. But recently some update broke the thing and the fix was to add the following to the mencoder command line:
-srate 16000
I'm not sure what it does exactly but it worked. Actually, -srate 8000 was what I had originally, but when I played it back on the BB, there was no sound. So I doubled it and the sound worked.
__________________
Device: Blackberry 8100 v4.2.0.64
Carrier: T-Mobile USA
BES: 4.1.0.38
Desktop OS: Fedora 7 Linux, Windows XP (vmware)
|
Offline
|
|
08-05-2007, 12:10 PM
|
#35
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
Quote:
Originally Posted by erroneus
But recently some update broke the thing and the fix was to add the following to the mencoder command line:
-srate 16000
I'm not sure what it does exactly but it worked. Actually, -srate 8000 was what I had originally, but when I played it back on the BB, there was no sound. So I doubled it and the sound worked.
|
Hmmm, the manpage says:
Code:
-srate <Hz>
Selects the output sample rate to be used (of course sound cards
have limits on this). If the sample frequency selected is dif-
ferent from that of the current media, the resample or lavcre-
sample audio filter will be inserted into the audio filter layer
to compensate for the difference. The type of resampling can be
controlled by the -af-adv option. The default is fast resam-
pling that may cause distortion.
I'm no audio engineer but it might be that your input audio has a sampling rate that is beyond the capability of the BB device (like maybe you have 48kHz and the BB can only handle 44.1kHz) and during the conversion it's not being downsampled. I would try a higher setting that 16kHz, that's awful. Try with '-srate 22050' or '-srate 44100' (22.05 kHz and 44.1kHz) and see how that works out.
BTW, feel free to post additions to the script!
|
Offline
|
|
01-19-2008, 02:14 PM
|
#36
|
New Member
Join Date: Mar 2007
Location: Katy, TX
Model: 8800
Carrier: AT&T
Posts: 7
|
Modifications to use Ubuntu 7.10
When I tried to use vid2bb.sh in Ubuntu, I'd get the following message:
Code:
Audio LAVC, couldn't find encoder for codec mp3.
With some poking around, I found the following parameters within the mencoder line in the script to work:
Code:
mencoder "$FILE" \
-o "${FILE%.*}_bb.avi" \
-of avi \
-ovc lavc \
-oac mp3lame \
-lavcopts vcodec=mpeg4:vbitrate=$VBR:acodec=aac:abitrate=$ABR \
-vf scale=$RES
Using mp3lame gave me a usable video with audio that was fine. There may be some fine tuning for this, but I haven't done too much more fiddling with it.
__________________
Tuxi
BlackBerry 8800
AT&T
BES (version unknown)
Windows XP, Ubuntu 8.10
|
Offline
|
|
01-19-2008, 06:34 PM
|
#37
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
Quote:
Originally Posted by tuxi
Using mp3lame gave me a usable video with audio that was fine. There may be some fine tuning for this, but I haven't done too much more fiddling with it.
|
Yeah, mencoder/mplayer can be compiled with all sorts of different stuff, it's a very confusing set of options they've got going on. If you need to use -oac mp3lame, then you want a line with -lameopts for the bitrate (and anything else), like so:
Code:
-oac mp3lame \
-lameopts abr:br=$ABR \
...and edit the -lavcopts line to remove the audio options now:
Code:
-lavcopts vcodec=mpeg4:vbitrate=$VBR
Complete:
Code:
mencoder "$FILE" \
-o "${FILE%.*}_bb.avi" \
-of avi \
-ovc lavc \
-oac mp3lame \
-lavcopts vcodec=mpeg4:vbitrate=$VBR \
-lameopts abr:br=$ABR \
-vf scale=$RES
Obviously tweak the -lameopts as much as you'd like and/or need, but the defaults should work pretty good.
|
Offline
|
|
05-19-2008, 05:21 PM
|
#38
|
Knows Where the Search Button Is
Join Date: Mar 2008
Model: 8820
PIN: N/A
Carrier: ATT
Posts: 28
|
thanks for this, it's very helpful! any idea what is the max supported video or audio bitrates, or does this vary by device?
|
Offline
|
|
05-19-2008, 06:05 PM
|
#39
|
BlackBerry Extraordinaire
Join Date: Dec 2006
Location: san francisco
Model: 8320
PIN: n/a
Carrier: t-mobile
Posts: 2,166
|
Quote:
Originally Posted by berry much
thanks for this, it's very helpful! any idea what is the max supported video or audio bitrates, or does this vary by device?
|
It pretty much varies, but the ones I listed are "safe" for most devices; you can just start edging upwards from there and see how much your device can handle. It's also very video-specific; I have a few that worked great on my 8100 but I still can't get them to work right on my 8320, which has been frustrating. The select ones not working for me are all WMV original containers, which makes me wonder...
|
Offline
|
|
06-11-2008, 04:13 PM
|
#40
|
Knows Where the Search Button Is
Join Date: Jun 2008
Model: 8130
PIN: N/A
Carrier: Sprint
Posts: 25
|
I converted an AVI video using the modified verison you posted for ubuntu. For some reason I keep getting the error "An error has occured attempting to play media".
My phone has v4.3.0.127
|
Offline
|
|
|
|