问题标签 [jcodec]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
25 浏览

java - 添加原生图片时,JCodec 序列编码器抛出 ClosedByInterruptException

我正在尝试使用序列编码器将一堆 ByteBuffers 获取到视频中。我正在像这样实例化编码器:

然后我在不同的线程上添加图片:

然后,再次在另一个线程上完成文件:

此代码有效! 我的问题是,它工作一次。我不知道为什么,但是当我再次运行此代码时,当我添加图片时它会抛出 ClosedByInterruptException。

我的第一个想法是在第一次录制后手动关闭 FileStream,所以我制作了 FileOutputStream 并使用 FileOutputStream#getChannel() 来获取 Channel。在完成()之后,我手动关闭它们。但这没有用!

我还尝试了不同的编解码器/格式。当我使用 VP8 时,它总是有效。问题是 VP8 不起作用,所以我不能使用那个。

0 投票
0 回答
62 浏览

java - Extracting frames from .ts file using Jcodec

Hello,

My goal is to extract frames from an .ts video file using Jcodec.

Actually, I am only able to extract the first frame, and then for left frames I receive warnings. (note that after the warning message my pic variable is null)

Here is the warning message: ([WARN] . (:0): Skipping frame as no SPS/PPS have been seen so far...) the message is sent for each other frame.

I have seen this thread Java BufferedImages from .ts File but sill have the same problem.

Here is what I tried:

Thanks You.

0 投票
1 回答
28 浏览

java - 使用 jcodec 生成包含多个图像的视频

我正在使用最新的 0.2.5 版本的 jcodec 来生成包含多个图像的视频。我正在这样做:

然后对于每个图像:

当我完成时:

这将返回一个相应的视频文件,无一例外,例如,我在 VLC 中正确地看到了第一张图像,但似乎视频的持续时间为 0。我做错了什么?

0 投票
0 回答
12 浏览

java - jcodec 2.5.0 中不存在AWTSequenceEncoder?

我正在尝试使用 JCodec 用 Ja​​va 制作屏幕录制软件。我很难找到它AWTSequenceEncoder的位置,或者它是否仍然存在于 JCodec 中。我正在为 javase 使用 JCodec 2.5.0。Java 8. 有谁知道这个类(AWTSequenceEncoder)是否仍然存在于库中,还是我必须使用 JCodec 的 github 上的文件的复制粘贴版本?

谢谢!加文