how to record audio from a URL (podcast, radio, stream) into file without using mic. Flutter plugin Just Audio

187

You can simply do this by reading audio stream as bytes then write these bytes to a file.

First import dio repo to handle reading audio stream as Stream of bytes.

Check Dio Package

then add this class to your project .. copy it from my gist

Record Class

and simply use it by

Start recording:

Record.start('stream url);

Stop recording:

Record.stop();
Share:
187
eternal dating
Author by

eternal dating

Updated on December 01, 2022

Comments

  • eternal dating
    eternal dating over 1 year

    I have a radio app where I play radio from URL using just audio in flutter (by using seturl() method and then play() method). I want to record audio using stream or some sort of other way than using microphone (which is already done and working). Thanks.

    And I need to save file as mp3.

    I wonder maybe there is a stream which I can listen to get streaming audio as uint8list to save in file. Or any other way then recording with microphone.

  • eternal dating
    eternal dating about 2 years
    it working! Thanks alot!