Ripping PBS videos

So you've tried streamtransport, rtmpsuck, rtmpdump and various searches on the web but everything came up short or sucked badly. This was what happened to me before I figured out you only need two very simple tools; one to figure out what the video stream URL is the other to grab it.

Examine URL snooper for the .m3u8 stream.

Split for readability. This should be all on one line.

ffmpeg -i "
 -vcodec copy -acodec copy -bsf:a aac_adtstoasc output.mp4

If you inside Australia you'll have an issue accessing the PBS video in the first place due to right restrictions. You can workaround by using host outside of the country.

ffmpeg -i "
 -vcodec copy -acodec copy -bsf:a aac_adtstoasc output.mp4
ffmpeg version N-60456-g4040b56 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb  8 2014 22:06:34 with gcc 4.8.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 63.101 / 52. 63.101
  libavcodec     55. 50.100 / 55. 50.100
  libavformat    55. 30.100 / 55. 30.100
  libavdevice    55.  7.100 / 55.  7.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, hls,applehttp, from '
  Duration: 00:54:30.29, start: 10.000000, bitrate: 0 kb/s
  Program 0
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 640x360 
    [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 174 kb/s
File 'output.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'output.mp4':
    encoder         : Lavf55.30.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x360 
    [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 174 kb/s

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 3639 fps=0.0 q=-1.0 size=   12337kB time=00:02:01.38 bitrate= 832.5kbits/
frame= 6318 fps=6223 q=-1.0 size=   23575kB time=00:03:30.77 bitrate= 916.3kbits
frame= 9269 fps=6025 q=-1.0 size=   36016kB time=00:05:09.24 bitrate= 954.1kbits
frame=12066 fps=5897 q=-1.0 size=   47824kB time=00:06:42.56 bitrate= 973.2kbits
frame=14893 fps=5832 q=-1.0 size=   59782kB time=00:08:16.89 bitrate= 985.6kbits
frame=17342 fps=5636 q=-1.0 size=   70210kB time=00:09:38.64 bitrate= 994.0kbits
frame=19452 fps=5427 q=-1.0 size=   79173kB time=00:10:49.01 bitrate= 999.3kbits
frame=21528 fps=5261 q=-1.0 size=   87531kB time=00:11:58.28 bitrate= 998.3kbits
frame=23621 fps=4950 q=-1.0 size=   95953kB time=00:13:08.12 bitrate= 997.4kbits
frame=24867 fps=4710 q=-1.0 size=  101288kB time=00:13:49.69 bitrate=1000.1kbits
frame=26539 fps=4586 q=-1.0 size=  108374kB time=00:14:45.48 bitrate=1002.6kbits
frame=28704 fps=4381 q=-1.0 size=  117495kB time=00:15:57.75 bitrate=1005.0kbits
frame=31096 fps=4400 q=-1.0 size=  124199kB time=00:17:17.53 bitrate= 980.6kbits
frame=33050 fps=4363 q=-1.0 size=  132516kB time=00:18:22.73 bitrate= 984.4kbits
frame=35527 fps=4366 q=-1.0 size=  140345kB time=00:19:45.38 bitrate= 969.9kbits
frame=36940 fps=4273 q=-1.0 size=  146141kB time=00:20:32.53 bitrate= 971.3kbits
frame=39001 fps=4261 q=-1.0 size=  154863kB time=00:21:41.30 bitrate= 974.9kbits
frame=41262 fps=4261 q=-1.0 size=  162614kB time=00:22:56.78 bitrate= 967.6kbits
frame=43259 fps=4245 q=-1.0 size=  168863kB time=00:24:03.37 bitrate= 958.4kbits
frame=45448 fps=4220 q=-1.0 size=  174908kB time=00:25:16.42 bitrate= 944.9kbits
frame=47242 fps=4189 q=-1.0 size=  182410kB time=00:26:16.27 bitrate= 948.0kbits
frame=49407 fps=4193 q=-1.0 size=  191603kB time=00:27:28.51 bitrate= 952.1kbits
frame=51301 fps=4174 q=-1.0 size=  199606kB time=00:28:31.71 bitrate= 955.3kbits
frame=53273 fps=4162 q=-1.0 size=  207389kB time=00:29:37.50 bitrate= 955.8kbits
frame=55913 fps=4202 q=-1.0 size=  215037kB time=00:31:05.59 bitrate= 944.2kbits
frame=58006 fps=4192 q=-1.0 size=  223092kB time=00:32:15.45 bitrate= 944.3kbits
frame=60099 fps=4180 q=-1.0 size=  231965kB time=00:33:25.29 bitrate= 947.6kbits
frame=62192 fps=4174 q=-1.0 size=  238270kB time=00:34:35.14 bitrate= 940.6kbits
frame=64199 fps=4167 q=-1.0 size=  245493kB time=00:35:42.07 bitrate= 938.8kbits
frame=65793 fps=4134 q=-1.0 size=  250554kB time=00:36:35.25 bitrate= 935.0kbits
frame=67720 fps=4124 q=-1.0 size=  258386kB time=00:37:39.55 bitrate= 936.8kbits
frame=69045 fps=4078 q=-1.0 size=  263202kB time=00:38:23.76 bitrate= 935.9kbits
frame=70265 fps=4024 q=-1.0 size=  268407kB time=00:39:04.51 bitrate= 937.8kbits
frame=71326 fps=3969 q=-1.0 size=  272860kB time=00:39:39.87 bitrate= 939.2kbits
frame=73255 fps=3963 q=-1.0 size=  281069kB time=00:40:44.24 bitrate= 942.0kbits
frame=75092 fps=3954 q=-1.0 size=  288786kB time=00:41:45.53 bitrate= 944.2kbits
frame=75707 fps=3882 q=-1.0 size=  291433kB time=00:42:06.05 bitrate= 945.1kbits
frame=77142 fps=3853 q=-1.0 size=  297486kB time=00:42:53.93 bitrate= 946.8kbits
frame=78507 fps=3824 q=-1.0 size=  303345kB time=00:43:39.48 bitrate= 948.7kbits
frame=80471 fps=3825 q=-1.0 size=  311651kB time=00:44:45.01 bitrate= 950.8kbits
frame=81029 fps=3761 q=-1.0 size=  314008kB time=00:45:03.66 bitrate= 951.4kbits
frame=81996 fps=3718 q=-1.0 size=  317858kB time=00:45:35.89 bitrate= 951.8kbits
frame=82823 fps=3666 q=-1.0 size=  321344kB time=00:46:03.52 bitrate= 952.6kbits
frame=83421 fps=3606 q=-1.0 size=  323865kB time=00:46:23.44 bitrate= 953.2kbits
frame=85514 fps=3612 q=-1.0 size=  331434kB time=00:47:33.28 bitrate= 951.6kbits
frame=87331 fps=3611 q=-1.0 size=  338803kB time=00:48:33.91 bitrate= 952.5kbits
frame=89102 fps=3600 q=-1.0 size=  346010kB time=00:49:33.00 bitrate= 953.4kbits
frame=91494 fps=3622 q=-1.0 size=  356063kB time=00:50:52.81 bitrate= 955.5kbits
frame=93461 fps=3627 q=-1.0 size=  364248kB time=00:51:58.44 bitrate= 956.9kbits
frame=95082 fps=3586 q=-1.0 size=  371029kB time=00:52:52.54 bitrate= 958.1kbits
frame=97433 fps=3606 q=-1.0 size=  379877kB time=00:54:10.98 bitrate= 957.2kbits
frame=98012 fps=3602 q=-1.0 Lsize=  384807kB time=00:54:30.41 bitrate= 963.9kbits/s
video:318073kB audio:64851kB subtitle:0 data:0 global headers:0kB muxing overhead 0.491705%
  • blog/ripping_pbs_videos.txt
  • Last modified: 2014/02/11 04:30
  • by brett