mirror of
https://github.com/flavioribeiro/donut.git
synced 2025-10-16 03:50:37 +08:00
3.2 KiB
3.2 KiB
Adding audio
Date: 2/4/24
Summary: Adding audio track
refs:
- webrtc discussion https://github.com/pion/webrtc/discussions/1955
- go webrtc example https://github.com/pion/webrtc/blob/master/examples/play-from-disk-renegotiation/main.go
- webrtc discussion https://stackoverflow.com/questions/66243915/how-to-get-multiple-streams-from-webrtc-peerconnection
- golang libav https://github.com/giorgisio/goav/blob/master/example/tutorial01.go#L69
- libav transcoding example gshttps://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/transcode.c#L158
- libav network example https://github.com/FFmpeg/FFmpgseg/blob/master/doc/examples/avio_http_serve_files.c#L116
- libav avio example https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/avio_read_callback.c#L95
- example https://blog.mi.hdm-stuttgart.de/index.php/2018/03/21/livestreaming-with-libav-tutorial-part-2/
- libav doc https://ffmpeg.org/doxygen/trunk/index.html
- generic av format https://github.com/rvs/ffmpeg/blob/master/libavformat/output-example.c
Moving player to static
Date: 2/3/24
Hypothesis: It's easy to do experimentation with local player
Summary
Copy and adapt code from https://github.com/flavioribeiro/donut-video into static/demo/
Investigating a potential memory leak
Date: 2/2/24
Hypothesis: There's a memory leak happening
Signs: pprof/allocs
Summary
- Start the donut
make run
, - Check the general profiling http://localhost:6060/debug/pprof/?debug=1
- Keep refreshing the page, notice that the counters: heap, goroutine, threadcreate are stable
- Access the the demo http://localhost:8080/
- Go back to the profiling page http://localhost:6060/debug/pprof/?debug=1
- Notice that the prof counters are stable, regardless if you refresh multiple times
- Now click on
[Connect]
- Observe how the perf counters go up http://localhost:6060/debug/pprof/?debug=1
- Keep refreshing the http://localhost:6060/debug/pprof/? and you'll see that the counters
goroutine
andthreacreate
are stable butheap
andallocs
counters are growing.- You can check the specific heap page as well http://localhost:6060/debug/pprof/heap?debug=1
- You can run the command
go tool pprof http://localhost:6060/debug/pprof/heap
and typeweb
, it'll generate a svg tree map of heap.