Streaming to Android and to Nokia ^3 devices?

About encoding, codec settings, muxers and filter usage
realjobe
Cone that earned his stripes
Cone that earned his stripes
Posts: 175
Joined: 10 Feb 2008 15:40

Streaming to Android and to Nokia ^3 devices?

Postby realjobe » 16 Aug 2011 17:45

Hi there.
Using VLC v1.1.11 on Windows 7 64bit edition on Zotac ID40 Hardware..

VLC has done a great job transcoding http .ts mpeg2 stream to Nokia N8 & Android devices in LAN space, but now something is bothering the system and has recently risen up (after vlc update?) Video tends to tear apart in motion sometimes and no matter how I change the x264 & rtp settings these occure in random. Sometimes rarely, sometimes quite often. Android phone does not do this so often but it does anyhow.

Em I missing something here. Bitrate seems to be a keyfactor here. At low bitrates (350kbit in total) video tearing does not occure, almost at all. On higher rates video tends to rip apart more often. Video tearing in this context means that picture start to smear in those areas where motion occures. Keyframe change will always fix this..

I use this commaline command to transcode, source is DreamBox's .ts stream.. Target total bitstream is 500 kbit/sec. This is where Nokia N8 start to have these videotear issues... also android... and also VLC player itself.

vbv-maxrate = totalbirate (500kbit/sec) - audiobitrate (128kbit/sec) = 372
vbv-bufsize = (totalbirate (500kbit/sec) - audiobitrate (128kbit/sec)) / 2 = 186
bitrate = totalbirate (500kbit/sec) - audiobitrate (128kbit/sec) = 372

Code: Select all

vlc.exe -I dummy --http-caching=2500 --audio-language=fin,eng http://192.168.0.251:8001/1:0:1:11:1001:20F6:EEEE0000:0:0:0: --sout "#transcode{audio-sync,soverlay,deinterlace,ab=128,samplerate=44100,channels=2,acodec=mp4a,vcodec=h264,width=640,height=360, vfilter="canvas{width=640,height=360,aspect=16:9}",fps=25,vb=372,venc=x264{threads=auto,keyint=250,preset=faster, level=-1,profile=baseline,qcomp=0.9,vbv-maxrate=372,vbv-bufsize=186,bitrate=372}}:rtp{sdp=rtsp://:5554/TV.sdp, name='TV'}" :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep :rtp-caching=2500
Is there something wrong here with the parameters? does cache be in any role.. CPU (dual atom 1.8Ghz) is somewhere 80% load..

realjobe
Cone that earned his stripes
Cone that earned his stripes
Posts: 175
Joined: 10 Feb 2008 15:40

Re: Streaming to Android and to Nokia ^3 devices?

Postby realjobe » 19 Aug 2011 19:58

Now with Nokia N8 Anna Update, video behaves a bit odd..
When scene starts from black, only differential frames are shown and picture is really weird... Keyframe / sufficient scenechange will refresh the picture to OK. What params does others use stream to mobile devices?

EDIT: This is getting more odd: It seems that with above x264 encoding parameters, video will encode properly, it's the RTP module that acts up
- When RTSP streaming in LAN, video tears-up, like some pacgaes gets lost in the middle..
- When RTSP streaming from 3,5G network, video at 500kbit/sec is perfect, no tearing a nothing..
- When Streaming to Flash Player

Code: Select all

... std{access=http,mux=ffmpeg{mux=flv}, mime="video/mp4",dst=:5554/TV.mp4}" :sout-mux-caching=2500
There has never been anything wrong, no tearing, nothing. JWPlayer caches 5 sec itself..

There is something wrong with the output params/module, not the videoencoder itself..

EDIT:... strange.. By turning off WMM Support from theWAG320N modem, RTSP stream seems to be a bit better now, but This does not fix the problem...

realjobe
Cone that earned his stripes
Cone that earned his stripes
Posts: 175
Joined: 10 Feb 2008 15:40

Re: Streaming to Android and to Nokia ^3 devices?

Postby realjobe » 04 Sep 2011 19:39

Wow! I tested Darwin Streaming Server v5.5.5 (http://wiki.videolan.org/Documentation: ... ile_Phones)
and NOW I got RTSP:554 stream from VLC to Work!!!

Code: Select all

"...rtp{mp4a-latm,dst=192.168.0.12,port-audio=20000,port-video=20002,ttl=127,name=CHANNEL,sdp=file:///c:/channel.sdp}";
The ODD problem is that i need to tweak the .sdp file and alter the b=RR:0 to b=RR:800.
Why?

BUT the video tearing problem has not been resolced so this needs to be with the x264 encoding!!

realjobe
Cone that earned his stripes
Cone that earned his stripes
Posts: 175
Joined: 10 Feb 2008 15:40

Re: Streaming to Android and to Nokia ^3 devices?

Postby realjobe » 15 Sep 2011 16:23

after a loooong study, it seems that there might be input problems from DreamBox: signal might have errors (BER slight)..
This works now pretty good..

Code: Select all

vlc.exe -I dummy -vvv --audio-language=fi,en http://192.168.0.251:8001/1:0:1:11:1001:20F6:EEEE0000:0:0:0: --sout "#transcode{threads=auto,audio-sync,soverlay,deinterlace,ab=96,samplerate=44100,channels=2,acodec=mp4a,vcodec=h264,width=640,height=360,vfilter="canvas{width=640,height=360,aspect=16:9}",fps=25,scale=1,vb=672,venc=x264{keyint=250,preset=veryfast,level=-1,profile=baseline,no-cabac,slices=8,qcomp=0.7,vbv-maxrate=672,vbv-bufsize=2016,bitrate=672}}:rtp{mp4a-latm,sdp=rtsp://:554/TV.sdp,name=TV1}" :no-sout-rtp-sap :no-sout-standard-sap :ttl=128 :sout-keep


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 15 guests