0

I have a HeimVision security system and I tried downloading videos into my debian system for analysis.

Edit: I uploaded the file online:

I tried playing this with VLC, but no video is displayed, only the VLC logo: VLC player

Looking at the logs, I see the following warnings/errors:

█[debianx1e][crime][0]$ vlc download\ \(9\).mp4 
VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72)
[000055d31a8c4570] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007fedc4c1a710] main decoder error: buffer deadlock prevented
[00007fedc4c04f60] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 11, expected 1) for PID 0
[hevc @ 0x7fedbc008000] Invalid NAL unit 4, skipping.
[00007fedd4015e30] main video output error: video output creation failed
[00007fedc4c1a710] main decoder error: failed to create video output
[00007fedd4170610] main video output error: video output creation failed
[00007fedc4c1a710] main decoder error: failed to create video output
[00007fedd4170610] main video output error: video output creation failed
[00007fedc4c1a710] main decoder error: failed to create video output
[hevc @ 0x7fedbc008000] get_buffer() failed
[hevc @ 0x7fedbc008000] thread_get_buffer() failed
[hevc @ 0x7fedbc0221c0] Invalid NAL unit 4, skipping.
[00007fede0c02560] main video output error: video output creation failed
[00007fedc4c1a710] main decoder error: failed to create video output
[hevc @ 0x7fedbc0221c0] get_buffer() failed
[hevc @ 0x7fedbc0221c0] thread_get_buffer() failed
[hevc @ 0x7fedbc03dd00] Invalid NAL unit 4, skipping.
[00007fedec0038d0] main video output error: video output creation failed
[00007fedc4c1a710] main decoder error: failed to create video output
[hevc @ 0x7fedbc03dd00] get_buffer() failed
[hevc @ 0x7fedbc03dd00] thread_get_buffer() failed
[hevc @ 0x7fedbc04e000] Invalid NAL unit 4, skipping.
[00007fedb8002bc0] main video output error: video output creation failed
[00007fedc4c1a710] main decoder error: failed to create video output
[hevc @ 0x7fedbc04e000] get_buffer() failed
[hevc @ 0x7fedbc04e000] thread_get_buffer() failed
[00007fedc4c1a710] avcodec decoder error: avcodec_send_packet critical error
[hevc @ 0x7fedbc05e4c0] Invalid NAL unit 4, skipping.
[00007fedac003110] main video output error: video output creation failed
[00007fedc4c1a710] main decoder error: failed to create video output
[hevc @ 0x7fedbc05e4c0] get_buffer() failed
[hevc @ 0x7fedbc05e4c0] thread_get_buffer() failed

I tried opening the file with chromium browser but the play button does not appear to be enabled

:no play button

Going back to the VLC logs, I tried googling some of the errors like "Invalid NAL unit 4, skipping.", "libdvbpsi error (PSI decoder): TS discontinuity (received 11, expected 1) for PID 0", tried several pointers:

  1. VLC.org forum post recommends installing libdvdcss2, but on my system: E: Package 'libdvdcss2' has no installation candidate.
  2. Tried converting the video to a different format using ffmpeg, although this command appears to succeed, the resulting mpeg file is still unplayable. The command generates many of the same warnings as when reproducing with VLC:
█[my-hostname][crime][0]$ ffmpeg -i 'download (9).mp4' -c copy -an 'copy-9.mpeg'                                                  
ffmpeg version 4.1.9-0+deb10u1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version=0+deb10u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[hevc @ 0x55bae12878c0] Invalid NAL unit 4, skipping.
    Last message repeated 1 times
[AVBSFContext @ 0x55bae128a740] Invalid NAL unit 4, skipping.
    Last message repeated 1 times
[hevc @ 0x55bae12878c0] Invalid NAL unit 4, skipping.
    Last message repeated 73 times
