-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check all streams to determine type #41
Conversation
Look for video content in all detected streams not just the first.
ping @jnx |
src/scanner.js
Outdated
tb = [ fr[1], fr[0] ] | ||
} | ||
break | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a for of
loops since streams
is an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const { pix_fmt } of json.streams) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem with this is that it will set audio files with a cover as image instead of audio... so we also need to check the disposition of the stream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes a good point, how about if we also check to see if there is a codec_type:audio element in one of the streams? This would have the same issue if the image stream is before the audio one (not sure if that can happen) but I would say that is a far less likely occurrence to audio being before video which seems to happen in around 30% of videos that I receive!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have spotted the deliberate mistake in my previous comment... We would also need some way to determine which is the "primary" stream I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, but isn't it more logical and practical than if there is video to switch to the video stream and take the data from it? I have problems when Vegas exports on Mainconcept mp4, stream 1 Audio, and 2 Video.
Use for of loop instead of in.
Any updates on this PR? |
Any updates on this PR? Have tested this and appears to correctly identify some videos that I had coming though as audio |
Refs CasparCG#41 but takes a different, possibly differently wrong, approach...
Rebased and merged as 41dbfdd |
Look for video content in all detected streams not just the first.