杜比透传
2020/3/4 9:18:57
ffmpeg -i C:\Users\Administrator\Desktop\dubi.mp4 -codec copy -vn apple.eac3 提取杜比全景声中的音频 ffmpeg -i C:\Users\Administrator\Desktop\dubi.mp4 -codec copy -vn apple.eac3
2020/3/4 10:43:22
/work/lvyunxiang/lajitong/Ultralink_SDK_v1.4.38918_BUILD20181015/003_api&sample/samples/4KPlay
2020/3/4 10:52:40
vim /work/lvyunxiang/Ultralink_SDK_v1.4.38914_BUILD181010/SampleCode/4KPlay/utility.cpp redlink 4kplay的数据
2020/3/4 11:06:25
ffmpeg -i apple.h264 -i apple.eac3 -c:a copy -f mp4 test_create.mp4 将杜比音频视频 混合为mp4
ffmpeg 支持eac3
ffmpeg -i C:\Users\Administrator\apple.eac3 -ar 48000 -f s16le out.pcm
./ffmpeg -y -f s16le -ac 8 -ar 48000 -i /home/out.pcm -c:a eac3 -f mpegts /home/test_eac3.ts //编码后还是杜比全景声
ffmpeg -i F:\ChID_voices_1280x720p_25fps_h264_6ch_640kbps_ddp_joc.mp4 -codec copy -vn apple.eac3
ffmpeg -i C:\Users\Administrator\apple.eac3 -ar 48000 -f s16le out.pcm
这样得到的pcm是6个声道的
桌面上的dble.mp4也是6个声道
ffmpeg -y -f s16le -ac 6 -ar 48000 -i out.pcm -c:a eac3 -f mpegts test_eac3.ts pcm生成ts
The point is to provide an open-source way for mixers who also use ffmpeg to encode Dolby Atmos content. The Dolby TrueHD encoder is almost finished in development for TrueHD streams without Atmos, so it won't be a bad idea to add support for Atmos encoding with TrueHD eventually.
http://ffmpeg.org/pipermail/ffmpeg-user/2016-November/034137.html //ffmpeg 中添加杜比全景声的需求
https://blog.csdn.net/av_geek/article/details/18445369/ //ac3 eac3格式
0b 77 04 ff 3f 84 e0 3e 49 20 8c 20 80 88 20 d0 1.15中的eac3头
-vsync 1 -async 1 -y -f decklink_sdi -pixel_format yuv420p -video_size 1920x1080 -standard 1080i50 -audio_pr 1 -video_con sdi -audio_con embd -channel 16 -ar 48000 -i 1 -discontinuity_exit -channel_num 3 -snapshots 1 -telnet_port 1700 -maxrate 8000000 -vn -acodec copy -f mpegts output.ts -loglevel verbose -stats
//my_add
av_log(NULL, AV_LOG_FATAL, "lvyunxiang test******sdi_input AV_CODEC_ID_EAC3:\n");
a_codecpar->codec_id = AV_CODEC_ID_EAC3;
//a_codecpar->bits_per_coded_sample=16;
/*switch(c->sample_depth) {
case 32:
if(useac3) {
//a_codecpar->codec_id = AV_CODEC_ID_AC3;;
a_codecpar->codec_id = AV_CODEC_ID_EAC3;
a_codecpar->bits_per_coded_sample=16;
} else {
a_codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;;
a_codecpar->bits_per_coded_sample=32;
}
break;
case 24:
a_codecpar->codec_id = AV_CODEC_ID_PCM_S24LE;
a_codecpar->bits_per_coded_sample=24;
break;
case 16:
default:
a_codecpar->codec_id = AV_CODEC_ID_PCM_S16LE;
a_codecpar->bits_per_coded_sample=16;
break;
}
*/
a_codecpar->channels = 6;
ffmpeg -i "C:\Users\Administrator\Desktop\Untitled 01.avi" -ar 48000 -f s32le out_decklink.pcm
自己的
height 1080, rowbytes 3840, time 35520000, duration 40000, flag 0, buf 0x7f646442c000, index: 38
sampleCount 1920, packetTime 35520000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35560000, duration 40000, flag 0, buf 0x7f6463ffd000, index: 39
sampleCount 1920, packetTime 35560000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35600000, duration 40000, flag 0, buf 0x7f6463bce000, index: 40
sampleCount 1920, packetTime 35600000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35640000, duration 40000, flag 0, buf 0x7f646379f000, index: 41
sampleCount 1920, packetTime 35640000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35680000, duration 40000, flag 0, buf 0x7f6463370000, index: 42
sampleCount 1920, packetTime 35680000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35720000, duration 40000, flag 0, buf 0x7f6462f41000, index: 43
sampleCount 1920, packetTime 35720000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35760000, duration 40000, flag 0, buf 0x7f6462b12000, index: 44
sampleCount 1920, packetTime 35760000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35800000, duration 40000, flag 0, buf 0x7f64624fa000, index: 45
sampleCount 1920, packetTime 35800000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35840000, duration 40000, flag 0, buf 0x7f64739ea000, index: 46
sampleCount 1920, packetTime 35840000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35880000, duration 40000, flag 0, buf 0x7f64735bb000, index: 47
sampleCount 1920, packetTime 35880000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35920000, duration 40000, flag 0, buf 0x7f647318c000, index: 48
sampleCount 1920, packetTime 35920000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 35960000, duration 40000, flag 0, buf 0x7f6472d5d000, index: 49
sampleCount 1920, packetTime 35960000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36000000, duration 40000, flag 0, buf 0x7f647292e000, index: 0
sampleCount 1920, packetTime 36000000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36040000, duration 40000, flag 0, buf 0x7f64724ff000, index: 1
sampleCount 1920, packetTime 36040000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36080000, duration 40000, flag 0, buf 0x7f64720d0000, index: 2
sampleCount 1920, packetTime 36080000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36120000, duration 40000, flag 0, buf 0x7f6471ca1000, index: 3
sampleCount 1920, packetTime 36120000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36160000, duration 40000, flag 0, buf 0x7f6471872000, index: 4
sampleCount 1920, packetTime 36160000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36200000, duration 40000, flag 0, buf 0x7f647125a000, index: 5
sampleCount 1920, packetTime 36200000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36240000, duration 40000, flag 0, buf 0x7f6470e2b000, index: 6
sampleCount 1920, packetTime 36240000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36280000, duration 40000, flag 0, buf 0x7f64709fc000, index: 7
sampleCount 1920, packetTime 36280000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36320000, duration 40000, flag 0, buf 0x7f64705cd000, index: 8
sampleCount 1920, packetTime 36320000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36360000, duration 40000, flag 0, buf 0x7f647019e000, index: 9
sampleCount 1920, packetTime 36360000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36400000, duration 40000, flag 0, buf 0x7f646fd6f000, index: 10
sampleCount 1920, packetTime 36400000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36440000, duration 40000, flag 0, buf 0x7f646f940000, index: 11
sampleCount 1920, packetTime 36440000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36480000, duration 40000, flag 0, buf 0x7f646f511000, index: 12
sampleCount 1920, packetTime 36480000, audio byte 0x7f645c02aa30
height 1080, rowbytes 3840, time 36520000, duration 40000, flag 0, buf 0x7f646f0e2000, index: 13
ajx的
height 1080, rowbytes 3840, time 17000000, duration 20000, flag 0, buf 0x7f9abc9fc000, index: 0
sampleCount 960, packetTime 17000000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17020000, duration 20000, flag 0, buf 0x7f9abc5cd000, index: 1
sampleCount 960, packetTime 17020000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17040000, duration 20000, flag 0, buf 0x7f9abc19e000, index: 2
sampleCount 960, packetTime 17040000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17060000, duration 20000, flag 0, buf 0x7f9abbd6f000, index: 3
sampleCount 960, packetTime 17060000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17080000, duration 20000, flag 0, buf 0x7f9abb940000, index: 4
sampleCount 960, packetTime 17080000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17100000, duration 20000, flag 0, buf 0x7f9abb511000, index: 5
sampleCount 960, packetTime 17100000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17120000, duration 20000, flag 0, buf 0x7f9abb0e2000, index: 6
sampleCount 960, packetTime 17120000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17140000, duration 20000, flag 0, buf 0x7f9abaaca000, index: 7
sampleCount 960, packetTime 17140000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17160000, duration 20000, flag 0, buf 0x7f9aba69b000, index: 8
sampleCount 960, packetTime 17160000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17180000, duration 20000, flag 0, buf 0x7f9aba26c000, index: 9
sampleCount 960, packetTime 17180000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17200000, duration 20000, flag 0, buf 0x7f9ab9e3d000, index: 10
sampleCount 960, packetTime 17200000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17220000, duration 20000, flag 0, buf 0x7f9ab9a0e000, index: 11
sampleCount 960, packetTime 17220000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17240000, duration 20000, flag 0, buf 0x7f9ab95df000, index: 12
sampleCount 960, packetTime 17240000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17260000, duration 20000, flag 0, buf 0x7f9ab91b0000, index: 13
sampleCount 960, packetTime 17260000, audio byte 0x7f9aa802aa00
height 1080, rowbytes 3840, time 17280000, duration 20000, flag 0, buf 0x7f9ab8d81000, index: 14
-vsync 1 -async 1 -y -f decklink_sdi -pixel_format yuv420p -video_size 1920x1080 -standard 1080i50 -audio_pr 1 -video_con sdi -audio_con embd -channel 2 -ar 48000 -i 1 -discontinuity_exit -channel_num 3 -snapshots 1 -telnet_port 1700 -filter_complex yadif=mode=0:parity=auto:deint=0[dint],[dint]split=outputs=1:[proxy0];[proxy0]scale=1920:1080[out0] -rtpflags +latm -aspect 16:9 -8x8dct 1 -profile:v high -level 40 -bufsize 6000000 -minrate 8000000 -maxrate 8000000 -rc_init_occupancy 7200000 -bt 800000 -aud 1 -mbtree 0 -mixed-refs 0 -fast-pskip 1 -vflags +cgop -b_strategy 1 -b-bias 12 -trellis 0 -bidir_refine 0 -vflags +loop -deblock -2:-2 -cmp chroma -psy 0 -weightb 0 -weightp 1 -b-pyramid 0 -subq 4 -coder 1 -qcomp 0.01 -direct-pred auto -aq-strength 0.8 -i_qfactor 0.7 -b_qfactor 1.2 -nr 0 -x264opts chroma_qp_offset=12:ipratio=1.40:pbratio=1.20:force_cfr -pix_fmt yuv420p -r 25 -vflags +ildct+ilme -b:v 8000000 -rc-lookahead 4 -g 50 -keyint_min 5 -bf 3 -refs 2 -mbd 0 -me_method dia -me_range 12 -sc_threshold 40 -qmax 50 -qmin 13 -qdiff 4 -vcodec libx264 -map [out0]:v:0 -max_muxing_queue_size 1024 -map 0:a:0 -acodec copy -f mpegts output.ts -loglevel verbose -stats
可以运行的
-vsync 1 -async 1 -y -f decklink_sdi -pixel_format yuv420p -video_size 1920x1080 -standard 1080i50 -audio_pr 1 -video_con sdi -audio_con embd -channel 2 -ar 48000 -i 1 -discontinuity_exit -channel_num 3 -snapshots 1 -telnet_port 1700 -filter_complex yadif=mode=0:parity=auto:deint=0[dint],[dint]split=outputs=1:[proxy0];[proxy0]scale=1920:1080[out0] -rtpflags +latm -aspect 16:9 -8x8dct 1 -profile:v high -level 40 -bufsize 6000000 -minrate 3000000 -maxrate 3000000 -rc_init_occupancy 7200000 -bt 300000 -aud 1 -mbtree 0 -mixed-refs 0 -fast-pskip 1 -vflags +cgop -b_strategy 1 -b-bias 12 -trellis 0 -bidir_refine 0 -vflags +loop -deblock -2:-2 -cmp chroma -psy 0 -weightb 0 -weightp 1 -b-pyramid 0 -subq 4 -coder 1 -qcomp 0.01 -direct-pred auto -aq-strength 0.8 -i_qfactor 0.7 -b_qfactor 1.2 -nr 0 -x264opts chroma_qp_offset=12:ipratio=1.40:pbratio=1.20:force_cfr -pix_fmt yuv420p -r 25 -vflags +ildct+ilme -b:v 3000000 -rc-lookahead 4 -g 50 -keyint_min 5 -bf 3 -refs 2 -mbd 0 -me_method dia -me_range 12 -sc_threshold 40 -qmax 50 -qmin 13 -qdiff 4 -vcodec libx264 -map [out0]:v:0 -max_muxing_queue_size 1024 -map 0:a:0 -acodec copy -f mpegts output.ts -loglevel verbose -stats
会崩溃的
-vsync 1 -async 1 -y -f decklink_sdi -pixel_format yuv420p -video_size 1920x1080 -standard 1080i50 -audio_pr 1 -video_con sdi -audio_con embd -channel 2 -ar 48000 -i 1 -discontinuity_exit -channel_num 4 -snapshots 1 -telnet_port 1700 -filter_complex split=outputs=1:[proxy0];[proxy0]scale=1920:1080[out0] -rtpflags +latm -aspect 16:9 -profile:v high444 -level 40 -bufsize 6000000 -minrate 8000000 -maxrate 8000000 -rc_init_occupancy 7200000 -bt 800000 -aud 1 -mbtree 0 -mixed-refs 0 -fast-pskip 1 -vflags +cgop -b_strategy 1 -b-bias 12 -trellis 0 -bidir_refine 0 -vflags +loop -deblock -2:-2 -cmp chroma -psy 0 -weightb 0 -weightp 1 -b-pyramid 0 -subq 4 -coder 0 -qcomp 0.01 -direct-pred auto -aq-strength 0.8 -i_qfactor 0.7 -b_qfactor 1.2 -nr 0 -x264opts chroma_qp_offset=12:ipratio=1.40:pbratio=1.20:force_cfr -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -pix_fmt yuv420p -r 25 -vflags +ildct+ilme -b:v 8000000 -rc-lookahead 18 -g 50 -keyint_min 5 -bf 3 -refs 3 -mbd 0 -me_method hex -me_range 16 -sc_threshold 40 -qmax 50 -qmin 13 -qdiff 4 -vcodec libx264 -map [out0]:v:0 -max_muxing_queue_size 1024 -codec:a:0 copy -map 0:a:0 -f mpegts output.ts -loglevel verbose -stats
编码器可以用 但是直接启动崩溃
/usr/local/yckj/bin/transcoder -vsync 1 -async 1 -y -f decklink_sdi -pixel_format yuv420p -video_size 1920x1080 -standard 1080i50 -audio_pr 1 -video_con sdi -audio_con embd -channel 2 -ar 48000 -i 1 -dts_error_threshold 1.0 -discontinuity_exit -channel_num 4 -snapshots 1 -log /var/log/transcoder_4.log -telnet_port 1700 -filter_complex split=outputs=1:[proxy0];[proxy0]scale=720:576[out0] -rtpflags +latm -aspect 16:9 -profile:v high444 -level 40 -bufsize 6000000 -minrate 8000000 -maxrate 8000000 -rc_init_occupancy 7200000 -bt 800000 -aud 1 -mbtree 0 -mixed-refs 0 -fast-pskip 1 -vflags +cgop -b_strategy 1 -b-bias 12 -trellis 0 -bidir_refine 0 -vflags +loop -deblock -2:-2 -cmp chroma -psy 0 -weightb 0 -weightp 1 -b-pyramid 0 -subq 4 -coder 0 -qcomp 0.01 -direct-pred auto -aq-strength 0.8 -i_qfactor 0.7 -b_qfactor 1.2 -nr 0 -x264opts chroma_qp_offset=12:ipratio=1.40:pbratio=1.20:force_cfr -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -pix_fmt yuv420p -r 25 -vflags +ildct+ilme -b:v 8000000 -rc-lookahead 18 -g 50 -keyint_min 5 -bf 3 -refs 3 -mbd 0 -me_method hex -me_range 16 -sc_threshold 40 -qmax 40 -qmin 4 -qdiff 4 -vcodec libx264 -map [out0]:v:0 -max_muxing_queue_size 1024 -codec:a:0 copy -map 0:a:0 -f mpegts /usr/local/yckj/bin/.proxy0_out_fifo_t_channel0 -loglevel verbose -stats