Code:
Code:
#!/bin/bash for file do base=${file%.*} ext=${file##*.} newname=${base}"_subt".mpg mencoder "$file" -sub ${base}.srt -subcp utf-8 -font /usr/share/fonts/msttcorefonts/arial.ttf -subfont-text-scale 2.5 -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:vstrict=0:acodec=mp2:abitrate=128:aspect=16/9 -ofps 25 -o "$newname" | zenity --progress --text="Working: $file" --pulsate --auto-close done zenity --info \ --text="Finished"
whats wrong with this script?it's supposed to convert a video file to mpeg2 and embed the subtitles.i tried it in an mp4 file and it worked.i tried in mkv and it does convert the video but doesn't embed the subs. so any ideas how should i make the script to work.with all filetypes?