1

비디오가 네트워크를 통해 재생 될 때 필요한 대역폭의 변화를 측정하려고합니다. 이 목적을 위해 비디오를 재생하는 데 필요한 대역폭의 그래프를 비디오 내에서 언제든지 계속 만들어야합니다.동영상의 인코딩 된 비트 전송률과 재생 위치의 그래프를 그려 봅니다.

gstreamer를 사용하여 비디오 처리를 시도했지만 어느 정도 일정한 디코딩 된 [인코딩되지 않은] 비디오의 비트 전송률을 제공합니다.

시간이 지남에 따라 비디오의 인코딩 된 비트 전송률을 얻는 방법이 있습니까?

답변

1

저는 여기에 답이 없으므로 다른 사람들에게 도움이되도록 직접 찾은 해결책을 게시 할 것입니다.

Vlc python bindings vlc 미디어 플레이어에 파이썬 API를 노출합니다. 또한 비디오 통계를 결정하는 데 사용할 수있는 MediaStats 클래스를 제공합니다.

class MediaStats(_Cstruct): 
_fields_ = [ 
    ('read_bytes',   ctypes.c_int ), 
    ('input_bitrate',  ctypes.c_float), 
    ('demux_read_bytes', ctypes.c_int ), 
    ('demux_bitrate',  ctypes.c_float), 
    ('demux_corrupted',  ctypes.c_int ), 
    ('demux_discontinuity', ctypes.c_int ), 
    ('decoded_video',  ctypes.c_int ), 
    ('decoded_audio',  ctypes.c_int ), 
    ('displayed_pictures', ctypes.c_int ), 
    ('lost_pictures',  ctypes.c_int ), 
    ('played_abuffers',  ctypes.c_int ), 
    ('lost_abuffers',  ctypes.c_int ), 
    ('sent_packets',  ctypes.c_int ), 
    ('sent_bytes',   ctypes.c_int ), 
    ('send_bitrate',  ctypes.c_float), 
] 
관련 문제