View Single Post
  #29  
Old 11-13-2016, 02:38 PM
j_cool j_cool is offline
Senior Member
 
Join Date: Feb 2016
Posts: 515
j_cool is on a distinguished road
Default

Re: Can somebody help get filmon rtmp code to play with livestreamer?


laj,

you started this thread filmon, rtmp code, livestreamer...

this is how this works for me on BBC 4:


PLAYING:

@title BBC_4
set var=http://www.filmon.com/channel/cbeebiesbbc-four
start /min livestreamer --player "ffplay.exe -vf scale=864:480" %var% worst


CMD window:

[cli][info] Found matching plugin filmon for URL http://www.filmon.com/channel/cbeebiesbbc-four
[cli][info] Available streams: low (worst), high (best)
[cli][info] Opening stream: low (rtmp)
[cli][info] Starting player: ffplay.exe -vf scale=864:480


RECORDING:

simplest:

@title ~BBC_4
set var=http://www.filmon.com/channel/cbeebiesbbc-four
FOR /f %%a IN ('livestreamer --stream-url %var% worst') DO set var2="%%a/103.low.stream"
ffmpeg -i %var2% -c:v h264 -c:a aac -vf scale=864:480 "c:\BBC_4.flv"

my original batch file:

@title ~BBC_4
set var=http://www.filmon.com/channel/cbeebiesbbc-four
:START
@FOR /f %%x IN ('DT') DO @set d=%%x
@FOR /f %%a IN ('livestreamer --stream-url %var% worst') DO set var2="%%a/103.low.stream"
ffmpeg -i %var2% -c:v h264 -c:a aac -vf scale=864:480 "c:\%d%_BBC_4.flv"
SLEEP 10
goto START


DT.exe ( delphi )

program DT;
{$APPTYPE CONSOLE}
uses SysUtils;
var dtime: string;
begin
dtime:= FormatDateTime('yyyy-mm-dd_hh-nn-ss', Now);
writeln(dtime);
end.


SLEEP.exe

http://www.computerhope.com/dutil.htm



CMD window:

C:\MISC\~>set var=http://www.filmon.com/channel/cbeebiesbbc-four

C:\MISC\~>set var2="rtmp://live-889.ld5.edge.filmon.com/live/?id=0ad5aac39bb13fbe1f5ae3a72e5dfd4c0ad4df9982bfb8 716aca0ee
d81b3bafb4b9fc891f4ca95e4efd167688e5b8e2eef0f15206 30d997a43e181e35f05a4279757406bd4cd91e3cb263509ef2 04d17eed0a7cf46c4f5b
552486307e4b226aabb843aeb2d52ba7d002883028e68659ac 08d5e34136bf150226a64a065d8afd19e465f5ed64ebd153e8 17d6a28d96c9cc19fdc9
77547fc8b/103.low.stream"

C:\MISC\~>ffmpeg -i "rtmp://live-889.ld5.edge.filmon.com/live/?id=0ad5aac39bb13fbe1f5ae3a72e5dfd4c0ad4df9982bfb8 716aca0e
ed81b3bafb4b9fc891f4ca95e4efd167688e5b8e2eef0f1520 630d997a43e181e35f05a4279757406bd4cd91e3cb263509ef 204d17eed0a7cf46c4f5
b552486307e4b226aabb843aeb2d52ba7d002883028e68659a c08d5e34136bf150226a64a065d8afd19e465f5ed64ebd153e 817d6a28d96c9cc19fdc
977547fc8b/103.low.stream" -c:v h264 -c:a aac -vf scale=864:480 "c:\2016-11-13_21-24-52_BBC_4.flv"
ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --ena
ble-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --ena
ble-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --e
nable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-lib
openh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-lib
soxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvo
rbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-li
bxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.100 / 57. 64.100
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[flv @ 032a81e0] video stream discovered after head already parsed
[flv @ 032a81e0] audio stream discovered after head already parsed
Input #0, flv, from 'rtmp://live-889.ld5.edge.filmon.com/live/?id=0ad5aac39bb13fbe1f5ae3a72e5dfd4c0ad4df9982bfb8 716aca0e
ed81b3bafb4b9fc891f4ca95e4efd167688e5b8e2eef0f1520 630d997a43e181e35f05a4279757406bd4cd91e3cb263509ef 204d17eed0a7cf46c4f5
b552486307e4b226aabb843aeb2d52ba7d002883028e68659a c08d5e34136bf150226a64a065d8afd19e465f5ed64ebd153e 817d6a28d96c9cc19fdc
977547fc8b/103.low.stream':
Duration: N/A, start: 8762.687000, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 568x320 [SAR 640:639 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tb
c
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp
[libx264 @ 057c0460] using SAR=80/81
[libx264 @ 057c0460] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 057c0460] profile High, level 3.0
[libx264 @ 057c0460] 264 - core 148 r2721 72d53ab - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.or
g/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 m
e_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_thr
eads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 r
c=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'c:\2016-11-13_21-24-52_BBC_4.flv':
Metadata:
encoder : Lavf57.56.100
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 864x480 [SAR 80:81 DAR 16:9], q=-1--1, 25 fps,
1k tbn, 25 tbc
Metadata:
encoder : Lavc57.64.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc57.64.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 340 fps= 28 q=28.0 size= 837kB time=00:00:13.93 bitrate= 492.1kbits/s speed=1.13x


Cheers,

Johnny.

Last edited by j_cool : 11-13-2016 at 03:25 PM. Reason: BBC's original high resolution: 854:480, original text not edited
Reply With Quote