-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I have suggest to you change this code in index.js
var params = [];
params.push('-show_streams', '-print_format', 'json', filePath);
var d = Deferred();
var info;
var stderr;
var ffprobe = spawn(opts.path, params);
to this, for ability to send parameters for ffprobe:
if( typeof opts.params == "undefined" )
opts.params = [ '-show_streams' ];
opts.params.push( '-print_format', 'json', filePath );
var d = Deferred();
var info;
var stderr;
var ffprobe = spawn(opts.path, opts.params);
The example of parametering for gain frames time informations:
var ffprobe = require('ffprobe'),
ffprobeStatic = require('ffprobe-static');
ffprobe('./file.mp4',
{ path: ffprobeStatic.path,
params: ["-select_streams", "v","-show_frames"]
},
function (err, info) {
if (err) return done(err);
console.log(info);
/*
{
media_type: 'video',
stream_index: 0,
key_frame: 0,
pkt_pts: 50688,
pkt_pts_time: '3.960000',
pkt_dts: 50688,
pkt_dts_time: '3.960000',
best_effort_timestamp: 50688,
best_effort_timestamp_time: '3.960000',
pkt_duration: 512,
pkt_duration_time: '0.040000',
pkt_pos: '657372',
pkt_size: '310',
width: 1024,
height: 576,
pix_fmt: 'yuv420p',
sample_aspect_ratio: '18961:18969',
pict_type: 'B',
coded_picture_number: 100,
display_picture_number: 0,
interlaced_frame: 0,
top_field_first: 0,
repeat_pict: 0,
chroma_location: 'left'
},
*/
}
);
Metadata
Metadata
Assignees
Labels
No labels