Errors and artefacts when decoding a .h264 file from security camera

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

Errors and artefacts when decoding a .h264 file from security camera

Robert Krüger-3
Hi,

I have a security camera file that gives me decoding errors which are very
likely the reason for several macroblocks being broken in the resulting
video (by far not all, you can still recognize the motive).

Are there any command line flags I can try to fix this or shall I submit a
trac ticket with the file?

Thanks,
Robert

Command line and output:

~/src/FFmpeg/ffmpeg -i file0000.h264 -c:v mpeg4 -q 1 file0000-transcoded.mov
ffmpeg version N-98974-g2a19232c19 Copyright (c) 2000-2020 the FFmpeg
developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --enable-libkvazaar --enable-gpl --enable-libx264
--enable-libx265
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.101.101 / 58.101.101
  libavformat    58. 51.101 / 58. 51.101
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[h264 @ 0x7fb2b0009400] Increasing reorder buffer to 1
[h264 @ 0x7fb2b0009400] Increasing reorder buffer to 2
[h264 @ 0x7fb2b0009400] Increasing reorder buffer to 4
Input #0, h264, from 'file0000.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
File 'file0000-transcoded.mov' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7fb260f00000] deprecated pixel format used, make sure you did
set range correctly
Output #0, mov, to 'file0000-transcoded.mov':
  Metadata:
    encoder         : Lavf58.51.101
    Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1280x720,
q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.101.101 mpeg4
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[h264 @ 0x7fb2ae80ee00] Invalid NAL unit 0, skipping.
[h264 @ 0x7fb2ae823000] Invalid NAL unit 0, skipping.
[h264 @ 0x7fb2ae810600] A non-intra slice in an IDR NAL
unit.trate=3503.0kbits/s speed=17.9x
[h264 @ 0x7fb2ae810600] decode_slice_header error
[h264 @ 0x7fb2ae80ca00] A non-intra slice in an IDR NAL unit.
[h264 @ 0x7fb2ae80ca00] decode_slice_header error
[h264 @ 0x7fb2ae80f400] Invalid NAL unit 0, skipping.
[h264 @ 0x7fb2ae80c400] Invalid NAL unit 0, skipping.
[h264 @ 0x7fb2ae80ca00] A non-intra slice in an IDR NAL
unit.trate=3498.9kbits/s speed=19.1x
[h264 @ 0x7fb2ae80ca00] decode_slice_header error
[NULL @ 0x7fb2b0009400] sps_id 32 out of range
[h264 @ 0x7fb2ae80f400] Invalid NAL unit 0, skipping.
[NULL @ 0x7fb2b0009400] sps_id 32 out of range
[h264 @ 0x7fb2ae80c400] Invalid NAL unit 0, skipping.
[NULL @ 0x7fb2b0009400] pps_id 3199971767 out of range8.44
bitrate=3480.9kbits/s speed=19.4x
[h264 @ 0x7fb2ae80f400] Invalid NAL unit 0, skipping.
[NULL @ 0x7fb2b0009400] pps_id 3199971767 out of range
[h264 @ 0x7fb2ae80c400] Invalid NAL unit 0, skipping.
[NULL @ 0x7fb2b0009400] too many reference frames 32:08.40
bitrate=3495.3kbits/s speed=19.5x
[h264 @ 0x7fb2ae823000] too many reference frames 32
    Last message repeated 2 times
frame= 2014 fps=490 q=1.0 Lsize=   34484kB time=00:01:20.52
bitrate=3508.3kbits/s speed=19.6x
video:34474kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.028308%
_______________________________________________
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: Errors and artefacts when decoding a .h264 file from security camera

Carl Eugen Hoyos-2


> Am 09.09.2020 um 17:18 schrieb Robert Krüger <[hidden email]>:
>
> I have a security camera file that gives me decoding errors which are very
> likely the reason for several macroblocks being broken in the resulting
> video (by far not all, you can still recognize the motive).
>
> Are there any command line flags I can try to fix this or shall I submit a
> trac ticket with the file?

Please provide a sample file.

Carl Eugen
_______________________________________________
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: Errors and artefacts when decoding a .h264 file from security camera

Robert Krüger-3
On Fri, Sep 11, 2020 at 9:47 AM Carl Eugen Hoyos <[hidden email]> wrote:

>
>
> > Am 09.09.2020 um 17:18 schrieb Robert Krüger <[hidden email]
> >:
> >
> > I have a security camera file that gives me decoding errors which are
> very
> > likely the reason for several macroblocks being broken in the resulting
> > video (by far not all, you can still recognize the motive).
> >
> > Are there any command line flags I can try to fix this or shall I submit
> a
> > trac ticket with the file?
>
> Please provide a sample file.
>
>
>
Created ticket https://trac.ffmpeg.org/ticket/8888 and added a link to a
sample file.

Thanks,
Robert
_______________________________________________
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: Errors and artefacts when decoding a .h264 file from security camera

Paul B Mahol
In reply to this post by Robert Krüger-3
On Wed, Sep 09, 2020 at 05:18:10PM +0200, Robert Krüger wrote:
> Hi,
>
> I have a security camera file that gives me decoding errors which are very
> likely the reason for several macroblocks being broken in the resulting
> video (by far not all, you can still recognize the motive).
>
> Are there any command line flags I can try to fix this or shall I submit a
> trac ticket with the file?

There is no command flags to fix this.
And also this is not bug.
This is feature request to support yet another CCTV camera footage container.

>
> Thanks,
> Robert
>
> Command line and output:
>
> ~/src/FFmpeg/ffmpeg -i file0000.h264 -c:v mpeg4 -q 1 file0000-transcoded.mov
> ffmpeg version N-98974-g2a19232c19 Copyright (c) 2000-2020 the FFmpeg
> developers
>   built with Apple clang version 11.0.0 (clang-1100.0.33.17)
>   configuration: --enable-libkvazaar --enable-gpl --enable-libx264
> --enable-libx265
>   libavutil      56. 58.100 / 56. 58.100
>   libavcodec     58.101.101 / 58.101.101
>   libavformat    58. 51.101 / 58. 51.101
>   libavdevice    58. 11.101 / 58. 11.101
>   libavfilter     7. 87.100 /  7. 87.100
>   libswscale      5.  8.100 /  5.  8.100
>   libswresample   3.  8.100 /  3.  8.100
>   libpostproc    55.  8.100 / 55.  8.100
> [h264 @ 0x7fb2b0009400] Increasing reorder buffer to 1
> [h264 @ 0x7fb2b0009400] Increasing reorder buffer to 2
> [h264 @ 0x7fb2b0009400] Increasing reorder buffer to 4
> Input #0, h264, from 'file0000.h264':
>   Duration: N/A, bitrate: N/A
>     Stream #0:0: Video: h264 (High), yuvj420p(pc, bt709, progressive),
> 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
> File 'file0000-transcoded.mov' already exists. Overwrite? [y/N] y
> Stream mapping:
>   Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
> Press [q] to stop, [?] for help
> [swscaler @ 0x7fb260f00000] deprecated pixel format used, make sure you did
> set range correctly
> Output #0, mov, to 'file0000-transcoded.mov':
>   Metadata:
>     encoder         : Lavf58.51.101
>     Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1280x720,
> q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc
>     Metadata:
>       encoder         : Lavc58.101.101 mpeg4
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
> [h264 @ 0x7fb2ae80ee00] Invalid NAL unit 0, skipping.
> [h264 @ 0x7fb2ae823000] Invalid NAL unit 0, skipping.
> [h264 @ 0x7fb2ae810600] A non-intra slice in an IDR NAL
> unit.trate=3503.0kbits/s speed=17.9x
> [h264 @ 0x7fb2ae810600] decode_slice_header error
> [h264 @ 0x7fb2ae80ca00] A non-intra slice in an IDR NAL unit.
> [h264 @ 0x7fb2ae80ca00] decode_slice_header error
> [h264 @ 0x7fb2ae80f400] Invalid NAL unit 0, skipping.
> [h264 @ 0x7fb2ae80c400] Invalid NAL unit 0, skipping.
> [h264 @ 0x7fb2ae80ca00] A non-intra slice in an IDR NAL
> unit.trate=3498.9kbits/s speed=19.1x
> [h264 @ 0x7fb2ae80ca00] decode_slice_header error
> [NULL @ 0x7fb2b0009400] sps_id 32 out of range
> [h264 @ 0x7fb2ae80f400] Invalid NAL unit 0, skipping.
> [NULL @ 0x7fb2b0009400] sps_id 32 out of range
> [h264 @ 0x7fb2ae80c400] Invalid NAL unit 0, skipping.
> [NULL @ 0x7fb2b0009400] pps_id 3199971767 out of range8.44
> bitrate=3480.9kbits/s speed=19.4x
> [h264 @ 0x7fb2ae80f400] Invalid NAL unit 0, skipping.
> [NULL @ 0x7fb2b0009400] pps_id 3199971767 out of range
> [h264 @ 0x7fb2ae80c400] Invalid NAL unit 0, skipping.
> [NULL @ 0x7fb2b0009400] too many reference frames 32:08.40
> bitrate=3495.3kbits/s speed=19.5x
> [h264 @ 0x7fb2ae823000] too many reference frames 32
>     Last message repeated 2 times
> frame= 2014 fps=490 q=1.0 Lsize=   34484kB time=00:01:20.52
> bitrate=3508.3kbits/s speed=19.6x
> video:34474kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.028308%
> _______________________________________________
> 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".
_______________________________________________
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: Errors and artefacts when decoding a .h264 file from security camera

Carl Eugen Hoyos-2
In reply to this post by Robert Krüger-3
Am Mi., 9. Sept. 2020 um 17:18 Uhr schrieb Robert Krüger
<[hidden email]>:
>
> Hi,
>
> I have a security camera file that gives me decoding errors which are very
> likely the reason for several macroblocks being broken in the resulting
> video (by far not all, you can still recognize the motive).

You forgot to mention that the file contains images from several cameras...

Paul sent a patch.

Carl Eugen
_______________________________________________
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: Errors and artefacts when decoding a .h264 file from security camera

Robert Krüger-3
On Sat, Sep 12, 2020 at 3:43 PM Carl Eugen Hoyos <[hidden email]> wrote:

> Am Mi., 9. Sept. 2020 um 17:18 Uhr schrieb Robert Krüger
> <[hidden email]>:
> >
> > Hi,
> >
> > I have a security camera file that gives me decoding errors which are
> very
> > likely the reason for several macroblocks being broken in the resulting
> > video (by far not all, you can still recognize the motive).
>
> You forgot to mention that the file contains images from several cameras...
>

I am assuming this is how the system records the feed from multiple
cameras, at least that's what I was told by the people who provided the
file. So, it's a recording device that records a signal that apparently
comes from a king of mixer, to a file. No processing was done on my side.


>
> Paul sent a patch.
>

Awesome, I will check it out!
_______________________________________________
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: Errors and artefacts when decoding a .h264 file from security camera

Robert Krüger-3
On Mon, Sep 14, 2020 at 9:53 AM Robert Krüger <[hidden email]>
wrote:

>
>
> On Sat, Sep 12, 2020 at 3:43 PM Carl Eugen Hoyos <[hidden email]>
> wrote:
>
>> Am Mi., 9. Sept. 2020 um 17:18 Uhr schrieb Robert Krüger
>> <[hidden email]>:
>> >
>> > Hi,
>> >
>> > I have a security camera file that gives me decoding errors which are
>> very
>> > likely the reason for several macroblocks being broken in the resulting
>> > video (by far not all, you can still recognize the motive).
>>
>> You forgot to mention that the file contains images from several
>> cameras...
>>
>
> I am assuming this is how the system records the feed from multiple
> cameras, at least that's what I was told by the people who provided the
> file. So, it's a recording device that records a signal that apparently
> comes from a king of mixer, to a file. No processing was done on my side.
>
>
>>
>> Paul sent a patch.
>>
>
> Awesome, I will check it out!
>
>

OK, so it's really two video streams in the file. Cool. The patch works
perfectly, thanks!
_______________________________________________
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".