rem @echo off

cd ..\..\..\
set bdir="C:/Program Files/PS3 Media Server v1.50.1/PS3 Media Server/regzamod\RzWEBplayer"
set youtube_dl=regzamod\RzWEBplayer\get_url\youtube-dl.exe
set mencoder=win32\mencoder.exe
set ffmpeg=win32\ffmpeg.exe
set nico_account=--username regzam_yhg@yahoo.co.jp --password regzam2014

rem ---- trasco ffmpeg bad
set url="http://www.nicovideo.jp/watch/sm23694820"
set url="http://www.nicovideo.jp/watch/sm23991760"

rem ---- remux ffmpeg bad
set url="http://www.nicovideo.jp/watch/sm23989802"
set url="http://www.nicovideo.jp/watch/sm23992630"

rem ---- trasco ffmpeg good
set url="http://www.nicovideo.jp/watch/sm23991923"

set url="http://www.nicovideo.jp/watch/sm23989802"
set url="http://www.nicovideo.jp/watch/sm13132658"

set video_out=out.mpg
rem set opts=--timeseek 20
set mencoder_opts=-ss 0 - -of mpeg -oac lavc -ovc lavc -lavcopts aspect=16/9:vcodec=mpeg2video:acodec=ac3 -o out.mpg
set ffmpeg_opts=-ss 0 -i pipe: -f mpegts -vcodec mpeg2video -acodec ac3 -async 10 -loglevel error -y out.mpg

pause

cmd.exe /c %youtube_dl% %nico_account% %url% -o - | %ffmpeg% %ffmpeg_opts%

pause