Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to convert TS files to MP3 using Exoplayer ? #6142

Closed
satyres opened this issue Jul 8, 2019 · 7 comments
Closed

Is it possible to convert TS files to MP3 using Exoplayer ? #6142

satyres opened this issue Jul 8, 2019 · 7 comments
Assignees
Labels

Comments

@satyres
Copy link

satyres commented Jul 8, 2019

Hi
i've been looking for a solution to play local TS files but it seems not possible.
is there a way to convert an Audio TS file to MP3 using Exoplayer or any external library ?
Regards

@ojw28
Copy link
Contributor

ojw28 commented Jul 8, 2019

  • ExoPlayer doesn't support transcoding from one format to another.
  • ExoPlayer does support playback of TS files, although it's also necessary for the contained sample formats to be supported. Please see the supported formats page for more information.

@ojw28 ojw28 self-assigned this Jul 8, 2019
@ojw28 ojw28 removed the needs triage label Jul 8, 2019
@satyres
Copy link
Author

satyres commented Jul 8, 2019

Thanks so much for your answer @ojw28
i have a TS file and i've tried to make play using Exoplayer but it doesn't work
but it works on VLC.
is there any way FLAG or something i need to do to make it work ?
this is the logcat :

com.google.android.exoplayer2.source.UnrecognizedInputFormatException: Input does not start with the #EXTM3U header.
at com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:185)
at com.google.android.exoplayer2.source.hls.playlist.HlsPlaylistParser.parse(HlsPlaylistParser.java:53)
at com.google.android.exoplayer2.offline.FilteringManifestParser.parse(FilteringManifestParser.java:41)
at com.google.android.exoplayer2.offline.FilteringManifestParser.parse(FilteringManifestParser.java:25)
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:158)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Regards

@ojw28
Copy link
Contributor

ojw28 commented Jul 8, 2019

You need to use ProgressiveMediaSource to play a TS stream, not HlsMediaSource. Please note that you can simply add your TS stream to the demo app as per these instructions, and then take a look at the code to see how it's done.

@ojw28 ojw28 closed this as completed Jul 8, 2019
@satyres
Copy link
Author

satyres commented Jul 8, 2019

Thanks @ojw28 .
it's not an online stream ,it's local file that i want to play using Exoplayer.
do i need to use ProgressiveMediaSource ?
Regards

@ojw28
Copy link
Contributor

ojw28 commented Jul 8, 2019

Yes

@satyres
Copy link
Author

satyres commented Jul 8, 2019

Excellent i' ve been able to play it using the 2.9.6 using ExtractorMediaSource
and it's working but i cannot jump from time to time and the total play time showing 00:00
but it's working fine
do i need to upgrade to 2.10.2 ?
Any way thanks so much.
Regards

@ojw28
Copy link
Contributor

ojw28 commented Jul 9, 2019

You should try 2.10.2. If it's still not working, you should track #5097 for further improvements.

@google google locked and limited conversation to collaborators Oct 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants