Is there a way to get QuickTime video information? (In googling it, I found one cl option for QT that was broken.)
I am looking to find pasp, length, audio channels, audio assignment, clap, and an assortment of other properties that is often found using the program "Dumpster". Most of this information is unavailable using ffmpeg.
Using an QuickTime sample from Apple site I can even get the ouput in a nicely JSON format:
ffprobe -v quiet -print_format json -show_format sample_iTunes.mov
{
"format": {
"filename": "sample_iTunes.mov",
"nb_streams": 2,
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"format_long_name": "QuickTime / MOV",
"start_time": "0.000000",
"duration": "85.500000",
"size": "3284257",
"bit_rate": "307298",
"tags": {
"major_brand": "qt ",
"minor_version": "537199360",
"compatible_brands": "qt ",
"creation_time": "2005-10-17 22:54:32"
}
}
}
I've used ffprobe version 1.0.7
Mediainfo is a nice utility, http://mediainfo.sourceforge.net/en .It will give some of the info you need. Also look at ffprobe, It takes options like -show_streams and -show_frames to get more details.
Here is one option: http://omino.com/sw/qt_tools/
Though the program itself is broken, if you run $ pieces/bin/qt_info <.mov file> it will give you some nice information.
Related
I want to use a custom font to generate pdf with gofpdf. Here is what I'm using :
fontPath := filepath.Join(cfg.Path, "assets", "font", "oxygen.ttf")
log.Println(fontPath)
doc.AddUTF8Font("oxygen", "", fontPath)
doc.SetFont("oxygen", "", 12)
/home/username/myapp/assets/font/oxygen.ttf
However pdf generations throws this error which I struggle to understand :
stat home/username/myapp/assets/font/oxygen.ttf: no such file or directory
Eventually I did check the stat myself through :
stat /home/username/myapp/assets/font/oxygen.ttf
The file exists properly and stats displays its infos. But it's like gofpdf ignores the initial slash (based on the error thrown). How to refer to the file URL properly ?
solved
Should have read the doc more accurately. Font dir has to be specified when creating the fpdf doc. To me it was :
gofpdf.New(orientation, "mm", "A4", "")
to
gofpdf.New(orientation, "mm", "A4", filepath.Join(cfg.Path, "assets", "font"))
then we can use :
doc.AddUTF8Font("oxygen", "", "oxygen.ttf")
I am using fluent-ffmpeg to resize a video.
I can't figure out what's happening though. I have 2 video files, one works but the other doesn't. I've been scouring the mediainfo outputs of both files, checking for discrepancies but other than filesize, duration etc. there's no difference (same codec, format, width/height, frame rate etc)
Here's a link to both files.
I've been reading these video files into fluent-ffmpeg using an input stream, as so:
await new Promise((resolve, reject) => {
ffmpeg(file.stream)
.output(path)
.size('426x240')
.on('start', function() {
console.log('started');
})
.on('error', function(err) {
console.log('An error occurred: ' + err.message);
})
.on('progress', function(progress) {
console.log('... frames: ' + progress.frames);
})
.on('end', function() {
console.log('Finished processing');
resolve();
})
.run();
});
The working file prints:
started
... frames: 86
... frames: 107
Finished processing
But the non-working file doesn't seem to have any frames, and prints:
started
... frames: 0
Finished processing
Any idea what could be wrong?
The ffmpeg command being executed:
ffmpeg -i pipe:0 -y -filter:v scale=w=426:h=240 uploads/works.mp4
I've been scouring the mediainfo outputs of both files, checking for discrepancies but other than filesize, duration etc. there's no difference
It does, but in full mode only. try mediainfo -f on the files, you'll see:
IsStreamable : Yes
for the working file, and
IsStreamable : No
For the non working file.
a "no" here means that the input needs to support seek (header is at the end, player needs to seek to end for parsing header then seek back to beginning for parsing data).
It seems like ffmpeg have problem probing the file when you pass it as a stream. But it does work if you pass it as a file. Could be because probing/demuxer can optionally use seeks etc. I tried to increase the probe buffer but didn't get it to work.
This do not work:
cat doesnt_work.mp4 | ffmpeg -i pipe:0 test.mp4
But this works:
ffmpeg -i doesnt_work.mp4 test.mp4
I am trying to convert a zip folder into svf. The zip contains the following files :
- an .obj (3D object);
- a .mtl (links the object to its texture);
- a .tif (texture).
I used Postman's 'Request Translation (ZIP to SVF)' to get an urn. Everything seems fine until that step. I get a 64 based urn, and the request's result is "created".
But, when I try to display it with Forge viewer afterwards, I get the following error :
error : 9
According to this, the data would not contain any viewable data.
So I tried to use Forge extractor instead, and it works perfectly, I can view my model with its texture as extractor's output.
This post seems to give some instructions, but I do not understand how to link the files together and register them individually for translation.
Has anyone encountered this before ?
When calling POST Job for a .zip make sure to specify the compressedUrn and rootFilename attributes, something like:
curl -X 'POST' -H 'Authorization: Bearer WmzXZq9MATYyfrnOFpYOE75sL5dh' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job' -d
'{
"input": {
"urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA",
"rootFilename": "file.obj",
"compressedUrn": true
},
"output": {
"formats": [
{
"type": "svf",
"views": [
"2d",
"3d"
]
}
]
}
}'
Compressed sample & prepare for Viewer sample.
I managed to get my svf urn, but I did not use the zip folder. I had to convert the files inside to another format to make it work.
Thanks for the answer though.
I am looking to get performance data of various alerts setup in my Nagios Core/XI. I think it is stored in RRDs. Are there ways I can get access to it?
If you're using Nagios XI you can get this data a few different ways.
If you're using XI 5 or later, then the easiest way that springs to mind is the API. Log in to your XI server as an administrator, navigate to 'Help' menu, then select 'Objects Reference' on the left hand side navigation and find 'GET objects/rrdexport' from the Objects Reference navigation box (or just scroll down to near the bottom).
An example curl might look like this:
curl -XGET "http://nagiosxi/nagiosxi/api/v1/objects/rrdexport?apikey=YOURAPIKEY&pretty=1&host_name=localhost"
Your response should look something like:
{
"meta": {
"start": "1453838100",
"step": "300",
"end": "1453838400",
"rows": "2",
"columns": "4",
"legend": {
"entry": [
"rta",
"pl",
"rtmax",
"rtmin"
]
}
},
"data": {
"row": [
{
"t": "1453838100",
"v": [
"6.0373333333e-03",
"0.0000000000e+00",
"1.7536000000e-02",
"3.0000000000e-03"
]
},
{
"t": "1453838400",
"v": [
"6.0000000000e-03",
"0.0000000000e+00",
"1.7037333333e-02",
"3.0000000000e-03"
]
}
]
}
}
BUT WAIT, THERE IS ANOTHER WAY
This way will work no matter what version you're on, and would actually work if you were processing performance data with NPCD on a Core system as well.
Log in to your server via ssh or console and get your butt over to the /usr/local/nagios/share/perfdata directory. From here we're going to use the localhost object as an example..
$ cd /usr/local/nagios/share/perfdata/
$ ls
localhost
$ cd localhost/
$ ls
Current_Load.rrd Current_Users.xml HTTP.rrd PING.xml SSH.rrd Swap_Usage.xml
Current_Load.xml _HOST_.rrd HTTP.xml Root_Partition.rrd SSH.xml Total_Processes.rrd
Current_Users.rrd _HOST_.xml PING.rrd Root_Partition.xml Swap_Usage.rrd Total_Processes.xml
$ rrdtool dump _HOST_.rrd
Once you run the rrdtool dump command, there is going to be an awful lot of output, so I keep that as an exercise for you, the reader ;)
If you're trying to automate something of some kind, then you should note that the xml files contain meta data for the rrd files and could potentially be useful to parse first.
Also, if you're anything like me, you love reading technical manuals. Here is a great one to read: RRDTool documentation
Hope this helped!
A couple of similar questions are on stackoverflow, but I haven't been able to figure this exact problem out.
I want to get a list of the fourccs for the avi codecs that FFMpeg can decode.
I know how to get all the formats ffmpeg -formats and codecs ffmpeg -codecs but neither list gives me an accessible list of fourccs. Neither does the documentation I can find.
I need this list, so that my application can access the fourcc of an avi file and determine whether to use ffmpeg or VfW (or DirectX) to try decode the file.
Is there some ffmpeg command that can give me this list?
To extend the answer given above by Darren (and because the comment facility doesn't allow this much text) here is the full list of codecs parsed from the isom_8c-source file on ffmpeg.org:
raw yuv2 2vuy yuvs L555 L565 B565 24BG
BGRA RGBA ABGR b16g b48r bxbg bxrg bxyv
NO16 DVOO R420 R411 R10k R10g r210 AVUI
AVrp SUDS v210 bxy2 v308 v408 v410 Y41P
yuv4 jpeg mjpa AVDJ AVRn dmb1 mjpb SVQ1
svq1 svqi SVQ3 mp4v DIVX XVID 3IV2 h263
s263 dvcp dvc dvpp dv5p dv5n AVdv AVd1
dvhq dvhp dvh1 dvh2 dvh4 dvh5 dvh6 dvh3
VP31 rpza cvid 8BPS smc rle WRLE qdrw
WRAW avc1 ai5p ai5q ai52 ai53 ai55 ai56
ai1p ai1q ai12 ai13 ai15 ai16 m1v1 mpeg
m1v m2v1 hdv1 hdv2 hdv3 hdv4 hdv5 hdv6
hdv7 hdv8 hdv9 hdva mx5n mx5p mx4n mx4p
mx3n mx3p xd54 xd55 xd59 xd5a xd5b xd5c
xd5d xd5e xd5f xdv1 xdv2 xdv3 xdv4 xdv5
xdv6 xdv7 xdv8 xdv9 xdva xdvb xdvc xdvd
xdve xdvf xdhd xdh2 AVmp mjp2 tga tiff
gif png MNG vc-1 avs2 drac AVdn H263
3IVD AV1x AVup sgi dpx exr apch apcn
I don't know if it's comprehensive but the source code seems to contain a list of FourCCs.
Look at http://ffmpeg.org/doxygen/trunk/isom_8c-source.html
There are lots of lines like this
{ CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') }
You should be able to download the latest source and write a script to pick them out.
It is possible to the mapping via avformat api, without digging in the source code.
uint32_t tag = MKTAG('H', '2', '6', '4');
const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 };
enum AVCodecID vcodec = av_codec_get_id(table, tag );
The functions avformat_get_riff_video_tags, avformat_get_riff_audio_tags and av_codec_get_id are all defined in "libavformat/avformat.h".
you can also get the mapping for a specific format using the table AVOutputFormat.codec_tag or AVInputFormat.codec_tag