おそらく、さらに2つのクエリが機能するでしょう...
select id,title from videos where id < $local_id order by id desc limit 1
select id,title from videos where id > $local_id order by id asc limit 1
おそらく、さらに2つのクエリが機能するでしょう...
select id,title from videos where id < $local_id order by id desc limit 1
select id,title from videos where id > $local_id order by id asc limit 1