#jogamp @ irc.freenode.net - 20130822 05:06:08 (UTC)


20130822 05:06:08 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20130821050608.html
20130822 05:06:08 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20130822050608.html
20130822 07:48:34 * jk4 (~jk4@anon) Quit (Ping timeout: 256 seconds)
20130822 07:56:12 * jk4 (~jk4@anon) has joined #jogamp
20130822 09:08:24 * xranby (~xranby@anon) has joined #jogamp
20130822 14:18:42 * xranby (~xranby@anon) Quit (Quit: Leaving.)
20130822 15:45:14 * kermyt (~kermyt@anon) Quit (Ping timeout: 264 seconds)
20130822 15:48:42 * kermyt (~kermyt@anon) has joined #jogamp
20130822 21:01:56 * xranby (~familjen@anon) has joined #jogamp
20130822 21:03:06 <xranby> sgothel: i am experimenting with the media player. i have a machine here that is too slow decoding large video files. it can make the frame skip code skip all frames and block rendering
20130822 21:03:43 <xranby> sgothel: hence i start think how to best handle this non optimal state
20130822 21:08:38 <xranby> if i dont skip frames it playbac in near realtime speed, and eventually makes audio skip instead
20130822 21:10:51 <xranby> the only gracefull solution i can think of is to instead of skipping frames for video or audio is to sacrifice the lipsync
20130822 21:11:30 <xranby> and hope the overload was only temporary
20130822 21:11:54 <xranby> holding thumbs the sync eventually goes back to normal
20130822 21:12:48 <xranby> the question boild down to.. if your computer is too slow .. do you want to A) skip frames B) skip audio or C) skip sync
20130822 21:13:24 <xranby> boils down to..
20130822 21:15:41 <xranby> sgothel: the code that repeat frames do on the other hand work great
20130822 21:15:46 <xranby> to prevent blocking
20130822 21:15:52 <xranby> on fast machines
20130822 21:16:07 <xranby> i like that a lot
20130822 21:28:01 <xranby> src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java line 620
20130822 21:28:01 <xranby> } else if ( dt < -maxVideoDelay ) {
20130822 21:28:01 <xranby> dropFrame = true; //fixme... thinknig about a more graceful solution
20130822 21:28:01 <xranby> }
20130822 21:28:41 <xranby> this code is problematic on slow computers
20130822 21:29:13 <xranby> and unfortunally do not solve the issue on slow computers
20130822 21:32:27 <sgothel> hi Xerxes .. me back ..
20130822 21:32:58 <sgothel> I have tons of changes .. implemented the threaded thing last week, but no time to push yet (sick)
20130822 21:33:53 <sgothel> I guess I can push now .. WIP .. if you like to check .. using a lock-free ringbuffer .. and more ffmpeg/libav stuff (growing audio buffer instead of snooping a/v frames)
20130822 21:40:41 <sgothel> - pushed GlueGen's new Ringbuffer
20130822 21:44:10 <xranby> sgothel: thank you for telling, was starting to become lightly worried since you have been quiet for about a week, i hope you curate yourself.
20130822 21:44:32 <xranby> sgothel: yes i would be happy to test it
20130822 21:44:59 <sgothel> thx .. some silly blood infection, due to root channel .. autch :)
20130822 21:45:04 <xranby> on this machine.. our stuff currently playback better compared to both totem and vlc
20130822 21:45:15 <xranby> so i think we are on the right track
20130822 21:45:17 <sgothel> preparing the JOGL commit w/ another WIP
20130822 21:45:32 <xranby> (when i tested to disable the frameskip)
20130822 21:45:56 <sgothel> hope the 'StreamWorker' change won't break it :)
20130822 21:46:36 <xranby> hehe no worries.. i have enough "slow" machines that can catch regressions in time
20130822 21:46:57 <xranby> by running into exotic states
20130822 21:48:33 <xranby> sgothel: you have had a tooth removed?
20130822 21:48:50 <xranby> recently i mean
20130822 21:48:51 <sgothel> drilling .. killing .. filling .. :)
20130822 21:49:03 <sgothel> _after_ :)
20130822 21:50:58 <xranby> i am teaching myself how to help the debian java package team
20130822 21:51:25 <xranby> this have been a long time mystery.. how the process to contibute to a debian upload work
20130822 21:53:54 <xranby> thus i have to familiarize myself with the debian community platform http://alioth.debian.org
20130822 21:54:39 <xranby> looks to be quite a lot of manual process before an upload is made
20130822 21:56:08 <sgothel> *kudos*
20130822 21:57:07 <xranby> i will try do the update of 2.0.2-rc12 in debian sid to 2.0.2
20130822 21:57:55 <xranby> to get a feeling how much work is involved with each package update
20130822 22:02:36 <xranby> ok that was a sidestep from the GLMediaPlayer focus
20130822 22:04:09 <xranby> there is some issues loading files with non ascii characters in the URI like a filename with an Hungarian É
20130822 22:06:08 <xranby> hmm.. now that worked for some reason..
20130822 22:06:17 <xranby> let me try to reproduce the error i got a minute ago
20130822 22:06:32 <xranby> maybe i did something silly
20130822 22:06:43 <sgothel> I also moved to URI .. hmm checked in ?
20130822 22:07:01 <sgothel> 2cb284545a2a0fd35762a104fee8107234808389 - yup
20130822 22:08:13 <xranby> Exception in thread "main" java.net.URISyntaxException: Illegal character in path at index 22: file:///media/AgentK/É É/2013-06-20-2309.mp4
20130822 22:08:13 <xranby> so here this is triggered by putting the file into a folder named "É É"
20130822 22:09:56 <sgothel> oh dear .. yeah .. the URIs ..
20130822 22:10:52 <xranby> a runtime bug i assume
20130822 22:11:12 <xranby> outside of jogamp codebase
20130822 22:13:19 <xranby> actually the offending character looks to be the space
20130822 22:13:30 <xranby> let me try encode that using %20
20130822 22:13:57 <sgothel> there are some ways to parse proper URIs .. hmm .. needs to be encoded .. guess new URI(string) fails here ..
20130822 22:16:23 <xranby> that kind of worked.. but then it got stuck in a URL encoder later on Caused by: java.lang.RuntimeException: Couldn't open URL
20130822 22:16:23 <xranby> at jogamp.opengl.util.av.impl.FFMPEGMediaPlayer.setStream0(Native Method)
20130822 22:16:50 <sgothel> looks like libav can't handle .. hmm
20130822 22:17:51 * kermyt (~kermyt@anon) Quit (Ping timeout: 276 seconds)
20130822 22:18:52 <xranby> ... i reduce all i am certain about to spaces causes trouble
20130822 22:20:27 <xranby> i get the same exception trying to open a file named " "
20130822 22:20:47 <sgothel> how about '\ ' ?
20130822 22:21:08 <sgothel> .. then we need to pass the ASCII8 encoded string to libav .. hmm
20130822 22:21:21 <sgothel> URI has such a get-encoded method
20130822 22:21:23 * kermyt (~kermyt@anon) has joined #jogamp
20130822 22:36:35 <xranby> (00:20:47) sgothel: how about '\ ' ? <-- sure i can create a file with that name vi \\\
20130822 22:37:08 <xranby> the question is how much time we want to kill on this bug :)
20130822 23:02:52 <sgothel> pushed ..
20130822 23:03:00 <sgothel> pull/rebuild gluegen + jogl
20130822 23:04:01 <sgothel> final String streamLocS=streamLoc.toString(); <- FFMPEGMediaPlayer.java line 214 ?
20130822 23:04:28 <sgothel> final String streamLocS=streamLoc.toASCIIString(); ?
20130822 23:06:30 <sgothel> .. maybe read the change-log and GLMediaPlayer API doc changes .. describing the new off-thread behavior
20130822 23:07:12 <xranby> sgothel: i will pull rebuild and test.. possibly fall asleep as well
20130822 23:07:35 <xranby> good quest: "Find 'truth' about correlation of audio and video PTS values," :)
20130822 23:07:40 <sgothel> since the whole multithreaded buffer handling is now done in Java .. IMHO the OMX impl. should be pretty easy now!
20130822 23:07:52 <sgothel> :)
20130822 23:09:15 <sgothel> com.jogamp.opengl.util.av.GLMediaPlayer$StreamException: RuntimeException while initializing: GLMediaPlayer[Uninitialized, vSCR 2147483647, frames[p 0, d 0, t 0 (0.0 s)], speed 1.0, 0 bps, Texture[count 4, free 0, dec 0, target 0xde1, format 0x1908, type 0x1401], Video[id -1, <unknown>, 0x0, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -1, <unknown>, 0 bps, 0 frames], uri file:///net/jordan/data/testdata/video/É]
20130822 23:09:15 <sgothel> at jogamp.opengl.util.av.GLMediaPlayerImpl$StreamWorker.run(GLMediaPlayerImpl.java:901)
20130822 23:09:15 <sgothel> Caused by: java.lang.RuntimeException: Couldn't open URI: file:///net/jordan/data/testdata/video/É
20130822 23:09:54 <sgothel> W/ 'streamLoc.toString()'
20130822 23:10:06 <sgothel> testing toASCIIString() now
20130822 23:10:56 <sgothel> com.jogamp.opengl.util.av.GLMediaPlayer$StreamException: RuntimeException while initializing: GLMediaPlayer[Uninitialized, vSCR 2147483647, frames[p 0, d 0, t 0 (0.0 s)], speed 1.0, 0 bps, Texture[count 4, free 0, dec 0, target 0xde1, format 0x1908, type 0x1401], Video[id -1, <unknown>, 0x0, 0.0 fps, 0.0 fdur, 0 bps], Audio[id -1, <unknown>, 0 bps, 0 frames], uri file:///net/jordan/data/testdata/video/É]
20130822 23:10:56 <sgothel> at jogamp.opengl.util.av.GLMediaPlayerImpl$StreamWorker.run(GLMediaPlayerImpl.java:901)
20130822 23:10:56 <sgothel> Caused by: java.lang.RuntimeException: Couldn't open URI: file:///net/jordan/data/testdata/video/%C3%89
20130822 23:10:56 <sgothel> at jogamp.opengl.util.av.impl.FFMPEGMediaPlayer.setStream0(Native Method)
20130822 23:11:12 <sgothel> so .. neither can be handled by libav :(
20130822 23:12:27 <sgothel> both cut-off at 'space' .. (tried w/ 'A B' folder name as well ..)
20130822 23:13:07 <sgothel> looks like an URI restriction ... not libav ..
20130822 23:17:52 <sgothel> file:///net/jordan/data/testdata/video/A%20B/big-buck-bunny_trailer.webm - at least passes completely to URI .. but libav fails to deal w/ it ..
20130822 23:23:15 <xranby> do totem or vlc opent his file?
20130822 23:23:19 <xranby> open
20130822 23:23:31 <sgothel> file:///net/jordan/data/testdata/video/É%20É/big-buck-bunny_trailer.webm - works w/ final String streamLocS=streamLoc.toString().replaceAll("%20", " "); :)
20130822 23:23:54 <xranby> ok!
20130822 23:24:39 <sgothel> pushed
20130822 23:25:13 <xranby> URL.decode ... foo?
20130822 23:25:21 <sgothel> maybe ..
20130822 23:25:57 <sgothel> will test w/ Android .. haven't done this for a long time :)
20130822 23:26:40 <sgothel> then we may can use the Raspi OMX player example .. to write a 'new' OMX player impl, based on the existing one
20130822 23:27:29 <xranby> a 'new' OMX player impl for Android
20130822 23:27:31 <xranby> ?
20130822 23:27:59 <xranby> ok
20130822 23:27:59 <sgothel> Raspi .. I thought .. OMX unstable on Android .. some use stagefright ..etc, but new APIs are available on Android
20130822 23:33:00 <sgothel> Request: If anybody knows how to get the WebM stream from youtube .. well, much appreciated :) .. -> YouTube player w/ JOGL :)
20130822 23:33:49 <xranby> this old tutorial at least show that frames may need sorting http://dranger.com/ffmpeg/tutorial05.html Tutorial 05: Synching Video
20130822 23:34:05 <sgothel> I read this one .. yup
20130822 23:34:10 <xranby> " Generally the PTS and DTS will only differ when the stream we are playing has B frames in it. "
20130822 23:34:27 <sgothel> but avplay .. doesn't care .. and they call it 'reordered PTS' ..
20130822 23:34:33 <sgothel> so demuxer does something ..
20130822 23:35:02 <sgothel> avplay does use their audioClock to inject samples .. well .. didn't want to touch that yet :)
20130822 23:37:59 <xranby> i still need to fix the dropped frames login after the git pull
20130822 23:38:18 <sgothel> ?
20130822 23:38:23 <xranby> this machine drops 99% of the frames and block rendering
20130822 23:38:35 <sgothel> oh .. still ? hmm
20130822 23:38:51 <xranby> Playing, frames[(p 71, d 1798) / 36957, 1232.846 s], speed 1.0, dAV 5184, vSCR 65015, vpts 59974, dSCR[-5041, avrg -4969], aSCR 70214, apts 59989 ( -10225 ), AudioSink[frames [d 2816, q 4, f 20], time 85, bytes 16384], Texture[count 4, free 3, dec 0]
20130822 23:38:54 <sgothel> well .. if decoding takes so loong .. nothing we can do ..
20130822 23:39:12 <sgothel> 5s behind PTS .. yup -> lost
20130822 23:39:15 <sgothel> what machine ?
20130822 23:39:51 <sgothel> (or we shall stop dropping .. or make it optional .. hmm)
20130822 23:40:01 <sgothel> i.e. dropping so many - ignore
20130822 23:40:04 <xranby> sgothel: AMD Athlon(tm) 64 X2 Dual Core from 2007 something downclocked to 1ghz for night coding
20130822 23:40:11 <sgothel> wow
20130822 23:40:32 <sgothel> that should do it ? 1080p mp4 ? hmm
20130822 23:41:26 <xranby> i am using a 720p mp4
20130822 23:42:05 <sgothel> how about w/o audio ? '-aid -2' ?
20130822 23:42:42 <xranby> 1280 x 720 H.264 / AVC 30 frames per second 11990 kbps <-- huh low compression on this one
20130822 23:43:17 <sgothel> and performance is 'lost' on StreamWorker thread I assume (decoding) .. sure
20130822 23:43:41 <xranby> audio: MPEG-4 AAC Stereo 48000 Hz 127 kbps
20130822 23:44:00 <sgothel> cmdline '-aid -2' to mute audio (no processing)
20130822 23:44:53 <xranby> nope.. still blocking
20130822 23:45:31 <xranby> Playing, frames[(p 99, d 935) / 36957, 1232.846 s], speed 1.0, dAV 2147478609, vSCR 36132, vpts 31094, dSCR[-5038, avrg -4956], aSCR 2147483647, apts 0 ( -2147483647 ), AudioSink[frames [d 0, q 0, f 1], time 0, bytes 0], Texture[count 4, free 1, dec 0]
20130822 23:46:01 <sgothel> well .. that is life w/ sw-decoding :|
20130822 23:46:05 <sgothel> how is mplayer ?
20130822 23:46:12 <sgothel> or better 'avplay' ?
20130822 23:47:30 <xranby> avplay "work" audio ok and playback drops half the frames
20130822 23:47:49 <sgothel> hmm
20130822 23:48:13 <sgothel> -textureCount 10 ?
20130822 23:48:25 <sgothel> maybe remove the 'drop frame' code .. to test ..
20130822 23:50:39 <xranby> adding textures did not solve it :/ i will try disable the drop frame
20130822 23:51:46 <sgothel> guess I have to test on raspi/beagle to have same low-perf hw :)
20130822 23:53:08 <xranby> src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java row 666
20130822 23:53:53 <sgothel> the evil line :)
20130822 23:54:01 <xranby> yup
20130822 23:59:10 <xranby> removing that line at least restored playback
20130822 23:59:25 <sgothel> the .. too slow .. playback .. well
20130822 23:59:34 <xranby> 23.9 fps
20130822 23:59:36 <sgothel> need to find a proper heuristic for it then
20130823 00:00:13 <sgothel> i.e. n-drops in a row .. -> no-drop, rinse and repeat ..
20130823 00:00:39 <sgothel> maybe every 2nd can drop .. ?
20130823 00:01:19 <sgothel> hmm .. we can set frame-drop in libav ..
20130823 00:01:37 <sgothel> sure we don't want to drop just in display, but in decoding where the work is done ..
20130823 00:02:14 <sgothel> pAV->pACodecCtx->skip_frame=AVDISCARD_DEFAULT;
20130823 00:02:29 <sgothel> jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c line 581
20130823 00:03:15 <sgothel> sorry .. not really
20130823 00:03:56 <sgothel> would need to push a discard option to readNext .. reading packet PTS before decoding actual video frame
20130823 00:04:05 <sgothel> (while progressing in packet read)
20130823 00:06:30 <xranby> agree
20130823 00:07:24 <xranby> and maybe still prevent blocking rendering.. if slow network io
20130823 00:07:27 <xranby> i/o
20130823 00:07:50 <sgothel> I hope avformat/util has code for that already ..
20130823 00:08:01 <sgothel> i.e. since we cannot cache 1000 textures :)
20130823 00:08:15 <sgothel> so it's on their side .. before demuxing
20130823 00:08:42 <xranby> thus better repeat the last frame and take the 1frame time hit instead of blocking rendering while hunting for the matching frame
20130823 00:08:53 <sgothel> sounds good
20130823 00:09:39 <sgothel> so we need a timeout in getNext*() .. or simply check re-add the non-blocking flag .. hmm
20130823 00:09:50 <sgothel> StreamWorker should have decoded the next frame .. always
20130823 00:10:16 <sgothel> otherwise .. decoding too slow or stream transport too slow
20130823 00:10:28 <sgothel> yup .. how to test the latter ? :)
20130823 00:12:03 <xranby> feed libav data from java and throttle?
20130823 00:14:52 <sgothel> a throttling web server .. hmm
20130823 00:15:30 <xranby> it will surely be talked about in benchmark reviews :)
20130823 00:19:45 <xranby> cure yourself, i will sleep now, tomorrow i will travel
20130823 00:20:08 <sgothel> yup have fun .. hitting bed as well, good travels
20130823 00:20:43 <xranby> thank you
20130823 00:20:56 <xranby> good night
20130823 00:21:00 * xranby (~familjen@anon) Quit (Quit: Leaving.)
20130823 05:06:08 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20130823050608.html