Audio is missing when using nvresize

Hey there,

I have been trying to resize a .ts video file into five different rates. After modifying the sample code from http://developer.download.nvidia.com/compute/redist/ffmpeg/1511-patch/FFMPEG-with-NVIDIA-Acceleration-on-Ubuntu_UG_v01.pdf page 15, I realized that the audio is missing!

This is my code:

ffmpeg -y -i $1 -filter_complex nvresize=5:s=hd1080\|hd720\|hd480\|wvga\|cif:readback=0[out0][out1][out2][out3][out4] \
-map [out0] -acodec copy -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 4M $2.high.ts \
-map [out1] -acodec copy -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 2M $2.mid.ts \
-map [out2] -acodec copy -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 1M $2.low.ts \
-map [out3] -acodec copy -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 750K $2.vlow.ts \
-map [out4] -acodec copy -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 500K $2.slow.ts

However, when I only output one .ts file, then the audio is back.

Been stuck on this problem for a while, please help.

I ran into the same issue. It looks like nvresize does not pass-through audio track despite the fact that docs say it is supposed to. An easy fix was to directly map output audio to the incoming audio track like this:

ffmpeg -y -i $1 -filter_complex nvresize=5:s=hd1080\|hd720\|hd480\|wvga\|cif:readback=0[out0][out1][out2][out3][out4] \
-map 0:a -acodec copy -map [out0] -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 4M $2.high.ts \
-map 0:a -acodec copy -map [out1] -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 2M $2.mid.ts \
-map 0:a -acodec copy -map [out2] -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 1M $2.low.ts \
-map 0:a -acodec copy -map [out3] -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 750K $2.vlow.ts \
-map 0:a -acodec copy -map [out4] -vcodec nvenc -profile high -pixel_format yuv420p -preset slow -b:v 500K $2.slow.ts