Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8710 closed defect (invalid)

HTTP error 403 Forbidden when open an mpd url (MPEG-DASH) from facebook video

Reported by: Farley Lai Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Built with dash support but when opening a dash mpd url corresponding to a facebook live stream, "HTTP error 403 Forbidden" is returned as follows.
However, VLC is able to play the mpd url without any issue.
Any ideas?

$> ffprobe version 4.2.3 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
  configuration: --prefix=/home/ml/farleylai/miniconda3/envs/sinet37 --cc=/home/ml/farleylai/miniconda3/envs/sinet37/conda-bld/ffmpeg_1591228974768/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-demuxer=dash --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-libx264 --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-libxml2 --enable-zlib --enable-libmp3lame
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[NULL @ 0x55e2b03331c0] Opening 'https://video-dfw5-1.xx.fbcdn.net/hvideo-prn2-frc/_nc_cat-107/v/rh9reyEfDyAckn2On4dEG/live-dash/dash-abr-ibr-audio/3246902542042931.mpd?_nc_rl=AfC78hI2eTCtKuFO' for reading
[https @ 0x55e2b0333bc0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x55e2b0335c40] Original list of addresses:
[tcp @ 0x55e2b0335c40] Address 157.240.19.20 port 443
[tcp @ 0x55e2b0335c40] Address 2a03:2880:f034:13:face:b00c:0:1823 port 443
[tcp @ 0x55e2b0335c40] Interleaved list of addresses:
[tcp @ 0x55e2b0335c40] Address 157.240.19.20 port 443
[tcp @ 0x55e2b0335c40] Address 2a03:2880:f034:13:face:b00c:0:1823 port 443
[tcp @ 0x55e2b0335c40] Starting connection attempt to 157.240.19.20 port 443
[tcp @ 0x55e2b0335c40] Successfully connected to 157.240.19.20 port 443
[https @ 0x55e2b0333bc0] request: GET /hvideo-prn2-frc/_nc_cat-107/v/rh9reyEfDyAckn2On4dEG/live-dash/dash-abr-ibr-audio/3246902542042931.mpd?_nc_rl=AfC78hI2eTCtKuFO HTTP/1.1
User-Agent: Lavf/58.29.100
Accept: */*
Range: bytes=0-
Connection: close
Host: video-dfw5-1.xx.fbcdn.net
Icy-MetaData: 1


[https @ 0x55e2b0333bc0] HTTP error 403 Forbidden
https://video-dfw5-1.xx.fbcdn.net/hvideo-prn2-frc/_nc_cat-107/v/rh9reyEfDyAckn2On4dEG/live-dash/dash-abr-ibr-audio/3246902542042931.mpd?_nc_rl=AfC78hI2eTCtKuFO: Server returned 403 Forbidden (access denied)

PS:
The live video urls from facebook are changing.
As mentioned in #7540, one can browse current live streams at https://www.facebook.com/livemap (a facebook account to log in may be necessary).
The video URL can be copied by clicking the three dot option on the top right corner (Copy Link).
A straightforward way to get the mpd url is using youtube-dl that can be installed through conda:

conda install -c conda-forge youtube-dl

Then the mpd url can be retrieved as follows (Here is an example. Please get a live one instead),

$> youtube-dl -g https://www.facebook.com/thenational/videos/675435893241531/
https://video-dfw5-1.xx.fbcdn.net/hvideo-atn3-prn/bhost_video-den4-1.xx/_nc_cat-1/v/rine4ddLcnIFSNpsvsQYG/live-dash/dash-abr-ibr-audio/10157549607307686.mpd?_nc_rl=AfC15-gDFaUQGQHO&ms=m_CT&oh=b3d591a680205f940394ed08bae6e1bb&oe=5EDA00B5

Change History (5)

comment:1 by Steven Liu, 4 years ago

it ok here.

(base) liuqi05:dash liuqi$ ./ffprobe -v debug -i "https://video-lax3-1.xx.fbcdn.net/v/t42.1790-29/10000000_1436138333253083_7347705215175523037_n.mp4?_nc_cat=103&_nc_sid=5aebc0&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfbGl2ZV9oZDFfdHJpbW1lZF9mcmFnXzJfdmlkZW8ifQ==&_nc_ohc=ThmsnbiG10IAX83DPU5&_nc_ht=video-lax3-1.xx&oh=b55f2d8682061ac4bb160074f7fd18cf&oe=5ED87CA2"
ffprobe version N-97994-gbbf84fabf9 Copyright (c) 2007-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.59)
  configuration: --quiet --enable-htmlpages --enable-libx264 --enable-libxml2 --enable-gpl --extra-ldflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-libfreetype --enable-fontconfig --enable-libspeex --enable-libopus --enable-libzmq --enable-libx265 --enable-libass --enable-videotoolbox --disable-optimizations --disable-stripping --enable-libmp3lame --samples=fate-suite/ --cc=clang
  libavutil      56. 49.100 / 56. 49.100
  libavcodec     58. 89.100 / 58. 89.100
  libavformat    58. 43.100 / 58. 43.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 83.100 /  7. 83.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[NULL @ 0x7fc977012600] Opening 'https://video-lax3-1.xx.fbcdn.net/v/t42.1790-29/10000000_1436138333253083_7347705215175523037_n.mp4?_nc_cat=103&_nc_sid=5aebc0&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfbGl2ZV9oZDFfdHJpbW1lZF9mcmFnXzJfdmlkZW8ifQ==&_nc_ohc=ThmsnbiG10IAX83DPU5&_nc_ht=video-lax3-1.xx&oh=b55f2d8682061ac4bb160074f7fd18cf&oe=5ED87CA2' for reading
[https @ 0x7fc976c10180] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x7fc976c10780] Original list of addresses:
[tcp @ 0x7fc976c10780] Address 31.13.70.14 port 443
[tcp @ 0x7fc976c10780] Interleaved list of addresses:
[tcp @ 0x7fc976c10780] Address 31.13.70.14 port 443
[tcp @ 0x7fc976c10780] Starting connection attempt to 31.13.70.14 port 443
[tcp @ 0x7fc976c10780] Successfully connected to 31.13.70.14 port 443
[https @ 0x7fc976c10180] request: GET /v/t42.1790-29/10000000_1436138333253083_7347705215175523037_n.mp4?_nc_cat=103&_nc_sid=5aebc0&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfbGl2ZV9oZDFfdHJpbW1lZF9mcmFnXzJfdmlkZW8ifQ==&_nc_ohc=ThmsnbiG10IAX83DPU5&_nc_ht=video-lax3-1.xx&oh=b55f2d8682061ac4bb160074f7fd18cf&oe=5ED87CA2 HTTP/1.1
User-Agent: Lavf/58.43.100
Accept: */*
Range: bytes=0-
Connection: close
Host: video-lax3-1.xx.fbcdn.net
Icy-MetaData: 1


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] ISO: File Type Major Brand: iso5
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] found sidx time -9223372036854775808, using it for pts
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] Before avformat_find_stream_info() pos: 22093 bytes read:24001 seeks:0 nb_streams:1
[h264 @ 0x7fc978809800] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7fc978809800] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7fc978809800] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x7fc978809800] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7fc978809800] Format yuv420p chosen by get_format().
[h264 @ 0x7fc978809800] Reinit context to 1280x720, pix_fmt: yuv420p
[h264 @ 0x7fc978809800] no picture
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.250000 0.019494
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.333333 0.015283
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.416667 0.011585
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.500000 0.008402
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.583333 0.005732
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.666667 0.003577
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.750000 0.001935
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.833333 0.000808
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.916667 0.000194
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 30.000000 0.000095
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 60.000000 0.000379
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 120.000000 0.001516
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 240.000000 0.006064
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 29.970030 0.000071
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] rfps: 59.940060 0.000285
    Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc977012600] After avformat_find_stream_info() pos: 194797 bytes read:195072 seeks:0 frames:21
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://video-lax3-1.xx.fbcdn.net/v/t42.1790-29/10000000_1436138333253083_7347705215175523037_n.mp4?_nc_cat=103&_nc_sid=5aebc0&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfbGl2ZV9oZDFfdHJpbW1lZF9mcmFnXzJfdmlkZW8ifQ==&_nc_ohc=ThmsnbiG10IAX83DPU5&_nc_ht=video-lax3-1.xx&oh=b55f2d8682061ac4bb160074f7fd18cf&oe=5ED87CA2':
  Metadata:
    major_brand     : iso5
    minor_version   : 1
    compatible_brands: avc1iso5dsmsmsixdash
    encoder         : Lavf58.20.100
  Duration: 01:00:29.88, start: 2.236000, bitrate: 1531 kb/s
    Stream #0:0(und), 21, 1/16000: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, Closed Captions, 0 kb/s, 29.97 fps, 29.97 tbr, 16k tbn, 2k tbc (default)
    Metadata:
      handler_name    : VideoHandler
[h264 @ 0x7fc97701ae00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7fc97701ae00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[AVIOContext @ 0x7fc976c17bc0] Statistics: 195072 bytes read, 0 seeks
(base) liuqi05:dash liuqi$

comment:2 by Steven Liu, 4 years ago

Resolution: worksforme
Status: newclosed

comment:3 by Farley Lai, 4 years ago

It is a duplicate of #6384 where the quotes are essential when running from the terminal.

comment:4 by Steven Liu, 4 years ago

Resolution: worksformewontfix

you could use the command line:

ffmpeg -i "https://video-lax3-1.xx.fbcdn.net/v/t42.1790-29/10000000_1436138333253083_7347705215175523037_n.mp4?_nc_cat=103&_nc_sid=5aebc0&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfbGl2ZV9oZDFfdHJpbW1lZF9mcmFnXzJfdmlkZW8ifQ==&_nc_ohc=ThmsnbiG10IAX83DPU5&_nc_ht=video-lax3-1.xx&oh=b55f2d8682061ac4bb160074f7fd18cf&oe=5ED87CA2"

not

ffmpeg -i https://video-lax3-1.xx.fbcdn.net/v/t42.1790-29/10000000_1436138333253083_7347705215175523037_n.mp4?_nc_cat=103&_nc_sid=5aebc0&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfbGl2ZV9oZDFfdHJpbW1lZF9mcmFnXzJfdmlkZW8ifQ==&_nc_ohc=ThmsnbiG10IAX83DPU5&_nc_ht=video-lax3-1.xx&oh=b55f2d8682061ac4bb160074f7fd18cf&oe=5ED87CA2

because the "&" is turn the task to background in terminal.

comment:5 by Carl Eugen Hoyos, 4 years ago

Resolution: wontfixinvalid

Does not sound like a behaviour that we could fix but decided not to.

Note: See TracTickets for help on using tickets.