MCPcopy
hub / github.com/MeiGen-AI/InfiniteTalk / get_video_codec

Function get_video_codec

wan/utils/utils.py:154–162  ·  view source on GitHub ↗
(video_path)

Source from the content-addressed store, hash-verified

152 return frame
153
154def get_video_codec(video_path):
155 result = subprocess.run(
156 ['ffprobe', '-v', 'error', '-select_streams', 'v:0',
157 '-show_entries', 'stream=codec_name', '-of', 'default=nw=1:nk=1', video_path],
158 stdout=subprocess.PIPE,
159 stderr=subprocess.PIPE
160 )
161 codec = result.stdout.decode().strip()
162 return codec
163
164
165

Callers 1

generate_infinitetalkMethod · 0.90

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected