William Storey
afcb0b7202
Merge pull request #23 from fpaupier/master
...
add: support for docker-compose
2022-03-09 17:08:07 -08:00
fpaupier
4921387848
update: getting started doc
...
to support docker usage
https://github.com/horgh/videostreamer/issues/22
2022-02-21 20:03:14 +01:00
fpaupier
ca60c46b4c
add: support for docker-compose
...
Copy the .env.example into a .env file, update with your variable run `docker-compose up`
https://github.com/horgh/videostreamer/issues/22
2022-02-21 19:56:25 +01:00
Will Storey
98336fcbc9
Add Dockerfile
2019-10-27 09:48:13 -07:00
Will Storey
e395247365
Convert to a Go module
2019-10-27 09:14:46 -07:00
Will Storey
2c0b7ca2e1
Merge pull request #12 from sergeydobrodey/patch-1
...
videostreamer.c: dont call avformat_free_context
2019-07-18 16:26:53 -07:00
Sergey Dobrodey
16dde98b2c
videostreamer.c: dont call avformat_free_context
...
avformat_close_input frees context and all its contents and set it to NULL
https://www.ffmpeg.org/doxygen/3.3/group__lavf__decoding.html#gae804b99aec044690162b8b9b110236a4
2019-07-18 18:13:13 +03:00
Will Storey
5eadfd6fab
Remove redundant log message
2018-07-23 17:32:58 -07:00
Will Storey
d4640f77fb
Use simpler method for retrieving error message
2018-07-23 17:31:45 -07:00
Will Storey
3673c3ce0b
Provide error reason if opening input fails
2018-07-23 17:31:35 -07:00
Will Storey
8a470e1b25
Clear input once we destroy it
...
It's possible we could use it still and it would be invalid memory
2018-01-25 20:53:48 -08:00
Will Storey
b06db9baec
Update a comment that referred to the wrong thing
2018-01-23 18:30:25 -08:00
Will Storey
4c857a40fb
Synchronize access to input and client outputs
...
It appears there is a race condition in that we could close the input or
client's output while the packet writer goroutine is still using them.
This could lead to crashes.
This hopefully fixes #6 .
2018-01-23 18:29:18 -08:00
Will Storey
c2aa2d30b5
Fix dts if we receive packets with NOPTS after having PTS
...
This is similar to the situation where we receive packets with lower dts
than we previously output, except in this case we have no pts at all.
An alternative may be to skip such packets all together, but let's try
fixing them first.
This is related to #5 .
2018-01-13 11:58:31 -08:00
Will Storey
93d839ecef
Manually set dts if it's the same as the last we output
...
In #1 we changed to manually set it if it is less than the last we
output. Apparently there are streams where it can be equal as well.
If we don't do this, then we see errors such as "Application provided
invalid, non monotonically increasing dts to muxer"
2018-01-11 21:44:54 -08:00
Will Storey
4392be9f01
Make remux_example take output file and number of frames from CLI
2018-01-11 21:44:19 -08:00
Will Storey
e621fdd9bf
Add more info about requirements and packages to install
2018-01-06 11:42:03 -08:00
Will Storey
2e6baf4e1b
Add more info to README about installation and requirements
2018-01-06 11:02:23 -08:00
Will Storey
7d8b10b1e8
Add .gitignore
2018-01-06 10:54:37 -08:00
Will Storey
fc34c977b2
Reorganize the README a bit
...
I also rephrase the summary blurb a little
2018-01-06 10:53:54 -08:00
Will Storey
42c330c730
Log error when writing frame fails
...
Also add some log output for when the number of clients change, and when
we open the input. Looking at debugging for issue #2 .
2017-04-08 16:21:08 -07:00
Will Storey
734ccb6d6b
Support input with non-monotonic dts
...
This fixes issue #1 .
It appears there are inputs where the dts fluctuates. This is apparently
inputs that are not well formed. However, I discovered that ffmpeg
itself allows for this. If it detects this happening, it updates the
pts/dts of the packet. To do this, it tracks the last output dts. This
ensures the output dts is monotonic even if the input is not.
I use essentially the same approach as in ffmpeg.
2017-03-14 12:00:07 -07:00
Will Storey
0b32184301
Fix indentation in a function.
2017-03-14 11:10:56 -07:00
Will Storey
215b19773a
Ensure we always write to output stream 0
...
If an input has multiple streams, then the packet's stream index for the
video stream we are reading may not match our output's stream index.
This can lead to errors such as:
[mp4 @ 0x5631c5836000] Invalid packet stream index: 1
Update the packet's stream index, prior to writing it, to match what it
is in our output.
I also update a comment (around line 294) to clarify that while we're
skipping a packet, it's not because it's not video.
2017-03-14 11:07:53 -07:00
Will Storey
763dc8fd38
README: Fix typo, improve wording
...
Not much of substance changed. I just noticed a typo and so re-read
everything and adjusted some language.
2017-03-14 10:40:13 -07:00
Will Storey
aba249aa62
Fix warnings about unset timestamps
2017-01-03 13:50:14 -08:00
Will Storey
4440856472
Clean up HTML and some comments
2017-01-01 22:56:16 -08:00
Will Storey
183fdbac5c
Add readme
2017-01-01 22:56:09 -08:00
Will Storey
1f0df03f36
Give each client its own goroutine for writes
...
This is to avoid the encoder blocking trying to write to the write side
of the pipe when a client is not reading from it quickly enough.
2017-01-01 22:36:09 -08:00
Will Storey
99c3233f69
Be more careful about cleaning up clients
...
Do it if encoder aborts for some reason. Also comment about behaviour of
pipe sides when closed.
2017-01-01 16:34:48 -08:00
Will Storey
99d23dc933
HTTP stream now works. 1 input, multi clients.
...
This refactors to have one output created per client.
2017-01-01 16:21:52 -08:00
Will Storey
37325f57b0
Open input/output separately, and read/write separately
...
This is a refactor of the library API so that we will be able to have
multiple outputs.
2017-01-01 14:58:29 -08:00
Will Storey
1ae87a3c72
Remove audio encoding
...
Also begin refactor of removing 'frames'.
This is now semi functional again. Still only the first client will
work.
2016-12-31 13:31:16 -08:00
Will Storey
fd0ddf62da
Fix remux example to take correct main() params
...
Also add comments explaining the program and the videostreamer lib.
2016-12-31 13:16:15 -08:00
Will Storey
7f16d84882
Initial import
...
This works for streaming mp4 from rtsp. But only to the first client as
it is unable to recognize discrete frames correctly. It needs further
work.
2016-12-31 13:12:45 -08:00