Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update joy4 and ffmpeg. #160

Merged
merged 4 commits into from
Nov 21, 2019
Merged

Update joy4 and ffmpeg. #160

merged 4 commits into from
Nov 21, 2019

Conversation

j0sh
Copy link
Collaborator

@j0sh j0sh commented Nov 21, 2019

Splitting up some of #141 into this PR in order to make the changes a touch less overwhelming.

  • Updates FFmpeg to use the Livepeer forked branch at https://github.com/livepeer/ffmpeg

  • Updates joy4 to fix some breakage resulting from the ffmpeg update. Specifically, this change modified the general libav code to not treat general IO errors as EOF. This broke some tests with the segmenter. Drilling down on the problem revealed that ffmpeg has a stricter view of what constitutes a proper EOF for RTMP : the playback stream needs to be torn down completely. Turns out that joy4 was simply terminating the connection, rather than tearing down the stream following the RTMP protocol. The teardown is added to joy4 here: livepeer/joy4@b2fea45

  • Fix some other test breakage induced by the ffmpeg update. In particular:

    • ADTS to ASC bitstream filters are now automatically inserted for the FLV muxer, so going from mpegts to FLV doesn't break anymore. Couldn't find another case which exhibits the same type of breakage, so just removed the test. (Almost everything else that holds AAC metadata in "Audio Specific Config" ASC format is a MP4 variant, and more exotic formats like nut can take basically anything.)

    • Some encoded file sizes got slightly larger. Haven't looked into precisely what / why but doesn't seem like an issue.

    • Tightened up the testing around draining GPU filter graphs. Something about the underlying implementation changed and is giving us 2 extra frames now. Sanity checked this against the results produced by the ffmpeg CLI itself: they match.

    • We have better test for RTMP stream disconnect. The old test broke since the stream is terminated cleanly now, even if no media packets are sent. We work around this by setting up a "server" with nc and sending a bogus RTMP handshake to which throws an IO error from ffmpeg. This isn't strictly a network disconnect, but is close enough.

@j0sh j0sh requested a review from darkdarkdragon November 21, 2019 09:14
@j0sh j0sh force-pushed the ja/depupdate branch 2 times, most recently from 39c1d79 to 408a103 Compare November 21, 2019 09:29
j0sh added 4 commits November 21, 2019 09:40
* We need modules now,

* Apparently zlib is not installed here by default (debian 10?)

* nc for tests since what's here is minimal.
Needed to correct some behavior that will break after the next
round of ffmpeg updates.
Needed for specialized nvenc flush API.
Copy link
Contributor

@darkdarkdragon darkdarkdragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just need to merge changes to joy4 first

@j0sh
Copy link
Collaborator Author

j0sh commented Nov 21, 2019

joy4 merged 👍

@j0sh j0sh merged commit fdbf27c into master Nov 21, 2019
@j0sh j0sh deleted the ja/depupdate branch November 21, 2019 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants