Need info on ATSC3 stream capture going wrong

Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Need info on ATSC3 stream capture going wrong

Deron Kazmaier
Hello, this is a really strange one for me that is way outside my
understanding. I've been using ffmpeg to stream tv shows and I've run
across a TV station I can not capture! The symptoms are after 12:55 or
so minutes the audio goes silent in the output, and shortly after that
ffmpeg quits. This works with some 40 other tv channels!

I had to bump up the loglevel to 90(!) to see something that might
explain this. Obviously 13 minutes of loglevel 90 is a huge amount of
output, so I'm hoping I have identified the important part and make it
obviously enough that someone might have some guidance on what is wrong.
What appears to happen is some audio timestamp drift error is noticed,
compensation is applied that perhaps has a math sign error, a whole lot
of silence is inserted, the incoming data is ignored because of that
silence, and the input buffer is overflowed.

Happy to provide complete uncut console data, but it is 50mb! Hopefully
this is enough that someone can guide me to a solution!

Thanks,

Deron


Command (without proper shell quoting because it is not issued from the
shell):

ffmpeg -loglevel 90 -f lavfi -i
movie=/dev/dvb/adapter0/dvr0:f=mpegts:s=dv+da[out0+subcc][out1]
-force_key_frames expr:gte(t,n_forced*2) -c:v libx264 -profile:v high
-level:v 4.0 -vf scale=1280:720 -s 1280x720 -aspect 1280:720 -pix_fmt
yuv420p -r 30 -preset veryfast -b:v 1200k -c:a libfdk_aac -cutoff 18000
-b:a 128k -ar 48000 -ac 2 -async 2 -flags:a -global_header -af
volume=volume=10.000dB:precision=float -f hls -hls_time 2 -hls_list_size
10 -hls_wrap 999999 -hls_flags delete_segments -hls_segment_filename
/var/www/html/stream/v.mid.%06d.ts -y /var/www/html/stream/v.mid.m3u8
-sn -force_key_frames expr:gte(t,n_forced*2) -c:v libx264 -profile:v
high -level:v 4.0 -vf scale=640:360 -s 640x360 -aspect 640:360 -pix_fmt
yuv420p -r 30 -preset veryfast -b:v 200k -c:a libfdk_aac -profile:a
aac_he -cutoff 18000 -b:a 96k -ar 44100 -ac 1 -flags:a -global_header
-af volume=volume=10.000dB:precision=float -f hls -hls_time 2
-hls_list_size 10 -hls_wrap 999999 -hls_flags delete_segments
-hls_segment_filename /var/www/html/stream/v.portrait.%06d.ts -y
/var/www/html/stream/v.portrait.m3u8 -sn -vn -c:a libfdk_aac -profile:a
aac_he -cutoff 18000 -b:a 96k -ar 44100 -ac 2 -flags:a -global_header
-af volume=volume=10.000dB:precision=float -f hls -hls_time 2
-hls_list_size 10 -hls_wrap 999999 -hls_flags delete_segments
-hls_segment_filename /var/www/html/stream/a.hi.%06d.ts -y
/var/www/html/stream/a.hi.m3u8 -sn -vn -c:a libfdk_aac -profile:a aac_he
-cutoff 18000 -b:a 60k -ar 32000 -ac 1 -flags:a -global_header -af
volume=volume=10.000dB:precision=float -f hls -hls_time 2 -hls_list_size
10 -hls_wrap 999999 -hls_flags delete_segments -hls_segment_filename
/var/www/html/stream/a.low.%06d.ts -y /var/www/html/stream/a.low.m3u8
-vf scale=426:240 -s 426x240 -aspect 426:240 -f image2 -vf fps=fps=2 -y
/var/www/html/stream/t.%06d.jpg -vn -map a:0 -c:a pcm_s16le -ar 48000
-ac 2 -f stream_segment -segment_time 2 -segment_format s16le -y
/var/www/html/stream/a.loudness.%06d.pcm


ffmpeg version N-93562-g3e10223385 Copyright (c) 2000-2019 the FFmpeg
developers
   built with gcc 7 (Ubuntu 7.2.0-8ubuntu3)
   configuration: --enable-shared --enable-gpl --enable-nonfree
--enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis
--enable-libfdk-aac --disable-stripping
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 50.100 / 58. 50.100
   libavformat    58. 27.102 / 58. 27.102
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 48.100 /  7. 48.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100

< ... snip ...>

[graph_1_aresample_in_0_1 @ 0x56452dc9ad00] [SWR @ 0x56452dc9b600]
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_1_aresample_in_0_1 @ 0x56452dc9ad00] [SWR @ 0x56452dc9b600] Using
fltp internally between filters
[graph_3_aresample_in_0_1 @ 0x56452dc5e480] [SWR @ 0x56452ddb9600]
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_3_aresample_in_0_1 @ 0x56452dc5e480] [SWR @ 0x56452ddb9600] Using
fltp internally between filters
[graph_4_aresample_in_0_1 @ 0x56452dda0380] [SWR @ 0x56452dda1080]
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_4_aresample_in_0_1 @ 0x56452dda0380] [SWR @ 0x56452dda1080] Using
fltp internally between filters
[graph_5_aresample_in_0_1 @ 0x56452f0c9200] [SWR @ 0x56452f0c9c40]
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_5_aresample_in_0_1 @ 0x56452f0c9200] [SWR @ 0x56452f0c9c40] Using
fltp internally between filters
[graph_7_aresample_in_0_1 @ 0x56452f18a740] [SWR @ 0x56452f18b180]
compensating audio timestamp drift:-0.001021 compensation:-2 in:48000
[graph_7_aresample_in_0_1 @ 0x56452f18a740] [SWR @ 0x56452f18b180] Using
fltp internally between filters
[libfdk_aac @ 0x56452dbd7440] Queue input is backward in time

