Re: Re: Here’s how to play your HD files with WiiMC

Home › Forums › Help and Support › Here’s how to play your HD files with WiiMC › Re: Re: Here’s how to play your HD files with WiiMC

#25038
cadbusca
Member

Here is the “StreamVideo.bat” post copied over from VLC so the whole instruction is here on WIIMC.


The following Bat file may be used to transcode and stream videos from your PC to WIIMC.
(Remove the (x86) if you are not on a 64 bit system)!!

If you put a shortcut to the StreamVideo.bat in your Sendto directory, you can then Right Click on any video file and send it to the bat and it will stream the video!

On the WII you must manually edit the SD Cardappswiimconlinemedia.xml file and add the following…
where xxx.xxx.x.xxx is your PC Server URL.

…just before the final line.

To play a file, start the VLC stream using the “Send to” “streamvideo.bat”, then on WIIMC select “Online Media/PC Streams/VLC stream” and your video will play on the WII ! Be sure to start the stream first before opening it in WIIMC or WIIMC will Error out..

Note you must have the following installed on your system for this feature to work, and you must modify the two statements in the bat to point at them. I have them installed in C:ProgramsMediaInfo and C:ProgramsFFMPEG subdirectories as used in the bat.

MediaInfo.exe (Command line version) from
http://downloads.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.33_Windows_i386.zipon 32 bit systems or
http://downloads.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.33_Windows_x64.zip on 64 bit systems
and FFMPEG.exe from http://www.videohelp.com/download/FFmpeg-0.5.1-svn-22140.7z

StreamVideo.bat
============================================================
@echo off
: If you have problems on your system just change
: @echo off to @echo on to view execution in the command window.

: This bat is used to stream video with VLC using http
: A corresponding player using http must be started on each client. ie: VLC http:\@server-url:8081
: Or on WIIMC by adding the following to the end of the SD Cardappswiimconlinemedia.xml file
:
:
:

if “%~x1″==”.ts” goto :playit
if “%~x1″==”.avi” goto :playit
if “%~x1″==”.mpg” goto :playit
if “%~x1″==”.mp4″ goto :playit
if “%~x1″==”.mkv” goto :playit
if “%~x1″==”.flv” goto :playit

echo invalid filetype – cannot stream

goto :exit

:playit

: Check if another instance is running.
if not exist C:tempVLCFlag.txt goto :doit
echo previous stream is active – close it first
goto :exit

:doit
: Set running flag
echo VLC is Running > C:tempVLCflag.txt

: there is a bug in VLC which prevents .ts from playing if subs are present.
: use VLC option to ignore subs for .ts
if “%~x1″==”.ts” goto :nosubs

: there is a bug in VLC that prevents .flv with AVC from converting

if NOT “%~x1” == “.flv” goto :normal

: Check .flv files for AVC video streams.
C:ProgramsMediaInfo_CLIMediaInfo.exe –Inform=Video;%%Format%% %1 > C:TEMPmedia.txt
: Read MI Value string back in
set /p format= < C:TEMPmedia.txt
if .%format% == .AVC goto :avcflv

:normal

: This transcodes all files to MPEG-2 video with AC3 audio on-the-fly as they are streamed.
: must use fps=30, channels=6, scale=.5, width=640, acodec=a52, samplerate=48000
“C:Program Files (x86)VideoLANVLCvlc.exe” -vvv %1 –sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4000,scale=.5,width=640,fps=30,acodec=a52,ab=384,channels=6,samplerate=48000,soverlay}:std{access=http,mux=ts,dst=:8081} –sub-autodetect-fuzzy=4

goto :exit

:nosubs

“C:Program Files (x86)VideoLANVLCvlc.exe” -vvv %1 –sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4000,scale=.5,width=640,fps=30,acodec=a52,ab=384,channels=6,samplerate=48000}:std{access=http,mux=ts,dst=:8081} –no-sub-autodetect-file

goto :exit

:avcflv

if exist C:TEMPVideo.mp4 erase C:TEMPVideo.mp4 > nul

echo.
echo THE AUDIO WILL FIRST TRANSCODE TO AC3… PLEASE WAIT A MINUTE or TWO…

: There is a bug that prevents VLC from streaming AAC and audio is lost
: so must use ffmpeg to preconvert avc/aac.flv to avc/ac3.mp4
: This only takes about 1 minute for each 30 minutes of video
: Need to use a 2 in front of redirect to stop ffmpeg output from displaying.

“C:ProgramsFFMPEGffmpeg.exe” -i %1 -vcodec copy -acodec ac3 -ar 48000 -ab 128kb -ac 2 -f mp4 “C:TEMPvideo.mp4” 2> C:TEMPffmpeg.txt

: Transcode the .mp4 file to MPEG-2 and just copy the ac3 audio
“C:Program Files (x86)VideoLANVLCvlc.exe” -vvv “C:TEMPvideo.mp4” –sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4000,scale=.5,width=640,fps=30,soverlay}:std{access=http,mux=ts,dst=:8081} –sub-autodetect-fuzzy=4

:exit

: Clean-up
if exist C:TEMPmedia.txt erase C:TEMPmedia.txt > nul
if exist C:TEMPVideo.mp4 erase C:TEMPVideo.mp4 > nul

: Remove Running Flag after first warning.
if exist C:tempVLCFlag.txt erase C:tempVLCFlag.txt

:================================================================================