Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Sur d’autres sites (333)

  • Building FFmpeg with NVIDIA GPU Hardware Acceleration in docker image, cannot load libnvcuvid.so.1 and libnvidia-encode.so.1

    22 mars 2023, par konovification

    I'm trying to build FFmpeg with NVIDIA GPU Hardware Acceleration following these instructions : https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/index.html#compiling-for-linux. The Docker image I'm using is nvidia/cuda:12.0.1-devel-ubuntu20.04

    


    Running the test command ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i bbb.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4, I get the following output :

    


    ffmpeg version N-109965-ge50a02b0f6 Copyright (c) 2000-2023 the FFmpeg developers                                                                                                                                                                                               
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)                                                                                                                                                                                                                              
  configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared                                                                                          
  libavutil      58.  3.100 / 58.  3.100                                                                                                                                                                                                                                        
  libavcodec     60.  6.100 / 60.  6.100                                                                                                                                                                                                                                        
  libavformat    60.  4.100 / 60.  4.100                                                                                                                                                                                                                                        
  libavdevice    60.  2.100 / 60.  2.100                                                                                                                                                                                                                                        
  libavfilter     9.  4.100 /  9.  4.100                                                                                                                                                                                                                                        
  libswscale      7.  2.100 /  7.  2.100                                                                                                                                                                                                                                        
  libswresample   4. 11.100 /  4. 11.100                                                                                                                                                                                                                                        
-vsync is deprecated. Use -fps_mode                                                                                                                                                                                                                                             
Passing a number to -vsync is deprecated, use a string argument as described in the manual.                                                                                                                                                                                     
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb.mp4':                                                                                                                                                                                                                              
  Metadata:                                                                                                                                                                                                                                                                     
    major_brand     : isom                                                                                                                                                                                                                                                      
    minor_version   : 1                                                                                                                                                                                                                                                         
    compatible_brands: isomavc1                                                                                                                                                                                                                                                 
    creation_time   : 2013-12-16T17:44:39.000000Z                                                                                                                                                                                                                               
    title           : Big Buck Bunny, Sunflower version                                                                                                                                                                                                                         
    artist          : Blender Foundation 2008, Janus Bager Kristensen 2013                                                                                                                                                                                                      
    comment         : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net                                                                                                                                                                                         
    genre           : Animation                                                                                                                                                                                                                                                 
    composer        : Sacha Goedegebure                                                                                                                                                                                                                                         
  Duration: 00:10:34.60, start: 0.000000, bitrate: 3481 kb/s                                                                                                                                                                                                                    
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 2998 kb/s, 30 fps, 30 tbr, 30k tbn (default)
    Metadata:                                                                                                                           
      creation_time   : 2013-12-16T17:44:39.000000Z                                                                                     
      handler_name    : GPAC ISO Video Handler                                                                                          
      vendor_id       : [0][0][0][0]                                                                                                    
  Stream #0:1[0x2](und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)                                     
    Metadata:                                                                                                                           
      creation_time   : 2013-12-16T17:44:42.000000Z                                                                                     
      handler_name    : GPAC ISO Audio Handler                                                                                          
      vendor_id       : [0][0][0][0]                                                                                                                                                                                                                                            
  Stream #0:2[0x3](und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 320 kb/s (default)                                                                                                                                                                          
    Metadata:                                                                                                                                                                                                                                                                   
      creation_time   : 2013-12-16T17:44:42.000000Z                                                                                                                                                                                                                             
      handler_name    : GPAC ISO Audio Handler                                                                                                                                                                                                                                  
      vendor_id       : [0][0][0][0]                                                                                                                                                                                                                                            
    Side data:                                                                                                                                                                                                                                                                  
      audio service type: main                                                                                                                                                                                                                                                  
Stream mapping:                                                                                                                                                                                                                                                                 
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))                                                                                                                                                                                                                      
  Stream #0:2 -> #0:1 (copy)                                                                                                                                                                                                                                                    
