You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the relevant line from FFmpeg output. Note that 90k tbr does not match the regex in FFmpeg.java:111, which looks for a number with an optional decimal point followed by "tbr", causing the regex utility to return null.
FFmpeg's output to stderr is not meant to be parsed. The proper way to solve this is to use FFprobe, with the flags given in this Ask Ubuntu answer. The output is printed to stdout and the result of the division gives you the frame rate.
Sun Feb 11 19:00:55 EST 2018 ERROR:null
java.lang.NullPointerException
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1838)
at sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122)
at java.lang.Float.parseFloat(Float.java:451)
at itdelatrisu.opsu.video.FFmpeg.extractMetadata(FFmpeg.java:111)
at itdelatrisu.opsu.video.Video.<init>(Video.java:80)
at itdelatrisu.opsu.states.Game.loadVideo(Game.java:1976)
at itdelatrisu.opsu.states.Game.enter(Game.java:1654)
at org.newdawn.slick.state.StateBasedGame.update(StateBasedGame.java:248)
at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:702)
at itdelatrisu.opsu.Container.gameLoop(Container.java:136)
at itdelatrisu.opsu.Container.start(Container.java:80)
at itdelatrisu.opsu.Opsu.main(Opsu.java:213)
The text was updated successfully, but these errors were encountered:
Looks like it might be doable. According to dump.c#print_fps, the only abbreviation it does is "k" for 1000, so we only need to additionally handle that case.
A
NullPointerException
occurs when thetbr
of a video is not completely numeric. Example video: 103482 - Rhodanthe* - Jumping!! (TV Size)Here is the relevant line from FFmpeg output. Note that
90k tbr
does not match the regex in FFmpeg.java:111, which looks for a number with an optional decimal point followed by "tbr", causing the regex utility to returnnull
.FFmpeg's output to stderr is not meant to be parsed. The proper way to solve this is to use FFprobe, with the flags given in this Ask Ubuntu answer. The output is printed to stdout and the result of the division gives you the frame rate.
Note that we don't currently bundle
ffprobe
.Stack trace
The text was updated successfully, but these errors were encountered: