Re: Re: Watch Megavideo,HD,Youtube w/ CC through WiiMC (VLCShare

Home › Forums › Third Party Enhancements › VLC Shares › Watch Megavideo,HD,Youtube w/ CC through WiiMC (VLCShares) › Re: Re: Watch Megavideo,HD,Youtube w/ CC through WiiMC (VLCShare

#26459
zany130
Member

@Daniel wrote:

Upnp Tester here-here :D.

I halted upnp feature, because it require code refractoring. I can’t do it alone right now.

I got announcer to work and some other things. It works with uPnpPlay for android and UPnP AV Control Point (a program for pc), but real dnla/upnp devices ignore it.

All code is in the trunk (https://code.google.com/p/vlc-shares/source/browse/trunk):

  • library/X/Upnp.php: it’s a port of UMSP/UMSPX, but after i made it i found that UMSP code is not standard compliance, so i change some things but lot of work need to be done yet
  • library/X/Upnp/Announcer.php: it’s the upnp announcer class. it run in a separate “thread” (or something like that) using the X_Threads_* (library/X/Threads*) api. Threads api is not documented and stabilized yet (to be honest it require refractoring)
  • application/controllers/UpnpController.php is the controller, it serves upnp manifests and handle upnp request

You can try it in the last rev. Just start the announcer from http://localhost/vlc-shares/upnp and try with your upnp device.

@Daniel wrote:

You think you could add some users permissions ? like admins/players/guests ?

Basic user login features are already implemented. Adding roles shouldn’t be a great problem, but it’s not in my plan right now. I’m focusing in improve rtmpdump integration, add basic threads support and some features like rss parser, single page monitoring and add new hosters. If you want to implement this yourself i can give you tips.

@Daniel wrote:

Is there a way to select a default language for subtitle/audio ? I could try to implement one (if you point me into right dirrection/file … ../Helper/FFmpeg.php ?) based on my vlc-transcoding script used for mediatomb; i prefer JAP audio over ENG and RO subtitles over EN and i extract informations with mediainfo.

Subtitle are turned off by default until you don’t select one subtitle in the Mode menu, default audio is the default one of the video. If you want to implement this kind of feature you could create a new plugin which change default settings if no special preferences are submitted. It’s not hard to be done. You just have to hook to

registerVlcArgs()

invoke ffmpeg helper (mediainfo helper is deprecated and will be removed in next 0.5.5 release) to get video/subtitles info and (if ro subtitle/audio are available) automatically add params in vlc args to use them.

Something like that:



public function registerVlcArgs(X_Vlc $vlc, $provider, $location, Zend_Controller_Action $controller) {
// get audio preference from the audioSwitcher plugin
$audioPref = $controller->getRequest()->getParam('audioSwitcher', false);
// get sub preference from fileSub plugin
$subPref = $controller->getRequest()->getParam('fileSub', false);

$cAudioIndex = false;
$cSubIndex = false;

// if there is no audio track selection made by the user
if ( !$audioPref ) {

// prepare ffmpeg helper
$this->helpers()->ffmpeg()->setLocation($location);

// more than 1 audio stream is available, so we can choose
if ( $this->helpers()->ffmpeg()->getAudioStreamsNumber() ) {

$audios = $this->helpers()->ffmpeg()->getAudiosInfo();


foreach ($audios as $track) {
// check if language code is available
// then check if the language is the same wanted (i call plugin options, but it's an example)
if ( isset($track) && $track == $this->options('preferred.audio') ) {
$cAudioIndex = $track;
break; // found, exit foreach;
}
}

}
}


// if there is no sub track selection made by the user
if ( !$subPref ) {

// THIS CODE ONLY CHECK OF EMBEDED SUBS, NOT EXTERNAL FILES.
// IT REQUIRES MORE JOB, IT'S A SAMPLE ONLY

// prepare ffmpeg helper (not a problem if already done in the audioPref if)
$this->helpers()->ffmpeg()->setLocation($location);

// more than 1 sub stream is available, so we can choose
if ( $this->helpers()->ffmpeg()->getSubsNumber() ) {

$subs = $this->helpers()->ffmpeg()->getSubsInfo();

foreach ($subs as $track) {
// check if language code is available
// then check if the language is the same wanted (i call plugin options, but it's an example)
if ( isset($track) && $track == $this->options('preferred.sub') ) {
$cSubIndex = $track;
break; // found, exit foreach;
}
}

}
}

// check if audio autoselection has been made:
if ( $cAudioIndex !== false ) { // 0 == false, so i make a !== comparison
$vlc->registerArg('audio', "--audio-track="$cAudioIndex"");
}

// check if audio autoselection has been made:
if ( $cSubIndex !== false ) { // 0 == false, so i make a !== comparison
$vlc->registerArg('subtitles', "--sub-track="$cSubIndex"");
}


}

@Daniel wrote:

________________________________

I created a profile to transcode to H264/MP3 to support hardware decoding in Android 3.x/Tegra 2 processors.
This is converted from what i use with MediaTomb, currently.

#transcode{fps=15,audio-sync,vcodec=h264,venc=x264{vbv-maxrate=512,vbv-bufsize=512,preset=slow,profile=main,keyint=15},vfilter=canvas{width=800,height=480,padd},aenc=ffmpeg,acodec=mp3,ab=80,samplerate=44100,channels=2,soverlay}:rtp{mp4a-latm,sdp=rtsp://0.0.0.0:5554/android.sdp} –no-hq-resampling –audio-filter=normalizer –volume=1024 –norm-buff-size=10 –norm-max-level=10.0 –a52-dynrng –dts-dynrng –equalizer-preamp=0.0 –subsdec-encoding=ISO-8859-2 –subsdec-align=0 –freetype-rel-fontsize=12 –freetype-effect=3 –sout-transcode-threads=1

… from http://wiki.videolan.org/VLC_command-line_help

– video bitrate: 512k
– audio bitrate: 80k
– x264 profile: main
– x264 preset: slow
– It resize image to 800×480 (Samsung S2 resolution, same aspect ratio with Samsung Galaxy Tab 10.1)
– subtitles encoding is ISO-8859-2 (Central-European)
– relative font size – 12 : 20 (Smaller), 18 (Small), 16 (Normal), 12 (Large), 6 (Larger)
– font effect – 3 : 1 (Background), 2 (Outline), 3 (Fat Outline)
– number of threads to transcode = 1
– normalize audio to a higher level

Keep up the good work, man.
Daniel

Nice, i’ll add it in the vlc-shares 0.5.5 release 🙂

If you want more info you can add me in gtalk/gmail or windows live at [email protected] or twitter at @ximarx