Radio Radio: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


== Compressing the shit out of audio files ==
== Compressing the shit out of audio files ==
[[File:Specto-of-input.png|thumb|High res input flac]]


Using a combination of sox and ffmpeg, i was able to get the following step-by-step result, all towards lowering the filesize of the input audio.
Using a combination of sox and ffmpeg, i was able to get the following step-by-step result, all towards lowering the filesize of the input audio.
Line 19: Line 22:
ffmpeg -i 5_output_dynamic-range.wav -c:a libopus -b:a 16k output.opus
ffmpeg -i 5_output_dynamic-range.wav -c:a libopus -b:a 16k output.opus
</syntaxhighlight>
</syntaxhighlight>
What about setting and re-setting the sample rate 117 times?
{{audio|mp3=https://pzwiki.wdka.nl/mw-mediadesign/images/7/7a/Between_117.mp3}}
Protocol for compression
<syntaxhighlight>
ffmpeg -i input.flac -b:a 64k between_02.mp3
sox between_02.mp3 -r 320000 between_03.mp3
sox between_03.mp3 -r 8000 between_04.mp3
sox between_04.mp3 -r 320000 between_05.mp3
sox between_05.mp3 -r 8000 between_06.mp3
sox between_06.mp3 -r 320000 between_07.mp3
sox between_07.mp3 -r 8000 between_08.mp3
sox between_08.mp3 -r 320000 between_09.mp3
sox between_09.mp3 -r 8000 between_10.mp3
sox between_10.mp3 -r 320000 between_11.mp3
sox between_11.mp3 -r 8000 between_12.mp3
sox between_12.mp3 -r 320000 between_13.mp3
sox between_13.mp3 -r 8000 between_14.mp3
sox between_14.mp3 -r 320000 between_15.mp3
sox between_15.mp3 -r 8000 between_16.mp3
sox between_16.mp3 -r 320000 between_17.mp3
sox between_17.mp3 -r 8000 between_18.mp3
sox between_18.mp3 -r 320000 between_19.mp3
sox between_19.mp3 -r 8000 between_20.mp3
sox between_20.mp3 -r 320000 between_21.mp3
sox between_21.mp3 -r 8000 between_22.mp3
sox between_22.mp3 -r 320000 between_23.mp3
sox between_23.mp3 -r 8000 between_24.mp3
sox between_24.mp3 -r 320000 between_25.mp3
sox between_25.mp3 -r 8000 between_26.mp3
sox between_26.mp3 -r 320000 between_27.mp3
sox between_27.mp3 -r 8000 between_28.mp3
sox between_28.mp3 -r 320000 between_29.mp3
sox between_29.mp3 -r 8000 between_30.mp3
sox between_30.mp3 -r 320000 between_31.mp3
sox between_31.mp3 -r 8000 between_32.mp3
sox between_32.mp3 -r 320000 between_33.mp3
sox between_33.mp3 -r 8000 between_34.mp3
sox between_34.mp3 -r 320000 between_35.mp3
sox between_35.mp3 -r 8000 between_36.mp3
sox between_36.mp3 -r 320000 between_37.mp3
sox between_37.mp3 -r 8000 between_38.mp3
sox between_38.mp3 -r 320000 between_39.mp3
sox between_39.mp3 -r 8000 between_40.mp3
sox between_40.mp3 -r 320000 between_41.mp3
sox between_41.mp3 -r 8000 between_42.mp3
sox between_42.mp3 -r 320000 between_43.mp3
sox between_43.mp3 -r 8000 between_44.mp3
sox between_44.mp3 -r 320000 between_45.mp3
sox between_45.mp3 -r 8000 between_46.mp3
sox between_46.mp3 -r 320000 between_47.mp3
sox between_47.mp3 -r 8000 between_48.mp3
sox between_48.mp3 -r 320000 between_49.mp3
sox between_49.mp3 -r 8000 between_50.mp3
sox between_50.mp3 -r 320000 between_51.mp3
sox between_51.mp3 -r 8000 between_52.mp3
sox between_52.mp3 -r 320000 between_53.mp3
sox between_53.mp3 -r 8000 between_54.mp3
sox between_54.mp3 -r 320000 between_55.mp3
sox between_55.mp3 -r 8000 between_56.mp3
sox between_56.mp3 -r 320000 between_57.mp3
sox between_57.mp3 -r 8000 between_58.mp3
sox between_58.mp3 -r 320000 between_59.mp3
sox between_59.mp3 -r 8000 between_60.mp3
sox between_60.mp3 -r 320000 between_61.mp3
sox between_61.mp3 -r 8000 between_62.mp3
sox between_62.mp3 -r 320000 between_63.mp3
sox between_63.mp3 -r 8000 between_64.mp3
sox between_64.mp3 -r 320000 between_65.mp3
sox between_65.mp3 -r 8000 between_66.mp3
sox between_66.mp3 -r 320000 between_67.mp3
sox between_67.mp3 -r 8000 between_68.mp3
sox between_68.mp3 -r 320000 between_69.mp3
sox between_69.mp3 -r 8000 between_70.mp3
sox between_70.mp3 -r 320000 between_71.mp3
sox between_71.mp3 -r 8000 between_72.mp3
sox between_72.mp3 -r 320000 between_73.mp3
sox between_73.mp3 -r 8000 between_74.mp3
sox between_74.mp3 -r 320000 between_75.mp3
sox between_75.mp3 -r 8000 between_76.mp3
sox between_76.mp3 -r 320000 between_77.mp3
sox between_77.mp3 -r 8000 between_78.mp3
sox between_78.mp3 -r 320000 between_79.mp3
sox between_79.mp3 -r 8000 between_80.mp3
sox between_80.mp3 -r 320000 between_81.mp3
sox between_81.mp3 -r 8000 between_82.mp3
sox between_82.mp3 -r 320000 between_83.mp3
sox between_83.mp3 -r 8000 between_84.mp3
sox between_84.mp3 -r 320000 between_85.mp3
sox between_85.mp3 -r 8000 between_86.mp3
sox between_86.mp3 -r 320000 between_87.mp3
sox between_87.mp3 -r 8000 between_88.mp3
sox between_88.mp3 -r 320000 between_89.mp3
sox between_89.mp3 -r 8000 between_90.mp3
sox between_90.mp3 -r 320000 between_91.mp3
sox between_91.mp3 -r 8000 between_92.mp3
sox between_92.mp3 -r 320000 between_93.mp3
sox between_93.mp3 -r 8000 between_94.mp3
sox between_94.mp3 -r 320000 between_95.mp3
sox between_95.mp3 -r 8000 between_96.mp3
sox between_96.mp3 -r 320000 between_97.mp3
sox between_97.mp3 -r 8000 between_98.mp3
sox between_98.mp3 -r 320000 between_99.mp3
sox between_99.mp3 -r 8000 between_100.mp3
sox between_100.mp3 -r 320000 between_101.mp3
sox between_101.mp3 -r 8000 between_102.mp3
sox between_102.mp3 -r 320000 between_103.mp3
sox between_103.mp3 -r 8000 between_104.mp3
sox between_104.mp3 -r 320000 between_105.mp3
sox between_105.mp3 -r 8000 between_106.mp3
sox between_106.mp3 -r 320000 between_107.mp3
sox between_107.mp3 -r 8000 between_108.mp3
sox between_108.mp3 -r 320000 between_109.mp3
sox between_109.mp3 -r 8000 between_110.mp3
sox between_110.mp3 -r 320000 between_111.mp3
sox between_111.mp3 -r 8000 between_112.mp3
sox between_112.mp3 -r 320000 between_113.mp3
sox between_113.mp3 -r 8000 between_114.mp3
sox between_114.mp3 -r 320000 between_115.mp3
sox between_115.mp3 -r 8000 between_116.mp3
sox between_116.mp3 -r 320000 between_117.mp3
</syntaxhighlight>
Then trough the previous compression syntax and an addtional denoise
[[File:Denoise mp3.mp3.png|thumb|Output after some compression and denoise]]
<syntaxhighlight>
ffmpeg -i output.mp3 -af "afftdn=nr=10:nf=-30:tn=1" denoise_mp3.mp3
</syntaxhighlight>
Results in 217KB of mp3! a reduction of 99.16%!
{{audio|mp3=https://pzwiki.wdka.nl/mw-mediadesign/images/6/61/Denoise_mp3.mp3}}




== Creating a private radio stream ==
== Creating a private radio stream ==
- using [https://icecast.org/ icecast] and darkIce
- using [https://icecast.org/ icecast] and darkIce

Latest revision as of 22:42, 26 October 2023

Documentation of creating the radio radio

Compressing the shit out of audio files

High res input flac


Using a combination of sox and ffmpeg, i was able to get the following step-by-step result, all towards lowering the filesize of the input audio. Mediawiki limits the use of .wav, .opus and .ogg, so slightly altered results. But using wav's, i got to the following From 25.3MB Flac to 1.7MB .mp3 and 369KB Opus!



Protocol for compression

ffmpeg -i input.flac -b:a 8k 1_output_lowest_bitrate.wav
sox 1_output_lowest_bitrate.wav -c 1 2_output_mono.wav
sox 2_output_mono.wav -r 8000 3_output_lowest_sample_rate.wav
sox 3_output_lowest_sample_rate.wav -b 8 4_output_lowest_bit_depth.wav
sox -v 0.02 4_output_lowest_bit_depth.wav -G 5_output_dynamic-range.wav compand 0.1,0.3 -60,-60,-30,-15,-20,-12,-4,-8,-2,-7 -2
ffmpeg -i 5_output_dynamic-range.wav -c:a libvorbis output.ogg
ffmpeg -i 5_output_dynamic-range.wav -b:a 192k output.mp3
ffmpeg -i 5_output_dynamic-range.wav -c:a libopus -b:a 16k output.opus

What about setting and re-setting the sample rate 117 times?



Protocol for compression

ffmpeg -i input.flac -b:a 64k between_02.mp3
sox between_02.mp3 -r 320000 between_03.mp3
sox between_03.mp3 -r 8000 between_04.mp3
sox between_04.mp3 -r 320000 between_05.mp3
sox between_05.mp3 -r 8000 between_06.mp3
sox between_06.mp3 -r 320000 between_07.mp3
sox between_07.mp3 -r 8000 between_08.mp3
sox between_08.mp3 -r 320000 between_09.mp3
sox between_09.mp3 -r 8000 between_10.mp3
sox between_10.mp3 -r 320000 between_11.mp3
sox between_11.mp3 -r 8000 between_12.mp3
sox between_12.mp3 -r 320000 between_13.mp3
sox between_13.mp3 -r 8000 between_14.mp3
sox between_14.mp3 -r 320000 between_15.mp3
sox between_15.mp3 -r 8000 between_16.mp3
sox between_16.mp3 -r 320000 between_17.mp3
sox between_17.mp3 -r 8000 between_18.mp3
sox between_18.mp3 -r 320000 between_19.mp3
sox between_19.mp3 -r 8000 between_20.mp3
sox between_20.mp3 -r 320000 between_21.mp3
sox between_21.mp3 -r 8000 between_22.mp3
sox between_22.mp3 -r 320000 between_23.mp3
sox between_23.mp3 -r 8000 between_24.mp3
sox between_24.mp3 -r 320000 between_25.mp3
sox between_25.mp3 -r 8000 between_26.mp3
sox between_26.mp3 -r 320000 between_27.mp3
sox between_27.mp3 -r 8000 between_28.mp3
sox between_28.mp3 -r 320000 between_29.mp3
sox between_29.mp3 -r 8000 between_30.mp3
sox between_30.mp3 -r 320000 between_31.mp3
sox between_31.mp3 -r 8000 between_32.mp3
sox between_32.mp3 -r 320000 between_33.mp3
sox between_33.mp3 -r 8000 between_34.mp3
sox between_34.mp3 -r 320000 between_35.mp3
sox between_35.mp3 -r 8000 between_36.mp3
sox between_36.mp3 -r 320000 between_37.mp3
sox between_37.mp3 -r 8000 between_38.mp3
sox between_38.mp3 -r 320000 between_39.mp3
sox between_39.mp3 -r 8000 between_40.mp3
sox between_40.mp3 -r 320000 between_41.mp3
sox between_41.mp3 -r 8000 between_42.mp3
sox between_42.mp3 -r 320000 between_43.mp3
sox between_43.mp3 -r 8000 between_44.mp3
sox between_44.mp3 -r 320000 between_45.mp3
sox between_45.mp3 -r 8000 between_46.mp3
sox between_46.mp3 -r 320000 between_47.mp3
sox between_47.mp3 -r 8000 between_48.mp3
sox between_48.mp3 -r 320000 between_49.mp3
sox between_49.mp3 -r 8000 between_50.mp3
sox between_50.mp3 -r 320000 between_51.mp3
sox between_51.mp3 -r 8000 between_52.mp3
sox between_52.mp3 -r 320000 between_53.mp3
sox between_53.mp3 -r 8000 between_54.mp3
sox between_54.mp3 -r 320000 between_55.mp3
sox between_55.mp3 -r 8000 between_56.mp3
sox between_56.mp3 -r 320000 between_57.mp3
sox between_57.mp3 -r 8000 between_58.mp3
sox between_58.mp3 -r 320000 between_59.mp3
sox between_59.mp3 -r 8000 between_60.mp3
sox between_60.mp3 -r 320000 between_61.mp3
sox between_61.mp3 -r 8000 between_62.mp3
sox between_62.mp3 -r 320000 between_63.mp3
sox between_63.mp3 -r 8000 between_64.mp3
sox between_64.mp3 -r 320000 between_65.mp3
sox between_65.mp3 -r 8000 between_66.mp3
sox between_66.mp3 -r 320000 between_67.mp3
sox between_67.mp3 -r 8000 between_68.mp3
sox between_68.mp3 -r 320000 between_69.mp3
sox between_69.mp3 -r 8000 between_70.mp3
sox between_70.mp3 -r 320000 between_71.mp3
sox between_71.mp3 -r 8000 between_72.mp3
sox between_72.mp3 -r 320000 between_73.mp3
sox between_73.mp3 -r 8000 between_74.mp3
sox between_74.mp3 -r 320000 between_75.mp3
sox between_75.mp3 -r 8000 between_76.mp3
sox between_76.mp3 -r 320000 between_77.mp3
sox between_77.mp3 -r 8000 between_78.mp3
sox between_78.mp3 -r 320000 between_79.mp3
sox between_79.mp3 -r 8000 between_80.mp3
sox between_80.mp3 -r 320000 between_81.mp3
sox between_81.mp3 -r 8000 between_82.mp3
sox between_82.mp3 -r 320000 between_83.mp3
sox between_83.mp3 -r 8000 between_84.mp3
sox between_84.mp3 -r 320000 between_85.mp3
sox between_85.mp3 -r 8000 between_86.mp3
sox between_86.mp3 -r 320000 between_87.mp3
sox between_87.mp3 -r 8000 between_88.mp3
sox between_88.mp3 -r 320000 between_89.mp3
sox between_89.mp3 -r 8000 between_90.mp3
sox between_90.mp3 -r 320000 between_91.mp3
sox between_91.mp3 -r 8000 between_92.mp3
sox between_92.mp3 -r 320000 between_93.mp3
sox between_93.mp3 -r 8000 between_94.mp3
sox between_94.mp3 -r 320000 between_95.mp3
sox between_95.mp3 -r 8000 between_96.mp3
sox between_96.mp3 -r 320000 between_97.mp3
sox between_97.mp3 -r 8000 between_98.mp3
sox between_98.mp3 -r 320000 between_99.mp3
sox between_99.mp3 -r 8000 between_100.mp3
sox between_100.mp3 -r 320000 between_101.mp3
sox between_101.mp3 -r 8000 between_102.mp3
sox between_102.mp3 -r 320000 between_103.mp3
sox between_103.mp3 -r 8000 between_104.mp3
sox between_104.mp3 -r 320000 between_105.mp3
sox between_105.mp3 -r 8000 between_106.mp3
sox between_106.mp3 -r 320000 between_107.mp3
sox between_107.mp3 -r 8000 between_108.mp3
sox between_108.mp3 -r 320000 between_109.mp3
sox between_109.mp3 -r 8000 between_110.mp3
sox between_110.mp3 -r 320000 between_111.mp3
sox between_111.mp3 -r 8000 between_112.mp3
sox between_112.mp3 -r 320000 between_113.mp3
sox between_113.mp3 -r 8000 between_114.mp3
sox between_114.mp3 -r 320000 between_115.mp3
sox between_115.mp3 -r 8000 between_116.mp3
sox between_116.mp3 -r 320000 between_117.mp3

Then trough the previous compression syntax and an addtional denoise

Output after some compression and denoise
ffmpeg -i output.mp3 -af "afftdn=nr=10:nf=-30:tn=1" denoise_mp3.mp3

Results in 217KB of mp3! a reduction of 99.16%!




Creating a private radio stream

- using icecast and darkIce