Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Handle the unknown #20

Merged
merged 2 commits into from
Apr 2, 2023
Merged

Handle the unknown #20

merged 2 commits into from
Apr 2, 2023

Conversation

keithgoldberg
Copy link
Contributor

The current library can't handle some of the videos that my code needs to process because they also include streams that are neither video nor audio.
I've created an UnknownStream type to prevent the library from dying when these streams are present. Don't try to do anything with unknown streams since it's just a stub that allows processing to continue on the video/audio streams.

…there are streams present in the file that aren't video or audio.
@zergon321
Copy link
Owner

Looking good to me. Could you please provide a media file with a stream that would fall into the unknown category? For me to test it out.

@keithgoldberg
Copy link
Contributor Author

I've added a subtitle track to demo.mp4 in the analyze example.

@zergon321
Copy link
Owner

Are you sure you added the subtitles track correctly? Neither examples/analyze nor FFMpeg detect the subtitles track.

@keithgoldberg
Copy link
Contributor Author

It looked like the subtitle track was there when I ran the following command:

`$ ffmpeg -hide_banner -i https://raw.githubusercontent.com/zergon321/reisen/23ce1f721272c2eeba1732800f3333679f5b9228/examples/analyze/demo.mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://raw.githubusercontent.com/zergon321/reisen/23ce1f721272c2eeba1732800f3333679f5b9228/examples/analyze/demo.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf59.27.100
Duration: 00:00:25.65, start: 0.000000, bitrate: 2423 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2206 kb/s, 29.95 fps, 30 tbr, 90k tbn, 2000k tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 209 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
Metadata:
handler_name : SubtitleHandler`

@zergon321
Copy link
Owner

Oh, my bad, looked at the wrong branch. Merging.

@zergon321 zergon321 merged commit 8fb0b08 into zergon321:master Apr 2, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants