Blabla. Bullshit. Chrome is a 100 engineering team. We are a handful on our freetime.It’s probably like with Chrome: they spend too much time focused on fancy new features that old, existing bugs and requests get back-burnered. (To be fair, I am the same; I work on a program with verve only until I get an idea for a new program, then I push the existing one aside to be continued “later” so that I can work on the fun, novel one. )
Code: Select all
#!/bin/bash
#vlcsub.sh script v1.0 by Zarko Zivanov
#Plays movie in vlc with subtitles in black bars below the movie
#Usage: vlcsub.sh movie_file subtitle_file
#get screen resolution
RES=$(xrandr | grep -E -o "current [0-9]+ x [0-9]+")
RESX=$(awk '{print $2}' <<< $RES)
RESY=$(awk '{print $4}' <<< $RES)
#get video resolution
INFO=$(mediainfo --Inform="Video;%Width% %Height%" "$1")
VIDX=$(awk '{print $1}' <<< $INFO)
VIDY=$(awk '{print $2}' <<< $INFO)
ASPECTRES=$((RESX*1000/RESY))
ASPECTVID=$((VIDX*1000/VIDY))
if [ $ASPECTVID -gt $ASPECTRES ]; then
VIDH=$((VIDY*RESX/VIDX))
PADDING=$(((RESY-VIDH)/2))
PADDING=$((PADDING*VIDY/RESY))
vlc --video-filter croppadd --croppadd-paddtop $PADDING --croppadd-paddbottom $PADDING "$1" --sub-file "$2"
else
vlc "$1" --sub-file "$2"
fi
It does not work on a dual-monitor configuration - the subtitles stay on the video, not below. On a single monitor it works OK.This was tested on a computer with a single monitor, Ubuntu 12.04 64-bit with vlc 2.0.1. I will test it on a dual-monitor configuration when I manage, or someone could do it and post results.
Return to “VLC media player Feature Requests”
Users browsing this forum: No registered users and 3 guests