0

I am trying to restream - transcode using avconv, the code below is working fine, the only issue is that I cannot use a different track. I tried -ac 2 or -ac 5 but these doesn't seem to work. Any idea?

Please find my sample code below:

avconv -i http://udpproxy.stream.tk:8070/udp/239.254.1.111:1234 \
 -vcodec libx264 \
 -profile:v baseline \
 -preset veryfast \
 -filter:v yadif \
 -trellis 2 \
 -async 1 \
 -pix_fmt yuv420p \
 -s 1280x720 \
 -r 25 \
 -g 25 \
 -bf 2 \
 -b_strategy 1 \
 -keyint_min 25 \
 -crf 20 \
 -b:v 1200k \
 -minrate 2000k \
 -maxrate 4096k \
 -bufsize 2048k \
 -threads 4 \
 -acodec libvo_aacenc \
 -ar 48000 \
 -ab 128k \
 -ac 2 \
 -f flv \
 -metadata service_name=streamtv \
 rtmp://192.168.207.11/locked/streamtv \
> /home/streamer/logs/streamtv-"$DATE".log 2>&1 & echo streamtv transcoding initiated
  • Note: it seems your mistake is about -ac, it specifies number of audio channels in the track. I believe flv only supports a single audio stream, no wonder the tool kept giving you the first one. – Kamil Maciorowski May 29 '19 at 20:41
  • i don't care if its only one track i really only need the 5th track – Nikolas May 29 '19 at 20:52
  • Use -map 0:v -map 0:a:4 as described in the duplicate links. – llogan May 29 '19 at 21:20
  • Great Thanks i didn't know this parameter – Nikolas May 30 '19 at 7:44