How to broadcast audio 3gp format over wifi converting audio file in udp packets?
-
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
-
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
-
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
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]) ...