Add support for NVDEC backend in video processing and enhance README documentation. Introduce a new script for extracting EasyCom sessions on specific GPUs, detailing session management and error handling. Update requirements.txt to include PyNvVideoCodec as an optional dependency. Refactor streaming_turn_model_directly.py to accommodate multiple decoder backends and improve frame indexing with ffprobe.
This commit is contained in:
@@ -18,6 +18,9 @@ NATIVE_BLOCK_SECONDS="${NATIVE_BLOCK_SECONDS:-2}"
|
||||
VIDEO_FPS="${VIDEO_FPS:-2}"
|
||||
MODE="${MODE:-open-stream-replay}"
|
||||
DTYPE="${DTYPE:-bfloat16}"
|
||||
DECODER="${DECODER:-decord}"
|
||||
DECODER_GPU_ID="${DECODER_GPU_ID:-0}"
|
||||
FRAME_CACHE_SIZE="${FRAME_CACHE_SIZE:-64}"
|
||||
# Space-separated host GPU ids, e.g. "0" or "0 1 2 3". One session per GPU at a time.
|
||||
GPUS="${GPUS:-0}"
|
||||
# Optional: only run selected session ids, e.g. SESSIONS="1 2 3"
|
||||
@@ -69,6 +72,7 @@ run_one() {
|
||||
echo "target=${target}"
|
||||
echo "output=${output}"
|
||||
echo "memory_seconds=${MEMORY_SECONDS} video_fps=${VIDEO_FPS} mode=${MODE}"
|
||||
echo "decoder=${DECODER} decoder_gpu_id=${DECODER_GPU_ID} frame_cache_size=${FRAME_CACHE_SIZE}"
|
||||
|
||||
if ! CUDA_VISIBLE_DEVICES="${gpu}" PYTHONUNBUFFERED=1 \
|
||||
python streaming_turn_model_directly.py \
|
||||
@@ -80,6 +84,9 @@ run_one() {
|
||||
--memory-seconds "${MEMORY_SECONDS}" \
|
||||
--native-block-seconds "${NATIVE_BLOCK_SECONDS}" \
|
||||
--video-fps "${VIDEO_FPS}" \
|
||||
--frame-cache-size "${FRAME_CACHE_SIZE}" \
|
||||
--decoder "${DECODER}" \
|
||||
--decoder-gpu-id "${DECODER_GPU_ID}" \
|
||||
--dtype "${DTYPE}" \
|
||||
--flash-attention-2 \
|
||||
--device cuda:0 \
|
||||
|
||||
Reference in New Issue
Block a user