flackbash / AudioAnchor

Android audio player that tracks the listening progress of your audio books and podcasts
GNU General Public License v3.0
223 stars 42 forks source link

App becomes unresponsive when trying to play certain mp3 podcasts #75

Open MarcelRobitaille opened 4 years ago

MarcelRobitaille commented 4 years ago

I can play .m4a files fine and I can even play certain .mp3 files, but not others.

Here are the podcasts which don't work: https://feeds.fireside.fm/selfhosted/rss https://destinationlinux.org/feed/mp3 https://tuxdigital.com/feed/thisweekinlinux-mp3

Steps to reproduce:

  1. Download an mp3 file from one of those feeds
  2. Add the folder to AudioAnchor
  3. Open the mp3 file
  4. Click play
  5. App is unresponsive then Android reports "AudioAnchor isn't responding" giving the options "Close app" and "Wait"

I am using LineageOS 17 on a Pocophone F1. AudiAnchor 2.2 from F-Droid.

flackbash commented 4 years ago

Thanks for reporting this, I'll look into it.

flackbash commented 4 years ago

I downloaded a podcast from one of the feeds and it was working fine. Can you give me a concrete example of an episode that is not working? And are the files playable with other players?

MarcelRobitaille commented 4 years ago

This one for example does not play: https://aphid.fireside.fm/d/1437767933/7296e34a-2697-479a-adfb-ad32329dd0b0/b5816c05-29ff-4f3c-a1d7-7a038ca76c89.mp3

Yes, I can play the files no problem with the VLC app / Music app.

flackbash commented 4 years ago

I can't reproduce this on my device. Can you give me also an example of a mp3 file that works? Maybe that way I can figure out what the problem is.

MarcelRobitaille commented 4 years ago

Sorry for the delay; I haven't had a lot of time for podcasts recently.

Does not work: https://media.fireside.fm/file/fireside-audio/podcasts/audio/7/7296e34a-2697-479a-adfb-ad32329dd0b0/episodes/6/6f0b82dc-1251-422b-9b70-b4ec62c5e6dc/6f0b82dc-1251-422b-9b70-b4ec62c5e6dc.mp3

Works: https://www.monstercat.com/podcast/306/COTW306.mp3

MarcelRobitaille commented 3 years ago

If I remove the video "cover art" with ffmpeg -i input.mp3 -vn -acodec copy output.mp3, it plays just fine.

Here is some information about the file (ffmpeg -i input.mp3):

ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-shared --enable-version3
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mp3, from 'input.mp3':
  Metadata:
    encoder         : LAME 64bits version 3.100 (http://lame.sf.net)
    track           : 33
    TLEN            : 2637503
    comment         : Alex puts the fantastic-looking, ARM-powered NAS known as the Helios64 to the test.
    album           : Self-Hosted
    genre           : Podcast
    copyright       : 2020 Jupiter Broadcasting
    encoded_by      : Jupiter Broadcasting
    TGID            : http://selfhosted.show/33
    title           : Self-Hosted 33: Helios64 Review
    publisher       : Jupiter Broadcasting
    artist          : Jupiter Broadcasting
    TOPE            : Jupiter Broadcasting
    date            : 2020
  Duration: 00:43:57.53, start: 0.025056, bitrate: 96 kb/s
    Chapter #0:0: start 21.000000, end 81.000000
    Metadata:
      title           : Multi-OS Men
    Chapter #0:1: start 81.000000, end 96.000000
    Metadata:
      title           : SPONSOR: A Cloud Guru
    Chapter #0:2: start 96.000000, end 340.000000
    Metadata:
      title           : Helios64
    Chapter #0:3: start 340.000000, end 509.000000
    Metadata:
      title           : Helios64: Build Quality
    Chapter #0:4: start 509.000000, end 606.000000
    Metadata:
      title           : Helios64: OS Installation
    Chapter #0:5: start 606.000000, end 706.000000
    Metadata:
      title           : Helios64: Fan Noise
    Chapter #0:6: start 706.000000, end 853.000000
    Metadata:
      title           : Helio64: ZFS
    Chapter #0:7: start 853.000000, end 1198.000000
    Metadata:
      title           : Helios64: Major Hardware Limitations
    Chapter #0:8: start 1198.000000, end 1657.000000
    Metadata:
      title           : Helios64: Performance and Comparison
    Chapter #0:9: start 1657.000000, end 1765.000000
    Metadata:
      title           : SPONSOR: Linode
    Chapter #0:10: start 1765.000000, end 1882.000000
    Metadata:
      title           : Feedback: Audio Books as Podcasts
    Chapter #0:11: start 1882.000000, end 1960.000000
    Metadata:
      title           : Feedback: Scripts and Cron Jobs for Audio Books
    Chapter #0:12: start 1960.000000, end 2032.000000
    Metadata:
      title           : Feedback: PhotoSync
    Chapter #0:13: start 2032.000000, end 2308.000000
    Metadata:
      title           : Feedback: Getting Started
    Chapter #0:14: start 2308.000000, end 2414.000000
    Metadata:
      title           : Feedback: Workaround for OpenHAB Users
    Chapter #0:15: start 2414.000000, end 2501.000000
    Metadata:
      title           : Home Assistant Conference
    Chapter #0:16: start 2501.000000, end 2547.000000
    Metadata:
      title           : SPONSOR: A Cloud Guru
    Chapter #0:17: start 2547.000000, end 2616.000000
    Metadata:
      title           : SPONSOR: Self-Hosted SREs
    Chapter #0:18: start 2616.000000, end 2637.000000
    Metadata:
      title           : Outro
    Stream #0:0: Audio: mp3, 44100 Hz, mono, fltp, 96 kb/s
    Metadata:
      encoder         : LAME3.100
    Side data:
      replaygain: track gain - -5.300000, track peak - unknown, album gain - unknown, album peak - unknown,
    Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 3000x3000 [SAR 59:59 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      title           : image
      comment         : Other
At least one output file must be specified
MarcelRobitaille commented 3 years ago

Actually, it seems that the problem is that the filename had a :. For example: episode number: episode name.mp3. Sorry for that bit of confirmation bias.

flackbash commented 3 years ago

Thanks for the info!

Ok, Lineage OS per default uses ext4 as file system, right? So certain characters that are forbidden in filenames for other Android distributions are valid characters in Lineage OS. Some component of the player service of AudioAnchor, my first guess would be the Android MediaPlayer setDataSource() method, has a problem with these characters appearing in filenames.

I'll try to fix this or at least output a proper error message so that users know what the problem is.

MarcelRobitaille commented 3 years ago

I appreciate that. It's really not a problem for me now that I know not to put fancy characters in the filename.