Closed scottf-tvw closed 1 year ago
Hi, Thank you for bringing this issue to our attention. The problem that you are observing is due to improper FFmpeg cli, namely, in filter definition of audio streams. For the specified stream, the correct command line is:
ffmpeg -c:v mpsoc_vcu_h264 -i rtmp://ingress.w1.invintus.com/srcEncoders/247airtestfeed \
-filter_complex "multiscale_xma=outputs=5: \
out_1_width=1920: out_1_height=1080: out_1_rate=full: \
out_2_width=1280: out_2_height=720: out_2_rate=full: \
out_3_width=848: out_3_height=480: out_3_rate=full: \
out_4_width=640: out_4_height=360: out_4_rate=full: \
out_5_width=288: out_5_height=160: out_5_rate=full \
[vid1][vid2][vid3][vid4][vid5]; [0:2]asplit=outputs=5[aud1][aud2][aud3][aud4][aud5]" \
-map "[vid1]" -b:v:0 2M -minrate:v:0 2M -maxrate:v:0 2M -bufsize:v:0 4M -c:v:0 mpsoc_vcu_h264 \
-map "[vid2]" -b:v:1 1M -minrate:v:1 1M -maxrate:v:1 1M -bufsize:v:1 1M -c:v:1 mpsoc_vcu_h264 \
-map "[vid3]" -b:v:2 750K -minrate:v:2 750K -maxrate:v:2 750K -bufsize:v:2 750K -c:v:2 mpsoc_vcu_h264 \
-map "[vid4]" -b:v:3 375K -minrate:v:3 375K -maxrate:v:3 375K -bufsize:v:3 375K -c:v:3 mpsoc_vcu_h264 \
-map "[vid5]" -b:v:4 250k -minrate:v:4 250k -maxrate:v:4 250k -bufsize:v:4 250k -c:v:4 mpsoc_vcu_h264 \
-map "[aud1]" -c:a:0 aac \
-map "[aud2]" -c:a:1 aac \
-map "[aud3]" -c:a:2 aac \
-map "[aud4]" -c:a:3 aac \
-map "[aud5]" -c:a:4 aac \
-var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2 v:3,a:3 v:4,a:4" \
-f hls \
-hls_wrap 5 \
-hls_time 6 \
-master_pl_name "test.m3u8" -hls_segment_filename "${HLS_DIR}/test_%v-%d.ts" "${HLS_DIR}/test_%v.m3u8"
With the above, you should get an output similar to:
ffmpeg version n4.4.xlnx.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --prefix=/opt/xilinx/ffmpeg --datadir=/opt/xilinx/ffmpeg/etc --enable-x86asm --enable-libxma2api --disable-doc --enable-libxvbm --enable-libxrm --enable-libfreetype --enable-libfontconfig --extra-cflags=-I/opt/xilinx/xrt/include/xma2 --extra-ldflags=-L/opt/xilinx/xrt/lib --extra-libs=-lxma2api --extra-libs=-lxrt_core --extra-libs=-lxrt_coreutil --extra-libs=-lpthread --extra-libs=-ldl --disable-static --enable-shared
...
Input #0, flv, from 'rtmp://ingress.w1.invintus.com/srcEncoders/247airtestfeed':
Metadata:
|RtmpSampleAccess: false
length : 1683456
timescale : 48000
sampletype : mp4a
audiochannels : 2
...
Stream mapping:
Stream #0:1 (mpsoc_vcu_h264) -> multiscale_xma
Stream #0:2 (aac) -> asplit
multiscale_xma:output0 -> Stream #0:0 (mpsoc_vcu_h264)
multiscale_xma:output1 -> Stream #0:1 (mpsoc_vcu_h264)
multiscale_xma:output2 -> Stream #0:2 (mpsoc_vcu_h264)
multiscale_xma:output3 -> Stream #0:3 (mpsoc_vcu_h264)
multiscale_xma:output4 -> Stream #0:4 (mpsoc_vcu_h264)
asplit:output0 -> Stream #0:5 (aac)
asplit:output1 -> Stream #0:6 (aac)
asplit:output2 -> Stream #0:7 (aac)
asplit:output3 -> Stream #0:8 (aac)
asplit:output4 -> Stream #0:9 (aac)
...
[hls @ 0x55e6ef938000] [0mOpening '/tmp/hls/test_0-0.ts' for writing
[1;35m[hls @ 0x55e6ef938000] [0mOpening '/tmp/hls/test_0.m3u8.tmp' for writing
[1;35m[hls @ 0x55e6ef938000] [0mOpening '/tmp/hls/test_1-0.ts' for writing
[1;35m[hls @ 0x55e6ef938000] [0mOpening '/tmp/hls/test_1.m3u8.tmp' for writing
[1;35m[hls @ 0x55e6ef938000] [0mOpening '/tmp/hls/test_2-0.ts' for writing
...
Let's know if this solves your problem. Cheers,
Ok thank you! I knew it was probably just a cli syntax issue. I don't often have to break the audio down in this manor. I do appreciate the guidance.and I do now see the ffmpeg asplit
directive spelled out in the sdk documentation: https://xilinx.github.io/video-sdk/v2.0/using_ffmpeg.html#mapping-audio-streams
I am using a aws VT1 and wanted to try out the scaler for HLS transcoding. I swapped out the bars and tone filter in the live hls example with a rtmp live stream input and it crashes on the filter-graphs for the scaler. my first assumption is that its a syntax mistake by me. but I wanted to pose the question here in case the documentation needed updating or there is an actual issue happening. Other means of HLS live transcode with filters not using
multiscale_xma
work just fine. I just wanted to take advantage of the scaler.here is the full debug output from ffmpeg: