Skip to content

Commit

Permalink
docs: update getMediaInfo output json
Browse files Browse the repository at this point in the history
  • Loading branch information
ForeverSc committed Aug 13, 2024
1 parent ac81565 commit 0f68a30
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 48 deletions.
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,42 +168,42 @@ Get the media information of a file, the output is referenced from `ffprobe`
```json
{
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"duration": 10.026667,
"bit_rate": "629116",
"duration": 263.383946,
"bit_rate": "6515500",
"start_time": 0,
"nb_streams": 4,
"nb_streams": 2,
"streams": [
{
"id": 1,
"index": 0,
"codec_type": 0,
"codec_type_string": "video",
"codec_name": "h264",
"codec_string": "avc1.4d400c",
"profile": "",
"pix_fmt": "",
"level": -99,
"width": 320,
"height": 176,
"codec_string": "avc1.640032",
"profile": "High",
"pix_fmt": "yuv420p",
"level": 50,
"width": 1080,
"height": 2336,
"channels": 0,
"sample_rate": 0,
"sample_fmt": "",
"bit_rate": "300570",
"extradata_size": 41,
"sample_fmt": "u8",
"bit_rate": "6385079",
"extradata_size": 36,
"extradata": Uint8Array,
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"r_frame_rate": "30/1",
"avg_frame_rate": "30/1",
"sample_aspect_ratio": "N/A",
"display_aspect_ratio": "N/A",
"start_time": 0,
"duration": 10,
"duration": 263.33333333333337,
"rotation": 0,
"nb_frames": "250",
"nb_frames": "7900",
"tags": {
"creation_time": "2012-03-13T08:58:06.000000Z",
"creation_time": "2023-12-10T15:50:56.000000Z",
"language": "und",
"vendor_id": "[0][0][0][0]",
"encoder": "JVT/AVC Coding"
"handler_name": "VideoHandler",
"vendor_id": "[0][0][0][0]"
}
},
{
Expand All @@ -219,22 +219,23 @@ Get the media information of a file, the output is referenced from `ffprobe`
"width": 0,
"height": 0,
"channels": 2,
"sample_rate": 48000,
"sample_rate": 44100,
"sample_fmt": "",
"bit_rate": "160545",
"bit_rate": "124878",
"extradata_size": 2,
"extradata": Uint8Array,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"sample_aspect_ratio": "N/A",
"display_aspect_ratio": "N/A",
"start_time": 0,
"duration": 10.026666666666666,
"duration": 263.3839455782313,
"rotation": 0,
"nb_frames": "470",
"nb_frames": "11343",
"tags": {
"creation_time": "2012-03-13T08:58:06.000000Z",
"creation_time": "2023-12-10T15:50:56.000000Z",
"language": "und",
"handler_name": "SoundHandler",
"vendor_id": "[0][0][0][0]"
}
}
Expand Down
49 changes: 25 additions & 24 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,42 +169,42 @@ getMediaInfo(): Promise<WebMediaInfo> // 2.0新增
```json
{
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"duration": 10.026667,
"bit_rate": "629116",
"duration": 263.383946,
"bit_rate": "6515500",
"start_time": 0,
"nb_streams": 4,
"nb_streams": 2,
"streams": [
{
"id": 1,
"index": 0,
"codec_type": 0,
"codec_type_string": "video",
"codec_name": "h264",
"codec_string": "avc1.4d400c",
"profile": "",
"pix_fmt": "",
"level": -99,
"width": 320,
"height": 176,
"codec_string": "avc1.640032",
"profile": "High",
"pix_fmt": "yuv420p",
"level": 50,
"width": 1080,
"height": 2336,
"channels": 0,
"sample_rate": 0,
"sample_fmt": "",
"bit_rate": "300570",
"extradata_size": 41,
"sample_fmt": "u8",
"bit_rate": "6385079",
"extradata_size": 36,
"extradata": Uint8Array,
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"r_frame_rate": "30/1",
"avg_frame_rate": "30/1",
"sample_aspect_ratio": "N/A",
"display_aspect_ratio": "N/A",
"start_time": 0,
"duration": 10,
"duration": 263.33333333333337,
"rotation": 0,
"nb_frames": "250",
"nb_frames": "7900",
"tags": {
"creation_time": "2012-03-13T08:58:06.000000Z",
"creation_time": "2023-12-10T15:50:56.000000Z",
"language": "und",
"vendor_id": "[0][0][0][0]",
"encoder": "JVT/AVC Coding"
"handler_name": "VideoHandler",
"vendor_id": "[0][0][0][0]"
}
},
{
Expand All @@ -220,22 +220,23 @@ getMediaInfo(): Promise<WebMediaInfo> // 2.0新增
"width": 0,
"height": 0,
"channels": 2,
"sample_rate": 48000,
"sample_rate": 44100,
"sample_fmt": "",
"bit_rate": "160545",
"bit_rate": "124878",
"extradata_size": 2,
"extradata": Uint8Array,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"sample_aspect_ratio": "N/A",
"display_aspect_ratio": "N/A",
"start_time": 0,
"duration": 10.026666666666666,
"duration": 263.3839455782313,
"rotation": 0,
"nb_frames": "470",
"nb_frames": "11343",
"tags": {
"creation_time": "2012-03-13T08:58:06.000000Z",
"creation_time": "2023-12-10T15:50:56.000000Z",
"language": "und",
"handler_name": "SoundHandler",
"vendor_id": "[0][0][0][0]"
}
}
Expand Down

0 comments on commit 0f68a30

Please sign in to comment.