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

Number of channels is hard-coded in stream.sh for node type = research #38

Open
scottveirs opened this issue Nov 24, 2021 · 0 comments
Open
Assignees
Labels

Comments

@scottveirs
Copy link
Member

Noticed 2 channels in .mp3 file from Sunset Bay (concatenated .ts segments, transcoded), when there is only one hydrophone deployed and I'd set CHANNELS=1 in the .env file. Looked at current master branch in node/stream.sh and saw that $CHANNELS is used within the ffmpeg call for node type hls-only but for node type research it is still hardcoded as -ac 2 ...

## Streaming HLS with FLAC archive 
	nice -n -10 ffmpeg -f jack -i ffjack \
       -f segment -segment_time "00:00:$FLAC_DURATION.00" -strftime 1 "/tmp/$NODE_NAME/flac/%Y-%m-%d_%H-%M-%S_$NODE_NAME-$SAMPLE_RATE-$CHANNELS.flac" \
       -f segment -segment_list "/tmp/$NODE_NAME/hls/$timestamp/live.m3u8" -segment_list_flags +live -segment_time $SEGMENT_DURATION -segment_format \
       mpegts -ar $STREAM_RATE -ac 2 -acodec aac "/tmp/$NODE_NAME/hls/$timestamp/live%03d.ts

the -ac 2 part should be replaced with -ac $CHANNELS and then some tests should be run to ensure that the streamed audio sounds ok (single channel .ts segments play as stereo) and that we're being efficient with S3 storage (i.e. FLAC file has only one channel).

@scottveirs scottveirs added the bug label Nov 24, 2021
@scottveirs scottveirs self-assigned this Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant