[Android] Playback failed of local file #130

Closed
opened 2026-04-24 23:09:00 +02:00 by adam · 5 comments
Owner

Originally created by @jmt-gh on GitHub (May 10, 2022).

Steps to reproduce

  1. Add m4b file to audiobookshelf library
  2. Download book for local playback in the Android app
  3. Attempt to play the file

OR

  1. Add m4b file to local folder on phone
  2. Attempt to play the file

Expected behaviour

  • The file would play

Actual behaviour

  • An error message shows up, and the file fails to play
    image

Environment data

Audiobookshelf Version:
Server: latest (image id e2860cb8cd4e)
App: v0.9.44-beta (app-dev-patch3.apk) | Also tried latest production build from the play store

  • Android App?
  • iOS App?

Android Issue

Android version: 11

Device model: OnePlus 6

Stock or customized system: Stock

iOS Issue

iOS Version:

iPhone model:

Originally created by @jmt-gh on GitHub (May 10, 2022). ### Steps to reproduce 1. Add m4b file to audiobookshelf library 2. Download book for local playback in the Android app 3. Attempt to play the file OR 1. Add m4b file to local folder on phone 3. Attempt to play the file ### Expected behaviour - The file would play ### Actual behaviour - An error message shows up, and the file fails to play ![image](https://user-images.githubusercontent.com/13617455/167663371-aa1f5ca1-bb48-433e-a21a-3a95a6b74019.png) ### Environment data Audiobookshelf Version: Server: latest (image id e2860cb8cd4e) App: v0.9.44-beta (app-dev-patch3.apk) | Also tried latest production build from the play store - [x] Android App? - [ ] iOS App? #### Android Issue Android version: 11 Device model: OnePlus 6 Stock or customized system: Stock #### iOS Issue iOS Version: iPhone model:
adam added the bug label 2026-04-24 23:09:00 +02:00
adam closed this issue 2026-04-24 23:09:00 +02:00
Author
Owner

@jmt-gh commented on GitHub (May 10, 2022):

Additional Notes

  • The downloaded file plays appropriately in other apps on my phone, such as YouTube Music, Smart AudioBook, and Listen Audiobook Player
  • If I place the file directly on my phone from my server, it still fails

The command I used to convert my single mp3 file + metadata to m4b:

#!/bin/bash
# $1 input mp3
# $2 metadata txt
# $3 cover jpg
# $4 output m4b
ffmpeg \
    -i "$1" \
    -i "$2" \
    -f image2pipe \
    -i "$3" -y -loglevel error -map 0:a -acodec aac -ac 2 -b:a 64k -movflags use_metadata_tags -map_metadata 1 -vf [2:v]crop=trunc'(iw/2)*2':trunc'(ih/2)*2' -map 2:v \
    -f mp4 "$4"

exifTool output of the file from my server:

