Prepare the videos by converting them with ffmpeg
ffmpeg -i 'some input file.mp4' -target [pal-dvd or ntsc-dvd] output.mpg
<?php | |
/* | |
Plugin Name: Remove bit.ly links | |
Description: Plugin to remove all bit.ly links from post content, keeping the anchor text. | |
Version: 1.0 | |
Author: Matthias Kretschmann | |
Author URI: http://mkretschmann.com | |
*/ | |
// Filter the_content |
videoName = (DocumentFile.fromSingleUri(applicationContext, videoUri)?.name ?: "").split('.')[0] | |
If we have the following structure in our application:
And we fill our index.php
with the following content just to get a basic website with a form working. You should be able to run this through a php-server of your choice.
/* MediaDecoder | |
Author: Andrew Stubbs (based on some examples from the docs) | |
This class opens a file, reads the first audio channel it finds, and returns raw audio data. | |
Usage: | |
MediaDecoder decoder = new MediaDecoder("myfile.m4a"); | |
short[] data; | |
while ((data = decoder.readShortData()) != null) { |
GlobalScope.launch { | |
viewModel.saveDataToDatabase(requireActivity(), account) | |
GlobalScope.launch(Dispatchers.Main) { | |
Toast.makeText(requireActivity(), "Data Inserted successfully", Toast.LENGTH_LONG).show() | |
} | |
} |
public void selectImage() { | |
Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); | |
pickIntent.setType("image/*"); | |
startActivityForResult(pickIntent, 411); | |
} | |
@Override | |
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | |
super.onActivityResult(requestCode, resultCode, data); |
FOr eample to choose or aelect only bmp files, use | |
Intent i = new Intent(Intent.ACTION_OPEN_DOCUMENT); | |
i.addCategory(Intent.CATEGORY_OPENABLE); | |
i.setType("image/x-ms-bmp"); | |
startActivityForResult(i, 411); |
import android.annotation.SuppressLint; | |
import android.media.MediaCodec; | |
import android.media.MediaExtractor; | |
import android.media.MediaFormat; | |
import android.media.MediaMetadataRetriever; | |
import android.media.MediaMuxer; | |
import android.util.Log; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; |