zakgof / velvet-video

Java library for encoding / decoding / muxing / demuxing video and audio in various formats
Other
47 stars 9 forks source link

Natives not re-extracted when using .free then .full natives #30

Closed Gamebuster19901 closed 4 years ago

Gamebuster19901 commented 4 years ago

I'm attempting to play a mp4 file but I'm getting the following exception:

Apr 01, 2020 10:30:27 PM de.gurkenlabs.litiengine.configuration.Configuration load
INFO: Configuration config.properties loaded
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
Apr 01, 2020 10:30:28 PM de.gurkenlabs.litiengine.DefaultUncaughtExceptionHandler uncaughtException
SEVERE: Game crashed! :(
com.zakgof.velvetvideo.VelvetVideoException: FFMPEG error -1094995529 : Invalid data found when processing input
        at com.zakgof.velvetvideo.impl.jnr.LibAVUtil.checkcode(LibAVUtil.java:101)
    at com.zakgof.velvetvideo.impl.VelvetVideoLib.checkcode(VelvetVideoLib.java:124)
    at com.zakgof.velvetvideo.impl.VelvetVideoLib.access$200(VelvetVideoLib.java:87)
    at com.zakgof.velvetvideo.impl.VelvetVideoLib$DemuxerImpl.<init>(VelvetVideoLib.java:818)
    at com.zakgof.velvetvideo.impl.VelvetVideoLib.demuxer(VelvetVideoLib.java:794)
    at com.zakgof.velvetvideo.IVelvetVideoLib.demuxer(IVelvetVideoLib.java:27)
    at de.gurkenlabs.litiengine.video.VideoPlayer$Demuxer.<init>(VideoPlayer.java:149)
    at de.gurkenlabs.litiengine.video.VideoPlayer.setVideo(VideoPlayer.java:37)
    at de.gurkenlabs.litiengine.video.VideoPlayer.<init>(VideoPlayer.java:30)
    at de.gurkenlabs.litiengine.video.VideoComponent.setVideo(VideoComponent.java:68)
    at de.gurkenlabs.litiengine.video.VideoComponent.setVideo(VideoComponent.java:50)
    at de.gurkenlabs.litiengine.video.VideoComponent.play(VideoComponent.java:54)
    at de.gurkenlabs.litiengine.video.VideoComponent.<init>(VideoComponent.java:28)
    at de.gurkenlabs.litiengine.resources.Videos.load(Videos.java:16)
    at com.gamebuster19901.Game.Main$VideoScreen.<init>(Main.java:37)
    at com.gamebuster19901.Game.Main.main(Main.java:32)

These are the video properties:

image

zakgof commented 4 years ago

Could you share a failing file?

Gamebuster19901 commented 4 years ago

video.zip

zakgof commented 4 years ago

The file plays fine on Windows 10 with velvet-video:0.5.0 + velvet-video-natives:0.2.6.full Are you running on Linux? What are the velvet-video and natives versions?

Gamebuster19901 commented 4 years ago

I'm running Ubuntu 18.04.4.

Using velvet-video:0.5.0 and velvet-video-natives:0.2.6

I've used both the .free and .full versions with the same effect.

zakgof commented 4 years ago

Reproduced the bug.

Quick workaround:

Root cause:

zakgof commented 4 years ago

Fixed in velvet 0.5.1 + natives 0.2.7, please check