JunkFood02 / Seal

🦭 Video/Audio Downloader for Android, based on yt-dlp, designed with Material You
GNU General Public License v3.0
11.85k stars 515 forks source link

[Bug] Splitting OPUS audio from video by chapters #1099

Closed hunkyburrito closed 1 month ago

hunkyburrito commented 1 year ago

Checklist

Describe the bug

I was trying to split a youtube video by chapters and only wanted the audio but if I select OPUS format the download fails. Using either m4a or webm formats works as expected.

To Reproduce

  1. Find youtube video with chapters
  2. Download OPUS audio format
  3. Attempt to split download by chapters
  4. Fail task

Error reports

Error Report ``` App version: 1.10.0 (11000) Device information: Android 12 (API 31) Supported ABIs: [arm64-v8a, armeabi-v7a, armeabi] Yt-dlp version: 2023.07.06 URL: https://piped.adminforge.de/watch?v=ruystidIISc [debug] Command-line config: ['--no-mtime', '-v', '--no-playlist', '--downloader', 'libaria2c.so', '--external-downloader-args', 'aria2c:"--summary-interval=1"', '-x', '--embed-metadata', '--embed-thumbnail', '--convert-thumbnails', 'jpg', '--parse-metadata', '%(release_year,upload_date)s:%(meta_date)s', '--parse-metadata', '%(album,title)s:%(meta_album)s', '-P', '/storage/emulated/0/Download/Seal/Audio', '-P', 'temp:/data/user/0/com.junkfood.seal/cache/tmp', '-o', '%(title).200B [%(id)s]/%(title).200B.%(ext)s', '-o', 'chapter:%(title).200B [%(id)s]/%(section_number)d - %(section_title).200B.%(ext)s', '--split-chapters', '--no-cache-dir', '--ffmpeg-location', '/data/app/~~EustcF70lh8SAtu4RIbUTw==/com.junkfood.seal-lVVdaWsVxP2LzpWQZhhGTg==/lib/arm64/libffmpeg.so', 'https://piped.adminforge.de/watch?v=ruystidIISc'] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI) [debug] yt-dlp version stable@2023.07.06 [b532a3481] (zip) [debug] Python 3.8.0 (CPython aarch64 64bit) - Linux-4.14.190-25741239-abG973U1UEU9IWH2-aarch64-with-libc (OpenSSL 1.1.1t 7 Feb 2023, libc) [debug] exe versions: ffmpeg 5.1 (setts), ffprobe 5.1 [debug] Optional libraries: Cryptodome-3.17, mutagen-1.46.0, sqlite3-2.6.0 [debug] Proxy map: {} [debug] Loaded 1855 extractors [debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto [debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id [debug] Searching for '(?P.+)' in '%(release_year,upload_date)s' [debug] Searching for '(?P.+)' in '%(album,title)s' [debug] ffmpeg command line: '/data/app/~~EustcF70lh8SAtu4RIbUTw==/com.junkfood.seal-lVVdaWsVxP2LzpWQZhhGTg==/lib/arm64/libffmpeg.so' -y -loglevel repeat+info -f image2 -pattern_type none -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.webp' -update 1 -bsf:v mjpeg2jpeg -movflags +faststart 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.jpg' [debug] Invoking aria2c downloader on "https://rr4---sn-q4flrnlz.googlevideo.com/videoplayback?expire=1695367254&ei=9usMZYeBOcyulu8PoaGfCA&ip=37.19.221.147&id=o-AEqBzCH4A4UaHRNJ5BVycLOp6__060tSF1wC520TnO1q&itag=251&source=youtube&requiressl=yes&mh=1v&mm=31%2C29&mn=sn-q4flrnlz%2Csn-q4fl6nds&ms=au%2Crdu&mv=m&mvi=4&pl=25&initcwndbps=983750&spc=UWF9fzN3IWj4O6vU9qsQ1RaggLW0A3A&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=42144675&dur=2469.861&lmt=1694902719435914&mt=1695345451&fvip=1&keepalive=yes&fexp=24007246&beids=24350017&c=ANDROID&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAPICwfaKhZgMsQi_tpTel-v4YnbwWr31LjigyqPqOyh8AiEAp82FHpmDKVwBLkTHHStIjUEKVEC6YLGitMin2Aw5fbQ%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIkIb21GzB-nTvbxz0gJ9SJsCW6hrJtZthhyzRmuK_vDAiEA9JtUiu0wOvVPB1uvBGNWoWWHDGPJf_vzN-15unnBhX8%3D" [debug] libaria2c.so command line: libaria2c.so -c --no-conf --console-log-level=warn --summary-interval=0 --download-result=hide --http-accept-gzip=true --file-allocation=none -x16 -j16 -s16 --min-split-size 1M --header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-us,en;q=0.5' --header 'Sec-Fetch-Mode: navigate' --check-certificate=true --remote-time=false --show-console-readout=true --summary-interval=1 --dir '/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/' --out './Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.webm.part' --auto-file-renaming=false -- 'https://rr4---sn-q4flrnlz.googlevideo.com/videoplayback?expire=1695367254&ei=9usMZYeBOcyulu8PoaGfCA&ip=37.19.221.147&id=o-AEqBzCH4A4UaHRNJ5BVycLOp6__060tSF1wC520TnO1q&itag=251&source=youtube&requiressl=yes&mh=1v&mm=31%2C29&mn=sn-q4flrnlz%2Csn-q4fl6nds&ms=au%2Crdu&mv=m&mvi=4&pl=25&initcwndbps=983750&spc=UWF9fzN3IWj4O6vU9qsQ1RaggLW0A3A&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=42144675&dur=2469.861&lmt=1694902719435914&mt=1695345451&fvip=1&keepalive=yes&fexp=24007246&beids=24350017&c=ANDROID&txp=5532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAPICwfaKhZgMsQi_tpTel-v4YnbwWr31LjigyqPqOyh8AiEAp82FHpmDKVwBLkTHHStIjUEKVEC6YLGitMin2Aw5fbQ%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAIkIb21GzB-nTvbxz0gJ9SJsCW6hrJtZthhyzRmuK_vDAiEA9JtUiu0wOvVPB1uvBGNWoWWHDGPJf_vzN-15unnBhX8%3D' [debug] ffmpeg command line: '/data/app/~~EustcF70lh8SAtu4RIbUTw==/com.junkfood.seal-lVVdaWsVxP2LzpWQZhhGTg==/lib/arm64/libffprobe.so' -show_streams 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.webm' [debug] ffmpeg command line: '/data/app/~~EustcF70lh8SAtu4RIbUTw==/com.junkfood.seal-lVVdaWsVxP2LzpWQZhhGTg==/lib/arm64/libffmpeg.so' -y -loglevel repeat+info -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.webm' -vn -acodec copy -movflags +faststart 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.opus' [debug] ffmpeg command line: '/data/app/~~EustcF70lh8SAtu4RIbUTw==/com.junkfood.seal-lVVdaWsVxP2LzpWQZhhGTg==/lib/arm64/libffmpeg.so' -y -loglevel repeat+info -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.opus' -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.meta' -map 0 -dn -ignore_unknown -c copy -map_metadata 1 -write_id3v1 1 -metadata 'title=Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To' -metadata date=20230913 -metadata 'description=Vibe while you tithe. Show them what it means to be Hive with a few songs of your own and enjoy these tracks while you help Eris Morn grow her newfound powers through battling Xivu Arath'"'"'s brood throughout Season of the Witch. Wise acolytes will know that they can right click on this video and press "loop" to have it play infinitely. 🔮 https://bung.ie/witch 0:00 - Necropolis (Remix) 2:17 - Frigid Tomb (Remix) 5:31 - Discipline (Remix) 7:40 - Whisper of the Worm 10:39 - Athanasia 13:32 - Deconstruction 15:15 - Odyssey IX 17:01 - The Awoken 20:46 - Excerpt from The Hope 23:05 - The Tower 24:24 - Penumbra 27:44 - View from Orbit 30:05 - Desolation 33:15 - Arcadia 36:31 - New Monarchy (Abridged) 38:40 - Sanctuary' -metadata 'synopsis=Vibe while you tithe. Show them what it means to be Hive with a few songs of your own and enjoy these tracks while you help Eris Morn grow her newfound powers through battling Xivu Arath'"'"'s brood throughout Season of the Witch. Wise acolytes will know that they can right click on this video and press "loop" to have it play infinitely. 🔮 https://bung.ie/witch 0:00 - Necropolis (Remix) 2:17 - Frigid Tomb (Remix) 5:31 - Discipline (Remix) 7:40 - Whisper of the Worm 10:39 - Athanasia 13:32 - Deconstruction 15:15 - Odyssey IX 17:01 - The Awoken 20:46 - Excerpt from The Hope 23:05 - The Tower 24:24 - Penumbra 27:44 - View from Orbit 30:05 - Desolation 33:15 - Arcadia 36:31 - New Monarchy (Abridged) 38:40 - Sanctuary' -metadata 'purl=https://www.youtube.com/watch?v=ruystidIISc' -metadata 'comment=https://www.youtube.com/watch?v=ruystidIISc' -metadata 'artist=Destiny 2' -metadata 'album=Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To' -movflags +faststart 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.temp.opus' [debug] ffmpeg command line: '/data/app/~~EustcF70lh8SAtu4RIbUTw==/com.junkfood.seal-lVVdaWsVxP2LzpWQZhhGTg==/lib/arm64/libffmpeg.so' -y -loglevel repeat+info -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.jpg' [debug] ffmpeg command line: '/data/app/~~EustcF70lh8SAtu4RIbUTw==/com.junkfood.seal-lVVdaWsVxP2LzpWQZhhGTg==/lib/arm64/libffmpeg.so' -y -loglevel repeat+info -ss 0.0 -t 137.0 -i 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.opus' -map 0 -dn -ignore_unknown -c copy -movflags +faststart 'file:/storage/emulated/0/Download/Seal/Audio/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/1 - Necropolis (Remix).opus' [debug] ffmpeg version 5.1 Copyright (c) 2000-2022 the FFmpeg developers built with Android (8490178, based on r450784d) clang version 14.0.6 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6) configuration: --prefix=/home/runner/work/build-ffmpeg/build-ffmpeg/build/ffmpeg/arm64-v8a --enable-cross-compile --target-os=android --arch=aarch64 --sysroot=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/sysroot --cc=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --cxx=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++ --ld=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --ar=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar --as=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --nm=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm --ranlib=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib --strip=/usr/local/lib/android/sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --extra-cflags='-O3 -fPIC -I/home/runner/work/build-ffmpeg/build-ffmpeg/build/external/arm64-v8a/include' --extra-ldflags='-L/home/runner/work/build-ffmpeg/build-ffmpeg/build/external/arm64-v8a/lib -lm -lm -lm -lm -lz' --enable-shared --disable-static --disable-vulkan --pkg-config=/usr/bin/pkg-config --enable-protocol=https --enable-version3 --enable-gpl --enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-libtwolame --enable-libspeex --enable-libvpx --enable-libwebp --enable-libfreetype --enable-libfribidi --enable-mbedtls --enable-libbluray --enable-libx264 libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 [ogg @ 0xb40000793127b650] 42613 bytes of comment header remain Input #0, ogg, from 'file:/data/user/0/com.junkfood.seal/cache/tmp/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To [ruystidIISc]/Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To.opus': Duration: 00:41:09.86, start: 0.000000, bitrate: 135 kb/s Chapters: Chapter #0:0: start 0.000000, end 137.000000 Metadata: title : Necropolis (Remix) Chapter #0:1: start 137.000000, end 331.000000 Metadata: title : Frigid Tomb (Remix) Chapter #0:2: start 331.000000, end 460.000000 Metadata: title : Discipline (Remix) Chapter #0:3: start 460.000000, end 639.000000 Metadata: title : Whisper of the Worm Chapter #0:4: start 639.000000, end 812.000000 Metadata: title : Athanasia Chapter #0:5: start 812.000000, end 915.000000 Metadata: title : Deconstruction Chapter #0:6: start 915.000000, end 1021.000000 Metadata: title : Odyssey IX Chapter #0:7: start 1021.000000, end 1246.000000 Metadata: title : The Awoken Chapter #0:8: start 1246.000000, end 1385.000000 Metadata: title : Excerpt from The Hope Chapter #0:9: start 1385.000000, end 1464.000000 Metadata: title : The Tower Chapter #0:10: start 1464.000000, end 1664.000000 Metadata: title : Penumbra Chapter #0:11: start 1664.000000, end 1805.000000 Metadata: title : View from Orbit Chapter #0:12: start 1805.000000, end 1995.000000 Metadata: title : Desolation Chapter #0:13: start 1995.000000, end 2191.000000 Metadata: title : Arcadia Chapter #0:14: start 2191.000000, end 2320.000000 Metadata: title : New Monarchy (Abridged) Chapter #0:15: start 2320.000000, end 2469.860000 Metadata: title : Sanctuary Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp Metadata: encoder : Lavf59.27.100 title : Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To date : 20230913 purl : https://www.youtube.com/watch?v=ruystidIISc synopsis : Vibe while you tithe. Show them what it means to be Hive with a few songs of your own and enjoy these tracks while you help Eris Morn grow her newfound powers through battling Xivu Arath's brood throughout Season of the Witch. Wise acolytes will know that : : 🔮 https://bung.ie/witch : : 0:00 - Necropolis (Remix) : 2:17 - Frigid Tomb (Remix) : 5:31 - Discipline (Remix) : 7:40 - Whisper of the Worm : 10:39 - Athanasia : 13:32 - Deconstruction : 15:15 - Odyssey IX : 17:01 - The Awoken : 20:46 - Excerpt from The Hope : 23:05 - The Tower : 24:24 - Penumbra : 27:44 - View from Orbit : 30:05 - Desolation : 33:15 - Arcadia : 36:31 - New Monarchy (Abridged) : 38:40 - Sanctuary comment : https://www.youtube.com/watch?v=ruystidIISc artist : Destiny 2 album : Destiny 2: Season of the Witch | Lo-Fi Beats to Tithe To Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1280x720, 90k tbr, 90k tbn (attached pic) Metadata: comment : Cover (front) [opus @ 0xb40000793127b970] Unsupported codec id in stream 1 Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:1 -- Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) ERROR: Postprocessing: Stream #0:1 -> #0:1 (copy) Traceback (most recent call last): File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3439, in process_info replace_info_dict(self.post_process(dl_filename, info_dict, files_to_move)) File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3621, in post_process info = self.run_all_pps('post_process', info, additional_pps=info.get('__postprocessors')) File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3603, in run_all_pps info = self.run_pp(pp, info) File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/YoutubeDL.py", line 3581, in run_pp files_to_delete, infodict = pp.run(infodict) File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/common.py", line 24, in run ret = func(self, info, *args, **kwargs) File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/common.py", line 129, in wrapper return func(self, info) File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/ffmpeg.py", line 1064, in run self.real_run_ffmpeg([(in_file, opts)], [(destination, self.stream_copy_opts())]) File "/data/user/0/com.junkfood.seal/no_backup/youtubedl-android/yt-dlp/yt-dlp/yt_dlp/postprocessor/ffmpeg.py", line 367, in real_run_ffmpeg raise FFmpegPostProcessorError(stderr.strip().splitlines()[-1]) yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: Stream #0:1 -> #0:1 (copy) ```

Screenshots & Screen Records

No response

Additional context

No response

JunkFood02 commented 1 year ago

should be a ffmpeg bug

bibsp commented 1 year ago

@hunkyburrito --split-chapters -f 251 --remux-video opus works perfectly in seal. Have you tried this?

hunkyburrito commented 1 year ago

@hunkyburrito --split-chapters -f 251 --remux-video opus works perfectly in seal. Have you tried this?

I was just using the gui format selection so I didn't attempt that before but that does indeed work. It even works with just --remux-video opus or -f 251 instead of both which makes me wonder why the gui selection fails.