Sign up here and you can log into the forum!

FLV Help

youtube/live365/pandora/flickr replacements & other web services

FLV Help   

Postby Gui » Sat May 05, 2012 1:26 pm

Hey all,

I'm developing a plugin that uses different video sources.
In one of them the videos are in flv which i can easily play in wdtv via usb, browser and vlc but not from the plugin.

Mediainfo:
Code: Select all
General
Complete name : C:\Users\Gui\Desktop\3.763644.1666795.flv
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 4.17 MiB
Duration : 39s 120ms
Overall bit rate mode : Variable
Overall bit rate : 893 Kbps
Writing application : Lavf52.93.0

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 39s 120ms
Bit rate : 768 Kbps
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.133
Stream size : 3.54 MiB (85%)
Writing library : x264 core 115 r1995 c1e60b9
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / 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 / rc=2pass / mbtree=1 / bitrate=768 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.41 / aq=1:1.00
Language : English

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 39s 56ms
Bit rate mode : Variable
Bit rate : 128 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Delay relative to video : -2ms
Stream size : 609 KiB (14%)
Language : English


Proxy based in animult plugin to test vlc:
Code: Select all
<?php


if ( $_SERVER['REQUEST_METHOD'] == 'HEAD' )
{
   header('HTTP/1.1 200 OK');
   header('Host: videa.hu');
   header('User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0');
   header('Connection: keep-alive');
   header('Cookie: __utma=247885952.240886776.1335387356.1335387356.1335387356.1; __utmz=247885952.1335387356.1.1.utmccn=(organic)|utmcsr=google|utmctr=|utmcmd=organic');
   header('Content-Type: video/x-flv');
   return;
}

$rawURL = $_GET['itemurl'];

   doTheMiracle($rawURL);


function doTheMiracle($prmUrl)
{
   header('Content-type: video/x-flv');
   header('Content-Disposition: attachment; filename="wdlxtv.flv"');
   header('Cache-control: no-cache');
   header('Connection: keep-alive');
   exec ('killall -9 ffmpeg');
   $cmd = "ffmpeg -i '$prmUrl' -loglevel quiet -y -vcodec copy -vbsf h264_mp4toannexb -acodec copy -y -f mpegts pipe:1 | cat";
   set_time_limit(0);
   passthru($cmd);
}

?>


Any tips on how to achieve this??

Needs to be external? :(

BTW the plugin content it's the latest's football goals from almost all leagues and competitions ;)

Thanks,
Gui
Last edited by Gui on Wed May 09, 2012 12:27 pm, edited 2 times in total.
User avatar
Gui
Developer
 
Posts: 161
Joined: Wed Jan 11, 2012 4:19 pm
Location: Hellgarve

Re: FLV Help   

Postby PaulF » Sat May 05, 2012 4:46 pm

Shoutcast is having trouble with ACC audio.
User avatar
PaulF
Developer
 
Posts: 427
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: FLV Help   

Postby Gui » Sun May 06, 2012 1:37 am

"FLV file extensions are supported (using a video codec of H.264 and an Audio codec of AAC only) in the latest firmware version for all of the above devices besides the WD TV HD Media Player (Gen 2)"

I'm really confused.

Solved it:

Code: Select all
$cmd = "ffmpeg -y -i '$prmUrl' -vcodec copy -acodec copy -f flv pipe:1"
Last edited by Gui on Wed May 09, 2012 9:26 am, edited 1 time in total.
User avatar
Gui
Developer
 
Posts: 161
Joined: Wed Jan 11, 2012 4:19 pm
Location: Hellgarve

Re: FLV Help [SOLVED]   

Postby DJArty » Sun May 06, 2012 9:59 pm

Hi!
My function doTheMiracle working for flv with mp3 audio inside (because its playing directly without sound). If flv have AAC auido inside - no need any conversion.
WD TV Live (1.02.21-WDLXTV-0.4.7.3);
Please Donate PayPal to email: djartyua ( a t ) gmail (d o t) com
WebMoney: WMZ114867333413; WMU219453404899; WMR161810775332
User avatar
DJArty
Developer
 
Posts: 540
Joined: Wed Jul 21, 2010 2:30 am
Location: Ukraine

Re: FLV Help [SOLVED]   

Postby Gui » Mon May 07, 2012 1:25 am

