From Qi-Hardware
Jump to: navigation, search

[edit] OpenWrt Software Image


For a few releases the NanoNote's OpenWrt firmware has been including a hardware-accelerated MPlayer, playing back up to 320x240 content at 30 FPS. Make sure your audio sample rate is 44100, everything else will need resampling which costs CPU cycles. Also never try to play back Theora video with surround-sound Vorbis audio stream. The NanoNote doesn't have the CPU power for decoding.

If you have ffmpeg2theora installed, just run this:

ffmpeg2theora original-video -channels 2 --samplerate 44100 -x 320 -y 240 --speedlevel 0 -o nanonote-video.ogv

It is recommended to us the latest Theora 1.2 (alpha) which has greatly improved visual encoding quality.

If it says You can not have less than one audio channel. then maybe your input video is mono. Remove the -channels 2 parameter from the ffmpeg2theora command.

To slightly compensate for the insane scenario of the audio requiring a higher bit rate than the video:

ffmpeg2theora original-video \
 --audioquality 0 --samplerate 44100 --channels 1 \
 -x 320 -y 240 --speedlevel 0 --videoquality 7 --optimize \
 -o nanonote-video.ogv

If you prefer GUI tools, you can use Transmageddon to perform the video conversion: create a file called "ben-nanonote.xml" with the following contents:

<?xml version="1.0"?>
    <make>Qi Hardware</make>
    <model>Ben NanoNote</model>
    <description>Profile for Ben NanoNote</description>
        <name>Andrea Bolognani</name>
                <preset>Quality Normal</preset>
                <preset>Quality Normal</preset>

and copy it over to /usr/share/transmageddon/profiles. The transcoded files are saved to the ~/Videos directory.

[edit] Jlime

The version of mplayer in Jlime supports avi files. You can use this little script to transcode video (requires mencoder and ffmpeg):

if [ $# -ne $EXPECTED_ARGS ]
  echo "Usage: `basename $0` original-video.avi"
  exit $E_BADARGS
mencoder -o /tmp/000video-track.avi -ovc lavc -oac pcm  -of rawvideo $1 # get the video track 
mencoder -o /tmp/000audio-track.wav -ovc lavc -oac mp3lame -of rawaudio $1 # get the audio track
mencoder /tmp/000video-track.avi -srate 24000 -vf scale=160:120 -o /tmp/000video.avi -oac mp3lame -lameopts vbr=0:br=24:mode=3 -ovc xvid -xvidencopts bitrate=50 -ofps 7 -sws 2 # convert video
ffmpeg -i /tmp/000audio-track.wav -acodec pcm_u8 -ac 1 -ar 8000 /tmp/000audio.wav # convert audio
ffmpeg -i /tmp/000video.avi -i /tmp/000audio.wav -acodec copy -vcodec copy `echo $1|cut -f 1 -d .`.small.avi # merge video and sound
rm /tmp/000video-track.avi
rm /tmp/000audio-track.wav
rm /tmp/000audio.wav
rm /tmp/000video.avi

scp it to your nanonote, and enjoy! :)

Personal tools