Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. How to broadcast audio 3gp format over wifi converting audio file in udp packets?

How to broadcast audio 3gp format over wifi converting audio file in udp packets?

Scheduled Pinned Locked Moved Android
comtutorialquestionloungeworkspace
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11111352
    wrote on last edited by
    #1

    I have to record a live audio/vedio and convert it into udp packets and broadcast it over wifi but not working after recording. This is my code public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); init(); random = new Random(); startAudioButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(checkPermission()) { audioSavePathInDevice = Environment.getExternalStorageDirectory().getAbsoluteFile() + "/" + createRandomFile(5) + "Recording.3gp"; mediaRecorderReady(); try { mediaRecorder.prepare(); mediaRecorder.start(); startListener(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } startAudioButton.setEnabled(false); stopAudioButton.setEnabled(true); Toast.makeText(getApplicationContext(), "Recording Started ", Toast.LENGTH_SHORT).show(); }else{ requestPermission(); } } }); stopAudioButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(),"Recording Completed",Toast.LENGTH_SHORT).show(); mediaRecorder.stop(); stopAudioButton.setEnabled(false); buttonPlayLastRecordAudio.setEnabled(true); stopAudioButton.setEnabled(true); buttonStopPlayingRecording.setEnabled(false); Toast.makeText(getApplicationContext(),"Recording Completed",Toast.LENGTH_SHORT).show(); } }); buttonPlayLastRecordAudio.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) throws IllegalArgumentException, SecurityException, IllegalStateException { try{ star

    L 2 Replies Last reply
    0
    • U User 11111352

      I have to record a live audio/vedio and convert it into udp packets and broadcast it over wifi but not working after recording. This is my code public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); init(); random = new Random(); startAudioButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(checkPermission()) { audioSavePathInDevice = Environment.getExternalStorageDirectory().getAbsoluteFile() + "/" + createRandomFile(5) + "Recording.3gp"; mediaRecorderReady(); try { mediaRecorder.prepare(); mediaRecorder.start(); startListener(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } startAudioButton.setEnabled(false); stopAudioButton.setEnabled(true); Toast.makeText(getApplicationContext(), "Recording Started ", Toast.LENGTH_SHORT).show(); }else{ requestPermission(); } } }); stopAudioButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(),"Recording Completed",Toast.LENGTH_SHORT).show(); mediaRecorder.stop(); stopAudioButton.setEnabled(false); buttonPlayLastRecordAudio.setEnabled(true); stopAudioButton.setEnabled(true); buttonStopPlayingRecording.setEnabled(false); Toast.makeText(getApplicationContext(),"Recording Completed",Toast.LENGTH_SHORT).show(); } }); buttonPlayLastRecordAudio.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) throws IllegalArgumentException, SecurityException, IllegalStateException { try{ star

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      What does "not working" mean? Please format your code properly (and remove any lines not related to the problem), and give some useful details as to the actual problem.

      1 Reply Last reply
      0
      • U User 11111352

        I have to record a live audio/vedio and convert it into udp packets and broadcast it over wifi but not working after recording. This is my code public class MainActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); init(); random = new Random(); startAudioButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(checkPermission()) { audioSavePathInDevice = Environment.getExternalStorageDirectory().getAbsoluteFile() + "/" + createRandomFile(5) + "Recording.3gp"; mediaRecorderReady(); try { mediaRecorder.prepare(); mediaRecorder.start(); startListener(); } catch (IllegalStateException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } startAudioButton.setEnabled(false); stopAudioButton.setEnabled(true); Toast.makeText(getApplicationContext(), "Recording Started ", Toast.LENGTH_SHORT).show(); }else{ requestPermission(); } } }); stopAudioButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getApplicationContext(),"Recording Completed",Toast.LENGTH_SHORT).show(); mediaRecorder.stop(); stopAudioButton.setEnabled(false); buttonPlayLastRecordAudio.setEnabled(true); stopAudioButton.setEnabled(true); buttonStopPlayingRecording.setEnabled(false); Toast.makeText(getApplicationContext(),"Recording Completed",Toast.LENGTH_SHORT).show(); } }); buttonPlayLastRecordAudio.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) throws IllegalArgumentException, SecurityException, IllegalStateException { try{ star

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Configure, publish, and play a live stream using MPEG-TS-based encoders with Wowza Streaming Engine. ... Property to fix TS packet alignment in UDP packets ... If you're receiving a multicast stream, change the 0.0.0.0 part of the URL to the ... Admin password file (format [username][space][password]) ...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups