FAQ  •  Register  •  Login

Live feed with custom -user_agent

<<

freaknik

User avatar

DLNA master

Posts: 345

Joined: Thu Mar 27, 2014 2:05 pm

Location: Endor

Post Mon Mar 30, 2020 3:03 pm

Live feed with custom -user_agent

  Code:
C:\Users\jomama\Desktop>ffmpeg -user_agent "Mozilla/5.0 (Windows NT 10.0; rv:74.0) Gecko/20100101 Firefox/74.0" -i https://videoserver1.org/live/XQ89LD7FrlwMZTJ-lt2l8Q/1585589743/2c26054f8ae1cee38e89b1983bbf1c63.m3u8
ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180829
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-libass --enable-librtmp --enable-fontconfig --enable-libfreetype --enable-zlib --enable-libx264 --enable-libspeex --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm -lexpat -lfreetype -lfribidi -lz' --arch=x86_32 --enable-runtime-cpudetect --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --enable-gpl --pkg-config=pkg-config --bindir='/jenkins/workspace/FFmpeg - Win32/target'
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[hls,applehttp @ 00152ae0] Opening 'https://videoserver1.org/hls/2c26054f8ae1cee38e89b1983bbf1c63-2432.ts' for reading
Input #0, hls,applehttp, from 'https://videoserver1.org/live/XQ89LD7FrlwMZTJ-lt2l8Q/1585589743/2c26054f8ae1cee38e89b1983bbf1c63.m3u8':
  Duration: N/A, start: 146.624333, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
At least one output file must be specified


There isn't a place in serviio console gui to add the -user_agent flag, but when used with ffmpeg it works perfectly. Can it be added to serviio? Without custom user agent ffmpeg gets 403 forbidden error. Thanks I looked at the documentation here:

https://wiki.serviio.org/doku.php?id=add_live_feeds

but there is nothing about ffmpeg streams with flags or switches whatever you call the addition of options. Thanks in advance!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Apr 13, 2020 5:58 pm

Re: Live feed with custom -user_agent

So for now you can only do it in a custom web resource plugin. YOu could write one, that will just use the URL you enter as a stream name, and use userAgent to pick it up.

Another option could be to use a ffmpeg wrapper script (and point to it via the -Dffmpeg.location system property) that will include the user agent you need.
<<

freaknik

User avatar

DLNA master

Posts: 345

Joined: Thu Mar 27, 2014 2:05 pm

Location: Endor

Post Tue Apr 21, 2020 1:24 am

Re: Live feed with custom -user_agent

OK thanks I will learn how groovy works and if I am successful will post it in the plugins area.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 101 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.