greptilian logo

IRC log for #friendlyjava, 2018-03-16

##friendlyjava on freenode

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
02:00 nanoz joined ##friendlyjava
02:02 nanoz left ##friendlyjava
06:24 mr_lou Morning!
06:25 mr_lou Is there any (easy) way of changing/setting screen mode with Java? I see we have DisplayMode, but I just get a "Unable to change screenmode" exception.
09:07 aditsu joined ##friendlyjava
11:27 aditsu mr_lou: are you using full screen exclusive mode? have you checked https://docs.oracle.com/javase/tutorial/extra/fullscreen/displaymode.html ?
11:36 mr_lou No
11:36 mr_lou Will take a peak.
11:40 mr_lou Hmm...
11:41 mr_lou The try...finally block looks weird to me. Doesn't a "finally" always get called? So that would mean it jumps out of fullscreen right away?
11:42 aditsu mr_lou: I assume all your drawing code goes in the "..." section
11:43 aditsu then the "finally" part gets called at the end
11:43 mr_lou Well....  the isDisplayChangeSupported() method returns false....  so.....
11:43 mr_lou I guess that answers my question.
11:44 * mr_lou is trying to figure out ways to view a 50fps video in actual 50 fps.... meaning the screen has to be 50hz or 100hz etc.
11:44 mr_lou But all PC monitors along with phone- and tablet displays are always 60hz or 120hz.
11:45 mr_lou Gives a very ugly result when a scrolltext "jumps" across the screen instead of gliding elegantly.
11:45 mr_lou That's one of the many reasons why I picked Blu-ray for 8-bit Memoirs. I wanted the videos to look awesome.
11:46 aditsu if it appears to jump, I'm guessing that the actual rate it's displaying is much lower than 60fps (or the original video is jumpy)
11:47 mr_lou Well true. The "jump" symptom appears when displaying a 60 fps video on a 50 hz screen. When it's the other way arround there are 1 frame displayed twice 6 times each second. It looks terrible.
11:48 mr_lou But apparently I'm the only one in the world who seems to mind it.
11:48 mr_lou Look at this: https://www.youtube.com/watch?v=kvf2qCpynzo&list=PLB3048BF925CEF9FA
11:49 mr_lou Scrolltexts.....    :-|
11:49 mr_lou Naturally runs smoothly on the real machine. But just looks ugly here because of the 60hz monitor you're using.
11:49 mr_lou So my question is: How can we watch 50 fps videos nowadays? Apart from using Blu-ray that is.
11:49 aditsu even if it's showing it at 25fps, if the playback speed is smooth, there shouldn't be any noticeable jumping (unless you're really observant to tiny details)
11:50 aditsu that youtube video has terrible quality and is originally jumpy
11:51 aditsu I think any video player should be able to handle any fps rate
11:51 aditsu you can play back that video in 0.25 speed, see how bad it is
11:52 mr_lou Well it happens on all Amstrad CPC videos on YouTube.
11:52 mr_lou Any 50 fps video you play on a PC.
11:52 aditsu maybe there are some technical problems about capturing the videos?
11:52 mr_lou No
11:52 mr_lou They are captured from emulator most of them, which records 50 fps.
11:53 mr_lou 50 fps on a 60hz display doesn't match.
11:53 mr_lou That's the problem.
11:53 mr_lou But a Blu-ray player tells the TV to change its refresh rate to match the fps of the video, and then it looks awesome.
11:53 mr_lou I've read that Kodi should do this too, but haven't tested. But everywhere else we're stuck with 60 hz.
11:54 aditsu you're making some assumptions..
11:54 mr_lou Assumptions is what you say before trying it out. What I'm stating comes from lots of experience.
11:54 mr_lou All my videos from 8-bit MEmoirs looks awesome on the Blu-ray
11:54 aditsu that particular video has 25fps
11:55 mr_lou But play the same video on a PC = ugly. Not a 1:1 frame playback - because of the 60hz monitor.
11:55 aditsu and is originally jumpy
11:56 aditsu if what you said was true, then tons and tons of dvds would be unwatchable
11:56 mr_lou I could find another then, but it seems there's no point.
11:56 mr_lou No it wouldn't, because DVD players and Blu-ray players CHANGES the refresh rate of the TV.
11:57 aditsu I don't have a tv, nor a dvd player :p just monitor and dvd drive
11:57 mr_lou And you also don't notice it much in movies anyway. You do notice it when a scrolltext is supposed to glide smoothly across the screen, and it doesn't.
11:57 aditsu lots of movie intros have gliding text
11:57 mr_lou Playing a 50 fps video on a 60 hz display will result in 6 frames being shown twice each second.
11:58 mr_lou And this appears as a "hickup".
11:58 aditsu actually, I think it would be 10 frames
12:00 aditsu also, video players can use various techniques to make it smoother than the basic crude approach
12:00 aditsu but if the original video is terrible (like the one you linked), there's nothing you can do about it
12:01 mr_lou Not 10. Think about it.
12:01 aditsu 60 frames shown in a second, from 50 frames in the video - do the math
12:02 mr_lou Video starts at first frame and first update. Meaning 1/50 of the second and 1/60 of the update. The next frame comes 1/50 of a second later, but the next update comes 1/60 later - sooner than the next frame. Ergo the first frame of the video is shown twice. But the next couldply of frames falls within the same timespan, and therefor looks ok.
12:03 aditsu every 5th frame would be shown twice
12:05 aditsu somewhat related: https://en.wikipedia.org/wiki/Telecine
12:11 aditsu so anyway, before blaming the refresh rate, check the video frame by frame to see if it has any bad jumps originally
12:12 aditsu the one you linked is terrible
12:16 aditsu also, you can try to display a 50fps scrolling text from a program, and see how good it looks
12:16 aditsu or even 25fps
12:18 mr_lou You're right. It's every 5th frame that gets shown twice.
12:19 mr_lou But listen. I've spend years on this, making 50 fps videos for 8-bit Memoirs. I know it's a problem. So I picked a video on YouTube that apparently had another problem. It sure looked like the same problem. And there are many others. Almost any CPC video or even C64 video you can find.
12:19 mr_lou I'm hunting for ways to view 50 fps videos properly.
12:20 aditsu well, do you have any 50 fps video that demonstrates the problem?
12:20 mr_lou Lots
12:20 mr_lou But you  already agree.
12:20 mr_lou Every 5th frame will be shown twice you say.
12:20 mr_lou This of course renders a smooth scrolltext non-smooth.
12:21 aditsu yes, but I don't agree that it's a problem
12:21 mr_lou And movement.
12:21 mr_lou It is.
12:21 mr_lou But ok.
12:21 mr_lou Hang on
12:21 aditsu well, can you give me a link?
12:27 mr_lou A 25 fps video doesn't match 60 hz either, and would still give these hickups.
12:28 aditsu 25fps would be somewhat worse, but still not bad
12:28 mr_lou But if we're debating whether or not you will see it as a problem, then you'll of course win, but it can be compared to audio quality when debating with an audiophgile
12:28 mr_lou The scrolltext in this video is not smooth: https://www.youtube.com/watch?v=QBEMttnI9fQ
12:28 mr_lou At the beginning.
12:28 mr_lou And I know most will say "Come on".
12:28 mr_lou But it's not.
12:28 mr_lou Now I can't see how many FPS it is, but it must be 50 or 25 because it's recorded from an emulator.
12:29 mr_lou And the CPC outputs 50 fps
12:29 aditsu yes, I notice some small jumps, let me check frame by frame
12:29 mr_lou Which will never look 100% right on a 60hz screen.
12:29 mr_lou It is particular back with scrolltexts
12:29 mr_lou But also sprite movement in general.
12:31 aditsu even if it's not 100% right, I think the problems you are noticing are mainly due to bad videos (or in some cases possibly jumpy scrolling on the original machine)
12:34 aditsu ugh, it's downloading very slowly..
12:35 mr_lou Well.... I'm seeing the problem on my PC with videos on my harddisk. Comparing PC playback of the same M2TS with the Blu-ray playback.
12:36 mr_lou But there's no doubt that most people don't care.
12:37 aditsu do you have a short sample?
12:38 mr_lou Not a short one. Would have to edit.
12:38 mr_lou 270 mb
12:38 aditsu finally downloaded that video, it is 30fps and originally a bit jumpy
12:39 mr_lou 30 fps... gawd.
12:39 mr_lou I'm surrounded by morons.
12:39 aditsu 1 frame jumps a pixel, next frame jumps 3 pixels
12:39 mr_lou Well I doubt you're curious enough to see that 270 mb file
12:39 mr_lou Or...hmm..
12:39 mr_lou wait
12:40 mr_lou Yes, 270 is right
12:41 mr_lou Started an upload anyway.
12:41 mr_lou 2 mbit upstream here... yay
12:41 aditsu that's somewhat big, but up to you
12:41 mr_lou It's from the project.
12:41 aditsu why don't you just cut a piece?
12:42 mr_lou Too lazy.
12:42 mr_lou When gotta wait till it's reencoded etc....
12:42 mr_lou *Then
12:42 * mr_lou is in bed with the flu
12:42 aditsu there shouldn't be any reencoding
12:42 mr_lou What tool do you use to cut a video without re-encoding?
12:43 aditsu ffmpeg
12:43 mr_lou Hm
12:43 aditsu with -c copy
12:47 mr_lou Well, that didn't work. https://vollnixx.wordpress.com/2012/06/01/howto-cut-a-video-directly-with-ffmpeg-without-transcoding/
12:47 mr_lou VLC won't play the resulting video.
12:47 mr_lou Probably has to do with the m2ts format.
12:49 aditsu well, then you can give me the whole file if you want
12:50 mr_lou It's uploading.
12:50 mr_lou For whatever reason you're curious.
13:03 mr_lou aditsu, Should be here now: http://www.8bitMemoirs.com/00825.m2ts
13:03 mr_lou Start in the middle of it. Notice the scrolltext.
13:04 aditsu 403 forbidden
13:04 mr_lou dammit
13:05 mr_lou What about now?
13:05 aditsu better
13:06 aditsu eta about 17 min
13:06 aditsu getting slower :/
13:22 mr_lou Teh internetz sucks.....
13:24 mr_lou That's why 8-bit Memoris is a wonderful offline thing. :-)
13:36 aditsu got it, hmm, smplayer is having some issues with seeking
13:37 aditsu ok, it works with vlc
13:39 aditsu I don't know if it can go frame by frame though..
13:43 aditsu managed to play it in smplayer; seems to be a smooth video, but the text is scrolling fast, and I wonder if it's skipping any frames due to resource usage
13:44 aditsu mpv is eating all the cpu like no tomorrow
13:48 aditsu let me see if I can get any gpu acceleration..
13:49 aditsu guess I should enable vdpau and recompile stuff
13:54 aditsu there's also vaapi..
13:55 aditsu and xvmc
14:19 aditsu ok, so I did all that, but it's still quite cpu-intensive, maybe I need to restart X
14:20 aditsu anyway, I suspect it's dropping frames due to cpu usage, which leads to the jerkiness
14:23 aditsu oh wait, I got it to play nicely in smplayer
14:24 aditsu mr_lou: it only uses about 11% cpu now, and the scrolling is pretty smooth
14:26 mr_lou It shouldn't use that much CPU. It's pretty lightly encoded.
14:27 mr_lou The scroll is "jerky" - but you may not notice that when you're not used to the real thing.
14:27 mr_lou Depends of course what the refresh rate of your monitor is. I'm just assuming it's 60 hz like most others
14:27 aditsu I guess it's not really perfect, but way better than those youtube videos
14:36 mr_lou I wouldn't say "way better". Slightly perhabs.
14:36 mr_lou Now go download 8-bit Memoirs, and burn the ISO to a Blu-ray disc and watch. ;-)
14:40 aditsu I don't have a blu-ray drive, and even if I had, I would still watch it on the same monitor, probably using the same drivers to decode and render the video :p
14:43 mr_lou If you can set your monitor to 50hz or 100hz, ithen it should also give an awesome result.
14:44 mr_lou It's not about the drivers.
14:44 aditsu yeah.. that was the next question, I don't know if it supports that (if it does, then I could just check your video, no need for blu-ray)
14:48 aditsu ok this is pretty wild: http://dpaste.com/23M5XB3
14:50 aditsu it can do 75, but that's also not ideal
14:51 aditsu plus non-native resolutions will affect the image quality
14:53 aditsu and at 720p it only does 60hz
14:54 mr_lou I have two screens connected to my PC, and one of them supports 50 hz...  so I could do xrandr -r 50 and that was it. Looks awesome now (on that screen, not the other one).
14:54 mr_lou See the problem is that most PC monitors simply don't support 50 hz.
14:55 mr_lou The one screen of mine that does support it - is my TV.
14:55 aditsu I have 2 monitors on another computer, but it's running windoze
14:56 aditsu let me check my laptop too..
14:57 aditsu nope
15:10 mr_lou So.... in my conclusion....  Blu-ray was the right platform.
15:13 aditsu I won't dispute that :p
15:14 mr_lou There's been a handful of people complaining about that choice.
15:14 mr_lou People like to complain.
15:15 mr_lou "Here, have my 5 year hard work for free"
15:15 mr_lou "But it's not how I want it!"
15:15 aditsu I guess it would be nice to write a program to do the scrolling at different rates and compare, but I don't feel like doing it myself
15:15 mr_lou You mean change the framerate of the videos depending on refreshrate.
15:15 mr_lou Then it would go much faster.
15:16 mr_lou And not give an accurate representation again.
15:16 aditsu no no, just programmatically scroll some text
15:16 aditsu no video file
15:16 mr_lou Not possible here. This is videos recorded from old computers.
15:16 aditsu no, just put some text on the screen, and move it every 1/x seconds
15:17 mr_lou Wouldn't work for my project.
15:18 mr_lou aditsu, You don't have a Blu-ray player at all? No PlayStation 3 or 4 or Xbox One? Or one of those TV boxes?
15:18 aditsu not for your project, just for testing the refresh rate issue
15:18 mr_lou How about Kodi on a RasBerry Pi or Nvidia Shield?
15:18 mr_lou There are (hidden) Blu-ray players everywhere.
15:19 aditsu nope, nope, nope, nope, nope, nope, oh, I have 2 raspberry pis
15:19 mr_lou Ah
15:19 mr_lou Well, they can be setup with Kodi. But only v18 handles Blu-ray, and v18 isn't out yet, but soon.
15:20 aditsu and what would be the point?
15:21 mr_lou Why does people have media centers?
15:21 mr_lou dunno
15:21 mr_lou I never understood that part about having all movies on a harddisk.
15:21 aditsu what can kodi do on a pi that I can't do on my computer?
15:21 mr_lou I prefer having the physical media.
15:21 aditsu I have most movies on dvds
15:21 mr_lou Well the point is that you don't wanna hook up your computer in the livingroom.
15:21 mr_lou A Pi is also just a computer, but tiny.
15:22 aditsu (well, regular movies)
15:22 mr_lou I really enjoy Blu-ray discs.
15:22 mr_lou Was watching Blu-ray Runner 2049 the other day....  got half way through then had to stop till next day.
15:22 aditsu hook up to what?
15:23 mr_lou Next day, I insert the movie, it asks if I wanna continue, I say yes, and that was it. No way this could have been done faster on any other media. Had it been netflix I'd have to wait till the Netflix app started etc.
15:23 mr_lou Er... you odn't have a TV in your living-room?
15:24 aditsu I wrote earlier: "I don't have a tv, nor a dvd playerjust monitor and dvd drive"
15:25 mr_lou .....maybe you went out and bought one in the mean time?
15:25 mr_lou Ok, so I don't have a great memory. I'm in bed with the flu. Gimme a break.
15:25 mr_lou Grumpy old man you.
15:26 mr_lou Why no TV? Just not interested?
15:27 aditsu well, my wife insists on it :p
15:27 aditsu thinks it is time-wasting and harmful
15:28 mr_lou Well.. I gotta admit, we never watch public TV either. We only watch movies - when there's time.
15:28 mr_lou Aired TV is boring, and the news is crap.
15:29 mr_lou How I view the news: https://www.youtube.com/watch?v=9U4Ha9HQvMo
15:29 aditsu so I watch ridiculous amounts of youtube clips instead
15:31 mr_lou hehe
15:31 mr_lou No where near as harmfull.......
15:33 mr_lou But mainstream media sucks.
15:34 aditsu haha, that clips is great
15:34 aditsu clip*
15:34 mr_lou :-)
15:36 aditsu I think it's referring to US media, is it similar in Denmark?
15:37 aditsu oh, old video - it mentions emails rather than tweets :p
15:39 mr_lou :-)
15:39 mr_lou Danish media isn't much better.
15:39 mr_lou They get caught lying, and there are no consequences.
15:40 mr_lou It's fine to delude the public.
16:18 philbot joined ##friendlyjava
16:18 Topic for ##friendlyjava is now Be friendly :) This channel is publicly logged at http://irclog.greptilian.com/friendlyjava/today ⚫ Please use a pastebin for pasting code
22:07 pdurbin joined ##friendlyjava

| Channels | #friendlyjava index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

##friendlyjava on freenode