
Recherche avancée
Autres articles (19)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (1970)
-
Error : ffmpeg : Failed to download resource "sqlite"
22 février 2023, par nouri am trying to download ffmpeg but I am getting this error ! could anyone help ? I am using paperclip gem to add images and videos. I am getting this error on heroku when i try to add a new video Av::UnableToDetect (Unable to detect any supported library so that's why im trying to download ffmpeg. could someone help please ! thanks in advance


brew install ffmpeg


curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
Error: ffmpeg: Failed to download resource "sqlite"
Download failed: https://sqlite.org/2022/sqlite-autoconf-3400100.tar.gz



when i add a new video to my website on heroku I got this error


2023-02-22T06:23:03.207072+00:00 app[web.1]: User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2023-02-22T06:23:03.208471+00:00 app[web.1]: Steptation Load (0.7ms) SELECT "steptations".* FROM "steptations" WHERE "steptations"."id" = $1 LIMIT 1 [["id", 1802]]
2023-02-22T06:23:03.210118+00:00 app[web.1]: [paperclip] Trying to link /tmp/RackMultipart20230222-2-1i28xon.mp4 to /tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-165fycl.mp4
2023-02-22T06:23:03.210923+00:00 app[web.1]: [paperclip] Trying to link /tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-165fycl.mp4 to /tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-p6icfm.mp4
2023-02-22T06:23:03.211217+00:00 app[web.1]: Command :: file -b --mime '/tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-p6icfm.mp4'
2023-02-22T06:23:03.218799+00:00 app[web.1]: [AV] Running command: if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi
2023-02-22T06:23:03.221000+00:00 app[web.1]: [AV] Running command: if command -v ffmpeg 2>/dev/null; then echo "true"; else echo "false"; fi
2023-02-22T06:23:03.222208+00:00 heroku[router]: at=info method=POST path= "/step_images?id=1802" host=www.mobileimplantlab.ca request_id=39f2b001-ab36-4a59-ae94-1f300d386a40 fwd="207.216.102.221" dyno=web.1 connect=0ms service=900ms status=500 bytes=234 protocol=https
2023-02-22T06:23:03.222987+00:00 app[web.1]: Completed 500 Internal Server Error in 18ms (ActiveRecord: 1.6ms)
2023-02-22T06:23:03.223510+00:00 app[web.1]: 
2023-02-22T06:23:03.223511+00:00 app[web.1]: Av::UnableToDetect (Unable to detect any supported library):
2023-02-22T06:23:03.223511+00:00 app[web.1]: app/controllers/step_images_controller.rb:15:in `create'
2023-02-22T06:23:03.223512+00:00 app[web.1]: 
2023-02-22T06:23:03.223512+00:00 app[web.1]: 
2023-02-22T06:23:14.356278+00:00 app[web.1]: Started POST "/step_images?id=1802" for 207.216.102.221 at 2023-02-22 06:23:14 +0000
2023-02-22T06:23:14.357993+00:00 app[web.1]: Processing by StepImagesController#create as HTML
2023-02-22T06:23:14.358067+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"PgRtPGgyOSPP8lQlbf9fAgOSZre/XlYcKBKJhe81oOz9Ge81GZZzEfc4Xcnz0zzZ35S7PpsfKOse3Q73mxhjEA==", "step_image"=>{"product_id"=>"4", "text"=>"", "text2"=>"", "text3"=>"", "text4"=>"", "text5"=>"", "video"=>#, @original_filename="IMG_2826.mp4", @content_type="video/mp4", @headers="Content-Disposition: form-data; name=\"step_image[video]\"; filename=\"IMG_2826.mp4\"\r\nContent-Type: video/mp4\r\n">, "text6"=>"test", "user_id"=>"73", "case_id"=>"311", "step_id"=>"3"}, "commit"=>"Submit", "id"=>"1802"}
2023-02-22T06:23:14.359735+00:00 app[web.1]: User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
2023-02-22T06:23:14.360954+00:00 app[web.1]: Steptation Load (0.7ms) SELECT "steptations".* FROM "steptations" WHERE "steptations"."id" = $1 LIMIT 1 [["id", 1802]]
2023-02-22T06:23:14.362132+00:00 app[web.1]: [paperclip] Trying to link /tmp/RackMultipart20230222-2-1stq4d4.mp4 to /tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-1jq0dqp.mp4
2023-02-22T06:23:14.362719+00:00 app[web.1]: [paperclip] Trying to link /tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-1jq0dqp.mp4 to /tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-9hfi7z.mp4
2023-02-22T06:23:14.362932+00:00 app[web.1]: Command :: file -b --mime '/tmp/847606d3771b12aa2d91db7647fe3a4920230222-2-9hfi7z.mp4'
2023-02-22T06:23:14.370045+00:00 app[web.1]: [AV] Running command: if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi
2023-02-22T06:23:14.372073+00:00 app[web.1]: [AV] Running command: if command -v ffmpeg 2>/dev/null; then echo "true"; else echo "false"; fi
2023-02-22T06:23:14.374070+00:00 app[web.1]: Completed 500 Internal Server Error in 16ms (ActiveRecord: 1.5ms)
2023-02-22T06:23:14.374254+00:00 heroku[router]: at=info method=POST path= "/step_images?id=1802" host=www.mobileimplantlab.ca request_id=4a0702a2-8d14-454a-9f1f-edf154e140fc fwd="207.216.102.221" dyno=web.1 connect=0ms service=267ms status=500 bytes=234 protocol=https
2023-02-22T06:23:14.374720+00:00 app[web.1]: 
2023-02-22T06:23:14.374721+00:00 app[web.1]: Av::UnableToDetect (Unable to detect any supported library):



in my gem file


source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.11.1'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.20.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'pry', '~> 0.13.1'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development


group :development do
 # Access an IRB console on exception pages or by using <%= console %> in views
 gem 'web-console', '~> 2.0'

 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
 gem 'spring'
end

gem 'devise'
group :development, :test do
 gem "interactive_editor"
 gem "hirb"
 gem "awesome_print"
 gem 'byebug'
end
group :production do
 gem 'rails_12factor'
 gem 'puma'
end
gem 'mail_form'
gem 'font-awesome-sass', '~> 5.12.0'

gem 'bootsnap', '>= 1.1.0', require: false
gem 'bootstrap-sass', '~>3.2.0'

gem 'paperclip'

gem 'aws-sdk-s3'
gem 'aws-sdk', '< 2.0'

gem 'thor', '0.19.1'
gem 'omniauth-google-oauth2'
gem "recaptcha", require: "recaptcha/rails"
gem 'friendly_id', '~> 5.4.0'

gem 'activeadmin'

gem 'cocoon'
gem 'bigdecimal', '1.3.5'
gem 'bundler', '1.17.3'
gem 'paperclip-av-transcoder'
gem "paperclip-ffmpeg", "~> 1.2.0"
gem "will_paginate", "~> 3.0.4" 
gem 'rails-erd'
gem 'rails_autolink'

gem 'rails-erd', group: :development



in the model


has_attached_file :video, :styles => {
 :medium => { :geometry => "500x500", :format => 'jpg' },
 :thumb => { :geometry => "100x100", :format => 'jpg' }
 }, :processors => [:transcoder]

 validates_attachment_content_type :video,
 :content_type => [
 "video/mp4", 
 "video/quicktime",
 "video/3gpp",
 "video/x-ms-wmv",
 "video/mov",
 "video/flv",
 
 ]



-
Generating DASH manifest with ffmpeg works in Docker exec shell but not in os.exec golang
22 février 2023, par InquisitorI am trying to generate a DASH manifest with ffmpeg using this command


/usr/bin/ffmpeg -f webm_dash_manifest -i ./480.webm -f webm_dash_manifest -i ./audio.webm -c copy -map 0:0 -map 1:0 -y -f webm_dash_manifest -adaptation_sets "id=0,streams=0 id=1,streams=1" ./manifest.mpd -loglevel repeat+level+verbose



I run this in go, in a docker container as shown :


func runFFmpeg(arguments []string) {
 arguments = append(arguments, "-loglevel", "repeat+level+verbose")
 cmd := exec.Command("ffmpeg", arguments...)

 fmt.Printf("cmd: %v\n", cmd)

 var out bytes.Buffer
 var stderr bytes.Buffer
 cmd.Stdout = &out
 cmd.Stderr = &stderr
 err := cmd.Run()

 if err != nil {
 log.Println(err)
 log.Println(stderr.String())
 }
}
runFFmpeg([]string{"-f", "webm_dash_manifest", "-i", "./480.webm", "-f", "webm_dash_manifest", "-i", "./audio.webm", "-c", "copy", "-map", "0:0", "-map", "1:0", "-y", "-f", "webm_dash_manifest", "-adaptation_sets", "\"id=0,streams=0 id=1,streams=1\"", "./manifest.mpd"})



But I get this output :


cmd: /usr/bin/ffmpeg -f webm_dash_manifest -i ./480.webm -f webm_dash_manifest -i ./audio.webm -c copy -map 0:0 -map 1:0 -y -copy_unknown -f webm_dash_manifest -adaptation_sets "id=0,streams=0 id=1,streams=1" ./manifest.mpd -loglevel repeat+level+verbose
 2023/02/22 04:45:17 exit status 1
 2023/02/22 04:45:17 [info] ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 [info] built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r3) 20220924
 [info] configuration: --prefix=/usr --enable-avfilter --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gnutls --enable-gpl --enable-libass --enable-libmp3lame --enable-libpulse --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-libdav1d --enable-lto --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-libxcb --enable-librist --enable-libsrt --enable-libssh --enable-libvidstab --disable-stripping --disable-static --disable-librtmp --disable-lzma --enable-libaom --enable-libopus --enable-libsoxr --enable-libwebp --enable-vaapi --enable-vdpau --enable-vulkan --enable-libdrm --enable-libzmq --optflags=-O2 --disable-debug --enable-libsvtav1
 [info] libavutil 57. 28.100 / 57. 28.100
 [info] libavcodec 59. 37.100 / 59. 37.100
 [info] libavformat 59. 27.100 / 59. 27.100
 [info] libavdevice 59. 7.100 / 59. 7.100
 [info] libavfilter 8. 44.100 / 8. 44.100
 [info] libswscale 6. 7.100 / 6. 7.100
 [info] libswresample 4. 7.100 / 4. 7.100
 [info] libpostproc 56. 6.100 / 56. 6.100
 [webm_dash_manifest @ 0x7fcec2836100] [warning] Could not find codec parameters for stream 0 (Video: vp9, 1 reference frame, none(tv, progressive, left), 640x480): unspecified pixel format
 Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
 [info] Input #0, webm_dash_manifest, from './480.webm':
 [info] Metadata:
 [info] title : Big Buck Bunny, Sunflower version
 [info] GENRE : Animation
 [info] MAJOR_BRAND : isom
 [info] MINOR_VERSION : 1
 [info] COMPATIBLE_BRANDS: isomavc1
 [info] COMPOSER : Sacha Goedegebure
 [info] ARTIST : Blender Foundation 2008, Janus Bager Kristensen 2013
 [info] COMMENT : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 [info] ENCODER : Lavf59.27.100
 [info] Duration: 00:10:34.60, bitrate: 352 kb/s
 [info] Stream #0:0: Video: vp9, 1 reference frame, none(tv, progressive, left), 640x480, SAR 853:640 DAR 853:480, 30 fps, 30 tbr, 1k tbn (default)
 [info] Metadata:
 [info] HANDLER_NAME : GPAC ISO Video Handler
 [info] VENDOR_ID : [0][0][0][0]
 [info] ENCODER : Lavc59.37.100 libvpx-vp9
 [info] DURATION : 00:10:34.600000000
 [info] webm_dash_manifest_duration: 634600
 [info] webm_dash_manifest_initialization_range: 889
 [info] webm_dash_manifest_file_name: 480.webm
 [info] webm_dash_manifest_track_number: 1
 [info] webm_dash_manifest_cues_start: 27924928
 [info] webm_dash_manifest_cues_end: 27927508
 [info] webm_dash_manifest_bandwidth: 738287
 [info] webm_dash_manifest_cluster_keyframe: 1
 [info] webm_dash_manifest_cue_timestamps: 67,5067,10067,15067,20067,25067,30067,35067,40067,45067,50067,55067,60067,65067,70067,75067,80067,85067,90067,95067,100067,105067,110067,115067,120067,125067,130067,135067,140067,145067,150067,155067,160067,165067,170067,175067,180067,185067,190067,195067
 [info] Input #1, webm_dash_manifest, from './audio.webm':
 [info] Metadata:
 [info] title : Big Buck Bunny, Sunflower version
 [info] GENRE : Animation
 [info] MAJOR_BRAND : isom
 [info] MINOR_VERSION : 1
 [info] COMPATIBLE_BRANDS: isomavc1
 [info] COMPOSER : Sacha Goedegebure
 [info] ARTIST : Blender Foundation 2008, Janus Bager Kristensen 2013
 [info] COMMENT : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
 [info] ENCODER : Lavf59.27.100
 [info] Duration: 00:05:35.91, bitrate: 120 kb/s
 [info] Stream #1:0: Audio: vorbis, 48000 Hz, 5.1, fltp (default)
 [info] Metadata:
 [info] HANDLER_NAME : GPAC ISO Audio Handler
 [info] VENDOR_ID : [0][0][0][0]
 [info] ENCODER : Lavc59.37.100 libvorbis
 [info] DURATION : 00:05:35.907000000
 [info] webm_dash_manifest_duration: 335907
 [info] webm_dash_manifest_initialization_range: 7411
 [info] webm_dash_manifest_file_name: audio.webm
 [info] webm_dash_manifest_track_number: 1
 [info] webm_dash_manifest_cues_start: 5047497
 [info] webm_dash_manifest_cues_end: 5048846
 [info] webm_dash_manifest_bandwidth: 126994
 [info] webm_dash_manifest_cluster_keyframe: 1
 [info] webm_dash_manifest_cue_timestamps: 0,4986,9980,14962,19959,24956,29946,34930,39916,44911,49908,54892,59874,64868,69858,74858,79855,84847,89834,94834,99826,104826,109826,114818,119812,124799,129780,134770,139756,144743,149727,154719,159714,164706,169698,174687,179668,184667,189658,194650,19
 HERE'S THE ERROR --> [error] Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
 [error] Error initializing output stream 0:1 -- 
 [info] Stream mapping:
 [info] Stream #0:0 -> #0:0 (copy)
 [info] Stream #1:0 -> #0:1 (copy)
 [error] 
 [AVIOContext @ 0x7fcebe23a840] [verbose] Statistics: 0 bytes written, 0 seeks, 0 writeouts
 [AVIOContext @ 0x7fcebe23a980] [verbose] Statistics: 5940786 bytes read, 133 seeks
 [AVIOContext @ 0x7fcebe23acc0] [verbose] Statistics: 2260628 bytes read, 72 seeks



It works perfectly however if I run it within docker exec (exec into the container and run the command in bash). Also, note in the last output that the command is well formed when I print it out from go. File permissions are also not the problem since the command to create the video variants works with os.exec i.e


runFFmpeg([]string{"-i", originalFilePath, "-c:v", "libvpx-vp9", "-keyint_min", "150", "-g", "150", "-tile-columns", "4", "-frame-parallel", "1", "-f", "webm", "-dash", "1", "-an", "-vf", fmt.Sprintf("scale=%s:%s", width, height), "-b:v", bitRate, "-dash", "1", "-y", destinationFilePath})



-
Decode a proprietary (Genetec) H264 network video stream
2 mars 2023, par al_muktharI have incoming byte streams probably encoded in H264 from a Genetec camera through a websocket in my spring boot application,


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


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


Any help would be appreciated


this is the part of hex dump received through socket


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



UPDATE TO THE CODE


1st Packet find here
2nd Packet find here


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)


public Map.Entry> hasMdat(byte[] byteArray) {
 for (int i = 0; i < byteArray.length - 3; i++) {
 if (byteArray[i] == (byte) 109 &&
 byteArray[i + 1] == (byte) 100 &&
 byteArray[i + 2] == (byte) 97 &&
 byteArray[i + 3] == (byte) 116) {

 return Map.entry(true, Arrays.asList(i, i + 1, i + 2, i + 3));
 }
 }
 return Map.entry(false, List.of(0));
}



This is my code which handles the byte stream


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

 }
 });