How to select genes before log2 ratio on a RNASeq gene expression matrix, based on signal median
There is no rule for fixing t and p. It depends on the level of stringency you expect. Value of t depends on what is considered to be an active concentration; this need not be same for all genes.

This is an RNAseq data; I don't understand what is the "median" signal you are talking about. For each sample a gene would have a normalized expression value which is typically RPKM (Reads Per Kilobase per Million mapped reads). If you have replicates for each sample then take the mean not the median. 

Regarding calculation of log-ratios: Always be careful with this especially in case of zeros. Instead of log ratios you may use some sort of a gain metric: 

if 
ratio = x/y 
then
gain = (x-y)/y

You can also do a principal component analysis on the data and select first n principal components.