Aug 19 2004, 05:38 AM
Joined: 7-June 04
Member No.: 3,599
For those who don't know, it is a streaming solution, only based on open standards, namely MP4, RTP and RTSP, etc. It is presently the standard for people investigating streaming solutions or deploying free solutions. More info on mpeg4ip.sf.net.
I just succeeded into cross-compiling this application for the Zaurus :
- RTP/RTSP streaming works perfectly.
- the video of the demonstration video from Darwin Streaming Server works fine.
- sound is half-working.
But some problems still remain:
- I don't know what is the modifier corresponding to the "Fn" key on the Zaurus (sadly it is not KMOD_CTRL). This is only a minor problem.
- The sound "jumps back in time constantly", which means every second is played several times before moving to the next. According to the developper of MPEG4IP:
as to why it's not working, I'd be looking at the SDL code. It could be a number of things, from not supporting that frequency or not supporting that channel combination, or not supporting that buffer size.
I know some persons had the same sound problems, and that some modification has been done to SDL_audio or SDL_mixer, I would be very (but really very) grateful if you could help me on that point, it is really the most annoying problem
- My home-made videos do not work, or only the mixed-up sound.
So, if anybody is interested in this program or has any clue about my problems, please
Oct 12 2004, 02:43 AM
Joined: 7-June 04
Member No.: 3,599
I am still working on this, and I have still the sound problem.
Further investigation showed that WAV files are read correctly, MP3 files (different bitrates tested) "jump back in time" (let's say every 1 second it jumps back 0.7-0.8 second), and AAC files sound just like garbage.
It seems to me that the synchronization module of MPEG4IP always thinks sound is ahead of time for MP3, causing the problem; but just the same code works perfectly on PC, and playing around with player/src/audio_sdl.cpp and synchronization stuff does not correct anything.
Here are some detailed instructions to compile MPEG4IP for the Zaurus 760/860 (I tried it on the SL-6000 too, but I had some strange errors when lauching the application) :
HOW TO CROSS-COMPILE MPEG4IP FOR ARM ?
Install my cross-compilation package on http://www.nautilus6.org/operation/zaurus.html if you don't have one (or check that you have all the necessary libraries cross-compiled -- like libSDL -- if you already have one, in that case you may have to change the paths I give).
Cross-compile and install xvid 1.0+ (read the instructions, something like "export PATH=/usr/local/arm/2.95.3/bin:$PATH && cd build/generic && ./configure --prefix=/usr/local/arm/2.95.3/arm-linux --host=arm-linux && make && make install").
$ cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/mpeg4ip co mpeg4ip
In lib/rtp/configure.in, comment the line testing /dev/urandom, since it cannot be determined when cross-compiling.
Define "PROG_E1 = " in player/src/Makefile.am, since you only want to compile the command-line version, otherwise you have some X libraries problems.
Correct key detection in player/src/main.cpp, since the Zaurus has no CTRL key, and that some other keys have other codes. It's not necessary, but then you will maybe need to close the terminal or connect to your Zaurus by ssh to stop the player.
$ export PATH=/usr/local/arm/2.95.3/bin:/usr/local/arm/2.95.3/arm-linux/bin:$PATH
$ ./cvs_bootstrap --enable-ipv6 --disable-server --disable-mmx --disable-ismacryp --disable-aesicm --disable-ppc --prefix=/usr/local/arm/2.95.3/arm-linux --exec_prefix=/usr/local/arm/2.95.3/arm-linux --host=arm-linux --x-includes=/usr/local/arm/2.95.3/arm-linux/include/X11 --x-libraries=/usr/local/arm/2.95.3/arm-linux/usr/X11R6/lib
In lib/gnu/Makefile and player/src/codec/mpeg4/Makefile, remove the "-Werror" (for example: "cat lib/gnu/Makefile | sed -e "s/ -Werror//g" > temp && mv temp lib/gnu/Makefile"), otherwise you have (known) cast warnings like : "/usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/../../../../arm-linux/include/bits/socket.h:264: warning: cast increases required alignment of target type".
In more and more files you have some problems with undefined strcasestr, in that case declare "#include "lib/gnu/strcasestr.h"" at the beginning of those files (for example: "echo "#include \"lib/gnu/strcasestr.h\"" > tmp && cat file.cpp >> tmp && mv tmp file.cpp").
Comment line 275 of player/src/video_sdl.cpp with the XMoveWindow, it does not work probably because of the older version of X development files that are available for the Zaurus.
Recompile mp4player. This line was adapted from the original Make but I changed the flags to enable this SDL application to run without the "QPaintDevice: Must construct a QApplication before a QPaintDevice" error. I think this line is not correcting the problem, but it is not my priority and I wrote one time a similar line that worked. To understand the problem, look at the compilation line for the SDL example in my cross-compilation package. If you change the order of the terms, there are great chances it will not work anymore.
arm-linux-g++ -DQWS -Dmain=SDL_main -D_REENTRANT -DNOCONTROLS -fexceptions -Wall -Werror -Wmissing-prototypes -Wno-char-subscripts -Woverloaded-virtual -Wno-unknown-pragmas -Wno-deprecated -Wformat=2 -DPLAYER_PLUGIN_DIR=\"/usr/local/arm/2.95.3/arm-linux/lib/mp4player_plugin\" -g -O2 -DMPEG4IP -o .libs/mp4player main.o -Wl,-rpath -Wl,/usr/local/arm/2.95.3/arm-linux/lib ../../lib/SDLAudio/src/.libs/libmpeg4ipSDL -lm ./.libs/libmp4player.a /home/fleiber/mpeg4ip/lib/sdp/.libs/libsdp.so /home/fleiber/mpeg4ip/player/lib/mp4util/.libs/libmp4util.so /home/fleiber/mpeg4ip/player/lib/libhttp/.libs/libhttp.so /home/fleiber/mpeg4ip/lib/msg_queue/.libs/libmsg_queue.so /home/fleiber/mpeg4ip/lib/mp4av/.libs/libmp4av.so /home/fleiber/mpeg4ip/lib/mp4/.libs/libmp4.so /home/fleiber/mpeg4ip/lib/mp4v2/.libs/libmp4v2.so ./.libs/libmp4syncsdl.a ./.libs/libmp4syncbase.a ./.libs/libmp4playerutils.a ../../lib/ismacryp/.libs/libismacryp.a -L/usr/local/arm/2.95.3/arm-linux/lib -lSDLmain /usr/local/arm/2.95.3/arm-linux/lib/libSDL.so -L/opt/Qtopia/sharp/lib -L/opt/QtEmbedded/sharp/lib/ -lSDL -lSDLmain -lqpe -lqte -lpthread -ldl -Wl,--rpath -Wl,/usr/local/arm/2.95.3/arm-linux/lib -Wl,--rpath -Wl,/usr/local/arm/2.95.3/arm-linux/lib
# export PATH=/usr/local/arm/2.95.3/bin:/usr/local/arm/2.95.3/arm-linux/bin:$PATH
# make install
This will install :
in $prefix/include/ : mp4*, mpeg4*, mpeg4ip*, sdp*, codec_plugin.h, rtp_plugin.h
in $prefix/bin/ : mp4dump, mp4extract, mp4info, mp4trackdump, mp4tags, mp4player, yuvdump, mpeg4vol, mpeg2video_parse, h264_parse, mpeg4ip-config
in $prefix/lib/ : libmp4, libmp4v2, libmp4av, libmp4util, libmpeg4ipSDL-1.2.0, libh264av, libmsg_queue, libsdp, libhttp
in $prefix/lib/mp4player_plugin/ : *
Copy at least to your Zaurus: mp4player (/usr/bin/), the libraries (/usr/lib/) and the plugins ($prefix/lib/mp4player_plugin, you need to create this directory). Create links for the libraries if necessary (for example, if you copy xvid10_plugin.so.0.0.0, link it to xvid10_plugin.so.0).
Now you're all set! It should even be working, but it is not for me (sound problems and some video files do not work).
If anybody has any idea how I could solve this sound problem...
If you want to test, you can read local mp3 or mp4 files on your Zaurus.
You can also try streaming from 22.214.171.124 (in that case use option RTP in RTSP, since UDP is filtered on the Internet) or [2001:688:1f99:1:250:baff:febe:af] if you have IPv6 connectivity. Available files are audio_32.mp4 or clip_200.mp4.
Finally I will add that I am using a GCC 2.95.3 cross-compilation environment with the original Sharp ROM (for several reasons), but those instructions should perfectly work with any other cross-compiling setup. By the way, I would be very interested if somebody would try compiling it with GCC 3.x...
|Lo-Fi Version||Time is now: 20th January 2017 - 06:11 AM|