0x776b7364 / toggle.sg-download

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

Windows 10 #22

Closed xcbdf closed 8 years ago

xcbdf commented 8 years ago

Hi, thanks for your awesome script. It worked well on my old computer, but now I've upgraded to Windows 10 on my new laptop, and I'm getting the "FFMPEG not found" error. I'm running Windows 10, 64 bit, with Python 2.7.11 and the latest FFMPEG build. I've attached a screenshot.

Thanks for your time!


C:\Users\kmng\Downloads\Python>download_toggle_video2.py http://video.toggle.sg/en/series/the-unbroken-cycle/ep5/348429

Toggle video and episodes downloader

by 0x776b7364

[*] Processing input 1 of 1 ...

[i] Toggle video http://video.toggle.sg/en/series/the-unbroken-cycle/ep5/348429 detected [i] Obtained mediaID = 348429 [i] Performing HTTP GET request on Toggle video URL ... [i] Obtained apiUser = tvpapi_147 [i] Obtained apiPass = 11111 [i] Performing HTTP GET request on download URL ... [i] Performing JSON parsing ... [i] Obtaining URL records from download URL response ...

[i] Entering video selection function ...

Enter selection (delimit multiple selections with space, 0 to select all): 3

[*] Selected URL(s): http://mediacorpvod-vh.akamaihd.net/i/HLS/201504W-B/MC_SD_UNBROKEN_CYCLE_EP5_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8

[i] Obtaining media name ... [i] Unicode title encountered. New media name = 348429 [i] Obtaining media duration ... [i] Obtained media duration = 00 hrs 46 mins 14 secs [i] Performing HTTP GET request to check for subtitles ... [i] Performing JSON parsing ... [!] No subtitles found!

[i] Starting download of queued URLs ...

[i] Thread cc4a144f: processing URL http://mediacorpvod-vh.akamaihd.net/i/HLS/201504W-B/MC_SD_UNBROKEN_CYCLE_EP5_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8

[i] Crafting ffmpeg command ... [i] Executing ffmpeg command ...

ffmpeg version N-71497-gedbb9b5 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 54. 22.101 / 54. 22.101 libavcodec 56. 34.100 / 56. 34.100 libavformat 56. 30.100 / 56. 30.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 14.100 / 5. 14.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 [h264 @ 0000000004c5b380] non-existing SPS 0 referenced in buffering period Last message repeated 1 times [h264 @ 00000000058cb8a0] non-existing SPS 0 referenced in buffering period Last message repeated 1 times [h264 @ 00000000059cc720] non-existing SPS 0 referenced in buffering period Last message repeated 1 times [h264 @ 0000000005da5e80] non-existing SPS 0 referenced in buffering period Last message repeated 1 times [h264 @ 0000000005bbec00] non-existing SPS 0 referenced in buffering period [h264 @ 00000000059cf9c0] non-existing SPS 0 referenced in buffering period [h264 @ 0000000005a02b00] non-existing SPS 0 referenced in buffering period [h264 @ 0000000005bb22c0] non-existing SPS 0 referenced in buffering period Input #0, hls,applehttp, from 'http://mediacorpvod-vh.akamaihd.net/i/HLS/201504W-B/MC_SD_UNBROKEN_CYCLE_EP5_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8': Duration: 00:46:14.04, start: 0.100511, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 701000 Stream #0:0: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv), 480x360 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc Metadata: variant_bitrate : 701000 Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 100 kb/s Metadata: variant_bitrate : 701000 Program 1 Metadata: variant_bitrate : 1087000 Stream #0:2: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv), 640x480 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc Metadata: variant_bitrate : 1087000 Stream #0:3: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 100 kb/s Metadata: variant_bitrate : 1087000 Program 2 Metadata: variant_bitrate : 1406000 Stream #0:4: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv), 640x480 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc Metadata: variant_bitrate : 1406000 Stream #0:5: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 100 kb/s Metadata: variant_bitrate : 1406000 Program 3 Metadata: variant_bitrate : 1885000 Stream #0:6: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv), 768x576 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc Metadata: variant_bitrate : 1885000 Stream #0:7: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 100 kb/s Metadata: variant_bitrate : 1885000 [mp4 @ 0000000006a43020] Codec for stream 0 does not use global headers but container format requires global headers [mp4 @ 0000000006a43020] Codec for stream 1 does not use global headers but container format requires global headers [mp4 @ 0000000006a43020] muxer does not support non seekable output Output #0, mp4, to 'http://mediacorpvod-vh.akamaihd.net/i/HLS/201504W-B/MC_SD_UNBROKEN_CYCLE_EP5_STB_MP4_,10,20,30,40,.mp4.csmil/master.m3u8.mp4': Metadata: encoder : Lavf56.30.100 Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 768x576 [SAR 1:1 DAR 4:3], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc Metadata: variant_bitrate : 1885000 Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 100 kb/s Metadata: variant_bitrate : 701000 Stream mapping: Stream #0:6 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

[!] Error: ffmpeg file not found, or existing file is for incorrect architecture. [i] Thread cc4a144f completed download! [i] Done!

0x776b7364 commented 8 years ago

I've just tested on Windows 10 10586.104 x64, with Python 2.7.11 and ffmpeg build-20160517. The script works well against your provided link. Try using the latest ffmpeg binary? The latest version I have is N-80011, compiled with GCC 5.3.0.

xcbdf commented 8 years ago

Thanks for looking into it!

I've tested it again with your specifications - Python 2.7.11 and ffmpeg build-20160517, but it gives the same error. It seems to complain about "Error: ffmpeg file not found, or existing file is for incorrect architecture.", but works fine when I ask for an mp4 download, presumably this last option does not use ffmpeg? I'm using a 64bit machine with Windows 10 Enterprise. Thanks!

xcbdf commented 8 years ago

Ah, thanks, it's working fine now!