Hey DJArty thanks for the clarification.
I'm very new to the proxy world.
User avatar
Gui
Developer
 
Posts: 161
Joined: Wed Jan 11, 2012 4:19 pm
Location: Hellgarve

Re: FLV Help [SOLVED]   

Postby Gui » Wed May 09, 2012 9:51 am

Code: Select all
General
Complete name : C:\Users\Gui\Desktop\live_user_ts0911651195_1336281891.flv
Format : Flash Video
File size : 46.5 MiB
Duration : 4mn 33s
Overall bit rate : 1 428 Kbps
Tagged date : UTC 2012-05-06 05:29:35
Tagging application : flvmeta 1.1-r213
jtv_meta : eyJvcmlnaW4iOiA1Mzk4NDAsICJmaWxlIjogIi91c3IvbG9jYWwvV293emFNZWRpYVNlcnZlclByby93b3d6YTEvY29udGVudC9saXZlX3VzZXJfdHMwOTExNjUxMTk1XzEzMzYyODE4OTEuZmx2IiwgImJyb2FkY2FzdF9wYXJ0IjogMSwgImZlYXR1cmVkIjogdHJ1ZSwgImNoYW5uZWxfc3Vic2NyaXB0aW9uIjogZmFsc2UsICJtZXRhZGF0YV9maWxlIjog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bm5lbF9pZCI6IDExNTYxODAyLCAiYnJvYWRjYXN0ZXIiOiAiZm1lIiwgImRlbGF5X2xlbmd0aCI6IDAsICJ1cGRhdGVkX29uIjogMTMzNjI4MTg5MSwgImNoYW5uZWxfdmlld19jb3VudCI6IDE3MjQxMTl9

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 7
Duration : 4mn 33s
Bit rate : 1 310 Kbps
Width : 1 440 pixels
Height : 900 pixels
Display aspect ratio : 1.600
Frame rate mode : Constant
Frame rate : 29.893 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.034
Stream size : 43.8 MiB (94%)
Writing library : x264 core 120 r2164 da19765
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=6 / 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=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=29.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=1800 / vbv_bufsize=1400 / crf_max=0.0 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00

Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 10
Duration : 4mn 33s
Bit rate : 74.5 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 44.1 KHz
Compression mode : Lossy
Delay relative to video : 372ms
Stream size : 2.62 MiB (6%)



Can somebody help me with this one?
The previous proxy didn't work.
User avatar
Gui
Developer
 
Posts: 161
Joined: Wed Jan 11, 2012 4:19 pm
Location: Hellgarve

Re: FLV Help   

Postby DJArty » Thu May 10, 2012 3:25 am

Better way - link to real sample file, not mediainfo only.
WD TV Live (1.02.21-WDLXTV-0.4.7.3);
Please Donate PayPal to email: djartyua ( a t ) gmail (d o t) com
WebMoney: WMZ114867333413; WMU219453404899; WMR161810775332
User avatar
DJArty
Developer
 
Posts: 540
Joined: Wed Jul 21, 2010 2:30 am
Location: Ukraine

Re: FLV Help   

Postby Gui » Thu May 10, 2012 3:29 am

DJArty wrote:Better way - link to real sample file, not mediainfo only.


http://media26.justin.tv/archives/2012-5-6/live_user_ts0911651195_1336283536.flv

Thanks.
User avatar
Gui
Developer
 
Posts: 161
Joined: Wed Jan 11, 2012 4:19 pm
Location: Hellgarve

Re: FLV Help   

Postby DJArty » Thu May 10, 2012 3:41 am

403 Forbidden
looks like spec. link generated to ip
WD TV Live (1.02.21-WDLXTV-0.4.7.3);
Please Donate PayPal to email: djartyua ( a t ) gmail (d o t) com
WebMoney: WMZ114867333413; WMU219453404899; WMR161810775332
User avatar
DJArty
Developer
 
Posts: 540
Joined: Wed Jul 21, 2010 2:30 am
Location: Ukraine

Re: FLV Help   

Postby Gui » Thu May 10, 2012 3:45 am

Try add it in a new tab (without Referer)
User avatar
Gui
Developer
 
Posts: 161
Joined: Wed Jan 11, 2012 4:19 pm
Location: Hellgarve

Next

Return to WDTVL Proxy Project

Who is online

Users browsing this forum: No registered users and 2 guests