Opened 8 years ago

Closed 4 years ago

#5391 closed enhancement (needs_more_info)

Allow option to use webproxy

Reported by: fool1223 Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: hls
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm trying to play a stream like the following:
http://example.com/proxy.php?u=http://realhost.com/session/xxx/index.m3u8

The resulting m3u8 file looks like this:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:1438367455
#EXTINF:4.000,
1438367455.ts
#EXTINF:4.000,
1438367456.ts
#EXTINF:4.000,
1438367457.ts
#EXTINF:4.000,
1438367458.ts

The problem is that ffmpeg doesn't stay on the complete url but instead downloads the file and than generates the new chunks like:
http://realhost.com/session/xxx/1438367455.ts

Obviously this won't work. So I want to request a command line arg like '--webproxy' which would include the full original url like this:
http://example.com/proxy.php?u=http://realhost.com/session/xxx/1438367455.ts

VLC can handle this type of urls already without problems but my software uses ffmpeg.

(I used the latest build ffmpeg version N-79173-gbe746ae for testing and also older versions)

Thanks in advance!

Change History (3)

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: undeterminedavformat
Keywords: hls added
Priority: normalwish
Version: unspecifiedgit-master

Please provide the command line that allows to reproduce the issue together with the complete, uncut console output to make this a valid ticket.

comment:2 by fool1223, 8 years ago

You can use any webproxy url (that ships out the untouched file) followed by a valid m3u8 file for example.

>C:\ffmpeg-20160330-git-be746ae-win32-static\bin\ffplay.exe http://example.com/proxy.php?u=http://realhost.com/session/xxx/index.m3u8
ffplay version N-79173-gbe746ae Copyright (c) 2003-2016 the FFmpeg developers
  built with gcc 5.3.0 (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-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enabl
e-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable
-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --ena
ble-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable
-lzma --enable-decklink --enable-zlib
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 32.100 / 57. 32.100
  libavformat    57. 29.101 / 57. 29.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 40.102 /  6. 40.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0/0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
[http @ 0026e080] HTTP error 404 Not Found    0KB sq=    0B f=0/0
[hls,applehttp @ 05425e60] Failed to open segment of playlist 0
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

comment:3 by Steven Liu, 4 years ago

Resolution: needs_more_info
Status: newclosed

Can you leave an usable url here? let me get your point.

Note: See TracTickets for help on using tickets.