From 65d605b17dfc978ebc089b7500a5aacd8fcd863f Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 1 Feb 2023 14:58:04 +0100 Subject: Improve ffprobe json parsing and don't log error for Codec Type attachment --- .../Test Data/Probing/video_ts.json | 105 +++++++++++++++++++++ .../Test Data/ffprobe1.json | 105 --------------------- 2 files changed, 105 insertions(+), 105 deletions(-) create mode 100644 tests/Jellyfin.MediaEncoding.Tests/Test Data/Probing/video_ts.json delete mode 100644 tests/Jellyfin.MediaEncoding.Tests/Test Data/ffprobe1.json (limited to 'tests/Jellyfin.MediaEncoding.Tests/Test Data') diff --git a/tests/Jellyfin.MediaEncoding.Tests/Test Data/Probing/video_ts.json b/tests/Jellyfin.MediaEncoding.Tests/Test Data/Probing/video_ts.json new file mode 100644 index 000000000..cdad5df50 --- /dev/null +++ b/tests/Jellyfin.MediaEncoding.Tests/Test Data/Probing/video_ts.json @@ -0,0 +1,105 @@ +{ + "streams": [ + { + "index": 0, + "codec_name": "h264", + "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", + "profile": "Main", + "codec_type": "video", + "codec_time_base": "1/50", + "codec_tag_string": "[27][0][0][0]", + "codec_tag": "0x001b", + "width": 1920, + "height": 1080, + "coded_width": 1920, + "coded_height": 1080, + "has_b_frames": 0, + "sample_aspect_ratio": "0:1", + "display_aspect_ratio": "0:1", + "pix_fmt": "yuvj420p", + "level": 42, + "color_range": "pc", + "color_space": "bt709", + "color_transfer": "bt709", + "color_primaries": "bt709", + "chroma_location": "left", + "field_order": "progressive", + "refs": 1, + "is_avc": "false", + "nal_length_size": "0", + "id": "0x1", + "r_frame_rate": "25/1", + "avg_frame_rate": "25/1", + "time_base": "1/90000", + "start_pts": 8570867078, + "start_time": "95231.856422", + "duration_ts": 31694552, + "duration": "352.161689", + "bits_per_raw_sample": "8", + "disposition": { + "default": 0, + "dub": 0, + "original": 0, + "comment": 0, + "lyrics": 0, + "karaoke": 0, + "forced": 0, + "hearing_impaired": 0, + "visual_impaired": 0, + "clean_effects": 0, + "attached_pic": 0, + "timed_thumbnails": 0 + } + }, + { + "index": 1, + "codec_name": "aac", + "codec_long_name": "AAC (Advanced Audio Coding)", + "profile": "LC", + "codec_type": "audio", + "codec_time_base": "1/44100", + "codec_tag_string": "[15][0][0][0]", + "codec_tag": "0x000f", + "sample_fmt": "fltp", + "sample_rate": "44100", + "channels": 2, + "channel_layout": "stereo", + "bits_per_sample": 0, + "id": "0x2", + "r_frame_rate": "0/0", + "avg_frame_rate": "0/0", + "time_base": "1/90000", + "start_pts": 8570867697, + "start_time": "95231.863300", + "duration_ts": 31695687, + "duration": "352.174300", + "bit_rate": "98191", + "disposition": { + "default": 0, + "dub": 0, + "original": 0, + "comment": 0, + "lyrics": 0, + "karaoke": 0, + "forced": 0, + "hearing_impaired": 0, + "visual_impaired": 0, + "clean_effects": 0, + "attached_pic": 0, + "timed_thumbnails": 0 + } + } + ], + "format": { + "filename": "TS Test record.ts", + "nb_streams": 2, + "nb_programs": 1, + "format_name": "mpegts", + "format_long_name": "MPEG-TS (MPEG-2 Transport Stream)", + "start_time": "95231.856422", + "duration": "352.181178", + "size": "179003772", + "bit_rate": "4066174", + "probe_score": 50 + } +} diff --git a/tests/Jellyfin.MediaEncoding.Tests/Test Data/ffprobe1.json b/tests/Jellyfin.MediaEncoding.Tests/Test Data/ffprobe1.json deleted file mode 100644 index cdad5df50..000000000 --- a/tests/Jellyfin.MediaEncoding.Tests/Test Data/ffprobe1.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "streams": [ - { - "index": 0, - "codec_name": "h264", - "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", - "profile": "Main", - "codec_type": "video", - "codec_time_base": "1/50", - "codec_tag_string": "[27][0][0][0]", - "codec_tag": "0x001b", - "width": 1920, - "height": 1080, - "coded_width": 1920, - "coded_height": 1080, - "has_b_frames": 0, - "sample_aspect_ratio": "0:1", - "display_aspect_ratio": "0:1", - "pix_fmt": "yuvj420p", - "level": 42, - "color_range": "pc", - "color_space": "bt709", - "color_transfer": "bt709", - "color_primaries": "bt709", - "chroma_location": "left", - "field_order": "progressive", - "refs": 1, - "is_avc": "false", - "nal_length_size": "0", - "id": "0x1", - "r_frame_rate": "25/1", - "avg_frame_rate": "25/1", - "time_base": "1/90000", - "start_pts": 8570867078, - "start_time": "95231.856422", - "duration_ts": 31694552, - "duration": "352.161689", - "bits_per_raw_sample": "8", - "disposition": { - "default": 0, - "dub": 0, - "original": 0, - "comment": 0, - "lyrics": 0, - "karaoke": 0, - "forced": 0, - "hearing_impaired": 0, - "visual_impaired": 0, - "clean_effects": 0, - "attached_pic": 0, - "timed_thumbnails": 0 - } - }, - { - "index": 1, - "codec_name": "aac", - "codec_long_name": "AAC (Advanced Audio Coding)", - "profile": "LC", - "codec_type": "audio", - "codec_time_base": "1/44100", - "codec_tag_string": "[15][0][0][0]", - "codec_tag": "0x000f", - "sample_fmt": "fltp", - "sample_rate": "44100", - "channels": 2, - "channel_layout": "stereo", - "bits_per_sample": 0, - "id": "0x2", - "r_frame_rate": "0/0", - "avg_frame_rate": "0/0", - "time_base": "1/90000", - "start_pts": 8570867697, - "start_time": "95231.863300", - "duration_ts": 31695687, - "duration": "352.174300", - "bit_rate": "98191", - "disposition": { - "default": 0, - "dub": 0, - "original": 0, - "comment": 0, - "lyrics": 0, - "karaoke": 0, - "forced": 0, - "hearing_impaired": 0, - "visual_impaired": 0, - "clean_effects": 0, - "attached_pic": 0, - "timed_thumbnails": 0 - } - } - ], - "format": { - "filename": "TS Test record.ts", - "nb_streams": 2, - "nb_programs": 1, - "format_name": "mpegts", - "format_long_name": "MPEG-TS (MPEG-2 Transport Stream)", - "start_time": "95231.856422", - "duration": "352.181178", - "size": "179003772", - "bit_rate": "4066174", - "probe_score": 50 - } -} -- cgit v1.2.3