Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Exception on video taken with Snapchat #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jonasN5 opened this issue Feb 20, 2020 · 2 comments
Closed

Exception on video taken with Snapchat #62

jonasN5 opened this issue Feb 20, 2020 · 2 comments

Comments

@jonasN5
Copy link

jonasN5 commented Feb 20, 2020

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

@jonasN5
Copy link
Author

jonasN5 commented Mar 2, 2020

Any idea why it crashes?

@jonasN5
Copy link
Author

jonasN5 commented May 2, 2020

v0.9.0 fixed the issue, so it was indeed linked to #14, thanks for the release!

@jonasN5 jonasN5 closed this as completed May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant