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

Unsupported video format or codec not found for AV1 videos #1656

Open
mlipkovich opened this issue Jun 2, 2021 · 3 comments
Open

Unsupported video format or codec not found for AV1 videos #1656

mlipkovich opened this issue Jun 2, 2021 · 3 comments

Comments

@mlipkovich
Copy link

Hello,

I'm trying to use FFmpegFrameGrabber with AV1 videos:

import org.bytedeco.javacv.FFmpegFrameGrabber
import org.bytedeco.javacv.FFmpegLogCallback

FFmpegLogCallback.set()

val url = "https://www.elecard.com/storage/video/Stream1_AV1_720p_1.5mbps.webm"
val frameGrabber = new FFmpegFrameGrabber(url)
frameGrabber.start()

but it fails with the following error:

Info: Input #0, matroska,webm, from 'https://www.elecard.com/storage/video/Stream1_AV1_720p_1.5mbps.webm':

Info:   Metadata:

Info:     encoder         : 
Info: libwebm-0.2.1.0
Info: 

Info:   Duration: 
Info: 00:02:54.20
Info: , start: 
Info: 0.000000
Info: , bitrate: 
Info: 1458 kb/s
Info: 

Info:     Stream #0:0
Info: (eng)
Info: : Video: av1 (Main), yuv420p(tv), 1280x720
Info: , SAR 1:1 DAR 16:9
Info: , 
Info: 25 fps, 
Info: 25 tbr, 
Info: 1k tbn, 
Info: 1k tbc
Info:  (default)
Info: 

org.bytedeco.javacv.FFmpegFrameGrabber$Exception: avcodec_find_decoder() error: Unsupported video format or codec not found: 32797. (For more details, make sure FFmpegLogCallback.set() has been called.)
  at org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:968)
  at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:846)
  at org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:841)
  ... 36 elided

This number 32797 corresponds to decoder AV_CODEC_ID_AV1. If i set it explicitly it also doesn't work

import org.bytedeco.ffmpeg.global.avcodec
avcodec.avcodec_find_decoder_by_name("AV_CODEC_ID_AV1")

returns null.
 

I'm using the following dependencies:

  "org.bytedeco" % "javacv" % "1.5.5",
  "org.bytedeco" % "ffmpeg-platform" % "4.3.2-1.5.5"

also tried to switch to

"org.bytedeco" % "javacv-platform" % "1.5.5"

with no success.
 

Am I missing some native libraries?
 

It works fine when I use the same URL with command line ffmpeg (version 4.1), OS Debian 10

@saudet
Copy link
Member

saudet commented Jun 3, 2021

I suppose we would need to enable support for that codec. Contributions are welcome!

@mlipkovich
Copy link
Author

Thank you for your response! Are there Pull Requests with similar changes so that I could see how it should be done? Or maybe some docs?

@saudet
Copy link
Member

saudet commented Jun 4, 2021

Sure, something like this: bytedeco/javacpp-presets#1036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants