Welcome to janforman.com you can find here infos about downtime of my servers and other stuff.

H264 Video Streaming to mobile phone

This sample is tested on Real Player from Real Networks that can be found on latest mobile phones.
(Stream is compatible with Symbian OS, IPhone, Windows Mobile)
VLC configuration sample:

:sout=#transcode{soverlay,ab=32,samplerate=22050,
channels=1,acodec=mp4a,vcodec=h264,
width=320,height=240,fps=15,vb=192,
venc=x264{vbv-bufsize=500,me=umh,
partitions=all,level=12,subme=7,threads=4,
no-cabac,ref=2,mixed-refs=1,bframes=0,
min-keyint=1,keyint=30,trellis=2,direct=auto,
qcomp=0.1,qpmax=51}}:
gather:rtp{mp4a-latm,sdp=rtsp://{IP}:554/tv.mp4}
(RTSP streaming compatible with Real Player)


- or change last line to
gather:standard{access=http,mux=mp4,dst={IP}:80/tv.mp4}
(HTTP is not compatible with Real Player)
- or to
gather:standard{access=mmsh,mux=mp4,dst={IP}:80/tv.mp4}
(MMS over HTTP is not compatible with Real Player)

Remember!: Not all sizes and framerates are supported,
place your IP to {IP}.
For example: Nokia 5800 accept only 320x240x15fps up to 256kbit/s
Wikipedia about Real Time Streaming Protocol
Used ports are
RTSP (TCP: 554 + UDP)
HTTP (TCP: 80)
MMSH (TCP: 80, true 1755 MMS not supported)

Howto encode video for Nokia 5800 XpressMusic

DOWNLOAD SAMPLE FILE NOW!

Nokia 5800 XpressMusic can accept only MPEG4 legacy format for smooth playback in 640×360 resolution.
You must have ffmpeg installed (i’am using one from SUPER encoder).
As you can see this is very easy and output video have excellent quality due to 2-pass encoding.
Picture is better than standard definition TV and is 16:9…
Deinterlace and subtitles can be included – watch remarks.
mkv x264 / ac-3 rips working just fine, enjoy ;-)

please download encode.bat here

@echo off
set ffpath=C:\Program Files\eRightSoft\SUPER
set opt=vbitrate=1687500:vrc_maxrate=1835008:
vrc_buf_size=917:mbd=2:vstrict=1:keyint=500:
cbp:mv0:vme=4:trell:v4mv:vqmin=3:lumi_mask=0.03:
dark_mask=0.2:scplx_mask=0.1:tcplx_mask=0.1:
naq:vhq=4:precmp=6:cmp=6:subcmp=6:
vb_qoffset=0.6:threads=2:level=31
rem set sub=-sub “file.srt” -subcp cp1250 -subfont-text-scale 3.2 -font c:\WINDOWS\FONTS\ARIALNB.TTF
rem set deinterlace=:phase=b
“%ffpath%\mencoder\mencoder” -sws 9 -nosound -vf scale=640:360,eq2=1.3:1.1:-0.06:1.3%deinterlace% -ovc lavc -lavcopts vcodec=mpeg4:%opt%:vpass=1 -ffourcc mp4v %sub% -o nul: “%*”
“%ffpath%\mencoder\mencoder” -sws 9 -oac copy -vf scale=640:360,eq2=1.3:1.1:-0.06:1.3%deinterlace% -ovc lavc -lavcopts vcodec=mpeg4:%opt%:vpass=2 -ffourcc mp4v %sub% -o c:\input.avi “%*”
“%ffpath%\ffmpeg” -i “c:\input.avi” -vcodec copy -acodec aac -ab 96 -ac 2 -ar 44100 c:\final.mp4
del c:\input.avi
del divx2pass.log
pause

please download encode.bat here

Place this code to file (example C:\WINDOWS\encode.bat) and easily type in prompt “encode.bat video.avi”… then wait and c:\final.mp4 file may appear.
Yes you can easily change this script for LINUX ;-)