ffmpeg - one input, two outputs - separate instances
Remove the pipe character.
ffmpeg -f v4l2 -standard PAL -i /dev/video0 -f alsa -thread_queue_size 512 -i hw:0,0 -preset superfast -crf 25 -r 25 -aspect 4:3 -acodec libmp3lame -b:v 6M -b:a 128k -ac 2 -ar 48000 /vids/vid1.avi -b:v 500k -b:a 128k -ac 2 -ar 48000 -y /opt/lampp/htdocs/preview.mp4
(mp3 is not standard in MP4 so let ffmpeg pick the default audio codec)