I am trying to exctract the meta data from x264-encoded video files. First priority is to map the IDR-frames structure. The work seams to be harder than expected and I am trying to find command line applications that I can control from my code.
Mp4box has an option "-dump-xml" or similar but I can't figure out how it works. Not much help available on the net on this option.
Anyone who can give me a hint on this or any other alternative?
Thank you.
Try something that calls mpeg4ip. This application contains mp4dump, avidump, yuvdump....
Check it out here: http://mpeg4ip.sourceforge.net/documentation/index.php
You can use MediaInfo It's a CLI software and can get the metainfo about videos and export them into an HTML or XML file; of course, it supports MP4. It's available for Linux (deb families and rpm ones), Mac OSX, Windows, BSD, etc.
You could use a command like this:
mediainfo --Output=XML video.mp4 > file.xml
This will output the metainfo of video.mp4 to file.xml
Metainfo included in the file includes format, codec, file size, duration, bit rate, frame rate, width, height, color space, stream size among others.
I hope this answer has been helful ;) =)
Related
I've tried all methods but I've faced a block at some point in time. I'm an amateur weather-data "collector" so any help would be appreciated
In order to read grib files, you need to make a control (ctl) file for that grib file using wgrib2. Then make index files (idx) for that ctl. Then you will be able to read the control file of your data.
Follow the instructions from here.
https://www.cpc.ncep.noaa.gov/products/wesley/g2ctl.html
g2ctl -O grib2_file >grib2_file.ctl
gribmap -O -i grib2_file.ctl
grads
Landscape mode? (no for portrait):
ga-> open grib2_file.ctl
Or you can watch a simple video on how to do it.
https://www.youtube.com/watch?v=Zb8vhdMtTRs
I need to make a .tex file an html page.
I looked around and i didn't find any good solution to my problem, or, for example tex4ht (or htlatex), i absolutly don't know how to use it.
I just installed Miktex 2.9 using the basic installer from their site, nothing more.
Also tried the command htlatex test (test.tex is my test file), and it happend to do only a small part of the job.
Any routine to properly make some html files out of .tex files ?
it will work maybe using,
http://jwork.org/rtextdoc/
Here the doc about that part :
http://jwork.org/wiki/RTextDoc:Latex
I'm thoroughly confused about how to read/write into igraph's Python module. What I'm trying right now is:
g = igraph.read("football.gml")
g.write_svg("football.svg", g.layout_circle() )
I have a football.gml file, and this code runs and writes a file called football.svg. But when I try to open it using InkScape, I get an error message saying the file cannot be loaded. Is this the correct way to write the code? What could be going wrong?
The write_svg function is sort of deprecated; it was meant only as a quick hack to allow SVG exports from igraph even if you don't have the Cairo module for Python. It has not been maintained for a while so it could be the case that you hit a bug.
If you have the Cairo module for Python (on most Linux systems, you can simply install it from an appropriate package), you can simply do this:
igraph.plot(g, "football.svg", layout="circle")
This would use Cairo's SVG renderer, which is likely to generate the correct result. If you cannot install the Cairo module for Python for some reason, please file a bug report on https://bugs.launchpad.net/igraph so we can look into this.
(Even better, please file a bug report even if you managed to make it work using igraph.plot).
Couple years late, but maybe this will be helpful to somebody.
The write_svg function seems not to escape ampersands correctly. Texas A&M has an ampersand in its label -- InkScape is probably confused because it sees & rather than &. Just open football.svg in a text editor to fix that, and you should be golden!
I was simply wondering how file watching algorithms are implemented. For instance, let's say I want to apply a filter (i.e., search/replace a string) to a file every time it is modified, what technique should I use? Obviously, I could run an infinite loop that would check every file in a directory for modifications, but it might not be very efficient. Is there any way to get notified directly by the OS instead? For the sake of demonstration, let's assume a *nix OS and whatever language (C/Ruby/Python/Java/etc.).
Linux has inotify, and judging from the wikipedia links, Windows has something similar called 'Directory Management'. Without something like inotify, you can only poll..
In Linux there is the Inotify subsystem which will alert you to file modification.
JavaSE 7 will have File Change Notification as part of NIO.2 updates.
There are wrappers to inotify that make it easy to use from high-level languages. For example, in ruby you can do the following with rb-inotify:
notifier = INotify::Notifier.new
# tell it what to watch
notifier.watch("path/to/foo.txt", :modify) {puts "foo.txt was modified!"}
notifier.watch("path/to/bar", :moved_to, :create) do |event|
puts "#{event.name} is now in path/to/bar!"
end
There's also pyinotify but I was unable to come up with an example as concise as the above.
I want to write a program that outputs a list of libraries that I should link to given source code (or object) files (for C or C++ programs).
In *nix, there are useful tools such as sdl-config and llvm-config. But, I want my program to work on Windows, too.
Usage:
get-library-names -l /path/to/lib a.cpp b.cpp c.cpp d.obj
Then, get-library-names would get a list of function names that are invoked from a.cpp, b.cpp, c.cpp, and d.obj. And, it'll search all library files in /path/to/lib directory and list libraries that are needed to link properly.
Is there such tool already written? Is it not trivial to write a such tool?
How do you find what libraries you should link to?
Thanks.
Yeah, you can create a pkg-config file which will allow you to run 'pkg-config --cflags' to get the compiler flags or 'pkg-config --libs' to get the linker libraries.
http://pkg-config.freedesktop.org/wiki/
If you're on Linux, just try looking into /usr/lib/pkgconfig to find some example .pc files that you can use as models. You can still use pkg-config on Windows as well, but it's not something that comes with it.