exiftool The\ Dutch\ House.m4b 
ExifTool Version Number         : 12.16
File Name                       : The Dutch House.m4b
Directory                       : .
File Size                       : 290 MiB
File Modification Date/Time     : 2022:05:09 22:45:36-07:00
File Access Date/Time           : 2022:05:10 08:04:05-07:00
File Inode Change Date/Time     : 2022:05:09 22:45:36-07:00
File Permissions                : rwxrwxrwx
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4  Base Media v1 [IS0 14496-12:2003]
Minor Version                   : 0.2.0
Compatible Brands               : isom, iso2, avc1, mp41
Media Data Size                 : 297641572
Media Data Offset               : 48
Movie Header Version            : 0
Create Date                     : 0000:00:00 00:00:00
Modify Date                     : 0000:00:00 00:00:00
Time Scale                      : 1000
Duration                        : 9:53:06
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 0000:00:00 00:00:00
Track Modify Date               : 0000:00:00 00:00:00
Track ID                        : 1
Track Duration                  : 0.04 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 510
Image Height                    : 680
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 510
Source Image Height             : 680
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Pixel Aspect Ratio              : 1:1
Buffer Size                     : 0
Max Bitrate                     : 6766000
Average Bitrate                 : 6766000
Video Frame Rate                : 25
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 0000:00:00 00:00:00
Media Modify Date               : 0000:00:00 00:00:00
Media Time Scale                : 44100
Media Duration                  : 9:53:06
Media Language Code             : und
Handler Description             : SoundHandler
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 44100
Handler Type                    : Metadata Tags
Title                           : The Dutch House
Artist                          : Ann Patchett
Album Artist                    : Ann Patchett
Date Time Original              : 
Description                     : Finalist for the Pulitzer Prize New York Times Bestseller | A Read with Jenna Today Show Book Club Pick | A New York Times Book Review Notable Book | TIME Magazine's 100 Must-Read Books of 2019 Named one of the Best Books of the Year by NPR, The Washington Post; O: The Oprah Magazine, Real Simple, Good Housekeeping, Vogue, Refinery29, and Buzzfeed Ann Patchett, the #1 New York Times bestselling author of Commonwealth, delivers her most powerful novel to date: a richly moving story that explores the indelible bond between two siblings, the house of their childhood, and a past that will not let them go. The Dutch House is the story of a paradise lost, a tour de force that digs deeply into questions of inheritance, love and forgiveness, of how we want to see ourselves and of who we really are. At the end of the Second World War, Cyril Conroy combines luck and a single canny investment to begin an enormous real estate empire, propelling his family from poverty to enormous wealth. His first order of business is to buy the Dutch House, a lavish estate in the suburbs outside of Philadelphia. Meant as a surprise for his wife, the house sets in motion the undoing of everyone he loves. The story is told by Cyril’s son Danny, as he and his older sister, the brilliantly acerbic and self-assured Maeve, are exiled from the house where they grew up by their stepmother. The two wealthy siblings are thrown back into the poverty their parents had escaped from and find that all they have to count on is one another. It is this unshakeable bond between them that both saves their lives and thwarts their futures. Set over the course of five decades, The Dutch House is a dark fairy tale about two smart people who cannot overcome their past. Despite every outward sign of success, Danny and Maeve are only truly comfortable when they’re together. Throughout their lives they return to the well-worn story of what they’ve lost with humor and rage. But when at last they’re forced to confront the people who left them behind, the relationship between an indulged brother and his ever-protective sister is finally tested.
Genre                           : 
Performer                       : 
Encoded By                      : audiobookshelf:2.0.12
ISBN                            : 9780062963697
Subtitle                        : A Novel
Track                           : 1
Encoder                         : Lavf58.76.100
Image Size                      : 510x680
Megapixels                      : 0.347
Avg Bitrate                     : 66.9 kbps
Rotation                        : 0

exiftool output of the file on my phone:

