blackhole failed ffprobe parsing
parent
d3f057de61
commit
12f070d237
|
@ -46,16 +46,20 @@ module.exports = (s,config,lang) => {
|
||||||
}
|
}
|
||||||
const streams = probeResult.streams || []
|
const streams = probeResult.streams || []
|
||||||
streams.forEach((stream) => {
|
streams.forEach((stream) => {
|
||||||
const codecType = stream.codec_type || 'video'
|
try{
|
||||||
const simpleInfo = {
|
const codecType = stream.codec_type || 'video'
|
||||||
fps: eval(stream.r_frame_rate) || '',
|
const simpleInfo = {
|
||||||
width: stream.coded_width,
|
fps: eval(stream.r_frame_rate) || '',
|
||||||
height: stream.coded_height,
|
width: stream.coded_width,
|
||||||
streamType: stream.codec_type,
|
height: stream.coded_height,
|
||||||
codec: stream.codec_name.toLowerCase(),
|
streamType: stream.codec_type,
|
||||||
|
codec: stream.codec_name.toLowerCase(),
|
||||||
|
}
|
||||||
|
streamIndex.all.push(simpleInfo)
|
||||||
|
streamIndex[codecType].push(simpleInfo)
|
||||||
|
}catch(err){
|
||||||
|
console.log(err)
|
||||||
}
|
}
|
||||||
streamIndex.all.push(simpleInfo)
|
|
||||||
streamIndex[codecType].push(simpleInfo)
|
|
||||||
})
|
})
|
||||||
if(streamIndex.video.length === 0){
|
if(streamIndex.video.length === 0){
|
||||||
streamIndex.video.push({
|
streamIndex.video.push({
|
||||||
|
|
Loading…
Reference in New Issue