Commit Graph

21 Commits

Author SHA1 Message Date
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