Skip to content

Commit 3800433

Browse files
committed
configure ffmpeg for full playback
1 parent 389f432 commit 3800433

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

simulation_stream_recorder.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
1616
output_directory="$script_dir/output"
1717

1818
# Create virtual display (:97) with screen resolution (1920x1080x24)
19-
Xvfb :97 -screen 0 1920x1080x24 &
19+
Xvfb :97 -screen 0 600x400x24 &
2020

2121
# Export the display environment variable to point to the virtual display
2222
export DISPLAY=:97
@@ -43,7 +43,9 @@ case $mode in
4343
exit 1
4444
fi
4545
# Stream to HLS using ffmpeg (assuming output_filename is the base name for the HLS playlist)
46-
ffmpeg -f x11grab -video_size 640x480 -i :97 -c:v libx264 -crf 21 -preset veryfast -f hls "$output_directory/$output_filename.m3u8"
46+
ffmpeg -f x11grab -s 600x400 -i :97 -c:v libx264 -preset ultrafast -f hls -hls_time 10 -hls_list_size 0 -hls_segment_filename "$output_directory/$output_filename.%03d.ts" "$output_directory/$output_filename.m3u8" &
47+
48+
4749
echo "Streaming started and available at $output_directory/$output_filename.m3u8"
4850
;;
4951
*)

0 commit comments

Comments
 (0)