I'm looking into `gpac` to create a low latency hls stream from a webcam. I've compiled gpac against the latest commit and using a custom ffmpeg 4.4 build. I've looked into the testsuite for some examples/references that generate ll-hls streams.

I'm using the command below that shows a static frame when I load it into [THEOplayer](https://www.theoplayer.com/ll-hls-test-page). I'm sure I'm doing something wrong, but as I've just touched gpac for the first time I'm not sure what options I should add to get a playable video stream. 

**What command should I use to stream from my webcam to generate a ll-hls stream?**

```make
gpac -i av://:src=/dev/video1 \
     @ enc:c=avc \
     @ -o http://127.0.0.1:8080/live.m3u8:segdur=2:cdur=0.2:dmode=dynamic:rdirs=${tmp_dir}:reqlog=GET:llhls=sf
```

Which generates a m3u8: 

```
#EXTM3U
#EXT-X-VERSION: 6
#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-STREAM-INF:BANDWIDTH=100000,CODECS="avc1.64001F",RESOLUTION=1280x720,FRAME-RATE="10"
live_1.m3u8

```

And the live_1.m3u8:

```
#EXTM3U
#EXT-X-TARGETDURATION:2
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PART-INF:PART-TARGET=0.2
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="video0_dashinit.mp4"
#EXTINF:2,
video0_dash1.m4s
#EXTINF:2.1,
video0_dash2.m4s
#EXTINF:2,
video0_dash3.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.10"
#EXTINF:2,
video0_dash4.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.10"
#EXTINF:2,
video0_dash5.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.10"
#EXTINF:2,
video0_dash6.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.10"
#EXTINF:2,
video0_dash7.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.6"
#EXTINF:0,
video0_dash8.m4s
```

The output of gpac:

```
[HTTPOut] Server running on port 8080
[FFMPEG] Unmapped FFMPEG pixel format nv16, patch welcome
[FFMPEG] Unmapped FFMPEG pixel format nv20le, patch welcome
[FFMPEG] Unmapped FFMPEG pixel format gray10le, patch welcome
[Dasher] AS-1 Rep 1 segment 1 done TOO LATE by 99 ms
[HTTPOut] REQ#1 127.0.0.1 GET live.m3u8 start
[HTTPOut] REQ#1 GET done: reply 200 - 160 bytes in 99 ms at 12.8076 kbps
[HTTPOut] REQ#2 127.0.0.1 GET live_1.m3u8 start
[HTTPOut] REQ#2 GET done: reply 200 - 1978 bytes in 99 ms at 158.436 kbps
[HTTPOut] REQ#3 127.0.0.1 GET video0_dash1.m4s start
[HTTPOut] REQ#4 127.0.0.1 GET video0_dashinit.mp4 start
[HTTPOut] REQ#4 GET done: reply 200 - 943 bytes in 101 ms at 74.1935 kbps
[HTTPOut] REQ#3 GET done: reply 200 - 656260 bytes in 199 ms at 26.3076 mbps
[Dasher] AS-1 Rep 1 segment 2 done TOO LATE by 299 ms
[Dasher] AS-1 Rep 1 segment 3 done TOO LATE by 499 ms
[Dasher] AS-1 Rep 1 segment 4 done TOO LATE by 599 ms
[Dasher] AS-1 Rep 1 segment 5 done TOO LATE by 699 ms
```

**Update**

After doing a couple more tests I've noticed that none of the experiments/tests I did works when I try to playback a video in Safari on an iPhone. This makes me wonder about the current state of the ll-hls implementation: is this supposed to work atm? Of course I still might be using the wrong command, though the commands that I use are based on the test-suite commands.
What gpac command to use for low latency hls (ll-hls) stream that captures from webcam?
This is a GitHub Issue
repo:gpac
owner:gpac
Title : What gpac command to use for low latency hls (ll-hls) stream that captures from webcam?
Issue date:

