As� que me di a la tarea de modificar el archivo 2 de subtitulos para colocarle el tiempo adecuado cuando deben aparecer. Saque un equivalente de cuantos minutos se le tiene que adelantar al tiempo para poder hacerlo de forma sencilla. Una vez que saque el tiempo me hice un script en BASH para que el lo hiciera por mi.
Aqu� me apoye del comando sed de linux, este comando sirve para sustitur una cadena por otra, as� que teniendo ya la herramienta necesaria solo le aplique algo de l�gica y listo.
Aqu� les dejo el c�digo que hice:
#!/bin/bashHORAANT=00
MINUTOANT=00
MINUTO_ANT=0
MINUTO_ACT=55
HORA_ACT=0
MINUTOACT=55
HORAACT=00
for i in `seq 154`;
do
TIEMPO_ANT=$HORAANT:$MINUTOANT
TIEMPO_ACT=$HORAACT:$MINUTOACT
j=`expr $i - 1`
sed s/$TIEMPO_ANT/$TIEMPO_ACT/g hotwheels$j.srt > hotwheels$i.srt
MINUTO_ANT=`expr $MINUTO_ANT + 1`
MINUTO_ACT=`expr $MINUTO_ACT + 1`
##AJUSTAR EL DISPLAY DE MINUTOS PARA EL TIEMPO ANTERIOR
if[$MINUTO_ANT -lt 10]; then
MINUTOANT=0$MINUTO_ANT
else
MINUTOANT=$MINUTO_ANT
fi
##AJUSTAR EL DISPLAY DE MINUTOS PARA EL TIEMPO ACTUAL
if[$MINUTO_ACT -gt 59]; then
MINUTO_ACT=0
HORAACT=01
fi
########################
if[$MINUTO_ACT -lt 10]; then
MINUTOACT=0$MINUTO_ACT
else
MINUTOACT=$MINUTO_ACT
fi
done
MINUTOANT=00
MINUTO_ANT=0
MINUTO_ACT=55
HORA_ACT=0
MINUTOACT=55
HORAACT=00
for i in `seq 154`;
do
TIEMPO_ANT=$HORAANT:$MINUTOANT
TIEMPO_ACT=$HORAACT:$MINUTOACT
j=`expr $i - 1`
sed s/$TIEMPO_ANT/$TIEMPO_ACT/g hotwheels$j.srt > hotwheels$i.srt
MINUTO_ANT=`expr $MINUTO_ANT + 1`
MINUTO_ACT=`expr $MINUTO_ACT + 1`
##AJUSTAR EL DISPLAY DE MINUTOS PARA EL TIEMPO ANTERIOR
if[$MINUTO_ANT -lt 10]; then
MINUTOANT=0$MINUTO_ANT
else
MINUTOANT=$MINUTO_ANT
fi
##AJUSTAR EL DISPLAY DE MINUTOS PARA EL TIEMPO ACTUAL
if[$MINUTO_ACT -gt 59]; then
MINUTO_ACT=0
HORAACT=01
fi
########################
if[$MINUTO_ACT -lt 10]; then
MINUTOACT=0$MINUTO_ACT
else
MINUTOACT=$MINUTO_ACT
fi
done
Basicamente lo que hace este c�digo es que toma como valores iniciales:
00:00 el tiempo en el que pone el primer subtitulo para la 2da mitad de la pelicula
00:55 el tiempo en que debe de poner el subititulo para la pelicula de 1 solo archivo
Despu�s con el comando sed le digo que todo lo que tenga 00:00 lo sustituya por 00:55
# sed s/00:00/00:55/g hotwheels0.srt > hotwheels1.srt
Y esto va aumentando minuto a minuto, hasta completar el fin de la pelicula y se tienen los tiempos adecuados
Ahora si podre ver la pelicula, a ver si logro entenderla ya que el ingles no lo mastico muy bien.


Comentarios Recientes