kokorin / Jaffree

______ Stop the War in Ukraine! _______ Java ffmpeg and ffprobe command-line wrapper
Apache License 2.0
475 stars 80 forks source link

ParseUtil #178

Closed kokorin closed 3 years ago

kokorin commented 3 years ago
03:21:59.689 [StdErr] INFO  c.g.k.j.f.FFmpegResultReader - [info] frame= 5400 fps=0.0 q=-1.0 Lsize=N/A time=00:02:59.97 bitrate=N/A speed=3.09e+03x    
03:21:59.690 [Runnable-0] WARN  c.g.k.j.u.ParseUtil - Failed to parse long number: N/A
java.lang.NumberFormatException: For input string: "N/A"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
    at java.lang.Long.parseLong(Long.java:692) ~[?:?]
    at java.lang.Long.parseLong(Long.java:817) ~[?:?]
    at com.github.kokorin.jaffree.util.ParseUtil.parseLong(ParseUtil.java:53) [classes/:?]
    at com.github.kokorin.jaffree.ffmpeg.FFmpegProgressReader.readProgress(FFmpegProgressReader.java:101) [classes/:?]
    at com.github.kokorin.jaffree.ffmpeg.FFmpegProgressReader.negotiate(FFmpegProgressReader.java:54) [classes/:?]
    at com.github.kokorin.jaffree.net.NegotiatingTcpServer.serve(NegotiatingTcpServer.java:44) [classes/:?]
    at com.github.kokorin.jaffree.net.TcpServer.run(TcpServer.java:66) [classes/:?]
    at com.github.kokorin.jaffree.process.Executor$1.run(Executor.java:83) [classes/:?]
    at java.lang.Thread.run(Thread.java:829) [?:?]
bbiallowons commented 3 years ago

Same issue here

WARN [com.github.kokorin.jaffree.util.ParseUtil] (55445b49-7c15-4905-910b-1ae1174c4f8c_thumbnail-Runnable-0) Failed to parse long number: N/A: java.lang.NumberFormatException: For input string: "N/A" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.base/java.lang.Long.parseLong(Long.java:692) at java.base/java.lang.Long.parseLong(Long.java:817) at deployment.static-asset-service-1.29.0-SNAPSHOT.war//com.github.kokorin.jaffree.util.ParseUtil.parseLong(ParseUtil.java:53) at deployment.static-asset-service-1.29.0-SNAPSHOT.war//com.github.kokorin.jaffree.ffmpeg.FFmpegProgressReader.readProgress(FFmpegProgressReader.java:101) at deployment.static-asset-service-1.29.0-SNAPSHOT.war//com.github.kokorin.jaffree.ffmpeg.FFmpegProgressReader.negotiate(FFmpegProgressReader.java:54) at deployment.static-asset-service-1.29.0-SNAPSHOT.war//com.github.kokorin.jaffree.net.NegotiatingTcpServer.serve(NegotiatingTcpServer.java:44) at deployment.static-asset-service-1.29.0-SNAPSHOT.war//com.github.kokorin.jaffree.net.TcpServer.run(TcpServer.java:66) at deployment.static-asset-service-1.29.0-SNAPSHOT.war//com.github.kokorin.jaffree.process.Executor$1.run(Executor.java:83) at java.base/java.lang.Thread.run(Thread.java:829)

kokorin commented 3 years ago

It's just a warning, log level should be debug. You can suppress such warning with logger configuration if it bothers you.

cromefire commented 3 years ago

Some runs, a first pass run for example, may only output a line like this:

frame=   85 fps=9.2 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x

At that point it doesn't output any progress anymore as it fails every time. Which is probably fine (a bit unreliably seemingly), but a bit annoying.