GithubHelp home page GithubHelp logo

h264j's People

Contributors

gid15 avatar twilightdema avatar

Watchers

 avatar

h264j's Issues

h264j library - decoding a single frame

Hello,

I'm using your library to decode the video stream from the AR.Drone 2.0.

In your example (H264Player.java) at code.google.com there is a code showing 
how to decode a whole inputStream from the file.
In my situation I have to read from the inputStream by my own. For every packet 
I read the custom header (called PaVE header, contains useful and needed 
information, it is 68 bytes long). From the header I get the payload size. I 
read the payload and write it to a byte array. So this data in byte array is a 
pure video data. 
And here is my question: how to use the library when we want to decode and we 
have a byte array of a single frame (pure video data) ??

The codec used for Drone video streaming is H264 (MPEG4.10 AVC) baseline 
profile.

I enclose the file VideoDecoder.java where your library is used. There is a 
decode method which decodes byte[] frameData to BufferedImage.  Constructor and 
other method are used to initialize and close the library.


Regards,
Chrystian Kacki

Original issue reported on code.google.com by [email protected] on 25 Jun 2013 at 6:24

Attachments:

The decoder can not decode the first key frame correctly

Hi, I am using your h264 decoder for a project, and I noticed that it has some 
bugs. The decoder is unable to decode the first key frame (I frame) correctly 
so that the player shows some difference frames (p/b frames) until the second 
key frame arrives. The attached video file was produced with an iPhone and can 
be played with other players, like vlc, windows media player, with no problem. 
Could you please take at this issue?

Thanks,

David

Original issue reported on code.google.com by [email protected] on 12 Mar 2015 at 8:02

Attachments:

java.lang.ArrayIndexOutOfBoundsException when running h264 file

What steps will reproduce the problem?
1. Go to PROJECT_PATH/bin
2. Copy the attached file to /sample_clips/
3. Run the command
java com.twilight.h264.player.H264Player ../sample_clips/sample.264


What is the expected output? What do you see instead?
- We expected that this file will be played as smooth as in three sample files 
(admiral, slamtv10, slamtv60)
- What we saw are two things:
+ 1. In the terminal, this exception repeated periodically:
java.lang.ArrayIndexOutOfBoundsException: 7
    at com.twilight.h264.decoder.CAVLCContext.decode_residual(CAVLCContext.java:595)
    at com.twilight.h264.decoder.CAVLCContext.ff_h264_decode_mb_cavlc(CAVLCContext.java:1248)
    at com.twilight.h264.decoder.H264Context.decode_slice(H264Context.java:4962)
    at com.twilight.h264.decoder.H264Context.decode_nal_units(H264Context.java:6616)
    at com.twilight.h264.decoder.H264Context.decode_frame(H264Context.java:8588)
    at com.twilight.h264.decoder.H264Decoder.decode(H264Decoder.java:35)
    at com.twilight.h264.decoder.MpegEncContext.avcodec_decode_video2(MpegEncContext.java:2300)
    at com.twilight.h264.player.H264Player.playFile(H264Player.java:176)
    at com.twilight.h264.player.H264Player.run(H264Player.java:69)
    at java.lang.Thread.run(Thread.java:662)

+ 2. The video still played in JFrame, but image's quality is highly degraded. 

What version of the product are you using? On what operating system?
The most current version, which dowloaded via:
svn checkout http://h264j.googlecode.com/svn/trunk/ h264j-read-only

Please provide any additional information below.
Can you please, give us some documentations on this library ? 
Thanks.

Original issue reported on code.google.com by [email protected] on 22 Nov 2012 at 1:42

Attachments:

How to explain this image distortion?

I'm using h264j for IP cameras client software.
Sometimes I get such a distortion as in the picture.
What could be the reason for this distortion?

PS. VLC player shows a normal picture from this camera.


Original issue reported on code.google.com by [email protected] on 6 Jun 2013 at 4:11

Attachments:

Color Problems and FF mode one


1. Open an H264 file.
2. Play it using the H264J Player.

* After converting the same file into mp4 using ffmpeg, the video shows 
perfectly. When I use the built-in player, which uses the H264J framework:
1) The video plays in FastForward.
2) There are some color distortions from the original video as well.
3) I keep getting Error while decoding frame 0, even when I use the 
sample_clips.

V. Latest from HEAD

Is there any way of fixing this issues ? Have you experienced the same thing ?
Is there any configuration on MpegEncContext I could use to get rid or minimize 
these effects ?

Thanks in advance.

Regards.
/Yore

Original issue reported on code.google.com by [email protected] on 10 Jan 2014 at 4:40

Suggested change for parsing NAL units.

In H264Player.java, here is a suggested change for the isEndOfFrame function.

    private boolean isEndOfFrame(int code) {
        int nal = code & 0x1F;
        //System.out.println("Nal: " + nal);
        if (nal == NAL_AUD) {
            foundFrameStart = false;
            return true;
        }

        boolean foundFrame = foundFrameStart;
        if (nal == NAL_SLICE  || nal == NAL_IDR_SLICE) {
            if (foundFrameStart) {
                return true;
            }
            foundFrameStart = true;
        } else {
            foundFrameStart = false;
        }

        return foundFrame;
    }

Original issue reported on code.google.com by [email protected] on 12 Oct 2014 at 6:39

Error decoding h264 file with i-frame split over several NALs

What steps will reproduce the problem?
1. use the Player with the attached file
2. the video that is displayed is corrupted

What is the expected output? What do you see instead?
Expected output: playback of video. video shows me looking at my webcam
What I see instead: corrupted playback as the I-Frame is not decoded correctly

What version of the product are you using? On what operating system?
Current source (9th April 2015). OS is Windows 8.1 64bit.
Java runtime from JDK1.7.0.60 in c:\program files

Please provide any additional information below.
The video is encoded using libx264 with my own software that takes YUV images 
and feeds them into linx264.
Libx264 is configured to run in low latency mode and there is a cap on each 
NALU of 1400 bytes. As a result the initial i-frame is split into several NAL 
Units

ffplay is fine with this file.(tested using a Windows port of ffmpeg from 
Zeranoe) with ffplay.exe built on 1st Nov 2014

I suspect it is due to the format of the I-Frame.

Sample video attached

Thanks
Roger

Original issue reported on code.google.com by [email protected] on 9 Apr 2015 at 1:03

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.