0x776b7364 / toggle.sg-download

Python script to automate Toggle.sg video downloads
MIT License
26 stars 18 forks source link

Edited ffmpeg command and link to download subtitles #42

Closed li-ruijie closed 6 years ago

0x776b7364 commented 6 years ago

The new subtitles URL works well, thanks! However, modification of the ffmpeg command causes the following error with a link such as https://video.toggle.sg/en/series/while-we-are-young-z/ep15/550084 (as referenced in #41):

[mp4 @ 0x1cc3060] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)
av_interleaved_write_frame(): Operation not permitted

Curious to know if you are facing the same error (which might point to a platform-specific ffmpeg implementation), and/or the reasons from removing the -bsf:a aac_adtstoasc parameter option.

0x776b7364 commented 6 years ago

Soon I'll be merging your pull request into master, but I'll be reverting the ffmpeg command as your change does not work for me.

li-ruijie commented 6 years ago

Just saw this. The -bsf:a aac_adtstoasc was throwing up some error which was why I removed it. Unfortunately, I did not log it down. I am using ffmpeg stable from choco on Win 10 Pro x64.

0x776b7364 commented 6 years ago

I've attempted to replicate your environment and I'm not seeing the error you're describing. Attempted with the URL https://video.toggle.sg/en/series/while-we-are-young-z/ep15/550084 and the file downloads successfully with -bsf:a aac_adtstoasc present in ffmpeg command.

Windows 10 x64 v1703
PS C:\Python27> choco list -li
Chocolatey v0.10.8
chocolatey 0.10.8
chocolatey-core.extension 1.3.3
ffmpeg 3.4
python2 2.7.14
vlc 2.2.6

Hence I'll be keeping the -bsf:a aac_adtstoasc parameter as default. If you could let me know how your environment differs. I can add in an if-check to strip the parameters if your environment is matched.