Press [q] to stop, [?] for help                                                                                                                                                                                                                                                 
[h264 @ 0x55bd878c2d80] Cannot load libnvcuvid.so.1                                                                                                                                                                                                                             
[h264 @ 0x55bd878c2d80] Failed loading nvcuvid.                                                                                                                                                                                                                                 
[h264 @ 0x55bd878c2d80] Failed setup for format cuda: hwaccel initialisation returned error.                                                                                                                                                                                    
[h264_nvenc @ 0x55bd86f5e680] Cannot load libnvidia-encode.so.1                                                                                                                                                                                                                 
[h264_nvenc @ 0x55bd86f5e680] The minimum required Nvidia driver for nvenc is 520.56.06 or newer                                                                                                                                                                                
[vost#0:0/h264_nvenc @ 0x55bd86f5e1c0] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed! 


    


    Output from nvidia-smi :

    


    +-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.05    Driver Version: 525.85.05    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| 27%   43C    P8    12W / 250W |    500MiB / 11264MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+


    


    The shared libraries are not part of the docker image. What are my options to add them ?

    


  • FFMPEG Output File is Empty Nothing was Encoded (for a Picture) ?

    4 mars 2023, par Sarah Szabo

    I have a strange issue effecting one of my programs that does bulk media conversions using ffmpeg from the command line, however this effects me using it directly from the shell as well :

    


    ffmpeg -i INPUT.mkv -ss 0:30 -y -qscale:v 2 -frames:v 1 -f image2 -huffman optimal "OUTPUT.png"
fails every run with the error message :
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

    


    This only happens with very specific videos, and seemingly no other videos. File type is usually .webm. These files have been downloaded properly (usually from yt-dlp), and I have tried re-downloading them just to verify their integrity.

    


    One such file from a colleague was : https://www.dropbox.com/s/xkucr2z5ra1p2oh/Triggerheart%20Execlica%20OST%20%28Arrange%29%20-%20Crueltear%20Ending.mkv?dl=0

    


    Is there a subtle issue with the command string ?

    


    Notes :

    


    removing -huffman optimal had no effect

    


    moving -ss to before -i had no effect

    


    removing -f image2 had no effect

    


    Full Log :

    


    sarah@MidnightStarSign:~/Music/Playlists/Indexing/Indexing Temp$ ffmpeg -i Triggerheart\ Execlica\ OST\ \(Arrange\)\ -\ Crueltear\ Ending.mkv -ss 0:30 -y -qscale:v 2 -frames:v 1 -f image2 -huffman optimal "TEST.png"
ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[matroska,webm @ 0x55927f484740] Could not find codec parameters for stream 2 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, matroska,webm, from 'Triggerheart Execlica OST (Arrange) - Crueltear Ending.mkv':
  Metadata:
    title           : TriggerHeart Exelica PS2 & 360 Arrange ー 16 - Crueltear Ending
    PURL            : https://www.youtube.com/watch?v=zJ0bEa_8xEg
    COMMENT         : https://www.youtube.com/watch?v=zJ0bEa_8xEg
    ARTIST          : VinnyVynce
    DATE            : 20170905
    ENCODER         : Lavf59.27.100
  Duration: 00:00:30.00, start: -0.007000, bitrate: 430 kb/s
  Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 720x720, SAR 1:1 DAR 1:1, 25 fps, 25 tbr, 1k tbn (default)
    Metadata:
      DURATION        : 00:00:29.934000000
  Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:00:30.001000000
  Stream #0:2: Attachment: none
    Metadata:
      filename        : cover.webp
      mimetype        : image/webp
Codec AVOption huffman (Huffman table strategy) specified for output file #0 (TEST.png) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
  Stream #0:0 -> #0:0 (vp9 (native) -> png (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'TEST.png':
  Metadata:
    title           : TriggerHeart Exelica PS2 & 360 Arrange ー 16 - Crueltear Ending
    PURL            : https://www.youtube.com/watch?v=zJ0bEa_8xEg
    COMMENT         : https://www.youtube.com/watch?v=zJ0bEa_8xEg
    ARTIST          : VinnyVynce
    DATE            : 20170905
    encoder         : Lavf59.27.100
  Stream #0:0(eng): Video: png, rgb24, 720x720 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
    Metadata:
      DURATION        : 00:00:29.934000000
      encoder         : Lavc59.37.100 png
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)


    


    Manjaro OS System Specs :

    


    System:&#xA;  Kernel: 6.1.12-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1&#xA;    parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.1-x86_64&#xA;    root=UUID=f11386cf-342d-47ac-84e6-484b7b2f377d rw rootflags=subvol=@&#xA;    radeon.modeset=1 nvdia-drm.modeset=1 quiet&#xA;    cryptdevice=UUID=059df4b4-5be4-44d6-a23a-de81135eb5b4:luks-disk&#xA;    root=/dev/mapper/luks-disk apparmor=1 security=apparmor&#xA;    resume=/dev/mapper/luks-swap udev.log_priority=3&#xA;  Desktop: KDE Plasma v: 5.26.5 tk: Qt v: 5.15.8 wm: kwin_x11 vt: 1 dm: SDDM&#xA;    Distro: Manjaro Linux base: Arch Linux&#xA;Machine:&#xA;  Type: Desktop Mobo: ASUSTeK model: PRIME X570-PRO v: Rev X.0x&#xA;    serial: <superuser required="required"> UEFI: American Megatrends v: 4408&#xA;    date: 10/27/2022&#xA;Battery:&#xA;  Message: No system battery data found. Is one present?&#xA;Memory:&#xA;  RAM: total: 62.71 GiB used: 27.76 GiB (44.3%)&#xA;  RAM Report: permissions: Unable to run dmidecode. Root privileges required.&#xA;CPU:&#xA;  Info: model: AMD Ryzen 9 5950X bits: 64 type: MT MCP arch: Zen 3&#x2B; gen: 4&#xA;    level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)&#xA;    model-id: 0x21 (33) stepping: 0 microcode: 0xA201016&#xA;  Topology: cpus: 1x cores: 16 tpc: 2 threads: 32 smt: enabled cache:&#xA;    L1: 1024 KiB desc: d-16x32 KiB; i-16x32 KiB L2: 8 MiB desc: 16x512 KiB&#xA;    L3: 64 MiB desc: 2x32 MiB&#xA;  Speed (MHz): avg: 4099 high: 4111 min/max: 2200/6358 boost: disabled&#xA;    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 4099 2: 4095&#xA;    3: 4102 4: 4100 5: 4097 6: 4100 7: 4110 8: 4111 9: 4083 10: 4099 11: 4100&#xA;    12: 4094 13: 4097 14: 4101 15: 4100 16: 4099 17: 4100 18: 4097 19: 4098&#xA;    20: 4095 21: 4100 22: 4099 23: 4099 24: 4105 25: 4098 26: 4100 27: 4100&#xA;    28: 4092 29: 4103 30: 4101 31: 4100 32: 4099 bogomips: 262520&#xA;  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1&#xA;    bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy&#xA;    constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total&#xA;    cqm_occup_llc cr8_legacy cx16 cx8 de decodeassists erms extapic&#xA;    extd_apicid f16c flushbyasid fma fpu fsgsbase fsrm fxsr fxsr_opt ht&#xA;    hw_pstate ibpb ibrs ibs invpcid irperf lahf_lm lbrv lm mba mca mce&#xA;    misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc nopl npt&#xA;    nrip_save nx ospke osvw overflow_recov pae pat pausefilter pclmulqdq&#xA;    pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pku pni popcnt&#xA;    pse pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sha_ni&#xA;    skinit smap smca smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp succor&#xA;    svm svm_lock syscall tce topoext tsc tsc_scale umip v_spec_ctrl&#xA;    v_vmsave_vmload vaes vgif vmcb_clean vme vmmcall vpclmulqdq wbnoinvd wdt&#xA;    x2apic xgetbv1 xsave xsavec xsaveerptr xsaveopt xsaves&#xA;  Vulnerabilities:&#xA;  Type: itlb_multihit status: Not affected&#xA;  Type: l1tf status: Not affected&#xA;  Type: mds status: Not affected&#xA;  Type: meltdown status: Not affected&#xA;  Type: mmio_stale_data status: Not affected&#xA;  Type: retbleed status: Not affected&#xA;  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via&#xA;    prctl&#xA;  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer&#xA;    sanitization&#xA;  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,&#xA;    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected&#xA;  Type: srbds status: Not affected&#xA;  Type: tsx_async_abort status: Not affected&#xA;Graphics:&#xA;  Device-1: NVIDIA GA104 [GeForce RTX 3070] vendor: ASUSTeK driver: nvidia&#xA;    v: 525.89.02 alternate: nouveau,nvidia_drm non-free: 525.xx&#x2B;&#xA;    status: current (as of 2023-02) arch: Ampere code: GAxxx&#xA;    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 8&#xA;    link-max: lanes: 16 bus-ID: 0b:00.0 chip-ID: 10de:2484 class-ID: 0300&#xA;  Device-2: AMD Cape Verde PRO [Radeon HD 7750/8740 / R7 250E]&#xA;    vendor: VISIONTEK driver: radeon v: kernel alternate: amdgpu arch: GCN-1&#xA;    code: Southern Islands process: TSMC 28nm built: 2011-20 pcie: gen: 3&#xA;    speed: 8 GT/s lanes: 8 link-max: lanes: 16 ports: active: DP-3,DP-4&#xA;    empty: DP-1, DP-2, DP-5, DP-6 bus-ID: 0c:00.0 chip-ID: 1002:683f&#xA;    class-ID: 0300 temp: 54.0 C&#xA;  Device-3: Microdia USB 2.0 Camera type: USB driver: snd-usb-audio,uvcvideo&#xA;    bus-ID: 9-2:3 chip-ID: 0c45:6367 class-ID: 0102 serial: <filter>&#xA;  Display: x11 server: X.Org v: 21.1.7 with: Xwayland v: 22.1.8&#xA;    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia dri: radeonsi&#xA;    gpu: radeon display-ID: :0 screens: 1&#xA;  Screen-1: 0 s-res: 5760x2160 s-dpi: 80 s-size: 1829x686mm (72.01x27.01")&#xA;    s-diag: 1953mm (76.91")&#xA;  Monitor-1: DP-1 pos: 1-2 res: 1920x1080 dpi: 93&#xA;    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A&#xA;  Monitor-2: DP-1-3 pos: 2-1 res: 1920x1080 dpi: 82&#xA;    size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A&#xA;  Monitor-3: DP-1-4 pos: 1-1 res: 1920x1080 dpi: 93&#xA;    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A&#xA;  Monitor-4: DP-3 pos: primary,2-2 res: 1920x1080 dpi: 82&#xA;    size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A&#xA;  Monitor-5: DP-4 pos: 2-4 res: 1920x1080 dpi: 82&#xA;    size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A&#xA;  Monitor-6: HDMI-0 pos: 1-3 res: 1920x1080 dpi: 93&#xA;    size: 527x296mm (20.75x11.65") diag: 604mm (23.8") modes: N/A&#xA;  API: OpenGL v: 4.6.0 NVIDIA 525.89.02 renderer: NVIDIA GeForce RTX&#xA;    3070/PCIe/SSE2 direct-render: Yes&#xA;Audio:&#xA;  Device-1: NVIDIA GA104 High Definition Audio vendor: ASUSTeK&#xA;    driver: snd_hda_intel bus-ID: 5-1:2 v: kernel chip-ID: 30be:1019 pcie:&#xA;    class-ID: 0102 gen: 4 speed: 16 GT/s lanes: 8 link-max: lanes: 16&#xA;    bus-ID: 0b:00.1 chip-ID: 10de:228b class-ID: 0403&#xA;  Device-2: AMD Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000&#xA;    Series] vendor: VISIONTEK driver: snd_hda_intel v: kernel pcie: gen: 3&#xA;    speed: 8 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 0c:00.1&#xA;    chip-ID: 1002:aab0 class-ID: 0403&#xA;  Device-3: AMD Starship/Matisse HD Audio vendor: ASUSTeK&#xA;    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16&#xA;    bus-ID: 0e:00.4 chip-ID: 1022:1487 class-ID: 0403&#xA;  Device-4: Schiit Audio Unison Universal Dac type: USB driver: snd-usb-audio&#xA;  Device-5: JMTek LLC. Plugable USB Audio Device type: USB&#xA;    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 5-2:3 chip-ID: 0c76:120b&#xA;    class-ID: 0300 serial: <filter>&#xA;  Device-6: ASUSTek ASUS AI Noise-Cancelling Mic Adapter type: USB&#xA;    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 5-4:4 chip-ID: 0b05:194e&#xA;    class-ID: 0300 serial: <filter>&#xA;  Device-7: Microdia USB 2.0 Camera type: USB driver: snd-usb-audio,uvcvideo&#xA;    bus-ID: 9-2:3 chip-ID: 0c45:6367 class-ID: 0102 serial: <filter>&#xA;  Sound API: ALSA v: k6.1.12-1-MANJARO running: yes&#xA;  Sound Interface: sndio v: N/A running: no&#xA;  Sound Server-1: PulseAudio v: 16.1 running: no&#xA;  Sound Server-2: PipeWire v: 0.3.65 running: yes&#xA;Network:&#xA;  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel&#xA;    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 07:00.0&#xA;    chip-ID: 8086:1539 class-ID: 0200&#xA;  IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: <filter>&#xA;  IP v4: <filter> type: dynamic noprefixroute scope: global&#xA;    broadcast: <filter>&#xA;  IP v6: <filter> type: noprefixroute scope: link&#xA;  IF-ID-1: docker0 state: down mac: <filter>&#xA;  IP v4: <filter> scope: global broadcast: <filter>&#xA;  WAN IP: <filter>&#xA;Bluetooth:&#xA;  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB&#xA;    driver: btusb v: 0.8 bus-ID: 5-5.3:7 chip-ID: 0a12:0001 class-ID: e001&#xA;  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends&#xA;Logical:&#xA;  Message: No logical block device data found.&#xA;  Device-1: luks-c847cf9f-c6b5-4624-a25e-4531e318851a maj-min: 254:2&#xA;    type: LUKS dm: dm-2 size: 3.64 TiB&#xA;  Components:&#xA;  p-1: sda1 maj-min: 8:1 size: 3.64 TiB&#xA;  Device-2: luks-swap maj-min: 254:1 type: LUKS dm: dm-1 size: 12 GiB&#xA;  Components:&#xA;  p-1: nvme0n1p2 maj-min: 259:2 size: 12 GiB&#xA;  Device-3: luks-disk maj-min: 254:0 type: LUKS dm: dm-0 size: 919.01 GiB&#xA;  Components:&#xA;  p-1: nvme0n1p3 maj-min: 259:3 size: 919.01 GiB&#xA;RAID:&#xA;  Message: No RAID data found.&#xA;Drives:&#xA;  Local Storage: total: 9.1 TiB used: 2.79 TiB (30.6%)&#xA;  SMART Message: Unable to run smartctl. Root privileges required.&#xA;  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital&#xA;    model: WDS100T3X0C-00SJG0 size: 931.51 GiB block-size: physical: 512 B&#xA;    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>&#xA;    rev: 111110WD temp: 53.9 C scheme: GPT&#xA;  ID-2: /dev/nvme1n1 maj-min: 259:4 vendor: Western Digital&#xA;    model: WDS100T2B0C-00PXH0 size: 931.51 GiB block-size: physical: 512 B&#xA;    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>&#xA;    rev: 211070WD temp: 46.9 C scheme: GPT&#xA;  ID-3: /dev/sda maj-min: 8:0 vendor: Western Digital&#xA;    model: WD4005FZBX-00K5WB0 size: 3.64 TiB block-size: physical: 4096 B&#xA;    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>&#xA;    rev: 1A01 scheme: GPT&#xA;  ID-4: /dev/sdb maj-min: 8:16 vendor: Western Digital&#xA;    model: WD4005FZBX-00K5WB0 size: 3.64 TiB block-size: physical: 4096 B&#xA;    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter>&#xA;    rev: 1A01 scheme: GPT&#xA;  ID-5: /dev/sdc maj-min: 8:32 type: USB vendor: SanDisk&#xA;    model: Gaming Xbox 360 size: 7.48 GiB block-size: physical: 512 B&#xA;    logical: 512 B type: N/A serial: <filter> rev: 8.02 scheme: MBR&#xA;  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?&#xA;  Message: No optical or floppy data found.&#xA;Partition:&#xA;  ID-1: / raw-size: 919.01 GiB size: 919.01 GiB (100.00%)&#xA;    used: 611.14 GiB (66.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0&#xA;    mapped: luks-disk label: N/A uuid: N/A&#xA;  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)&#xA;    used: 40.2 MiB (7.9%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 label: EFI&#xA;    uuid: 8922-E04D&#xA;  ID-3: /home raw-size: 919.01 GiB size: 919.01 GiB (100.00%)&#xA;    used: 611.14 GiB (66.5%) fs: btrfs dev: /dev/dm-0 maj-min: 254:0&#xA;    mapped: luks-disk label: N/A uuid: N/A&#xA;  ID-4: /run/media/sarah/ConvergentRefuge raw-size: 3.64 TiB&#xA;    size: 3.64 TiB (100.00%) used: 2.19 TiB (60.1%) fs: btrfs dev: /dev/dm-2&#xA;    maj-min: 254:2 mapped: luks-c847cf9f-c6b5-4624-a25e-4531e318851a&#xA;    label: ConvergentRefuge uuid: 7d295e73-4143-4eb1-9d22-75a06b1d2984&#xA;  ID-5: /run/media/sarah/MSS_EXtended raw-size: 475.51 GiB&#xA;    size: 475.51 GiB (100.00%) used: 1.48 GiB (0.3%) fs: btrfs&#xA;    dev: /dev/nvme1n1p1 maj-min: 259:5 label: MSS EXtended&#xA;    uuid: f98b3a12-e0e4-48c7-91c2-6e3aa6dcd32c&#xA;Swap:&#xA;  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)&#xA;  ID-1: swap-1 type: partition size: 12 GiB used: 6.86 GiB (57.2%)&#xA;    priority: -2 dev: /dev/dm-1 maj-min: 254:1 mapped: luks-swap label: SWAP&#xA;    uuid: c8991364-85a7-4e6c-8380-49cd5bd7a873&#xA;Unmounted:&#xA;  ID-1: /dev/nvme1n1p2 maj-min: 259:6 size: 456 GiB fs: ntfs label: N/A&#xA;    uuid: 5ECA358FCA356485&#xA;  ID-2: /dev/sdb1 maj-min: 8:17 size: 3.64 TiB fs: ntfs&#xA;    label: JerichoVariance uuid: 1AB22D5664889CBD&#xA;  ID-3: /dev/sdc1 maj-min: 8:33 size: 3.57 GiB fs: iso9660&#xA;  ID-4: /dev/sdc2 maj-min: 8:34 size: 4 MiB fs: vfat label: MISO_EFI&#xA;    uuid: 5C67-4BF8&#xA;USB:&#xA;  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0&#xA;    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900&#xA;  Hub-2: 1-2:2 info: Hitachi ports: 4 rev: 2.1 speed: 480 Mb/s&#xA;    chip-ID: 045b:0209 class-ID: 0900&#xA;  Device-1: 1-2.4:3 info: Microsoft Xbox One Controller (Firmware 2015)&#xA;    type: <vendor specific="specific"> driver: xpad interfaces: 3 rev: 2.0 speed: 12 Mb/s&#xA;    power: 500mA chip-ID: 045e:02dd class-ID: ff00 serial: <filter>&#xA;  Hub-3: 2-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s&#xA;    chip-ID: 1d6b:0003 class-ID: 0900&#xA;  Hub-4: 2-2:2 info: Hitachi ports: 4 rev: 3.0 speed: 5 Gb/s&#xA;    chip-ID: 045b:0210 class-ID: 0900&#xA;  Hub-5: 3-0:1 info: Hi-speed hub with single TT ports: 1 rev: 2.0&#xA;    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900&#xA;  Hub-6: 3-1:2 info: VIA Labs Hub ports: 4 rev: 2.1 speed: 480 Mb/s&#xA;    power: 100mA chip-ID: 2109:3431 class-ID: 0900&#xA;  Hub-7: 3-1.2:3 info: VIA Labs VL813 Hub ports: 4 rev: 2.1 speed: 480 Mb/s&#xA;    chip-ID: 2109:2813 class-ID: 0900&#xA;  Hub-8: 4-0:1 info: Super-speed hub ports: 4 rev: 3.0 speed: 5 Gb/s&#xA;    chip-ID: 1d6b:0003 class-ID: 0900&#xA;  Hub-9: 4-2:2 info: VIA Labs VL813 Hub ports: 4 rev: 3.0 speed: 5 Gb/s&#xA;    chip-ID: 2109:0813 class-ID: 0900&#xA;  Hub-10: 5-0:1 info: Hi-speed hub with single TT ports: 6 rev: 2.0&#xA;    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900&#xA;  Device-1: 5-1:2 info: Schiit Audio Unison Universal Dac type: Audio&#xA;    driver: snd-usb-audio interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA&#xA;    chip-ID: 30be:1019 class-ID: 0102&#xA;  Device-2: 5-2:3 info: JMTek LLC. Plugable USB Audio Device type: Audio,HID&#xA;    driver: hid-generic,snd-usb-audio,usbhid interfaces: 4 rev: 1.1&#xA;    speed: 12 Mb/s power: 100mA chip-ID: 0c76:120b class-ID: 0300&#xA;    serial: <filter>&#xA;  Device-3: 5-4:4 info: ASUSTek ASUS AI Noise-Cancelling Mic Adapter&#xA;    type: Audio,HID driver: hid-generic,snd-usb-audio,usbhid interfaces: 4&#xA;    rev: 1.1 speed: 12 Mb/s power: 100mA chip-ID: 0b05:194e class-ID: 0300&#xA;    serial: <filter>&#xA;  Hub-11: 5-5:5 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s&#xA;    power: 100mA chip-ID: 05e3:0608 class-ID: 0900&#xA;  Device-1: 5-5.3:7 info: Cambridge Silicon Radio Bluetooth Dongle (HCI mode)&#xA;    type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s&#xA;    power: 100mA chip-ID: 0a12:0001 class-ID: e001&#xA;  Hub-12: 5-6:6 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s&#xA;    power: 100mA chip-ID: 05e3:0608 class-ID: 0900&#xA;  Hub-13: 6-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s&#xA;    chip-ID: 1d6b:0003 class-ID: 0900&#xA;  Hub-14: 7-0:1 info: Hi-speed hub with single TT ports: 6 rev: 2.0&#xA;    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900&#xA;  Device-1: 7-2:2 info: SanDisk Cruzer Micro Flash Drive type: Mass Storage&#xA;    driver: usb-storage interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 200mA&#xA;    chip-ID: 0781:5151 class-ID: 0806 serial: <filter>&#xA;  Device-2: 7-4:3 info: ASUSTek AURA LED Controller type: HID&#xA;    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 16mA&#xA;    chip-ID: 0b05:18f3 class-ID: 0300 serial: <filter>&#xA;  Hub-15: 8-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s&#xA;    chip-ID: 1d6b:0003 class-ID: 0900&#xA;  Hub-16: 9-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0&#xA;    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900&#xA;  Hub-17: 9-1:2 info: Terminus FE 2.1 7-port Hub ports: 7 rev: 2.0&#xA;    speed: 480 Mb/s power: 100mA chip-ID: 1a40:0201 class-ID: 0900&#xA;  Device-1: 9-1.1:4 info: Sunplus Innovation Gaming mouse [Philips SPK9304]&#xA;    type: Mouse driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s&#xA;    power: 98mA chip-ID: 1bcf:08a0 class-ID: 0301&#xA;  Device-2: 9-1.5:6 info: Microdia Backlit Gaming Keyboard&#xA;    type: Keyboard,Mouse driver: hid-generic,usbhid interfaces: 2 rev: 2.0&#xA;    speed: 12 Mb/s power: 400mA chip-ID: 0c45:652f class-ID: 0301&#xA;  Device-3: 9-1.6:7 info: HUION H420 type: Mouse,HID driver: uclogic,usbhid&#xA;    interfaces: 3 rev: 1.1 speed: 12 Mb/s power: 100mA chip-ID: 256c:006e&#xA;    class-ID: 0300&#xA;  Hub-18: 9-1.7:8 info: Terminus Hub ports: 4 rev: 2.0 speed: 480 Mb/s&#xA;    power: 100mA chip-ID: 1a40:0101 class-ID: 0900&#xA;  Device-1: 9-2:3 info: Microdia USB 2.0 Camera type: Video,Audio&#xA;    driver: snd-usb-audio,uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s&#xA;    power: 500mA chip-ID: 0c45:6367 class-ID: 0102 serial: <filter>&#xA;  Device-2: 9-4:11 info: VKB-Sim &#xA9; Alex Oz 2021 VKBsim Gladiator EVO L&#xA;    type: HID driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s&#xA;    power: 500mA chip-ID: 231d:0201 class-ID: 0300&#xA;  Hub-19: 10-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s&#xA;    chip-ID: 1d6b:0003 class-ID: 0900&#xA;Sensors:&#xA;  System Temperatures: cpu: 38.0 C mobo: 41.0 C&#xA;  Fan Speeds (RPM): fan-1: 702 fan-2: 747 fan-3: 938 fan-4: 889 fan-5: 3132&#xA;    fan-6: 0 fan-7: 0&#xA;  GPU: device: nvidia screen: :0.0 temp: 49 C fan: 0% device: radeon&#xA;    temp: 53.0 C&#xA;Info:&#xA;  Processes: 842 Uptime: 3h 11m wakeups: 0 Init: systemd v: 252&#xA;  default: graphical tool: systemctl Compilers: gcc: 12.2.1 alt: 10/11&#xA;  clang: 15.0.7 Packages: 2158 pm: pacman pkgs: 2110 libs: 495 tools: pamac,yay&#xA;  pm: flatpak pkgs: 31 pm: snap pkgs: 17 Shell: Bash v: 5.1.16&#xA;  running-in: yakuake inxi: 3.3.25&#xA;</filter></filter></filter></filter></filter></filter></vendor></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></filter></superuser>

    &#xA;

  • Decode a proprietary (Genetec) H264 network video stream

    2 mars 2023, par al_mukthar

    I have incoming byte streams probably encoded in H264 from a Genetec camera through a websocket in my spring boot application,

    &#xA;

    I need to decode the incoming H264 streams to transmit the video to my frontend clients.&#xA;I have tried using javaCV/FFMpeg but nothing works.

    &#xA;

    I think, Genetec is using some custom encoding which is different from normal encoding

    &#xA;

    Any help would be appreciated

    &#xA;

    this is the part of hex dump received through socket

    &#xA;

    00000000: 01 00 00 00 04 48 32 36 34 00 00 00 24 38 65 34    .....H264...$8e4&#xA;00000010: 32 39 65 37 61 2D 32 66 34 66 2D 34 37 31 61 2D    29e7a-2f4f-471a-&#xA;00000020: 39 61 63 30 2D 66 66 62 38 64 64 37 63 37 64 37    9ac0-ffb8dd7c7d7&#xA;00000030: 32 00 00 00 D4 7B 22 49 73 49 6E 69 74 22 3A 66    2...T{"IsInit":f&#xA;00000040: 61 6C 73 65 2C 22 49 73 41 75 64 69 6F 22 3A 66    alse,"IsAudio":f&#xA;00000050: 61 6C 73 65 2C 22 54 6F 74 61 6C 53 65 63 6F 6E    alse,"TotalSecon&#xA;00000060: 64 73 22 3A 30 2E 30 36 2C 22 46 72 61 6D 65 54    ds":0.06,"FrameT&#xA;00000070: 69 6D 65 22 3A 22 32 30 32 33 2D 30 32 2D 32 33    ime":"2023-02-23&#xA;00000080: 54 30 34 3A 32 31 3A 35 33 2E 35 33 31 5A 22 2C    T04:21:53.531Z",&#xA;00000090: 22 53 65 71 75 65 6E 63 65 49 64 22 3A 31 2C 22    "SequenceId":1,"&#xA;000000a0: 42 61 73 65 44 65 63 6F 64 65 54 69 6D 65 22 3A    BaseDecodeTime":&#xA;000000b0: 32 36 35 38 37 2C 22 4D 65 64 69 61 54 69 6D 65    26587,"MediaTime&#xA;000000c0: 22 3A 32 36 35 38 37 2C 22 49 73 46 72 61 6D 65    ":26587,"IsFrame&#xA;000000d0: 48 69 64 64 65 6E 22 3A 66 61 6C 73 65 2C 22 49    Hidden":false,"I&#xA;000000e0: 73 4B 65 79 46 72 61 6D 65 22 3A 66 61 6C 73 65    sKeyFrame":false&#xA;000000f0: 2C 22 49 64 22 3A 34 34 35 2C 22 47 65 6E 65 72    ,"Id":445,"Gener&#xA;00000100: 61 74 69 6F 6E 22 3A 31 7D 00 00 3F 50 00 00 00    ation":1}..?P...&#xA;00000110: 68 6D 6F 6F 66 00 00 00 10 6D 66 68 64 00 00 00    hmoof....mfhd...&#xA;00000120: 00 00 00 01 BD 00 00 00 50 74 72 61 66 00 00 00    ....=...Ptraf...&#xA;00000130: 10 74 66 68 64 00 02 00 00 00 00 00 01 00 00 00    .tfhd...........&#xA;00000140: 14 74 66 64 74 01 00 00 00 00 00 00 00 00 00 67    .tfdt..........g&#xA;00000150: DB 00 00 00 24 74 72 75 6E 01 00 0F 01 00 00 00    [...$trun.......&#xA;00000160: 01 00 00 00 70 00 00 00 3C 00 00 3E E0 00 01 00    ....p...&lt;..>`...&#xA;00000170: 00 00 00 00 00 00 00 3E E8 6D 64 61 74 00 00 3E    .......>hmdat..>&#xA;00000180: DC 41 E1 81 80 93 BE 16 2B 33 77 3D 4C B6 55 8B    \Aa...>.&#x2B;3w=L6U.&#xA;00000190: D2 55 60 92 05 F7 F7 A4 97 54 4B 6C A6 68 48 84    RU`..ww$.TKl&amp;hH.&#xA;000001a0: 68 FF D2 B6 6C 02 31 FC 24 01 78 EA BD 20 AD 15    h.R6l.1|$.xj=.-.&#xA;000001b0: F1 73 31 4B EB EF 18 1B 50 B3 13 F2 DC C6 4C E1    qs1Kko..P3.r\FLa&#xA;000001c0: 75 8B 94 52 6B C5 09 37 55 1E 45 66 6A 92 39 23    u..RkE.7U.Efj.9#&#xA;000001d0: C9 2D FD BB EC AD FD CF C4 30 75 FF 44 66 FA 85    I-};l-}OD0u.Dfz.&#xA;000001e0: D9 7C 18 72 AE 63 45 60 DD D7 65 44 84 49 95 8D    Y|.r.cE`]WeD.I..&#xA;000001f0: 2C 70 6C 57 8E E9 A9 EB B6 F6 78 BD D6 88 99 F6    ,plW.i)k6vx=V..v&#xA;00000200: FC 25 B1 0A FF DF CB 77 6A 67 37 24 A5 3D 8F A1    |%1.._Kwjg7$%=.!&#xA;00000210: 27 9B 4F 42 0E CD B8 87 6E C9 99 FC 6F 4C 53 4B    &#x27;.OB.M8.nI.|oLSK&#xA;00000220: 01 EA B6 AF 99 F8 22 C1 8F 1E C1 66 D6 8A 09 D6    .j6/.x"A..AfV..V&#xA;00000230: 99 79 91 F7 C1 2A 08 1F 81 CB 5E DD C3 CA 86 8F    .y.wA*...K^]CJ..&#xA;00000240: 57 BF 17 A2 64 6B 69 56 AE 19 1F 57 AD A6 D8 C2    W?."dkiV...W-&amp;XB&#xA;00000250: 06 28 EB 46 D3 E4 85 51 3E E2 A5 40 50 50 85 7D    .(kFSd.Q>b%@PP.}&#xA;00000260: 72 6B 20 87 1A 6E 73 E1 B8 88 9E 20 23 48 6D FE    rk...nsa8...#Hm~&#xA;00000270: C2 0D 39 ED 24 B2 6D B5 9B 81 B6 BC F4 EE DE A2    B.9m$2m5..6..bB.{"&amp;.!4.R^5&#xA;000002b0: 2A A6 E2 71 D7 4F 96 0A EC AE 8D 39 27 B8 CF 61    *&amp;bqWO..l..9&#x27;8Oa&#xA;000002c0: CC ED E9 AF 74 C3 95 D3 E3 96 32 20 E6 31 0B E4    Lmi/tC.Sc.2.f1.d&#xA;000002d0: DC F4 FF 41 37 36 E7 DB 87 AE B3 7D BF CA F8 05    \t.A76g[..3}?Jx.&#xA;000002e0: 72 2A 38 AB B8 8E 98 43 97 C8 5E 80 57 C6 E7 1E    r*8&#x2B;8..C.H^.WFg.&#xA;000002f0: 86 75 CE CD CE BF CF 10 C9 8A C2 C9 6E 33 41 AC    .uNMN?O.I.BIn3A,&#xA;00000300: 91 AC A8 F3 1B E6 D5 0A 22 A1 2C 4C 68 19 51 4D    .,(s.fU."!,Lh.QM&#xA;00000310: 17 DA AE E1 D7 BC 0E 2D F8 14 61 E2 4F BA 26 A3    .Z.aW&lt;.-x.abO:&amp;#&#xA;00000320: 0A E4 A6 BE 08 EA 3C 28 E6 C5 6B CA 3A 86 D2 59    .d&amp;>.j&lt;(fEkJ:.RY&#xA;00000330: 34 C2 ED 91 72 5A EF 2C BE D7 38 A4 60 D7 F3 97    4Bm.rZo,>W8$`Ws.&#xA;00000340: BB E6 FD C2 D0 29 10 B5 A4 79 D8 3E 61 48 8A F9    ;f}BP).5$yX>aH.y&#xA;00000350: C6 D8 13 D0 FD DB D6 FA 24 7F CD 5A BF 06 57 49    FX.P}[Vz$.MZ?.WI&#xA;00000360: 51 EC ED B2 74 AB 92 1D 37 68 70 A2 A5 31 B5 5F    Qlm2t&#x2B;..7hp"%15_&#xA;00000370: EA CF 9E 3E 6A B1 78 16 B7 94 D1 46 7B 63 C1 67    jO.>j1x.7.QF{cAg&#xA;00000380: D2 B0 08 44 64 1E 68 15 39 80 E3 DD EB C0 E1 71    R0.Dd.h.9.c]k@aq&#xA;00000390: E8 EE D0 4D DF 4F 41 E0 96 C5 34 AD BC D3 9E 88    hnPM_OA`.E4-&#x27;.7pV%_>.T..&#xA;00000430: 7F FC AD 71 CE AF 54 8B 5D DC 27 34 20 A3 0A 73    .|-qN/T.]\&#x27;4.#.s&#xA;00000440: 76 A5 81 33 22 31 56 6B 1D 82 C4 32 FB 82 15 F6    v%.3"1Vk..D2{..v&#xA;00000450: 97 C8 47 29 3C 9E 59 9A C0 83 48 A0 55 CB C8 D6    .HG)&lt;.Y.@.H.UKHV&#xA;00000460: 36 92 CC 54 A7 00 E3 28 9E 99 45 B2 E5 7E 88 A7    6.LT&#x27;.c(..E2e~.&#x27;&#xA;00000470: 28 4E CA 75 17 3C D3 B5 6C F5 FD AC 05 55 BF F7    (NJu.?{.T2Yr.h.wYGw&#xA;000004d0: 3C 19 C8 7B 81 9B 17 19 E9 81 A0 36 AD C6 62 71    &lt;.H{....i..6-Fbq&#xA;000004e0: DB 68 72 8F 6A 37 45 D9 0E 6E DC 2C 5E 52 C2 75    [hr.j7EY.n\,^RBu&#xA;000004f0: 51 2F F9 CE 8A 10 12 E9 C8 68 A9 D6 A6 D7 5B 14    Q/yN...iHh)V&amp;W[.&#xA;00000500: 11 51 42 FD BE B5 09 56 7F 19 C3 EB A7 A6 DF 6C    .QB}>5.V..Ck&#x27;&amp;_l&#xA;00000510: 55 A3 11 DC EF 81 C3 CD DD 63 BF 38 F8 5A 4A 45    U#.\o.CM]c?8xZJE&#xA;00000520: 33 24 7B A4 55 B3 85 A6 87 75 3B 85 51 5C 03 B7    3${$U3.&amp;.u;.Q\.7&#xA;

    &#xA;

    UPDATE TO THE CODE

    &#xA;

    1st Packet find here&#xA;2nd Packet find here

    &#xA;

    I have updated the code as per one of the comment to read only MDAT box to retrieve H264 stream from the incoming bytes[] through the socket, now I send only MDAT box contents (next byte after MDAT box)

    &#xA;

    public Map.Entry> hasMdat(byte[] byteArray) {&#xA;    for (int i = 0; i &lt; byteArray.length - 3; i&#x2B;&#x2B;) {&#xA;        if (byteArray[i] == (byte) 109 &amp;&amp;&#xA;                byteArray[i &#x2B; 1] == (byte) 100 &amp;&amp;&#xA;                byteArray[i &#x2B; 2] == (byte) 97 &amp;&amp;&#xA;                byteArray[i &#x2B; 3] == (byte) 116) {&#xA;&#xA;            return Map.entry(true, Arrays.asList(i, i &#x2B; 1, i &#x2B; 2, i &#x2B; 3));&#xA;        }&#xA;    }&#xA;    return Map.entry(false, List.of(0));&#xA;}&#xA;

    &#xA;

    This is my code which handles the byte stream

    &#xA;

    initSocketConnection(new VideoStreamCallback() {&#xA;        @Override&#xA;        public void onVideoStreamReceived(byte[] bytes) {&#xA;           &#xA;Map.Entry> b = hasMdat(bytes);&#xA;        if (b.getKey()) {&#xA;            byte[] b1 = Arrays.copyOfRange(bytes, b.getValue().get(3) &#x2B; 1, bytes.length);&#xA;  //write b1 back to client using spring SSE&#xA;            &#xA;        }&#xA;&#xA;        }&#xA;    });&#xA;

    &#xA;