[mpegts @ 0x55bae1282840] start time for stream 1 is not set in estimate_timings_from_pts
[mpegts @ 0x55bae1282840] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels): unspecified sample format                                                 
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from '/home/USER/Downloads/crime/download (9).mp4':
  Duration: 00:00:50.72, start: 0.000000, bitrate: 44 kb/s
  Program 1 
    Stream #0:0[0x100]: Video: hevc (Main) ([36][0][0][0] / 0x0024), yuv420p(tv, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], 10 fps, 100 tbr, 90k tbn, 10 tbc
    Stream #0:1[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 0 channels
File '/home/USER/Downloads/crime/copy-9.mpeg' already exists. Overwrite ? [y/N] y
[mpeg @ 0x55bae12bcac0] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to '/home/USER/Downloads/crime/copy-9.mpeg':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: hevc (Main) ([36][0][0][0] / 0x0024), yuv420p(tv, bt470bg), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 10 fps, 100 tbr, 90k tbn, 10 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x55bae12878c0] Invalid NAL unit 4, skipping.
    Last message repeated 512 times
[NULL @ 0x55bae12878c0] Invalid NAL unit 5, skipping.
frame=  512 fps=0.0 q=-1.0 Lsize=     216kB time=00:00:50.61 bitrate=  35.0kbits/s speed=3.56e+03x    
video:214kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.990804%
[my-hostname][crime][0]$ 

Looking at the output of mediainfo, the file appears to be a MPEG-TS file:

█[my-hostname][crime][1]$ mediainfo "/home/USER/Downloads/crime/download (10).mp4"
General
ID                                       : 1 (0x1)
Complete name                            : /home/USER/Downloads/crime/download (10).mp4
Format                                   : MPEG-TS
File size                                : 547 KiB
Duration                                 : 5 min 5 s
Overall bit rate                         : 9 428 b/s
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L4@Main
Codec ID                                 : 36
Duration                                 : 5 min 11 s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 10.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 0)
Bit depth                                : 8 bits
Color range                              : Limited
Color primaries                          : BT.601 PAL
Transfer characteristics                 : BT.470 System B/G
Matrix coefficients                      : BT.470 System B/G

I tried renaming the file extension to ts or mp4 without any luck.

How can I play this mp4 file on linux?

4
  • It wouldn't surprise me if the vendor of your hardware monkeyed with the codec just enough so that you're required to use their proprietary player. If they did, there's a good reason: you don't want it to be too easy to expertly edit security camera footage. You should contact HeimVision support.
    – MDeBusk
    Oct 23, 2022 at 23:05
  • My phone's VLC at least shows a still frame. Of a car standing in a humongous drive way. Oct 23, 2022 at 23:59
  • Your video plays fine on my debian sid system with smplayer and mpv (although mpv displays lots of "[ffmpeg/video] hevc: Invalid NAL unit 4, skipping." errors). It's a 50 second B&W video of a parked car with an incrementing timestamp from 22:51:40 to 22:52:30. No Audio. My guess is maybe you need an updated version of ffmpeg or libavcodec.....or maybe vlc is just fussier about "minor" problems than smplayer or mpv. BTW. the file is an mpeg transport stream (MPEG-TS), the "correct" filename extension is .ts, not .mp4.
    – cas
    Oct 24, 2022 at 3:22
  • BTW, I used handbrake to convert it to a .m4v file using the General -> Very Fast 1080p30 preset. The original mpeg-ts file lost the image if i used the arrow keys in smplayer to jump backwards and forwards but the converted .m4v file worked fine.
    – cas
    Oct 24, 2022 at 3:28

1 Answer 1

0

Your video plays just fine on my Linux Mint 21 Vanessa in Celluloid played via Nvidia acceleration:

enter image description here

In any case as CAS pointed out, you can use https://handbrake.fr/ to convert this video to your liking.

My guess is, there is just some library missing in your system or VLC does not exactly play well with this format; cannot disprove or confirm.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .