Regression in stream output recording between 3.0.3/3.0.8 and 3.0.11
Hi,
Apologies for the report, but I'll try to give as many details as I can.
I have a Raspberry Pi running Raspbian 5.4.x (Linux 5.4.51-v7l+ #1326 (closed) SMP Fri Jul 17 10:51:18 BST 2020 armv7l GNU/Linux) and in the last week I updated VLC from 3.0.8 to the latest VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced).
I have a recurring cron job to record a video stream of live Mass, from http://t4p7h5h4.stackpathcdn.com/CSTV-HTTP/dolphinsbarn.stream/playlist.m3u8 , using the following command:
cvlc http://t4p7h5h4.stackpathcdn.com/CSTV-HTTP/dolphinsbarn.stream/playlist.m3u8 --sout file/mp4:/home/pi/omv-media/recordings/`date +\%Y-\%m-\%d`-dolphinsbarn-mass-sun9am.mp4
Since the update, the generated video is slightly smaller, and when playing it on my desktop VLC and selecting a later time, it shows a grey frame for a few seconds and/or then the frame gets partially corrupted for a while. It also doesn't render well on Chrome, and when converting with ffmpeg I get frequent messages of corrupt frames:
[h264 @ 0x7f8f63000000] error while decoding MB 30 37, bytestream -51 699.2kbits/s dup=48886 drop=0 speed= 4x
[h264 @ 0x7f8f63000000] concealing 723 DC, 723 AC, 723 MV errors in I frame
2020-08-01-dolphinsbarn-mass-sat6pm.mp4: corrupt decoded frame in stream 1
and ffmpeg -i returns the following error:
[h264 @ 0x7ffd5b002000] error while decoding MB 7 45, bytestream -20
[h264 @ 0x7ffd5b002000] concealing 234 DC, 234 AC, 234 MV errors in I frame
I had an older Raspberry Pi image lying around, with VLC 3.0.3 and running the same command generates proper videos, as expected. I tried out recording the stream using ffmpeg directly and it also seems to do it properly, without the same issues, suggesting that it is not a source problem but rather a client problem.
The media info on ffmpeg for all of them seems to be fairly the same, except for the error in 3.0.11:
FFMPEG Recorded:
Input [#0](https://code.videolan.org/videolan/vlc/-/issues/0), mov,mp4,m4a,3gp,3g2,mj2, from '2020-08-02-dolphinsbarn-mass-sun9am-ffmpeg.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 01:00:19.61, start: 0.000000, bitrate: 405 kb/s
Stream [#0](https://code.videolan.org/videolan/vlc/-/issues/0):0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1024x768 [SAR 1:1 DAR 4:3], 339 kb/s, 16.08 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandler
Stream [#0](https://code.videolan.org/videolan/vlc/-/issues/0):1(und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 63 kb/s (default)
Metadata:
handler_name : SoundHandler
3.0.3 Recorded:
Input [#0](https://code.videolan.org/videolan/vlc/-/issues/0), mov,mp4,m4a,3gp,3g2,mj2, from '2020-08-02-dolphinsbarn-mass-sun9am-3.0.8.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: mp41avc1
creation_time : 2020-08-02T09:00:01.000000Z
playback_requirements: QuickTime 6.0 or greater
playback_requirements-eng: QuickTime 6.0 or greater
encoder : vlc 3.0.3 stream output
encoder-eng : vlc 3.0.3 stream output
Duration: 01:00:09.40, start: 0.000000, bitrate: 405 kb/s
Stream [#0](https://code.videolan.org/videolan/vlc/-/issues/0):0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1024x768 [SAR 1:1 DAR 4:3], 339 kb/s, 16.08 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2020-08-02T09:00:01.000000Z
handler_name : VideoHandler
Stream [#0](https://code.videolan.org/videolan/vlc/-/issues/0):1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2020-08-02T09:00:01.000000Z
handler_name : SoundHandler
3.0.11 Recorded:
[h264 @ 0x7ffd5b002000] error while decoding MB 7 45, bytestream -20
[h264 @ 0x7ffd5b002000] concealing 234 DC, 234 AC, 234 MV errors in I frame
Input [#0](https://code.videolan.org/videolan/vlc/-/issues/0), mov,mp4,m4a,3gp,3g2,mj2, from '2020-08-02-dolphinsbarn-mass-sun9am-3.0.11.mp4':
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: mp41avc1
creation_time : 2020-08-02T09:00:01.000000Z
playback_requirements: QuickTime 6.0 or greater
playback_requirements-eng: QuickTime 6.0 or greater
encoder : vlc 3.0.11 stream output
encoder-eng : vlc 3.0.11 stream output
Duration: 01:00:09.37, start: 0.000000, bitrate: 380 kb/s
Stream [#0](https://code.videolan.org/videolan/vlc/-/issues/0):0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1024x768 [SAR 1:1 DAR 4:3], 319 kb/s, 16.36 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
creation_time : 2020-08-02T09:00:01.000000Z
handler_name : VideoHandler
Stream [#0](https://code.videolan.org/videolan/vlc/-/issues/0):1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2020-08-02T09:00:01.000000Z
handler_name : SoundHandler
Here are the 3 videos I recorded today at the same time - using ffmpeg, 3.0.3 and 3.0.11 if they help:
https://drive.google.com/drive/folders/1NoM6IXSz9682BcFu8A0rYopsH0nzMr2N?usp=sharing
As mentioned, I have videos from previous weekends where they had been recorded with 3.0.8 and it still worked, so I expect it to be a more recent regression or change. I'm just sharing the videos from 3.0.3, 3.0.11 and ffmpg for comparison as they record fairly the same time period. The fact that ffmpeg works well, and older VLC as well makes me suspect it's a regression, but let me know if that's not supposed to be the case.
I'm attaching a debug-log for a small sample recording session of one such clip on 3.0.11 . If it helps I can try to get a debug log for 3.0.3 as well.
I hope I'm following the bug reporting instructions, but let me know otherwise.
Thanks in advance for your time.