Mp3 file not showing in any application after the mp3 file is saved . After 15 odd minutes it is automatically shown . if i manually change the name from file manager it will be instantly shown . How to solve this problem .
Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
String[] projection = {
MediaStore.Audio.Media.TITLE,
MediaStore.Audio.Media.DATA,
MediaStore.Audio.Media.DISPLAY_NAME,
MediaStore.Audio.Media.DURATION,
MediaStore.Audio.Media.ALBUM_ID
};
String sortOrder = MediaStore.Audio.Media.DISPLAY_NAME
Cursor c = getContentResolver().query(uri,projection,null,null,sortOrder);
if(c.moveToFirst())
{
do {
String title = c.getString(c.getColumnIndex(MediaStore.Audio.Media.TITLE));
String data = c.getString(c.getColumnIndex(MediaStore.Audio.Media.DATA));
String name = c.getString(c.getColumnIndex(MediaStore.Audio.Media.DISPLAY_NAME));
String duration = c.getString(c.getColumnIndex(MediaStore.Audio.Media.DURATION));
String albumid= c.getString(c.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID));
Songs song = new Songs(title,data,name,duration,albumid);
songs.add(song);
title1.add(name);
}while (c.moveToNext());
}
Output file path:
Environment.getExternalStorageDirectory()+ "/Trim"+".mp3";
This is my command:
"-y","-ss", start,"-i", input_path,"-t", end,"-metadata","title=Trim","-acodec", "copy","-preset", "ultrafast",output_path