Skip to content
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

transcode fail every time. #22

Closed
waelHamed opened this issue Jun 6, 2016 · 4 comments
Closed

transcode fail every time. #22

waelHamed opened this issue Jun 6, 2016 · 4 comments

Comments

@waelHamed
Copy link

hi , i tried all the resolution yet nothing transcoded and every time that error comes in the log

"06-06 16:59:43.588 10263-10344/net.ypresto.androidtranscoder.example E/MediaTranscoder: Fatal error while transcoding, this might be invalid format or bug in engine or Android.
net.ypresto.androidtranscoder.engine.InvalidOutputFormatException: MediaFormatStrategy returned pass-through for both video and audio. No transcoding is necessary.
at net.ypresto.androidtranscoder.engine.MediaTranscoderEngine.setupTrackTranscoders(MediaTranscoderEngine.java:157)
at net.ypresto.androidtranscoder.engine.MediaTranscoderEngine.transcodeVideo(MediaTranscoderEngine.java:96)
at net.ypresto.androidtranscoder.MediaTranscoder$4.call(MediaTranscoder.java:184)
at net.ypresto.androidtranscoder.MediaTranscoder$4.call(MediaTranscoder.java:166)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)"

@ypresto
Copy link
Owner

ypresto commented Jul 7, 2016

MediaFormatStrategy returned pass-through for both video and audio. No transcoding is necessary.

It happens when resolution of output is larger than input.
Preset MediaFormatStrategys decline upscaling.
If you really want to do so, you can implement your own MediaFormatStrategy.

@ypresto ypresto closed this as completed Jul 14, 2016
@veaceslc
Copy link

This makes no sense. What about the case when I want to transcode to the same resolution but with a lower bitrate?

@bhaveshjethani
Copy link

When we compressed any video file which don't have audio then i am getting error.

2020-05-05 20:15:55.812 28877-29411/za.co.j3.sportsite.debug E/MediaTranscoder: Fatal error while transcoding, this might be invalid format or bug in engine or Android.
java.lang.IllegalArgumentException: extractor does not contain video and/or audio tracks.
at net.ypresto.androidtranscoder.utils.MediaExtractorUtils.getFirstVideoAndAudioTrack(MediaExtractorUtils.java:59)
at net.ypresto.androidtranscoder.engine.MediaTranscoderEngine.setupTrackTranscoders(MediaTranscoderEngine.java:153)
at net.ypresto.androidtranscoder.engine.MediaTranscoderEngine.transcodeVideo(MediaTranscoderEngine.java:96)
at net.ypresto.androidtranscoder.MediaTranscoder$4.call(MediaTranscoder.java:184)
at net.ypresto.androidtranscoder.MediaTranscoder$4.call(MediaTranscoder.java:166)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)

MediaExtractorUtils > getFirstVideoAndAudioTrack()

@sumitguptax100
Copy link

I am also getting this exception is some devices

MediaFormatStrategy returned pass-through for both video and audio. No transcoding is necessary.
please suggest me a quick fix for this.

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

5 participants