# find the stream that matches our aid
#stream=`grep "Stream.*\[0x$aid_hex\]" $aidcheck`
- stream=`grep "scan: audio" $aidcheck | grep -n "" | grep "scan: audio 0x$aid_hex"`
+ #stream=`grep "scan: audio" $aidcheck | grep -n "" | grep "scan: audio 0x$aid_hex"`
+ stream=`grep "add_audio_to_title:" $aidcheck | grep -n "" | grep "add_audio_to_title:.* stream 0x$aid_hex"`
# extract the track number that handbrake uses
#track=`expr match "$stream" '.*#[0-9]\.\([0-9]*\)'`