--- start body ---
I'm looking into `gpac` to create a low latency hls stream from a webcam. I've compiled gpac against the latest commit and using a custom ffmpeg 4.4 build. I've looked into the testsuite for some examples/references that generate ll-hls streams.

I'm using the command below that shows a static frame when I load it into [THEOplayer](https://www.theoplayer.com/ll-hls-test-page). I'm sure I'm doing something wrong, but as I've just touched gpac for the first time I'm not sure what options I should add to get a playable video stream. 

**What command should I use to stream from my webcam to generate a ll-hls stream?**

```make
gpac -i av://:src=/dev/video1 \
     @ enc:c=avc \
     @ -o http://127.0.0.1:8080/live.m3u8:segdur=2:cdur=0.2:dmode=dynamic:rdirs=${tmp_dir}:reqlog=GET:llhls=sf
```

Which generates a m3u8: 

```
#EXTM3U
#EXT-X-VERSION: 6
#EXT-X-INDEPENDENT-SEGMENTS

#EXT-X-STREAM-INF:BANDWIDTH=100000,CODECS="avc1.64001F",RESOLUTION=1280x720,FRAME-RATE="10"
live_1.m3u8

```

And the live_1.m3u8:

```
#EXTM3U
#EXT-X-TARGETDURATION:2
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PART-INF:PART-TARGET=0.2
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MAP:URI="video0_dashinit.mp4"
#EXTINF:2,
video0_dash1.m4s
#EXTINF:2.1,
video0_dash2.m4s
#EXTINF:2,
video0_dash3.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash4.m4s.10"
#EXTINF:2,
video0_dash4.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash5.m4s.10"
#EXTINF:2,
video0_dash5.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash6.m4s.10"
#EXTINF:2,
video0_dash6.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.6"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.7"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.8"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.9"
#EXT-X-PART:DURATION=0.2,URI="video0_dash7.m4s.10"
#EXTINF:2,
video0_dash7.m4s
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.1",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.2"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.3"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.4"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.5"
#EXT-X-PART:DURATION=0.2,URI="video0_dash8.m4s.6"
#EXTINF:0,
video0_dash8.m4s
```

The output of gpac:

```
[HTTPOut] Server running on port 8080
[FFMPEG] Unmapped FFMPEG pixel format nv16, patch welcome
[FFMPEG] Unmapped FFMPEG pixel format nv20le, patch welcome
[FFMPEG] Unmapped FFMPEG pixel format gray10le, patch welcome
[Dasher] AS-1 Rep 1 segment 1 done TOO LATE by 99 ms
[HTTPOut] REQ#1 127.0.0.1 GET live.m3u8 start
[HTTPOut] REQ#1 GET done: reply 200 - 160 bytes in 99 ms at 12.8076 kbps
[HTTPOut] REQ#2 127.0.0.1 GET live_1.m3u8 start
[HTTPOut] REQ#2 GET done: reply 200 - 1978 bytes in 99 ms at 158.436 kbps
[HTTPOut] REQ#3 127.0.0.1 GET video0_dash1.m4s start
[HTTPOut] REQ#4 127.0.0.1 GET video0_dashinit.mp4 start
[HTTPOut] REQ#4 GET done: reply 200 - 943 bytes in 101 ms at 74.1935 kbps
[HTTPOut] REQ#3 GET done: reply 200 - 656260 bytes in 199 ms at 26.3076 mbps
[Dasher] AS-1 Rep 1 segment 2 done TOO LATE by 299 ms
[Dasher] AS-1 Rep 1 segment 3 done TOO LATE by 499 ms
[Dasher] AS-1 Rep 1 segment 4 done TOO LATE by 599 ms
[Dasher] AS-1 Rep 1 segment 5 done TOO LATE by 699 ms
```

**Update**

After doing a couple more tests I've noticed that none of the experiments/tests I did works when I try to playback a video in Safari on an iPhone. This makes me wonder about the current state of the ll-hls implementation: is this supposed to work atm? Of course I still might be using the wrong command, though the commands that I use are based on the test-suite commands.
--- end body ---
