Skip to content

Instantly share code, notes, and snippets.

@Luiz-Monad
Created January 29, 2017 22:34
Show Gist options
  • Save Luiz-Monad/1d7fd0cf579c25f69af7ff0f75f3b643 to your computer and use it in GitHub Desktop.
Save Luiz-Monad/1d7fd0cf579c25f69af7ff0f75f3b643 to your computer and use it in GitHub Desktop.
VLC transcode bullshit formats
function x($i) { $i.Replace("`r", '').Replace("`n", '').Replace(" ",'').Replace("'", '"') }
$f = join-path (get-location) 'screen'
$l = join-path (get-location) 'log.txt'
pushd 'C:\Program Files\VideoLAN\VLC'
./vlc.exe `
-I dummy `
(x "screen://") `
(x @"
--sout=#transcode{
scale='1',
fps='23.97'
}:duplicate{
dst=std{
access='file',
mux='ts',
dst='$($f)_out.avi'
}
}
"@) `
(x "--extraintf=http:logger") `
(x "--verbose=3") `
(x "--file-logging") `
(x "--logfile='$l'")
popd
ls -Filter *mp4 | % {
pushd 'C:\Program Files\VideoLAN\VLC'
$f = $_.FullName;
$f
./vlc.exe `
-I dummy `
"-vvv" (x "'$f'") `
(x @"
--sout=#transcode{
vcodec='h264',
scale='1',
fps='23.97',
vb='100',
deinterlace='0',
acodec='none',
vfilter=croppadd{
croptop='110',
cropleft='80',
cropbottom='580',
cropright='1470'
}
}:standard{
access='file',
mux='mp4',
dst='$($f)_out.mp4'
}
"@) `
"vlc://quit"
popd;
}
#get-process *vlc* | kill -force
#ls | % { mv $_ $_.FullName.Replace('_out.mp4','') }
function x($i) { $i.Replace("`r", '').Replace("`n", '').Replace(" ",'').Replace("'", '"') }
ls -Filter *mp4 | % {
pushd 'C:\Program Files\VideoLAN\VLC'
$f = $_.FullName;
$f
./vlc.exe `
-I dummy `
-vvv (x "'$f'") `
(x @"
--sout=#transcode{
vcodec='h264',
scale='0.25',
fps='23.97',
vb='800',
deinterlace='1',
acodec='mp3',
ab='128',
channels='2',
samplerate='44100'
}:standard{
access='file',
mux='mp4',
dst='$($f)_out.mp4'
}
"@)
popd;
}
#get-process *vlc* | kill -force
#ls | % { mv $_ $_.FullName.Replace('_out.mp4','') }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment