Giter VIP home page Giter VIP logo

vi3o's Introduction

vi3o - VIdeo and Image IO

Utility for loading/saving/displaying video and images. It gives random access to mjpg (in http multipart format) and H264 (in .mkv format) video frames. For recordings origination from Axis cameras the camera system time at the time of capture is provided as timestamp for each frame.

Further details are provided in the Documentation

vi3o's People

Contributors

apljungquist avatar buggfabriken avatar daniel-falk avatar danielfa-axis avatar hakanardo avatar hakanardo-axis avatar monopolis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vi3o's Issues

Segfault when requesting gray video

vi3o segfaults when requesting video with grey=True and the image height isn't dividable by 16 and the vertical subsampling is 2 (i.e. 4:2:0 format). The same would probably happen with 4:2:2 if the image height isn't dividable by 8.

The reason for this seems to be that jpeg_read_raw_data might increase output_scanline beyond the image height. The libjpeg documentation states intervall "0 .. output_height-1", so this indicates either a bug in libjpeg or miss use of it.

My _mjpeg.so links to libjpeg.so.62 and I have the following libjpeg installed

libjpeg-dev/oldstable,now 1:1.3.1-12 all [installed]
libjpeg8/now 8d1-2 amd64 [installed,local]

but also libjpeg-turbo

libjpeg62-turbo/oldstable,now 1:1.3.1-12 amd64 [installed,automatic]
libjpeg62-turbo-dev/oldstable,now 1:1.3.1-12 amd64 [installed,automatic]

I have tested with two recordings available at the following links, segfault using the first but not second:
http://da-robotteknik.se/shared/video_1920x1080.mjpg
http://da-robotteknik.se/shared/video_1024x768.mjpg

DecodeError when accessing first frame after last frame

Not sure if this is related to issue: #25

cd test && python -c "import vi3o; v = vi3o.Video('t.mkv'); v[-1]; v[0]"

..leads to:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/danielfa/src/vi3o/vi3o/mkv.py", line 104, in __getitem__
    for img in self.myiter:
  File "/home/danielfa/src/vi3o/vi3o/mkv.py", line 229, in __next__
    return self.next()
  File "/home/danielfa/src/vi3o/vi3o/mkv.py", line 219, in next
    raise DecodeError
vi3o.mkv.DecodeError

It does work with a.mkv, b.mkv, c.mkv and systime.mkv. This might indicate one of the two:

  1. It's related to the encoding from the Axis camera's
  2. It's depending of if there is a "nice" end of the file or if it's a cut off web stream

mjpg files and mkv files using mjpg codec seems unaffected.

Decoding mkv/h264 results in green frames

This seems to be a problem when running ubuntu, not debian so probably depending of the installed version of libavcodec?

With the video systime.mkv the first frame is OK, then there is 31 frames which is fully green, then it's OK again. This aligns with the keyframes in the video (1 and 33).

python -c "from vi3o import Video; from vi3o.image import imview; [imview(f) for f in Video('systime.mkv')]"

With a.mkv it does also align with the keyframes (1 and 9)

However, with t.mkv it does not. Only keyframe is 1 but the frames are:
1 OK
2,3,4 green
5 OK
6,7,8 green
9,... OK

keyframes extracted with:
ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries frame=pkt_pts_time -of csv=print_section=0 systime.mkv

I have not seen the problem with mjpg files or mkv files using mjpg codec.

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.