exiftool The\ Dutch\ House.m4b
ExifTool Version Number         : 12.16
File Name                       : The Dutch House.m4b
Directory                       : .
File Size                       : 290 MiB
File Modification Date/Time     : 2022:05:10 08:06:32-07:00
File Access Date/Time           : 2022:05:10 08:06:32-07:00
File Inode Change Date/Time     : 2022:05:10 08:06:32-07:00
File Permissions                : rw-------
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4  Base Media v1 [IS0 14496-12:2003]
Minor Version                   : 0.2.0
Compatible Brands               : isom, iso2, avc1, mp41
Media Data Size                 : 297641572
Media Data Offset               : 48
Movie Header Version            : 0
Create Date                     : 0000:00:00 00:00:00
Modify Date                     : 0000:00:00 00:00:00
Time Scale                      : 1000
Duration                        : 9:53:06
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 0000:00:00 00:00:00
Track Modify Date               : 0000:00:00 00:00:00
Track ID                        : 1
Track Duration                  : 0.04 s
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 510
Image Height                    : 680
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 510
Source Image Height             : 680
X Resolution                    : 72
Y Resolution                    : 72
Bit Depth                       : 24
Pixel Aspect Ratio              : 1:1
Buffer Size                     : 0
Max Bitrate                     : 6766000
Average Bitrate                 : 6766000
Video Frame Rate                : 25
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 0000:00:00 00:00:00
Media Modify Date               : 0000:00:00 00:00:00
Media Time Scale                : 44100
Media Duration                  : 9:53:06
Media Language Code             : und
Handler Description             : SoundHandler
Balance                         : 0
Audio Format                    : mp4a
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 44100
Handler Type                    : Metadata Tags
Title                           : The Dutch House
Artist                          : Ann Patchett
Album Artist                    : Ann Patchett
Date Time Original              : 
Description                     : Finalist for the Pulitzer Prize New York Times Bestseller | A Read with Jenna Today Show Book Club Pick | A New York Times Book Review Notable Book | TIME Magazine's 100 Must-Read Books of 2019 Named one of the Best Books of the Year by NPR, The Washington Post; O: The Oprah Magazine, Real Simple, Good Housekeeping, Vogue, Refinery29, and Buzzfeed Ann Patchett, the #1 New York Times bestselling author of Commonwealth, delivers her most powerful novel to date: a richly moving story that explores the indelible bond between two siblings, the house of their childhood, and a past that will not let them go. The Dutch House is the story of a paradise lost, a tour de force that digs deeply into questions of inheritance, love and forgiveness, of how we want to see ourselves and of who we really are. At the end of the Second World War, Cyril Conroy combines luck and a single canny investment to begin an enormous real estate empire, propelling his family from poverty to enormous wealth. His first order of business is to buy the Dutch House, a lavish estate in the suburbs outside of Philadelphia. Meant as a surprise for his wife, the house sets in motion the undoing of everyone he loves. The story is told by Cyril’s son Danny, as he and his older sister, the brilliantly acerbic and self-assured Maeve, are exiled from the house where they grew up by their stepmother. The two wealthy siblings are thrown back into the poverty their parents had escaped from and find that all they have to count on is one another. It is this unshakeable bond between them that both saves their lives and thwarts their futures. Set over the course of five decades, The Dutch House is a dark fairy tale about two smart people who cannot overcome their past. Despite every outward sign of success, Danny and Maeve are only truly comfortable when they’re together. Throughout their lives they return to the well-worn story of what they’ve lost with humor and rage. But when at last they’re forced to confront the people who left them behind, the relationship between an indulged brother and his ever-protective sister is finally tested.
Genre                           : 
Performer                       : 
Encoded By                      : audiobookshelf:2.0.12
ISBN                            : 9780062963697
Subtitle                        : A Novel
Track                           : 1
Encoder                         : Lavf58.76.100
Image Size                      : 510x680
Megapixels                      : 0.347
Avg Bitrate                     : 66.9 kbps
Rotation                        : 0
@jmt-gh commented on GitHub (May 10, 2022): **Additional Notes** - The downloaded file **plays appropriately** in other apps on my phone, such as YouTube Music, Smart AudioBook, and Listen Audiobook Player - If I place the file directly on my phone from my server, **it still fails** The command I used to convert my single mp3 file + metadata to m4b: ``` #!/bin/bash # $1 input mp3 # $2 metadata txt # $3 cover jpg # $4 output m4b ffmpeg \ -i "$1" \ -i "$2" \ -f image2pipe \ -i "$3" -y -loglevel error -map 0:a -acodec aac -ac 2 -b:a 64k -movflags use_metadata_tags -map_metadata 1 -vf [2:v]crop=trunc'(iw/2)*2':trunc'(ih/2)*2' -map 2:v \ -f mp4 "$4" ``` exifTool output of the file from my server: ``` exiftool The\ Dutch\ House.m4b ExifTool Version Number : 12.16 File Name : The Dutch House.m4b Directory : . File Size : 290 MiB File Modification Date/Time : 2022:05:09 22:45:36-07:00 File Access Date/Time : 2022:05:10 08:04:05-07:00 File Inode Change Date/Time : 2022:05:09 22:45:36-07:00 File Permissions : rwxrwxrwx File Type : MP4 File Type Extension : mp4 MIME Type : video/mp4 Major Brand : MP4 Base Media v1 [IS0 14496-12:2003] Minor Version : 0.2.0 Compatible Brands : isom, iso2, avc1, mp41 Media Data Size : 297641572 Media Data Offset : 48 Movie Header Version : 0 Create Date : 0000:00:00 00:00:00 Modify Date : 0000:00:00 00:00:00 Time Scale : 1000 Duration : 9:53:06 Preferred Rate : 1 Preferred Volume : 100.00% Preview Time : 0 s Preview Duration : 0 s Poster Time : 0 s Selection Time : 0 s Selection Duration : 0 s Current Time : 0 s Next Track ID : 3 Track Header Version : 0 Track Create Date : 0000:00:00 00:00:00 Track Modify Date : 0000:00:00 00:00:00 Track ID : 1 Track Duration : 0.04 s Track Layer : 0 Track Volume : 0.00% Image Width : 510 Image Height : 680 Graphics Mode : srcCopy Op Color : 0 0 0 Compressor ID : avc1 Source Image Width : 510 Source Image Height : 680 X Resolution : 72 Y Resolution : 72 Bit Depth : 24 Pixel Aspect Ratio : 1:1 Buffer Size : 0 Max Bitrate : 6766000 Average Bitrate : 6766000 Video Frame Rate : 25 Matrix Structure : 1 0 0 0 1 0 0 0 1 Media Header Version : 0 Media Create Date : 0000:00:00 00:00:00 Media Modify Date : 0000:00:00 00:00:00 Media Time Scale : 44100 Media Duration : 9:53:06 Media Language Code : und Handler Description : SoundHandler Balance : 0 Audio Format : mp4a Audio Channels : 2 Audio Bits Per Sample : 16 Audio Sample Rate : 44100 Handler Type : Metadata Tags Title : The Dutch House Artist : Ann Patchett Album Artist : Ann Patchett Date Time Original : Description : Finalist for the Pulitzer Prize New York Times Bestseller | A Read with Jenna Today Show Book Club Pick | A New York Times Book Review Notable Book | TIME Magazine's 100 Must-Read Books of 2019 Named one of the Best Books of the Year by NPR, The Washington Post; O: The Oprah Magazine, Real Simple, Good Housekeeping, Vogue, Refinery29, and Buzzfeed Ann Patchett, the #1 New York Times bestselling author of Commonwealth, delivers her most powerful novel to date: a richly moving story that explores the indelible bond between two siblings, the house of their childhood, and a past that will not let them go. The Dutch House is the story of a paradise lost, a tour de force that digs deeply into questions of inheritance, love and forgiveness, of how we want to see ourselves and of who we really are. At the end of the Second World War, Cyril Conroy combines luck and a single canny investment to begin an enormous real estate empire, propelling his family from poverty to enormous wealth. His first order of business is to buy the Dutch House, a lavish estate in the suburbs outside of Philadelphia. Meant as a surprise for his wife, the house sets in motion the undoing of everyone he loves. The story is told by Cyril’s son Danny, as he and his older sister, the brilliantly acerbic and self-assured Maeve, are exiled from the house where they grew up by their stepmother. The two wealthy siblings are thrown back into the poverty their parents had escaped from and find that all they have to count on is one another. It is this unshakeable bond between them that both saves their lives and thwarts their futures. Set over the course of five decades, The Dutch House is a dark fairy tale about two smart people who cannot overcome their past. Despite every outward sign of success, Danny and Maeve are only truly comfortable when they’re together. Throughout their lives they return to the well-worn story of what they’ve lost with humor and rage. But when at last they’re forced to confront the people who left them behind, the relationship between an indulged brother and his ever-protective sister is finally tested. Genre : Performer : Encoded By : audiobookshelf:2.0.12 ISBN : 9780062963697 Subtitle : A Novel Track : 1 Encoder : Lavf58.76.100 Image Size : 510x680 Megapixels : 0.347 Avg Bitrate : 66.9 kbps Rotation : 0 ``` exiftool output of the file on my phone: ``` exiftool The\ Dutch\ House.m4b ExifTool Version Number : 12.16 File Name : The Dutch House.m4b Directory : . File Size : 290 MiB File Modification Date/Time : 2022:05:10 08:06:32-07:00 File Access Date/Time : 2022:05:10 08:06:32-07:00 File Inode Change Date/Time : 2022:05:10 08:06:32-07:00 File Permissions : rw------- File Type : MP4 File Type Extension : mp4 MIME Type : video/mp4 Major Brand : MP4 Base Media v1 [IS0 14496-12:2003] Minor Version : 0.2.0 Compatible Brands : isom, iso2, avc1, mp41 Media Data Size : 297641572 Media Data Offset : 48 Movie Header Version : 0 Create Date : 0000:00:00 00:00:00 Modify Date : 0000:00:00 00:00:00 Time Scale : 1000 Duration : 9:53:06 Preferred Rate : 1 Preferred Volume : 100.00% Preview Time : 0 s Preview Duration : 0 s Poster Time : 0 s Selection Time : 0 s Selection Duration : 0 s Current Time : 0 s Next Track ID : 3 Track Header Version : 0 Track Create Date : 0000:00:00 00:00:00 Track Modify Date : 0000:00:00 00:00:00 Track ID : 1 Track Duration : 0.04 s Track Layer : 0 Track Volume : 0.00% Image Width : 510 Image Height : 680 Graphics Mode : srcCopy Op Color : 0 0 0 Compressor ID : avc1 Source Image Width : 510 Source Image Height : 680 X Resolution : 72 Y Resolution : 72 Bit Depth : 24 Pixel Aspect Ratio : 1:1 Buffer Size : 0 Max Bitrate : 6766000 Average Bitrate : 6766000 Video Frame Rate : 25 Matrix Structure : 1 0 0 0 1 0 0 0 1 Media Header Version : 0 Media Create Date : 0000:00:00 00:00:00 Media Modify Date : 0000:00:00 00:00:00 Media Time Scale : 44100 Media Duration : 9:53:06 Media Language Code : und Handler Description : SoundHandler Balance : 0 Audio Format : mp4a Audio Channels : 2 Audio Bits Per Sample : 16 Audio Sample Rate : 44100 Handler Type : Metadata Tags Title : The Dutch House Artist : Ann Patchett Album Artist : Ann Patchett Date Time Original : Description : Finalist for the Pulitzer Prize New York Times Bestseller | A Read with Jenna Today Show Book Club Pick | A New York Times Book Review Notable Book | TIME Magazine's 100 Must-Read Books of 2019 Named one of the Best Books of the Year by NPR, The Washington Post; O: The Oprah Magazine, Real Simple, Good Housekeeping, Vogue, Refinery29, and Buzzfeed Ann Patchett, the #1 New York Times bestselling author of Commonwealth, delivers her most powerful novel to date: a richly moving story that explores the indelible bond between two siblings, the house of their childhood, and a past that will not let them go. The Dutch House is the story of a paradise lost, a tour de force that digs deeply into questions of inheritance, love and forgiveness, of how we want to see ourselves and of who we really are. At the end of the Second World War, Cyril Conroy combines luck and a single canny investment to begin an enormous real estate empire, propelling his family from poverty to enormous wealth. His first order of business is to buy the Dutch House, a lavish estate in the suburbs outside of Philadelphia. Meant as a surprise for his wife, the house sets in motion the undoing of everyone he loves. The story is told by Cyril’s son Danny, as he and his older sister, the brilliantly acerbic and self-assured Maeve, are exiled from the house where they grew up by their stepmother. The two wealthy siblings are thrown back into the poverty their parents had escaped from and find that all they have to count on is one another. It is this unshakeable bond between them that both saves their lives and thwarts their futures. Set over the course of five decades, The Dutch House is a dark fairy tale about two smart people who cannot overcome their past. Despite every outward sign of success, Danny and Maeve are only truly comfortable when they’re together. Throughout their lives they return to the well-worn story of what they’ve lost with humor and rage. But when at last they’re forced to confront the people who left them behind, the relationship between an indulged brother and his ever-protective sister is finally tested. Genre : Performer : Encoded By : audiobookshelf:2.0.12 ISBN : 9780062963697 Subtitle : A Novel Track : 1 Encoder : Lavf58.76.100 Image Size : 510x680 Megapixels : 0.347 Avg Bitrate : 66.9 kbps Rotation : 0 ```
Author
Owner

