Questions tagged [jcodec]

JCodec is an open source pure java implementation of video and audio codecs and formats.

JCodec is a library implementing a set of popular video and audio codecs. Currently JCodec supports:

Video

  • H.264 Main profile decoder ( CAVLC/CABAC, I/P/B frames );

  • H.264 Baseline profile encoder ( CAVLC, I-frames only, P-frames as of version 0.2 ); -MPEG 1/2 decoder ( I/P/B frames, interlace );

  • Apple ProRes decoder;

  • Apple ProRes encoder;

  • JPEG decoder;

Audio

  • SMPTE 302M decoder;

Wrappers ( muxers, demuxers, formats ):

  • MP4 ( ISO BMF, Apple QuickTime ) de-muxer;
  • MP4 ( ISO BMF, Apple QuickTime ) muxer;
  • MKV ( Matroska ) de-muxer;
  • MKV ( Matroska ) muxer;
  • MPEG PS ( Program Stream ) demuxer;
  • MPEG TS ( Transport Stream ) demuxer;

JCodec is free software distributed under FreeBSD License.

Home page: http://jcodec.org/

Repo : https://github.com/jcodec/jcodec

Dev team email : jcodecproject@gmail.com

76 questions
1
vote
1 answer

JCodec bitmap to mp4 - distortion in result video

When I'm trying to convert a single bitmap to a 10 secs long video using JCodec - sometimes I get a weird result, usually it's a color distortion - or a black diagonal line drawn on the result video. here is the code I using (I debugged it and the…
mendy
  • 127
  • 1
  • 9
1
vote
2 answers

how to add audio to the video created from set of images using jcodec

I am able to create video with jcodec from set of images with the following but unable to add audio. public void createVideo() { SequenceEncoder se = null; try { File dir=new File(Environment.getExternalStorageDirectory()+ "/" +…
Uma Achanta
  • 3,669
  • 4
  • 22
  • 49
1
vote
0 answers

Java screen capture using Robot and streaming compressed video (JCodec) via Sockets

I need an Java app (desktop - Windows & Mac) that needs to send desktop screen video to other users via Sockets (WebSockets, because clients are using browser). For now i have managed to do: Get screenshot using Robot.getImageWritersByFormatName…
Milos R
  • 71
  • 1
  • 5
1
vote
0 answers

generate a mp4 file from list of images by using jcodec library

I am using JCodec library to convert a list of bitmap images into a mp4 file. Everything works fine but the generated mp4 file plays the first image correctly and the rest of the images don't get rendered properly. here is my encoder code private…
user3225075
  • 373
  • 1
  • 5
  • 23
1
vote
2 answers

How to get number of frame (mp4) in JAVA?

I'm using jcodec for frame extraction from mp4 files, and creating a new video file from the images. However, I'm taking hard time for getting the total number of frame in jcodec. (And I've looked the jcodec sources, but I cannot find it..) Does…
H.Choi
  • 11
  • 3
1
vote
0 answers

Video streaming from java to android

I'm using JCodec + webcam-capture (https://github.com/sarxos/webcam-capture). I would get images from webcam and send directly (after encoding) to android. The problem is that if I send the images just encoding, the VideoView in android give…
granmirupa
  • 2,780
  • 16
  • 27
1
vote
1 answer

Can jcodec add audio to MP4 file?

To anyone experienced with using jcodec, my understanding is that the library cannot yet encode audio (it can decode it, however). However, jcodec does have a PCMMP4MuxerTrack class which allows you to addSamples(ByteBuffer) of raw PCM data to an…
yesbutmaybeno
  • 1,078
  • 13
  • 31
1
vote
0 answers

Red and green lines on my output using Jcodec

I've posted an issue to the jcodec tracker about this problem I'm having with jcodec, but I assume this will get more coverage if I ask here as well. Briefly, I have h.264 encoded data and I am getting YUV420P raw data using the Jcodec library. Once…
Paul Gregoire
  • 9,715
  • 11
  • 67
  • 131
1
vote
0 answers

Android Studio showing compiler errors for no reason

This started happening once I imported jcodec (http://jcodec.org/) for Android into the Studio as a module. The actual project itself compiles fine and works as expected on both devices and emulators but the compiler marks everything involving…
0
votes
0 answers

Adding audio from WAV file to MP4 using JCODEC

I'm trying to figure out how to add an audio from an existing WAV file to an existing MP4 file using jcodec. Looked at https://github.com/jcodec/jcodec/issues/187, https://github.com/jcodec/jcodec/issues/164 to get some clues, still cannot figure…
rlib
  • 7,444
  • 3
  • 32
  • 40
0
votes
0 answers

Decode h264 video to java.awt.image.BufferedImage in java

I am trying to make an AirPlay server in java with this library. I am able to start the server and connect to it and I am getting video input, however the input is in h264 format and I tried decoding it with JCodec but it always says I need an…
LetsDuck
  • 41
  • 4
0
votes
1 answer

AWTSequenceEncoder does not exist in jcodec 2.5.0?

I am trying to use JCodec to make a screen-recording software in Java. I am having trouble finding where AWTSequenceEncoder is located, or if it even exists in JCodec still. I am using JCodec 2.5.0 for javase. Java 8. Does anyone know if this class…
0
votes
1 answer

Generation of a video with several images with jcodec

I'm using the last 0.2.5 version of jcodec to generate a video with several images. I'm doing this: AWTSequenceEncoder encoder = AWTSequenceEncoder.createSequenceEncoder(file, 25); Then for each image: encoder.encodeImage(image); The when I'm…
Hervé Girod
  • 465
  • 3
  • 12
0
votes
1 answer

JCodec Sequence Encoder throwing ClosedByInterruptException when adding a native Picture

I'm trying to use the Sequence Encoder to get a bunch of ByteBuffers to a Video. I am instantiating the Encoder like this: new SequenceEncoder(NIOUtils.writableFileChannel(movie.getAbsolutePath()), Rational.R(60, 1), Format.MOV, Codec.H264,…
0
votes
0 answers

how to decode h264 byte[] to BufferedImage [Java]

I am receiving a byte[] for every frame of a video stream and want to decode it to a BufferedImage using JCodec library. This is my code: private H264Decoder decoder = new H264Decoder(); private ByteBuffer bb = null; private Picture out =…
nvplus
  • 81
  • 8