Test: push a real video track, matching the default -c:v copy path - #63
Merged
Conversation
EnvelopSound#62 restored CI but left `test` red: the bundled test pushes audio-only 16-channel AAC, and the shipped default (-c:v copy) has nothing to copy against a source with no video, so it never writes a manifest. Full diagnosis is in EnvelopSound#62. Rather than special-case audio-only support - a bigger, separate question, and not one anyone has actually asked for - this fixes the test to match the path the project actually supports and every real deployment uses: video+audio. Adds a synthetic testsrc2 video track alongside the existing audio, encoded with libx264 so -c:v copy has something to copy. The audio path is unchanged.
There was a problem hiding this comment.
Pull request overview
This PR fixes the media streaming CI test to publish a video+audio RTMP stream, aligning the test input with the project’s default transcoder configuration (-c:v copy) so a DASH manifest is produced.
Changes:
- Updates the bundled test publisher to add a synthetic
testsrc2video stream alongside the existing 16-channel AAC audio stream. - Encodes the synthetic video with
libx264so the transcoder’s default video-copy path has a video track to copy.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| echo "Testing media streaming" | ||
|
|
||
| bash -c "ffmpeg -y -stream_loop -1 -i test.wav -af \"channelmap=channel_layout=hexadecagonal\" -c:a aac -ac 16 -b:a 2048k -f flv \"rtmp://nginx-rtmp:1935/live/stream1?token=${RTMP_AUTH_TOKEN}\" &" | ||
| bash -c "ffmpeg -y -stream_loop -1 -i test.wav -f lavfi -i \"testsrc2=size=640x360:rate=25\" -af \"channelmap=channel_layout=hexadecagonal\" -c:v libx264 -g 25 -c:a aac -ac 16 -b:a 2048k -f flv \"rtmp://nginx-rtmp:1935/live/stream1?token=${RTMP_AUTH_TOKEN}\" &" |
RTMP_AUTH_TOKEN was spliced into a string that a second bash -c then re-parsed, so a token containing shell metacharacters could break out. Backgrounding ffmpeg directly needs no such wrapper and removes the double-interpolation entirely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#62 restored CI but left
testred: the bundled test pushes audio-only 16-ch AAC (test.wav), and the shipped default (FFMPEG_FLAGS=... -c:v copy) has nothing to copy against an audio-only source, so it never writes a manifest. Full diagnosis is in #62's description.Rather than special-case audio-only support (a bigger, separate question -- no one has actually asked for it, and Earshot's own README documents "optional video" as aspirational rather than something the shipped default handles), this instead fixes the test to match the path the project actually supports and every real deployment uses: video+audio. Adds a synthetic
testsrc2video track alongside the existing audio, encoded withlibx264so the default-c:v copyhas something to copy -- same audio path as before, unchanged.