@advplyr commented on GitHub (May 13, 2022):

Are you able to play any other audio files you converted to m4b?
Do you have any other m4b's that you didn't transcode yourself that are playable?

@advplyr commented on GitHub (May 13, 2022): Are you able to play any other audio files you converted to m4b? Do you have any other m4b's that you didn't transcode yourself that are playable?
Author
Owner

@jmt-gh commented on GitHub (Jun 4, 2022):

Ah. Yeah, I grabbed a librevox m4b and it seems to work just fine. Do you have any thoughts as to what might be wrong? The ffmpeg command I used is actually one I yoinked from the logs when audiobookshelf was doing a mp3->m4b conversion (the local machine is a bit beefier than the server hosting audiobookshelf -- I figured I could speed it up by running it locally)

@jmt-gh commented on GitHub (Jun 4, 2022): Ah. Yeah, I grabbed a librevox m4b and it seems to work just fine. Do you have any thoughts as to what might be wrong? The ffmpeg command I used is actually one I yoinked from the logs when audiobookshelf was doing a mp3->m4b conversion (the local machine is a bit beefier than the server hosting audiobookshelf -- I figured I could speed it up by running it locally)
Author
Owner

@advplyr commented on GitHub (Jun 4, 2022):

I can only think it was corrupted somehow, but I have no idea.

@advplyr commented on GitHub (Jun 4, 2022): I can only think it was corrupted somehow, but I have no idea.
Author
Owner

@advplyr commented on GitHub (Jun 25, 2022):

Was this ever resolved? I'm not sure how to reproduce this one and I think we discussed it in discord.

@advplyr commented on GitHub (Jun 25, 2022): Was this ever resolved? I'm not sure how to reproduce this one and I think we discussed it in discord.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#130