HTTP Live Streaming supports .ts format, if a streaming source is audio-only source and it is packed in .ts segment and the m3u8 file doesn't contain CODECS attribute. So, how can I know if this stream is audio-only or audio-video source?
Thanks
You can use a tool like MediaInfo or ffprobe to determine if the segment contains a video and/or audio stream.
Note that if you use Apple's mediafilesegmenter tool (with the -a option) to create an audio-only stream it generates .aac files, so if it is a .ts file then it probably does contain both video and audio.
Related
I declared the pathname of my mp3 audio file in my code as var pathname: String = "/..../file.mp3" (It's saved correctly, I can listen to it).
Can I convert that file to an Opus audio file? Thank you very much
I don't know about that specific error, but the Supported Media Formats page says Opus is only supported in Android 5.0+, and then only in the matroska container.
Make sure you're testing on newer Android, and you may need to demux manually to feed raw packets to the decoder.
If you need Opus support everywhere you can include the C library in your app and call it directly over JNI.
We're trying to upload playable audio files from PowerApps mic to SharePoint Online list.
I have used the following line:
Patch(sharepointlistname, ForAll(Gallery1.AllItems,{Title:Title, VoiceMessage:Audio});
The above returns the following results:
(from Android and iPhone, .aac and .caf links (respectively) to SharePoint List):
data/bb788abd-7848-449f-810b-2bd6368dcb19.aac
or
temp/recording_8BA1187E-158A-469E-9994-F644C6F619D8-1610-000001A0FBF5F1F0.caf
It seems impossible to convert these .aac and .caf to .wav or any playable file.
Can someone guide me on this, or maybe let me know where the actual audio files are being saved to from powerapps? The .aac or .caf links are most likely references to a specific location on a local database that is created by PowerApps. Unfortunately, I have not found any information.
aac files and caf files are audio files. They are not just your regular and familiar wav or mp3 files.
Both formats can be played by Quicktime.
You can find a list of all the programs that can play those formats here:
http://extension.nirsoft.net/caf
http://extension.nirsoft.net/aac
I have a requirement where I need to extract ID3 tags from a MPEG2 TS(HLS STREAM). MPEG2 has a limited support in android in regards to playing the file. But my concern is to extract the ID3 tags(playing the file is not necessary). Hence I am not concerned with the codecs(encoding and decoding).
I have explored the following options:
libstagefright and OpenMax : A playback engine implemented by Google from Android 2.0.
It has a MediaExtractor is responsible for retrieving track data and the corresponding meta data from the underlying file system or http stream. But according to this post Adding video codec to Android I need to build my own firmware or my own media player.I am hoping I don't have to go down that path. More info on stagefright and openMax can be found here:
An overview of Stagefright player
Android’s Stagefright Media Player Architecture
Custom Wrapper Codec Integration into Android
How to integrate a decoder to multimedia framework
Compiling and using FFMPEG: A complete, cross-platform solution to record, convert and stream audio and video. We can demultiplex ts files with this library as mentioned here:
FFmpeg - Extracting video and audio from transport stream file (.ts).
But I am not sure if I will be able to extract the ID3 tags from the HLS Stream. libavformat might be able to do this but I still need to come up with a mechanism for signaling the read metadata to my application.
Compiling vlc for android: I have compiled vlc for android and made some modifications inside the transport module in demux component for extracting the tags, but it is not able to play all the streams that I am supplying to it.
After looking through these options , I am still at a fix in how to achieve this. I don't want to create a media player as I will not be playing the files nor do I want to build my own firmware. Using ffmpeg seems to be the most viable option, but I want to try this without using any third-party or open source library. My questions are:
Is it even possible to create a demultiplexer from scratch that will work on android?
If possible then ,how to go about it ?
Any options that I have missed?
I am new to this. Any help would be greatly appreciated..Thanks
In android, there is a support to extract ID3 tags. Please refer to ID3 module for further details.
Integration of ID3 into MP3 extractor can be found here.
From a quick check, I have found that ID3 is supported from Froyo onwards.
I am pretty new at streaming video, so please bear with me. :)
I am trying to port an m3u8 stream over from iPhone to Android. Looking in the m3u8 feed, I found some .ts files. From what I can tell, .ts files are, themselves, wrappers that contain the video stream (Elementary Stream).
Is it possible to play a .ts file in Android? (The docs only list 3gp and mp4 as supported formats.)
Is there a way to extract the Elementary Stream and just process the video feed? If that is in 3gp or mp4, I should be ok.
Will Stagefright handle .ts? Is Stagefright even available? I read that there are/were some problems with it.
(As a further caveat, I am not getting much help from my server guys. They are pushing for a Flash player solution, including a proprietary player. They will not provide me with a 3gp or an mp4 feed, but I'm hoping I can find that in the .ts file.)
I'm open to other suggestions. Thanks for your patience with this newbie. :)
There is a standard for that called HTTP Live Streaming. Android 3.0 supports this protocol to some extent which means you can pass the URL of the m3u8 playlist to the MediaPlayer and the player should be able to stream it over HTTP. Stagefright is bundled with Android 3.0.
You can browse its source code here.
Also, this thread might interest you: it summarizes support for HTTP Live Streaming.
Android stagefright in Gingerbread and prior versions does not support playback of .ts (transport stream) or elementary stream. As you have rightly pointed out, it only supports MP4/3GP/MP3 file formats.
You can play .ts video file in android by using NDK based project. Dolphine player is best open source player for android and also supports various formats of video.
You got the .ts link from m3u file. Now you can fetch binary data from .ts file and store this binary data in file, then play this file by using video player.
I want to play the flv files in Android. So what I thought is to convert the flv file to mp4 or 3gp(for which there is a decoder in Android). OpenCore can be used to convert. I have looked into opencore code, there is a class in opencore "/android/external/opencore/fileformats/mp4/composer" to create the mp4 file. It has apis like
AddTrack
AddSampleToTrack
I should give the input as frames, but in Flv I will get the Sorenson Video and Mp3 audio frame(after doing some trivial string operations to remove the headers). Can I use these directly as input to above apis or is there any good way to convert flv to mp4? And also I have looked into "/android/external/opencore/nodes/pvmp4ffcomposernode" but it reads from ports not able to know how to send input to this class.
Let me know your thoughts.
I have solved using ffmpeg.
I have ported ffmpeg and libfaac to Android. It works great.