tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

pipe:159: Bad file descriptor #626

Closed kazemihabib closed 3 years ago

kazemihabib commented 3 years ago

Description I'm trying to extract subtitles from Videos. It works without problem when I use file protocol but When I use https://github.com/tanersener/mobile-ffmpeg/wiki/Storage-Access-Framework approach for some videos I get this error I/mobile-ffmpeg: size= 1kB time=00:01:19.16 bitrate= 0.1kbits/s speed= 155x
I/mobile-ffmpeg: size= 2kB time=00:02:32.02 bitrate= 0.1kbits/s speed= 146x E/mobile-ffmpeg: pipe:159: Bad file descriptor I/mobile-ffmpeg: size= 2kB time=00:02:37.19 bitrate= 0.1kbits/s speed= 140x I/mobile-ffmpeg: video:0kB audio:0kB subtitle:1kB other streams:0kB global headers:0kB I/mobile-ffmpeg: 95.775864%

it ends a successful return code but the generate subtitle file is empty or just has the first few lines.

Expected behavior Using "pipe:%d" should work like "file://" Current behavior For some video "pipe:%d" returns the error pipe:%d: Bad file descriptor

Logs I/mobile-ffmpeg: size= 1kB time=00:01:19.16 bitrate= 0.1kbits/s speed= 155x
I/mobile-ffmpeg: size= 2kB time=00:02:32.02 bitrate= 0.1kbits/s speed= 146x E/mobile-ffmpeg: pipe:159: Bad file descriptor I/mobile-ffmpeg: size= 2kB time=00:02:37.19 bitrate= 0.1kbits/s speed= 140x I/mobile-ffmpeg: video:0kB audio:0kB subtitle:1kB other streams:0kB global headers:0kB I/mobile-ffmpeg: 95.775864%

Environment

alexcohn commented 3 years ago

pipe protocol does not resolve the problems of SAF. You can either wait for the next release or build from sources and get native support of scoped storage.

kazemihabib commented 3 years ago

@alexcohn Thankyou