Code Monkey home page Code Monkey logo

mp4viewer's Introduction

lint Code style pytest PyPI - Version

MP4Viewer

MP4Viewer is an mp4 metadata analyser (ISO base media file format) written in python. You can use it to analyse the metadata of mp4 files on the shell, a new gtk based window, or save it as a json file. The definitions of structures used in the code can be found in the publicly available standard (it is not free to download anymore) ISO/IEC 14496-12 - ISO base media file format.

Install using pip

pip install --upgrade mp4viewer

python3 -m mp4viewer [-h] [-o {stdout,gui,json}] [-e] [-c {on,off}] file.mp4

Run directly from code

./parse.sh [-h] [-o {stdout,gui,json}] [-e] [-c {on,off}] file.mp4

Arguments

positional arguments:
  input_file            Location of the ISO bmff file (mp4)

options:
  -h, --help            show this help message and exit
  -o {stdout,gui,json}, --output {stdout,gui,json}
                        Specify the output format. Please note that pygtk is required for `gui`.
  -c {on,off}, --color {on,off}
                        Toggle colors in console based output; on by default.
  -j JSON_PATH, --json JSON_PATH
                        Path to the json file where the output should be saved. If this is specified, the json output will be generated and written to this file even if the requested output format is not
                        json. If the output format is json and this argument is not specified, the json object will be written to the current directory using "$PWD/$(basename input_file).mp4viewer.json"
  -e, --expand-arrays   Do not truncate long arrays
  --debug               Used for internal debugging
  --latex               Generate latex-in-markdown for github README

Sample outputs:

The default output on the console

shell output

GTK

window with gtk treeview

MP4Viewer uses gtk in graphics mode and requires pygtk3 for viewing results in a window. This usually comes preinstalled with recent versions of ubuntu.

You can find more similar MP4 tools in this page

mp4viewer's People

Contributors

amarghosh avatar kedarisetti avatar matte86 avatar toshic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mp4viewer's Issues

imrove show desc of atom for console

write("%s%s%s%s%s\n" %(prefix, self.header_prefix, ConsoleRenderer.COLOR_HEADER,

     def show_node(self, node, prefix):
-        write("%s%s%s%s%s\n" %(prefix, self.header_prefix, ConsoleRenderer.COLOR_HEADER,
-            node.name, ConsoleRenderer.ENDCOL))
+        write("%s%s%s%s%s ***** (%s)\n" %(prefix, self.header_prefix, ConsoleRenderer.COLOR_HEADER,
+            node.name, ConsoleRenderer.ENDCOL, node.desc))

its not working with my file

here is where it fails
[anshul@daku_daddy src]$ python showboxes.py ~/test_videos/1.mp4
Traceback (most recent call last):
File "showboxes.py", line 16, in getboxlist
box = Box.getnextbox(buf, parent)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 115, in getnextbox
box = Box(buf, parent, container)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 43, in init
self.parse_children(buf)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 67, in parse_children
box = Box.getnextbox(buf, self)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 115, in getnextbox
box = Box(buf, parent, container)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 43, in init
self.parse_children(buf)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 67, in parse_children
box = Box.getnextbox(buf, self)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 115, in getnextbox
box = Box(buf, parent, container)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 43, in init
self.parse_children(buf)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 67, in parse_children
box = Box.getnextbox(buf, self)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 115, in getnextbox
box = Box(buf, parent, container)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 43, in init
self.parse_children(buf)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 67, in parse_children
box = Box.getnextbox(buf, self)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 115, in getnextbox
box = Box(buf, parent, container)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 43, in init
self.parse_children(buf)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 67, in parse_children
box = Box.getnextbox(buf, self)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/isobmff/box.py", line 118, in getnextbox
buf.skipbytes(box.size - box.consumed_bytes)
File "/home/anshul/Downloads/mp4_view/mp4viewer-master/src/datasource.py", line 146, in skipbytes
raise Exception("Negative bytes to skip %d" %(count))
Exception: Negative bytes to skip -8

---1.mp4 ---ftyp
major brand: qt
minor version: 537199360
brands: qt ,,,

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.