mirror of
https://git.asonix.dog/asonix/pict-rs.git
synced 2024-11-27 20:11:16 +00:00
ffprobe: handle files with empty stream json
This commit is contained in:
parent
260f9a158a
commit
d03cc63d2b
3 changed files with 52 additions and 3 deletions
|
@ -53,6 +53,7 @@ impl FfMpegStreams {
|
|||
FfMpegStream::Unknown { codec_name } => {
|
||||
tracing::info!("Encountered unknown stream {codec_name}");
|
||||
}
|
||||
FfMpegStream::Empty {} => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -135,6 +136,7 @@ enum FfMpegStream {
|
|||
Audio(FfMpegAudioStream),
|
||||
Video(FfMpegVideoStream),
|
||||
Unknown { codec_name: String },
|
||||
Empty {},
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Deserialize)]
|
||||
|
|
35
src/discover/ffmpeg/ffprobe_6_0_mov_details.json
Normal file
35
src/discover/ffmpeg/ffprobe_6_0_mov_details.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"programs": [
|
||||
|
||||
],
|
||||
"streams": [
|
||||
{
|
||||
"codec_name": "hevc",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"pix_fmt": "yuv420p10le",
|
||||
"nb_read_frames": "187",
|
||||
"side_data_list": [
|
||||
{
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"codec_name": "aac",
|
||||
"nb_read_frames": "135"
|
||||
},
|
||||
{
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
},
|
||||
{
|
||||
|
||||
}
|
||||
],
|
||||
"format": {
|
||||
"format_name": "mov,mp4,m4a,3gp,3g2,mj2"
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
use crate::formats::{
|
||||
AlphaCodec, AnimationFormat, ImageFormat, ImageInput, InputFile, InputVideoFormat, Mp4Codec,
|
||||
WebmAlphaCodec, WebmCodec,
|
||||
AlphaCodec, AnimationFormat, ImageFormat, ImageInput, InputFile, InputVideoFormat,
|
||||
Mp4AudioCodec, Mp4Codec, WebmAlphaCodec, WebmCodec,
|
||||
};
|
||||
|
||||
use super::{Discovery, FfMpegDiscovery, PixelFormatOutput};
|
||||
|
||||
fn details_tests() -> [(&'static str, Option<Discovery>); 13] {
|
||||
fn details_tests() -> [(&'static str, Option<Discovery>); 14] {
|
||||
[
|
||||
(
|
||||
"animated_webp",
|
||||
|
@ -151,6 +151,18 @@ fn details_tests() -> [(&'static str, Option<Discovery>); 13] {
|
|||
frames: None,
|
||||
}),
|
||||
),
|
||||
(
|
||||
"mov",
|
||||
Some(Discovery {
|
||||
input: InputFile::Video(InputVideoFormat::Mp4 {
|
||||
video_codec: Mp4Codec::H265,
|
||||
audio_codec: Some(Mp4AudioCodec::Aac),
|
||||
}),
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
frames: Some(187),
|
||||
}),
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue