Closed martinmelo00 closed 5 years ago
Update: after playing with some settings one finally worked: -live-media instead of -live. Now I am getting an mpd, segments and init mp4.
However I am still getting a lot of dropped frames. This is the command I'm currently using:
DashCast -vf video4linux2 -v4l2f h264 -vfr 24 -vres 1920x1080 -v /dev/video0 -conf dashcast.conf -seg-dur 10000 -frag-dur 10000 -mpd-refresh 60 -min-buffer 10 -time-shift 60 -live-media
and output:
Options: video source: /dev/video0 video format: video4linux2 v4l2 format: h264 video framerate: 24 video resolution: 1920x1080 video crop: 0x0 audio source: Configurations: id:v1 res:1920x1080 vbr:800000 Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1486535235.163945, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 24 fps, 24 tbr, 1000k tbn, 2000k tbc AVCTX give frame duration of 1/48 - keeping requested rate 24, but this may result in unexpected behaviour. Press q or Q to exit... [libx264 @ 0x6fb004a0] using cpu capabilities: ARMv6 NEON [libx264 @ 0x6fb004a0] profile High, level 4.0 [libx264 @ 0x6fb004a0] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=24 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=24 rc=abr mbtree=1 bitrate=800 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Generating MPD at 2017-02-08T06:27:15.647Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 1 [libx264 @ 0x6fb004a0] non-strictly-monotonic PTS [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [libx264 @ 0x6fb004a0] invalid DTS: PTS is less than DTS [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [libx264 @ 0x6fb004a0] invalid DTS: PTS is less than DTS [video_encoder] Rep v1 UTC diff at segment close: 8750 is lower than cumulated segment duration 10000 (diff -1250) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:15.647Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 1 [video_encoder] Rep v1 UTC diff at segment close: 9156 is lower than cumulated segment duration 20000 (diff -10844) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:24.399Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 2 [video_encoder] Rep v1 UTC diff at segment close: 13738 is lower than cumulated segment duration 30000 (diff -16262) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:24.804Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 3 [video_encoder] Rep v1 UTC diff at segment close: 13878 is lower than cumulated segment duration 40000 (diff -26122) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:29.386Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 4 [video_encoder] Rep v1 UTC diff at segment close: 14075 is lower than cumulated segment duration 50000 (diff -35925) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:29.525Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 5 [video_encoder] Rep v1 UTC diff at segment close: 14308 is lower than cumulated segment duration 60000 (diff -45692) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:29.724Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 6 [video_encoder] Rep v1 UTC diff at segment close: 14528 is lower than cumulated segment duration 70000 (diff -55472) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:29.956Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 7 [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [video_encoder] Rep v1 UTC diff at segment close: 15659 is lower than cumulated segment duration 80000 (diff -64341) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:30.177Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 8 [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [video_encoder] Rep v1 UTC diff at segment close: 16995 is lower than cumulated segment duration 90000 (diff -73005) - frame rate is probably not correct or frames were lost! Generating MPD at 2017-02-08T06:27:31.308Z StartTime: 2017-02-08T06:27:15.647Z - startNumber 1 - last number 9 [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame
Edit: trying to play the created files in dash seems to load fine but there is no video output:
[17] EME detected on this user agent! (ProtectionModel_21Jan2015)
Debug.js:108 [23] Playback Initialized
Debug.js:108 [39] [dash.js 2.4.1] MediaPlayer has been initialized
Debug.js:108 [39] Converted video element to dash.js player and added content: http://172.16.42.165:8000/media/2/stream/
Debug.js:108 [71] Parsing complete: ( xml2json: 3.67ms, objectiron: 0.565ms, total: 0.00423s)
Debug.js:108 [76] Matching default timing source protocol to manifest protocol: http://time.akamai.com/?iso
Debug.js:108 [80] Manifest has been refreshed at Wed Feb 08 2017 01:52:12 GMT-0500 (Eastern Standard Time)[1486536732.535]
Debug.js:108 [97] Local time: Wed Feb 08 2017 01:52:12 GMT-0500 (Eastern Standard Time)
Debug.js:108 [97] Server time: Wed Feb 08 2017 01:52:11 GMT-0500 (Eastern Standard Time)
Debug.js:108 [97] Difference (ms): -1560
Debug.js:108 [101] MediaSource attached to element. Waiting on open...
Debug.js:108 [102] MediaSource is open!
Debug.js:108 [103] Duration successfully set to: 1.7976931348623157e+308
Debug.js:108 [105] Added 0 inline events
Debug.js:108 [106] video codec: video/mp4;codecs="avc1.640028"
Debug.js:108 [118] Schedule controller stopping for video
Debug.js:108 [122] No audio data.
Debug.js:108 [123] No text data.
Debug.js:108 [123] No fragmentedText data.
Debug.js:108 [124] No embeddedText data.
Debug.js:108 [124] No muxed data.
Debug.js:108 [126] Getting the request for video time : 9.3
Debug.js:108 [127] Index for video time 9.3 is 8
Debug.js:108 [130] Schedule controller starting for video
Debug.js:108 [131] Start Event Controller
Debug.js:108 [132] Native video element event: play
Debug.js:108 [145] Init fragment finished loading saving to video's init cache
Debug.js:108 [148] Native video element event: loadedmetadata
Debug.js:108 [149] Requesting seek to time: 8
Debug.js:108 [149] Starting playback at offset: 8
Debug.js:108 [151] Seeking to: 8
Debug.js:108 [153] Top qualityvideo index has changed from undefined to 0
Debug.js:108 [156] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [157] Getting the request for video time : 8
Debug.js:108 [157] Index for video time 8 is 7
Debug.js:108 [157] SegmentTemplate: 7 / Infinity
Debug.js:108 [191] Buffered Range for type: video : 1486536716.230396 - 1486536716.270396
Debug.js:108 [194] ThroughputRule requesting switch to index: 0 type: video Average throughput 6773 kbps
Debug.js:108 [194] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [194] Index for video time 8 is 7
Debug.js:108 [195] SegmentTemplate: 7 / Infinity
Debug.js:108 [195] Getting the next request at index: 8
Debug.js:108 [195] SegmentTemplate: 8 / Infinity
Debug.js:108 [212] Buffered Range for type: video : 1486536716.230396 - 1486536716.270471
Debug.js:108 [214] ThroughputRule requesting switch to index: 0 type: video Average throughput 20020 kbps
Debug.js:108 [215] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [215] Getting the request for video time : 9
Debug.js:108 [215] Index for video time 9 is 8
Debug.js:108 [215] SegmentTemplate: 8 / Infinity
Debug.js:108 [216] Getting the next request at index: 9
Debug.js:108 [216] SegmentTemplate: 9 / Infinity
Debug.js:108 [231] Buffered Range for type: video : 1486536716.230396 - 1486536716.270623
Debug.js:108 [233] ThroughputRule requesting switch to index: 0 type: video Average throughput 26412 kbps
Debug.js:108 [234] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [235] Getting the request for video time : 10
Debug.js:108 [235] Index for video time 10 is 9
Debug.js:108 [235] SegmentTemplate: 9 / Infinity
Debug.js:108 [236] Getting the next request at index: 10
Debug.js:108 [236] SegmentTemplate: 10 / Infinity
Debug.js:108 [265] Buffered Range for type: video : 1486536716.230396 - 1486536716.270703
Debug.js:108 [268] ThroughputRule requesting switch to index: 0 type: video Average throughput 17023 kbps
Debug.js:108 [268] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [268] Getting the request for video time : 11
Debug.js:108 [268] Index for video time 11 is 10
Debug.js:108 [269] SegmentTemplate: 10 / Infinity
Debug.js:108 [269] Getting the next request at index: 11
Debug.js:108 [269] SegmentTemplate: 11 / Infinity
Debug.js:108 [312] Buffered Range for type: video : 1486536716.230396 - 1486536716.283813
Debug.js:108 [315] ThroughputRule requesting switch to index: 0 type: video Average throughput 20977 kbps
Debug.js:108 [316] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [316] Getting the request for video time : 12
Debug.js:108 [317] Index for video time 12 is 11
Debug.js:108 [317] SegmentTemplate: 11 / Infinity
Debug.js:108 [318] Getting the next request at index: 12
Debug.js:108 [318] SegmentTemplate: 12 / Infinity
Debug.js:108 [416] Buffered Range for type: video : 1486536716.230396 - 1486536716.325332
Debug.js:108 [418] ThroughputRule requesting switch to index: 0 type: video Average throughput 17927 kbps
Debug.js:108 [419] Switch history rule index: 0 samples: 6 drops: 1
Debug.js:108 [420] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [420] Getting the request for video time : 13
Debug.js:108 [420] Index for video time 13 is 12
Debug.js:108 [421] SegmentTemplate: 12 / Infinity
Debug.js:108 [421] Getting the next request at index: 13
Debug.js:108 [421] SegmentTemplate: 13 / Infinity
Debug.js:108 [653] Buffered Range for type: video : 1486536716.230396 - 1486536716.365423
Debug.js:108 [655] ThroughputRule requesting switch to index: 0 type: video Average throughput 19288 kbps
Debug.js:108 [656] Switch history rule index: 0 samples: 7 drops: 1
Debug.js:108 [656] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [656] Getting the request for video time : 14
Debug.js:108 [657] Index for video time 14 is 13
Debug.js:108 [657] SegmentTemplate: 13 / Infinity
Debug.js:108 [657] Getting the next request at index: 14
Debug.js:108 [1159] ThroughputRule requesting switch to index: 0 type: video Average throughput 19288 kbps
Debug.js:108 [1160] Switch history rule index: 0 samples: 8 drops: 1
Debug.js:108 [1162] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [1163] Getting the request for video time : 14
Debug.js:108 [1164] Index for video time 14 is 13
Debug.js:108 [1165] SegmentTemplate: 13 / Infinity
Debug.js:108 [1166] Getting the next request at index: 14
Debug.js:108 [1416] Buffered Range for type: video : 1486536716.230396 - 1486536716.406034
Debug.js:108 [1419] ThroughputRule requesting switch to index: 0 type: video Average throughput 18802 kbps
Debug.js:108 [1419] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [1420] Getting the request for video time : 15
Debug.js:108 [1420] Index for video time 15 is 14
Debug.js:108 [1421] SegmentTemplate: 14 / Infinity
Debug.js:108 [1421] Getting the next request at index: 15
Debug.js:108 [1922] ThroughputRule requesting switch to index: 0 type: video Average throughput 18802 kbps
Debug.js:108 [1922] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [1923] Getting the request for video time : 15
Debug.js:108 [1923] Index for video time 15 is 14
Debug.js:108 [1924] SegmentTemplate: 14 / Infinity
Debug.js:108 [1924] Getting the next request at index: 15
Debug.js:108 [2191] Buffered Range for type: video : 1486536716.230396 - 1486536716.447836
Debug.js:108 [2196] ThroughputRule requesting switch to index: 0 type: video Average throughput 20753 kbps
Debug.js:108 [2197] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [2198] Getting the request for video time : 16
Debug.js:108 [2199] Index for video time 16 is 15
Debug.js:108 [2199] SegmentTemplate: 15 / Infinity
Debug.js:108 [2200] Getting the next request at index: 16
Debug.js:108 [2701] ThroughputRule requesting switch to index: 0 type: video Average throughput 20753 kbps
Debug.js:108 [2702] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [2702] Getting the request for video time : 16
Debug.js:108 [2703] Index for video time 16 is 15
Debug.js:108 [2704] SegmentTemplate: 15 / Infinity
Debug.js:108 [2705] Getting the next request at index: 16
Debug.js:108 [3207] ThroughputRule requesting switch to index: 0 type: video Average throughput 20753 kbps
Debug.js:108 [3208] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [3209] Getting the request for video time : 16
Debug.js:108 [3211] Index for video time 16 is 15
Debug.js:108 [3213] SegmentTemplate: 15 / Infinity
Debug.js:108 [3215] Getting the next request at index: 16
Debug.js:108 [3468] Buffered Range for type: video : 1486536716.230396 - 1486536716.494564
Debug.js:108 [3473] ThroughputRule requesting switch to index: 0 type: video Average throughput 20191 kbps
Debug.js:108 [3474] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [3474] Getting the request for video time : 17
Debug.js:108 [3475] Index for video time 17 is 16
Debug.js:108 [3476] SegmentTemplate: 16 / Infinity
Debug.js:108 [3477] Getting the next request at index: 17
Debug.js:108 [3978] ThroughputRule requesting switch to index: 0 type: video Average throughput 20191 kbps
Debug.js:108 [3980] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [3983] Getting the request for video time : 17
Debug.js:108 [3984] Index for video time 17 is 16
Debug.js:108 [3985] SegmentTemplate: 16 / Infinity
Debug.js:108 [3987] Getting the next request at index: 17
Debug.js:108 [4188] Buffered Range for type: video : 1486536716.230396 - 1486536716.533228
Debug.js:108 [4192] ThroughputRule requesting switch to index: 0 type: video Average throughput 20745 kbps
Debug.js:108 [4193] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [4194] Getting the request for video time : 18
Debug.js:108 [4194] Index for video time 18 is 17
Debug.js:108 [4194] SegmentTemplate: 17 / Infinity
Debug.js:108 [4195] Getting the next request at index: 18
Debug.js:108 [4697] ThroughputRule requesting switch to index: 0 type: video Average throughput 20745 kbps
Debug.js:108 [4698] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [4699] Getting the request for video time : 18
Debug.js:108 [4700] Index for video time 18 is 17
Debug.js:108 [4701] SegmentTemplate: 17 / Infinity
Debug.js:108 [4705] Getting the next request at index: 18
Debug.js:108 [5207] ThroughputRule requesting switch to index: 0 type: video Average throughput 20745 kbps
Debug.js:108 [5208] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [5209] Getting the request for video time : 18
Debug.js:108 [5210] Index for video time 18 is 17
Debug.js:108 [5210] SegmentTemplate: 17 / Infinity
Debug.js:108 [5214] Getting the next request at index: 18
Debug.js:108 [5440] Buffered Range for type: video : 1486536716.230396 - 1486536716.572017
Debug.js:108 [5442] ThroughputRule requesting switch to index: 0 type: video Average throughput 19524 kbps
Debug.js:108 [5443] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [5443] Getting the request for video time : 19
Debug.js:108 [5443] Index for video time 19 is 18
Debug.js:108 [5443] SegmentTemplate: 18 / Infinity
Debug.js:108 [5444] Getting the next request at index: 19
Debug.js:108 [5946] ThroughputRule requesting switch to index: 0 type: video Average throughput 19524 kbps
Debug.js:108 [5947] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [5949] Getting the request for video time : 19
Debug.js:108 [5950] Index for video time 19 is 18
Debug.js:108 [5951] SegmentTemplate: 18 / Infinity
Debug.js:108 [5953] Getting the next request at index: 19
Debug.js:108 [6193] Buffered Range for type: video : 1486536716.230396 - 1486536716.612151
Debug.js:108 [6197] ThroughputRule requesting switch to index: 0 type: video Average throughput 17903 kbps
Debug.js:108 [6198] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [6198] Getting the request for video time : 20
Debug.js:108 [6198] Index for video time 20 is 19
Debug.js:108 [6199] SegmentTemplate: 19 / Infinity
Debug.js:108 [6199] Getting the next request at index: 20
Debug.js:108 [6701] ThroughputRule requesting switch to index: 0 type: video Average throughput 17903 kbps
Debug.js:108 [6701] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [6702] Getting the request for video time : 20
Debug.js:108 [6702] Index for video time 20 is 19
Debug.js:108 [6703] SegmentTemplate: 19 / Infinity
Debug.js:108 [6703] Getting the next request at index: 20
Debug.js:108 [7205] ThroughputRule requesting switch to index: 0 type: video Average throughput 17903 kbps
Debug.js:108 [7205] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [7206] Getting the request for video time : 20
Debug.js:108 [7206] Index for video time 20 is 19
Debug.js:108 [7207] SegmentTemplate: 19 / Infinity
Debug.js:108 [7207] Getting the next request at index: 20
Debug.js:108 [7440] Buffered Range for type: video : 1486536716.230396 - 1486536716.648697
Debug.js:108 [7442] ThroughputRule requesting switch to index: 0 type: video Average throughput 18910 kbps
Debug.js:108 [7444] AbrController (video) stay on 0/0 (buffer: 0)
Debug.js:108 [7445] Getting the request for video time : 21
Debug.js:108 [7445] Index for video time 21 is 20
Debug.js:108 [7445] SegmentTemplate: 20 / Infinity
Debug.js:108 [7446] Getting the next request at index: 21
Debug.js:108 [7952] ThroughputRule requesting switch to index: 0 type: video Average throughput 18910 kbps
Hi, I'm not familiar with Dashcast, but as far as I know, you're asking him to encode your content at 1080p30. I don't think the x264 library is able to encode at this frame rate/Resolution on raspberry (specially without hardware encoding support). Maybe you should try with (much) lower resolution and fps ?
You could also try to use raspivid or gstreamer (which both support hardware encoding) to generate your encoded file and then use MP4Box to dash the resulting file.
Ah I'll try and play with the resolution and framerate but I could have sworn I checked the capability from the format output from the driver and the res was fare for h264.
As per your second comment, I originally went this route as raspivid is very nice however there is no way for me to stream this into MP4Box to chunk it out or use raspivid to DashCast (that I know of). Let me specify here: I'm not trying to work with prerecorded video but rather live video coming off of the camera. So I have used a combination of raspivid (to create pre-recorded raw h264 video) and then MP4Box to package and segment the video and create the mpd etc with success. However what I'm trying to do is with live streaming video and not pre-recorded.
That said I have also read (but don't fully understand) that MP4Box or DashCast can take a live hls stream and convert it to output dash. In which case I can easily do VoD, Live, and Event HLS broadcasts from a live video capture, but I'm trying to create a live Dash broadcast from live video capture.
I tried another route this time:
raspivid -n -t 0 -pf baseline -o - | DashCast -v pipe: -live-media Options: video source: pipe: video crop: 0x0 audio source: Configurations: id:v1 res:1920x1080 vbr:1000000 id:a1 abr:192000 [h264 @ 0x328d2d0] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, h264, from 'pipe:': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (Baseline), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc AVCTX give frame duration of 1/50 - keeping requested rate -1, but this may result in unexpected behaviour.
[libx264 @ 0x759004a0] using cpu capabilities: ARMv6 NEON Press q or Q to exit... [libx264 @ 0x759004a0] profile High, level 4.0 [libx264 @ 0x759004a0] 264 - core 148 r2762 90a61ec - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=25 keyint_min=2 scenecut=40 intra_refresh=0 rc_lookahead=25 rc=abr mbtree=1 bitrate=1000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Generating MPD at 2017-02-09T04:00:32.730Z StartTime: 2017-02-09T04:00:32.730Z - startNumber 1 - last number 1
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS [libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS [libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[libx264 @ 0x759004a0] non-strictly-monotonic PTS
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame
[dashcast] Live system dropped a video frame ^Cmmal: Aborting program
Still can't seem to get this cleared up, any help would be greatly appreciated, thank you.
I didn't know that v4l2 was able to provide hardware encoded content, good to know :)
Nevertheless, it seems that dashcast will transcode your content anyway (h264->h264). There will be performance issue (as transcoding is software).
There is a suggested fix for the non-strictly-monotonic PTS on this thread:
http://stackoverflow.com/questions/6603979/ffmpegavcodec-encode-video-setting-pts-h264
I think you could try to modify the applications/dashcast/video_encoder.c:
video_data_node->vframe->pts (line195) with the above suggested fix (ie: force the pts value).
I think there is a way to live feed to MP4Box,
1, Using ffmpeg with v4l2/264 as input, you should be able to continuously write a fragmented MP4 file
2, MP4Box -dash-live [GoP duration] file.mp4
1 & 2 should be launched as two process. The -dash-live option is looping over an input file, and periodically update the mpd and segments.
This is highly untested and hypothetical ^^
Ps: Sample for TS over HLS http://raspberrypi.stackexchange.com/questions/7446/how-can-i-stream-h-264-video-from-the-raspberry-pi-camera-module-via-a-web-serve
I did originally try to use avconv (vs ffmpeg) to create a fragmented mp4 file and read it into MP4Box. But I always got errors that MP4Box could not open the file. That was originally my preferred method (I do have a working example for HLS). Maybe I was doing something wrong? probably but didn't think so. I'll update this post with what I used for that.
What made me switch to DashCast was a remark I read that MP4Box wasn't made to handle streaming files and that one should use DashCast which was intended for that. The raspberry pi was recently updated with v4l2 driver support so I went the DashCast route with that. I spent some time also trying to output from raspivid which will dump raw h264 and continued to get the errors with DashCast.
That said I'll try the suggested fix and see where that gets me. I appreciate your help and update once I try.
Alas, trying to force the pts value got rid of the error for non strictly monotonic pts but I still only get this error for output: [dashcast] Live system dropped a video frame
I would think that maybe I don't ahve any data coming out of the /dev/video0 but I know that I can pull data from it through other means. so I'm at a complete loss here.
Again I'm using two methods:
Ultimately I can get MP4Box to work against prerecorded output files. I'm going to make one last ditch effort at using raspivid to output h264 file segments to a directory and having MP4Box run through them in a loop and see if I can get that to work. I feel thats a real hacky way to accomplish the goal but I feel I'm running out of options. I don't know the dashcast source base well enough to dig this out myself.
However if there is something I'm missing and am muddling up the dashcast use on the pi against the raspberry pi camera setup then I'm all ears to anyones input here. I appreciate all the help thus far!
Hi, it seems there is basic support for dash in the latest version of ffmpeg. Using the following command:
raspivid -n -w 1280 -h 720 -g 25 -fps 25 -vf -hf -t 86400000 -b 1800000 -ih -o - | ffmpeg -re -y -i - -c:v copy -f dash -min_seg_duration 1000 -use_template 1 -use_timeline 0 -init_seg_name init-\$RepresentationID\$.mp4 -media_seg_name test-\$RepresentationID\$-\$Number\$.mp4 test.mpd
This is not dash-if compatible, but playback is ok with MP4Client.
MP4Client -logs dash@debug -f test.mpd
See this thread for further info (http://stackoverflow.com/questions/40046444/how-should-i-use-the-dash-not-webm-dash-manifest-format-in-ffmpeg)
dashcast is now deprecated, please use GPAC 0.9.0
Thanks for reporting your issue. Please make sure these boxes are checked before submitting your issue - thank you!
Detailed guidelines: http://gpac.io/2013/07/16/how-to-file-a-bug-properly/
I've followed the instructions for compilation on the raspberry pi 3 according to this page: https://gpac.wp.imt.fr/dashcast/
After some trial and tribulation I cleanly got all three repo's compiling and installing. The only issue remaining is that there is no available package for libavcodec-extra-53 however it displayed that libav-tools replaces it and that installed with no issue.
I have checked availability of the camera on /dev/video0 but cannot seem to get appropriate output from DashCast. After creating a conf file according the the page and performing the following command: DashCast -vf video4linux2 -v4l2f h264 -vfr 30 -vres 1920x1080 -v /dev/video0 -conf dashcast.conf -live
I get the following output:
MPD refresh time not set in live - defaulting to segment duration Options: video source: /dev/video0 video format: video4linux2 v4l2 format: h264 video framerate: 30 video resolution: 1920x1080 video crop: 0x0 audio source: Configurations: id:v1 res:1920x1080 vbr:800000 Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 1486533628.371648, bitrate: N/A Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 30 fps, 30 tbr, 1000k tbn, 2000k tbc AVCTX give frame duration of 1/60 - keeping requested rate 30, but this may result in unexpected behaviour. [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame [dashcast] Live system dropped a video frame ^C
It will continue in that matter until I terminate it.
Any help would be greatly appreciated.