Closed
Description
Transcoding always fail with this particular video from snapchat (don't have another sample)? File is 418KB. I've tried on 4 different devices and the problem is the same. Using v0.8.0 Maybe linked to #15 ?
This is my config:
val mTranscodeVideoStrategy = DefaultVideoStrategy.Builder()
.bitRate(3000000.toLong())
.addResizer(AtMostResizer(720, 1280))
//.addResizer(ExactResizer(Size(720, 1280)))
.build()
Transcoder
.into(compressedFilePath)
.setValidator(WriteVideoValidator())
.setVideoTrackStrategy(mTranscodeVideoStrategy)
.addDataSource(content.contentURL!!)
.setListener(this@CompressFileWorker).transcode()
.get()
I've tried without .bitRate()
and the result is the same. Somehow I'm using the validator the wrong way since the file is already compressed and below my threshold.
Here is the errorlog:
2020-02-20 17:02:20.399 7850-8017/com.myapp.android W/FileSource: offset/length adjusted from 0/576460752303423487 to 0/427512
2020-02-20 17:02:20.413 7850-8017/com.myapp.android I/DefaultVideoStrategy: Input width&height: 360x716
2020-02-20 17:02:20.413 7850-8017/com.myapp.android I/DefaultVideoStrategy: Output width&height: 360x716
2020-02-20 17:02:20.414 7850-8017/com.myapp.android V/Engine: Duration (us): 5998000
2020-02-20 17:02:20.414 7850-8017/com.myapp.android V/Engine: new step: 0
2020-02-20 17:02:20.416 7850-8017/com.myapp.android E/Transcoder: Fatal error while transcoding, this might be invalid format or bug in engine or Android.
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
at com.otaliastudios.transcoder.source.DefaultDataSource.selectTrack(DefaultDataSource.java:64)
at com.otaliastudios.transcoder.engine.Engine.openCurrentStep(Engine.java:149)
at com.otaliastudios.transcoder.engine.Engine.getCurrentTrackTranscoder(Engine.java:219)
at com.otaliastudios.transcoder.engine.Engine.transcode(Engine.java:366)
at com.otaliastudios.transcoder.Transcoder$1.call(Transcoder.java:134)
at com.otaliastudios.transcoder.Transcoder$1.call(Transcoder.java:124)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
I think somehow it seems no tracks are set but tbh couldn't figure out the exact problem by myself. You can download the file here: https://drive.google.com/open?id=1Jcwu2ryTyEwv5eWgUzZGA_kdHJ_KUhjD
Metadata
Metadata
Assignees
Labels
No labels