< ... snip ...>

[graph_1_aresample_in_0_1 @ 0x56452dc9ad00] [SWR @ 0x56452dc9b600]
adding 16384 audio samples of silence
[graph_1_aresample_in_0_1 @ 0x56452dc9ad00] [SWR @ 0x56452dc9b600]
adding 15311 audio samples of silence
[graph_3_aresample_in_0_1 @ 0x56452dc5e480] [SWR @ 0x56452ddb9600]
adding 16384 audio samples of silence
[graph_3_aresample_in_0_1 @ 0x56452dc5e480] [SWR @ 0x56452ddb9600]
adding 15311 audio samples of silence
[graph_4_aresample_in_0_1 @ 0x56452dda0380] [SWR @ 0x56452dda1080]
adding 16384 audio samples of silence
[graph_4_aresample_in_0_1 @ 0x56452dda0380] [SWR @ 0x56452dda1080]
adding 15311 audio samples of silence
[graph_5_aresample_in_0_1 @ 0x56452f0c9200] [SWR @ 0x56452f0c9c40]
adding 16384 audio samples of silence
[graph_5_aresample_in_0_1 @ 0x56452f0c9200] [SWR @ 0x56452f0c9c40]
adding 15311 audio samples of silence
[graph_7_aresample_in_0_1 @ 0x56452f18a740] [SWR @ 0x56452f18b180]
adding 16384 audio samples of silence
[graph_7_aresample_in_0_1 @ 0x56452f18a740] [SWR @ 0x56452f18b180]
adding 15311 audio samples of silence
[libfdk_aac @ 0x56452de52600] Queue input is backward in time

< ... snip ...>

[ac3 @ 0x56452db4ed00] incomplete frame

< ... snip ...>

[mpeg2video @ 0x56452dafba80] Invalid mb type in B-frame at 69 36
[mpeg2video @ 0x56452dafba80] Warning MVs not available
[mpeg2video @ 0x56452dafba80] concealing 720 DC, 720 AC, 720 MV errors
in B frame
[Parsed_movie_0 @ 0x56452dac1a00] EOF timestamp not reliable
movie=/dev/dvb/adapter0/dvr0:f=mpegts:s=dv+da[out0+subcc][out1]: Value
too large for defined data type

and then ffmpeg starts wrapping things up and quits.


_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Need info on ATSC3 stream capture going wrong

Carl Zwanzig
On 4/14/2019 7:14 AM, Deron wrote:
> What appears to happen is some audio timestamp drift error is noticed,
> compensation is applied that perhaps has a math sign error, a whole lot of
> silence is inserted, the incoming data is ignored because of that silence,
> and the input buffer is overflowed.

I wonder, and this is just a WAG, if that stream has enough uncorrected bit
errors spread around that the demux/decoder can't figure out where the data
blocks start and then picks a likely spot that's wrong. Can you pick out the
error stats for different channels and compare them?

z!

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Need info on ATSC3 stream capture going wrong

Deron Kazmaier
On 4/14/19 10:42 AM, Carl Zwanzig wrote:

> On 4/14/2019 7:14 AM, Deron wrote:
>> What appears to happen is some audio timestamp drift error is
>> noticed, compensation is applied that perhaps has a math sign error,
>> a whole lot of silence is inserted, the incoming data is ignored
>> because of that silence, and the input buffer is overflowed.
>
> I wonder, and this is just a WAG, if that stream has enough
> uncorrected bit errors spread around that the demux/decoder can't
> figure out where the data blocks start and then picks a likely spot
> that's wrong. Can you pick out the error stats for different channels
> and compare them?
>
> z!

Could errors in the data stream produce such repeatable results?

I don't know how accurate azap's status is, but I see no uncorrected
blocks and reported signal strength is perfect.

status 1f | signal ffff | snr 0130 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 012a | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 012a | ber ffffffff | unc 00000000 |
FE_HAS_LOCK

Here is some other station's output that do not suffer this problem.

status 1f | signal ffff | snr 0143 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 0143 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 0147 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK

....

status 1f | signal eb84 | snr 00e3 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal eb84 | snr 00e8 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal eb84 | snr 00e8 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK

....

status 1f | signal ffff | snr 0140 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 0140 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 0140 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK

...

status 1f | signal ffff | snr 0117 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 0116 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK
status 1f | signal ffff | snr 0119 | ber ffffffff | unc 00000000 |
FE_HAS_LOCK

Thanks for your WAG. Anyone with another?

Deron

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".