분석#
비디오 분석정보를 JSON 형식으로 응답한다.
예제#
analyze 명령어로 비디오를 분석합니다.
https://example.com/sample.mp4/c_hdims/analyze/src
https://example.com/sample.mp4/c_hdims/analyze/srcd
명령어#
analyze/src#
비디오 분석정보를 간략히 제공한다.
{
"enable": true,
"url": "/video.mp4",
"result": {
"source": {
"size": 6238713,
"format": "mp4",
"duration": 15.062,
"video": {
"codec_name": "h264",
"width": 1920,
"height": 1080
},
"audio": {
"codec_name": "aac"
}
},
"elapsed": {
"init": 2,
"complete": 14
},
"function": {
"keyword": "xcdr"
}
}
}
enable트랜스코더 모듈에 적재/처리 가능하다면
true, 불가하다면falseurl원본 URL
result분석결과
source미디어 정보
size (단위: bytes)용량
format포맷 -
flac,flv,fmp4,gif,mp2,mp3,mp4,mpg,mxf,oga,ogg,ts,wav,webmduration (단위: 초)재생시간 (소수점 3째자리까지 표시)
video비디오 정보. 비디오가 없다면
null이다.codec_name비디오 코덱
width (단위: px)가로길이
height (단위: px)세로길이
audio오디오 정보. 오디오가 없다면
null이다.codec_name비디오 코덱
elapsed경과시간
init (단위: ms)호출시점 ~ 원본이미지 초기화
complete (단위: ms)호출시점 ~ 완료
function트랜스코더 설정
keyword호출 키워드
analyze/srcd#
비디오 분석정보를 상세히 제공한다.
{
"enable": true,
"url": "/video.mp4",
"result": {
"source": {
"streams": [
{
"index": 0,
"codec_name": "aac",
"codec_long_name": "AAC (Advanced Audio Coding)",
"profile": "LC",
"codec_type": "audio",
"codec_time_base": "1/48000",
"codec_tag_string": "mp4a",
"codec_tag": "0x6134706d",
"sample_fmt": "fltp",
"sample_rate": "48000",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/48000",
"start_pts": -2048,
"start_time": "-0.042667",
"duration_ts": 722944,
"duration": "15.061333",
"bit_rate": "160002",
"max_bit_rate": "160002",
"nb_frames": "706",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0
},
"tags": {
"language": "kor",
"handler_name": "SoundHandler"
}
},
{
"index": 1,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_time_base": "1/60",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1088,
"has_b_frames": 2,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 41,
"color_range": "tv",
"color_space": "bt709",
"color_transfer": "bt709",
"color_primaries": "bt709",
"chroma_location": "left",
"refs": 4,
"is_avc": "1",
"nal_length_size": "4",
"r_frame_rate": "30/1",
"avg_frame_rate": "30/1",
"time_base": "1/15360",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 230400,
"duration": "15.000000",
"bit_rate": "3157810",
"bits_per_raw_sample": "8",
"nb_frames": "450",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0
},
"tags": {
"language": "und",
"handler_name": "VideoHandler"
}
}
],
"format": {
"filename": "http://rproxy.video.m2/http://127.0.0.1/mmv/media/monopoly.mp4",
"nb_streams": 2,
"nb_programs": 0,
"format_name": "mov,mp4,m4a,3gp,3g2,mj2",
"format_long_name": "QuickTime / MOV",
"start_time": "-0.042667",
"duration": "15.062000",
"size": "6238713",
"bit_rate": "3313617",
"probe_score": 100,
"tags": {
"major_brand": "isom",
"minor_version": "512",
"compatible_brands": "isomiso2avc1mp41",
"encoder": "Lavf57.71.100"
}
}
},
"elapsed": {
"init": 2,
"complete": 14
},
"function": {
"keyword": "xcdr"
}
}
}
analyze/ssim#
원본과 변환된 비디오의 유사성을 SSIM(Structural Similarity Index Measure) 방식으로 비교한다.
{
"enable": true,
"url": "/example.mp4",
"result": {
"ssim": "0.971172",
"elapsed": {
"init": 5217,
"complete": 9559
}
}
}
enableSSIM 비교가 정상처리되었다. 실패라면
false로 응답하다.url원본 URL
result분석결과
ssim (범위: 0~1)원본과 변환된 비디오의 유사성으로 완전히 동일하다면
1이다.