Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DenizUgur committed Jul 17, 2022
1 parent 3e668d3 commit 9c724dc
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 28 deletions.
63 changes: 63 additions & 0 deletions demo/encode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash
SOURCE=$(realpath $1)

GOP_SIZE=60
PRESET_P=ultrafast
V_SIZE=1280x720

START_OFFSET=180
DURATION=90

../FFmpeg/bin/ffmpeg -i $SOURCE/match.mp4 \
-ss $START_OFFSET \
-c:v libx264 -keyint_min $GOP_SIZE -g $GOP_SIZE -pix_fmt yuv420p -r 30 \
-t $DURATION \
-map v:0 -s:0 $V_SIZE \
-init_seg_name init\$RepresentationID\$.\$ext\$ -media_seg_name chunk\$RepresentationID\$-\$Number%05d\$.\$ext\$ \
-adaptation_sets "id=0,streams=v" \
-use_template 1 -use_timeline 0 \
-frag_type every_frame \
-seg_duration 10 \
-preset ultrafast \
-f dash videos/match/video.mpd

../FFmpeg/bin/ffmpeg -i $SOURCE/match.mp4 \
-ss $START_OFFSET \
-c:v libx264 -keyint_min $GOP_SIZE -g $GOP_SIZE -pix_fmt yuv420p -r 30 \
-t $DURATION \
-vf "sa=snooker:3" \
-map v:0 -s:0 $V_SIZE \
-init_seg_name init\$RepresentationID\$.\$ext\$ -media_seg_name chunk\$RepresentationID\$-\$Number%05d\$.\$ext\$ \
-adaptation_sets "id=0,streams=v" \
-use_template 1 -use_timeline 0 \
-frag_type every_frame \
-seg_duration 10 \
-preset ultrafast \
-f dash videos/match-visualized/video.mpd

../FFmpeg/bin/ffmpeg -i $SOURCE/match2.mp4 \
-ss $START_OFFSET \
-c:v libx264 -keyint_min $GOP_SIZE -g $GOP_SIZE -pix_fmt yuv420p -r 30 \
-t $DURATION \
-map v:0 -s:0 $V_SIZE \
-init_seg_name init\$RepresentationID\$.\$ext\$ -media_seg_name chunk\$RepresentationID\$-\$Number%05d\$.\$ext\$ \
-adaptation_sets "id=0,streams=v" \
-use_template 1 -use_timeline 0 \
-frag_type every_frame \
-seg_duration 10 \
-preset ultrafast \
-f dash videos/match2/video.mpd

../FFmpeg/bin/ffmpeg -i $SOURCE/match2.mp4 \
-ss $START_OFFSET \
-c:v libx264 -keyint_min $GOP_SIZE -g $GOP_SIZE -pix_fmt yuv420p -r 30 \
-t $DURATION \
-vf "sa=snooker:3" \
-map v:0 -s:0 $V_SIZE \
-init_seg_name init\$RepresentationID\$.\$ext\$ -media_seg_name chunk\$RepresentationID\$-\$Number%05d\$.\$ext\$ \
-adaptation_sets "id=0,streams=v" \
-use_template 1 -use_timeline 0 \
-frag_type every_frame \
-seg_duration 10 \
-preset ultrafast \
-f dash videos/match2-visualized/video.mpd
20 changes: 0 additions & 20 deletions demo/encodefordemo.sh

This file was deleted.

1 change: 1 addition & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<div class="col-sm-6">
<h1>Automated Adaptive Playback for Encoder-Adjudicated Live Sports</h1>
<p>Read the MIPR'22 paper <a href="https://doi.org/10.1145/3458305.3478437" target="_blank">here</a></p>
<p>Checkout the <a href="https://github.com/DenizUgur/CAPSC" target="_blank">GitHub repository</a> with Docker image ready to test the system</p>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion demo/run.sh

This file was deleted.

8 changes: 5 additions & 3 deletions scripts/server.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash
BASE=$(pwd)
BASE=$(dirname $0)

NGINX_CONF=$(realpath $BASE/../config/nginx.dev.conf)

# Start NGINX
nginx -s stop >/dev/null 2>&1
nginx -c $BASE/config/nginx.dev.conf
nginx -c $NGINX_CONF

# Start React
BROWSER=none npm --prefix $BASE/server/app run start
BROWSER=none npm --prefix $BASE/../server/app run start
2 changes: 1 addition & 1 deletion server/app/src/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function Demo() {
</p>
</div>
<div>
<span>Desnity (0-2)</span>
<span>Density (0-2)</span>
<p
style={{
color: state.density === 2 ? "green" : "red",
Expand Down
2 changes: 1 addition & 1 deletion simulator/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INPUT_DIR=./videos
COMMON_OUTPUT_DIR=../development/content
COMMON_OUTPUT_DIR=../server/content
COMMON_HTTP_CONTEXT=/content
SCRIPTS_DIR=../scripts
BASE_URL=http://localhost/client
Expand Down
4 changes: 2 additions & 2 deletions simulator/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async function master() {
resources: [
"http://localhost:80", // Nginx
"http://localhost:8000", // Gpac
"http://localhost:3000", // Next.js
"http://localhost:3000", // React
],
validateStatus: (status) => {
return status >= 200 && status < 500;
Expand Down Expand Up @@ -232,7 +232,7 @@ async function worker() {

// Start the browser
const browser = await puppeteer.launch({
headless: false,
headless: true,
executablePath:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
args: ["--window-size=840,525", "--window-position=840,0"],
Expand Down

0 comments on commit 9c724dc

Please sign in to comment.