
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (105)
-
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation"
Sur d’autres sites (10539)
-
ffmpeg command not working from bash script but working from command line [duplicate]
6 octobre 2023, par SamTechI wrote a
bash
script that is generating command to encode video and create HLS playlist.

Here is the script. To make it short and clear, i fill variables with hard-coded values.


#!/bin/bash

# below variables are generated from some other script

basic="-hide_banner -y -i Sample.mp4 -profile:v main -crf 20 -sc_threshold 0 -g 50 -keyint_min 50 -hls_time 6"

renditions="-c:v:0 h264 -filter:v:0 scale=w=426:h=240:force_original_aspect_ratio=decrease -b:v:0 128k -maxrate:v:0 136k -bufsize:v:0 192k -c:v:1 h264 -filter:v:1 scale=w=640:h=360:force_original_aspect_ratio=decrease -b:v:1 256k -maxrate:v:1 273k -bufsize:v:1 384k -b:a 128k -c:a aac -ar 48000 -ac 2"

mapping="-map 0:v -map 0:v -map 0:a"
stream_map="-var_stream_map \"v:0,agroup:audio v:1,agroup:audio a:0,agroup:audio\""

hls="-hls_list_size 0 -f hls -hls_playlist_type vod -hls_segment_type mpegts -master_pl_name master.m3u8 -y %v_seg.m3u8"

# show final command
echo "Command:"
echo "ffmpeg ${basic} ${renditions} ${mapping} ${stream_map} ${hls}"

# execute command
ffmpeg ${basic} ${renditions} ${mapping} ${stream_map} ${hls}



Here is complete output from the script, along with the error it is giving.


[samtech@SAM tmp]$ ./hls-debug.sh 
Command:
ffmpeg -hide_banner -y -i Sample.mp4 -profile:v main -crf 20 -sc_threshold 0 -g 50 -keyint_min 50 -hls_time 10 -c:v:0 h264 -filter:v:0 scale=w=426:h=240:force_original_aspect_ratio=decrease -b:v:0 128k -maxrate:v:0 136k -bufsize:v:0 192k -c:v:1 h264 -filter:v:1 scale=w=640:h=360:force_original_aspect_ratio=decrease -b:v:1 256k -maxrate:v:1 273k -bufsize:v:1 384k -b:a 128k -c:a aac -ar 48000 -ac 2 -map 0:v -map 0:v -map 0:a -var_stream_map "v:0,agroup:audio v:1,agroup:audio a:0,agroup:audio" -hls_list_size 0 -f hls -hls_playlist_type vod -hls_segment_type mpegts -master_pl_name master.m3u8 -y %v_seg.m3u8
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x562fabc34480] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Sample.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:31.00, start: 0.002000, bitrate: 1146 kb/s
 Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 12800 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
[NULL @ 0x562fabc69680] Unable to find a suitable output format for 'v:1,agroup:audio'
v:1,agroup:audio: Invalid argument



And here is output when i copy command and run in terminal


[samtech@SAM tmp]$ ffmpeg -hide_banner -y -i Sample.mp4 -profile:v main -crf 20 -sc_threshold 0 -g 50 -keyint_min 50 -hls_time 10 -c:v:0 h264 -filter:v:0 scale=w=426:h=240:force_original_aspect_ratio=decrease -b:v:0 128k -maxrate:v:0 136k -bufsize:v:0 192k -c:v:1 h264 -filter:v:1 scale=w=640:h=360:force_original_aspect_ratio=decrease -b:v:1 256k -maxrate:v:1 273k -bufsize:v:1 384k -b:a 128k -c:a aac -ar 48000 -ac 2 -map 0:v -map 0:v -map 0:a -var_stream_map "v:0,agroup:audio v:1,agroup:audio a:0,agroup:audio" -hls_list_size 0 -f hls -hls_playlist_type vod -hls_segment_type mpegts -master_pl_name master.m3u8 -y %v_seg.m3u8
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55eeed0c7500] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Sample.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Duration: 00:00:31.00, start: 0.002000, bitrate: 1146 kb/s
 Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 640x480, 997 kb/s, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 12800 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:0 -> #0:1 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:2 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55eeed0ff5c0] using SAR=1/1
[libx264 @ 0x55eeed0ff5c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55eeed0ff5c0] profile Main, level 1.3, 4:2:0, 8-bit
[libx264 @ 0x55eeed0ff5c0] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=7 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=50 keyint_min=26 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=136 vbv_bufsize=192 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[libx264 @ 0x55eeed106f40] using SAR=1/1
[libx264 @ 0x55eeed106f40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55eeed106f40] profile Main, level 2.1, 4:2:0, 8-bit
[libx264 @ 0x55eeed106f40] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=11 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=50 keyint_min=26 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=273 vbv_bufsize=384 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[mpegts @ 0x55eef094a180] frame size not set
Output #0, hls, to '%v_seg.m3u8':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.3.100
 Stream #0:0(und): Video: h264, yuv420p(tv, progressive), 320x240 [SAR 1:1 DAR 4:3], q=2-31, 128 kb/s, 25 fps, 90k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 136000/0/128000 buffer size: 192000 vbv_delay: N/A
 Stream #0:1(und): Video: h264, yuv420p(tv, progressive), 480x360 [SAR 1:1 DAR 4:3], q=2-31, 256 kb/s, 25 fps, 90k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 273000/0/256000 buffer size: 384000 vbv_delay: N/A
 Stream #0:2(und): Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.3.100 aac
[hls @ 0x55eeed0fc700] Opening '0_seg0.ts' for writing10.98 bitrate=N/A dup=370 drop=0 speed=11.2x 
[hls @ 0x55eeed0fc700] Opening '1_seg0.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg0.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg1.ts' for writing17.53 bitrate=N/A dup=370 drop=0 speed=11.8x 
[hls @ 0x55eeed0fc700] Opening '1_seg1.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg1.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg2.ts' for writing28.75 bitrate=N/A dup=370 drop=0 speed=11.6x 
[hls @ 0x55eeed0fc700] Opening '1_seg2.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg2.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg3.ts' for writing
[hls @ 0x55eeed0fc700] Opening '0_seg.m3u8' for writing
[hls @ 0x55eeed0fc700] Opening '1_seg3.ts' for writing
[hls @ 0x55eeed0fc700] Opening '1_seg.m3u8' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg3.ts' for writing
[hls @ 0x55eeed0fc700] Opening '2_seg.m3u8' for writing
[hls @ 0x55eeed0fc700] Opening 'master.m3u8' for writing
frame= 775 fps=264 q=-1.0 Lq=-1.0 size=N/A time=00:00:30.97 bitrate=N/A dup=370 drop=0 speed=10.6x 
video:1227kB audio:489kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x55eeed0ff5c0] frame I:16 Avg QP:17.53 size: 9672
[libx264 @ 0x55eeed0ff5c0] frame P:328 Avg QP:20.42 size: 690
[libx264 @ 0x55eeed0ff5c0] frame B:431 Avg QP:18.51 size: 125
[libx264 @ 0x55eeed0ff5c0] consecutive B-frames: 20.6% 13.2% 7.4% 58.8%
[libx264 @ 0x55eeed0ff5c0] mb I I16..4: 33.1% 0.0% 66.9%
[libx264 @ 0x55eeed0ff5c0] mb P I16..4: 0.8% 0.0% 2.4% P16..4: 15.3% 7.5% 4.3% 0.0% 0.0% skip:69.7%
[libx264 @ 0x55eeed0ff5c0] mb B I16..4: 0.1% 0.0% 0.0% B16..8: 10.8% 1.7% 0.4% direct: 0.4% skip:86.6% L0:40.4% L1:51.0% BI: 8.7%
[libx264 @ 0x55eeed0ff5c0] coded y,uvDC,uvAC intra: 70.8% 80.4% 61.6% inter: 3.8% 4.7% 0.5%
[libx264 @ 0x55eeed0ff5c0] i16 v,h,dc,p: 17% 39% 23% 21%
[libx264 @ 0x55eeed0ff5c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 26% 18% 7% 7% 6% 7% 6% 7%
[libx264 @ 0x55eeed0ff5c0] i8c dc,h,v,p: 44% 31% 14% 11%
[libx264 @ 0x55eeed0ff5c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55eeed0ff5c0] ref P L0: 73.7% 16.3% 7.4% 2.6%
[libx264 @ 0x55eeed0ff5c0] ref B L0: 94.3% 4.9% 0.9%
[libx264 @ 0x55eeed0ff5c0] ref B L1: 98.3% 1.7%
[libx264 @ 0x55eeed0ff5c0] kb/s:112.27
[libx264 @ 0x55eeed106f40] frame I:16 Avg QP:15.14 size: 18394
[libx264 @ 0x55eeed106f40] frame P:260 Avg QP:19.00 size: 1507
[libx264 @ 0x55eeed106f40] frame B:499 Avg QP:18.80 size: 269
[libx264 @ 0x55eeed106f40] consecutive B-frames: 9.7% 11.4% 6.2% 72.8%
[libx264 @ 0x55eeed106f40] mb I I16..4: 36.5% 0.0% 63.5%
[libx264 @ 0x55eeed106f40] mb P I16..4: 1.2% 0.0% 3.1% P16..4: 15.5% 7.1% 3.2% 0.0% 0.0% skip:69.9%
[libx264 @ 0x55eeed106f40] mb B I16..4: 0.1% 0.0% 0.1% B16..8: 11.4% 1.6% 0.3% direct: 0.4% skip:86.2% L0:39.1% L1:53.5% BI: 7.4%
[libx264 @ 0x55eeed106f40] coded y,uvDC,uvAC intra: 65.1% 75.8% 54.1% inter: 3.1% 4.5% 0.3%
[libx264 @ 0x55eeed106f40] i16 v,h,dc,p: 35% 27% 12% 26%
[libx264 @ 0x55eeed106f40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 25% 15% 7% 8% 7% 8% 6% 6%
[libx264 @ 0x55eeed106f40] i8c dc,h,v,p: 46% 29% 14% 11%
[libx264 @ 0x55eeed106f40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55eeed106f40] ref P L0: 71.6% 15.9% 8.6% 3.9%
[libx264 @ 0x55eeed106f40] ref B L0: 93.9% 4.6% 1.5%
[libx264 @ 0x55eeed106f40] ref B L1: 98.3% 1.7%
[libx264 @ 0x55eeed106f40] kb/s:211.68
[aac @ 0x55eeed1009c0] Qavg: 401.380



What the wrong is going with that script ?


I am pulling my hairs from last few hours because of it, anyone help please.


-
Merge file without data loss using FFmpeg inside of WASM
9 septembre 2023, par DejiEdit : I'm rewriting this entire question


Goal : To reconstruct a video from its pieces/chunks from a network stream inside of an
@ffmpeg/ffmpeg
worker

Problems :


- 

- Video chunks/pieces which come after the first piece/chunk are reported by
@ffmpeg/ffmpeg
to have invalid data, as seen in the log below :




{
 "type": "stderr",
 "message": "video-0_chunk-1.part: Invalid data found when processing input"
}



- 

- How would I merge these chunks/pieces to reconstruct the full video using
@ffmpeg/ffmpeg
(after solving the first issue above)




My current code situation :


- 

- For merging the video pieces




const constructFile = async (chunks: Uint8Array[], queueId: number) => {
 await Promise.all(
 chunks.map(async (chunk, index) => {
 const chunkFile = `video-${queueId}_chunk-${index}`;
 await ffmpeg.writeFile(chunkFile, chunk);

 // Return information about newly created file
 ffmpeg.exec(["-i", chunkFile]);
 })
 );
};



I'm reading the logs/output for


ffmpeg.exec(['-i', chunkFile])



using


ffmpeg.on('log', (log) => console.log(log))



- 

- For fetching the videos using streams




await useFetch(Capacitor.convertFileSrc(file.path), {
 responseType: "stream",

 onResponse: async ({ response }) => {
 if (response.body) {
 const reader = response.body.getReader();

 while (true) {
 const { done, value } = await reader.read();

 if (done) break;
 file.chunks.push(value);
 }
 reader.releaseLock();
 }
 },
});



Note : file.chunks is linked to a reactive value which is passed to
constructFile()
when initialized

These are the logs I get from the code currently above :


chunk-4OF65L5M.js:2710 <suspense> is an experimental feature and its API will likely change.
(index):298 native App.addListener (#25407936)
(index):298 native FilePicker.pickVideos (#25407937)
(index):272 result FilePicker.pickVideos (#25407937)
(index):298 native VideoEditor.thumbnail (#25407938)
(index):272 result VideoEditor.thumbnail (#25407938)
Processing.vue:135 {type: 'stderr', message: 'ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers'}
Processing.vue:135 {type: 'stderr', message: ' built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)'}
Processing.vue:135 {type: 'stderr', message: ' configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass'}
Processing.vue:135 {type: 'stderr', message: ' libavutil 57. 28.100 / 57. 28.100'}
Processing.vue:135 {type: 'stderr', message: ' libavcodec 59. 37.100 / 59. 37.100'}
Processing.vue:135 {type: 'stderr', message: ' libavformat 59. 27.100 / 59. 27.100'}
Processing.vue:135 {type: 'stderr', message: ' libavdevice 59. 7.100 / 59. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libavfilter 8. 44.100 / 8. 44.100'}
Processing.vue:135 {type: 'stderr', message: ' libswscale 6. 7.100 / 6. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libswresample 4. 7.100 / 4. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libpostproc 56. 6.100 / 56. 6.100'}
Processing.vue:135 {type: 'stderr', message: "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video-0_chunk-0':"}
Processing.vue:135 {type: 'stderr', message: ' Metadata:'}
Processing.vue:135 {type: 'stderr', message: ' major_brand : mp42'}
Processing.vue:135 {type: 'stderr', message: ' minor_version : 0'}
Processing.vue:135 {type: 'stderr', message: ' compatible_brands: isommp42'}
Processing.vue:135 {type: 'stderr', message: ' creation_time : 2022-11-29T14:46:32.000000Z'}
Processing.vue:135 {type: 'stderr', message: ' Duration: 00:00:51.50, start: 0.000000, bitrate: 81 kb/s'}
Processing.vue:135 {type: 'stderr', message: ' Stream #0:0[0x1](und): Video: h264 (High) (avc1 …6], 259 kb/s, 30 fps, 30 tbr, 15360 tbn (default)'}
Processing.vue:135 {type: 'stderr', message: ' Metadata:'}
Processing.vue:135 {type: 'stderr', message: ' creation_time : 2022-11-29T14:46:32.000000Z'}
Processing.vue:135 {type: 'stderr', message: ' handler_name : ISO Media file produced by Google Inc. Created on: 11/29/2022.'}
Processing.vue:135 {type: 'stderr', message: ' vendor_id : [0][0][0][0]'}
Processing.vue:135 {type: 'stderr', message: ' Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0…706D), 44100 Hz, stereo, fltp, 127 kb/s (default)'}
Processing.vue:135 {type: 'stderr', message: ' Metadata:'}
Processing.vue:135 {type: 'stderr', message: ' creation_time : 2022-11-29T14:46:32.000000Z'}
Processing.vue:135 {type: 'stderr', message: ' handler_name : ISO Media file produced by Google Inc. Created on: 11/29/2022.'}
Processing.vue:135 {type: 'stderr', message: ' vendor_id : [0][0][0][0]'}
Processing.vue:135 {type: 'stderr', message: 'At least one output file must be specified'}
Processing.vue:135 {type: 'stderr', message: 'Aborted()'}
Processing.vue:135 {type: 'stderr', message: 'ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers'}
Processing.vue:135 {type: 'stderr', message: ' built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)'}
Processing.vue:135 {type: 'stderr', message: ' configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass'}
Processing.vue:135 {type: 'stderr', message: ' libavutil 57. 28.100 / 57. 28.100'}
Processing.vue:135 {type: 'stderr', message: ' libavcodec 59. 37.100 / 59. 37.100'}
Processing.vue:135 {type: 'stderr', message: ' libavformat 59. 27.100 / 59. 27.100'}
Processing.vue:135 {type: 'stderr', message: ' libavdevice 59. 7.100 / 59. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libavfilter 8. 44.100 / 8. 44.100'}
Processing.vue:135 {type: 'stderr', message: ' libswscale 6. 7.100 / 6. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libswresample 4. 7.100 / 4. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libpostproc 56. 6.100 / 56. 6.100'}
Processing.vue:135 {type: 'stderr', message: 'video-0_chunk-1: Invalid data found when processing input'}
Processing.vue:135 {type: 'stderr', message: 'Aborted()'}
Processing.vue:135 {type: 'stderr', message: 'ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers'}
Processing.vue:135 {type: 'stderr', message: ' built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)'}
Processing.vue:135 {type: 'stderr', message: ' configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass'}
Processing.vue:135 {type: 'stderr', message: ' libavutil 57. 28.100 / 57. 28.100'}
Processing.vue:135 {type: 'stderr', message: ' libavcodec 59. 37.100 / 59. 37.100'}
Processing.vue:135 {type: 'stderr', message: ' libavformat 59. 27.100 / 59. 27.100'}
Processing.vue:135 {type: 'stderr', message: ' libavdevice 59. 7.100 / 59. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libavfilter 8. 44.100 / 8. 44.100'}
Processing.vue:135 {type: 'stderr', message: ' libswscale 6. 7.100 / 6. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libswresample 4. 7.100 / 4. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libpostproc 56. 6.100 / 56. 6.100'}
Processing.vue:135 {type: 'stderr', message: 'video-0_chunk-2: Invalid data found when processing input'}
Processing.vue:135 {type: 'stderr', message: 'Aborted()'}
Processing.vue:135 {type: 'stderr', message: 'ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers'}
Processing.vue:135 {type: 'stderr', message: ' built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)'}
Processing.vue:135 {type: 'stderr', message: ' configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass'}
Processing.vue:135 {type: 'stderr', message: ' libavutil 57. 28.100 / 57. 28.100'}
Processing.vue:135 {type: 'stderr', message: ' libavcodec 59. 37.100 / 59. 37.100'}
Processing.vue:135 {type: 'stderr', message: ' libavformat 59. 27.100 / 59. 27.100'}
Processing.vue:135 {type: 'stderr', message: ' libavdevice 59. 7.100 / 59. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libavfilter 8. 44.100 / 8. 44.100'}
Processing.vue:135 {type: 'stderr', message: ' libswscale 6. 7.100 / 6. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libswresample 4. 7.100 / 4. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libpostproc 56. 6.100 / 56. 6.100'}
Processing.vue:135 {type: 'stderr', message: 'video-0_chunk-3: Invalid data found when processing input'}
Processing.vue:135 {type: 'stderr', message: 'Aborted()'}
Processing.vue:135 {type: 'stderr', message: 'ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers'}
Processing.vue:135 {type: 'stderr', message: ' built with emcc (Emscripten gcc/clang-like repla…3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)'}
Processing.vue:135 {type: 'stderr', message: ' configuration: --target-os=none --arch=x86_32 --…e-libfreetype --enable-libfribidi --enable-libass'}
Processing.vue:135 {type: 'stderr', message: ' libavutil 57. 28.100 / 57. 28.100'}
Processing.vue:135 {type: 'stderr', message: ' libavcodec 59. 37.100 / 59. 37.100'}
Processing.vue:135 {type: 'stderr', message: ' libavformat 59. 27.100 / 59. 27.100'}
Processing.vue:135 {type: 'stderr', message: ' libavdevice 59. 7.100 / 59. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libavfilter 8. 44.100 / 8. 44.100'}
Processing.vue:135 {type: 'stderr', message: ' libswscale 6. 7.100 / 6. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libswresample 4. 7.100 / 4. 7.100'}
Processing.vue:135 {type: 'stderr', message: ' libpostproc 56. 6.100 / 56. 6.100'}
Processing.vue:135 {type: 'stderr', message: 'video-0_chunk-4: Invalid data found when processing input'}
Processing.vue:135 {type: 'stderr', message: 'Aborted()'}
</suspense>


Notes :


- 

- The sections which start with
Processing.vue
come from the logging system I've setup. - The pieces/chunks gotten from the network where stored in exactly the same order in which they came
- If you've seen the old question, the
ReferenceError
happens as a result of HMR by Vite
- 

- Similar to this, some logs were repeated twice because I was actively changing some things and the component had to rerun from the start












Summary : If my problem is still not clear, you could provide another way of fetching a large file (video) from a network, loading the file into memory and passing the file data to
@ffmpeg/ffmpeg
for further processing

- Video chunks/pieces which come after the first piece/chunk are reported by
-
when using ffmpeg encode to hevc , but got 'rawvideo' [closed]
3 septembre 2023, par 112292454i tried use ffmpeg to convert some types video to h265 to save disk space
but for some video, successfully converted and the file size smaller, but cannot play。
the result video codec name is "rawvideo",not hevc.


the ffporbe of raw video is


ffprobe version 5.1.2-3ubuntu1 Copyright (c) 2007-2022 the FFmpeg developers
 built with gcc 12 (Ubuntu 12.2.0-14ubuntu2)
 configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
 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
Input #0, avi, from 'xxx.avi':
 Duration: 00:06:11.62, start: 0.000000, bitrate: 5196 kb/s
 Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5057 kb/s, 29 fps, 29 tbr, 29 tbn
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 128 kb/s



or


ffprobe -v error -show_entries stream=duration,r_frame_rate,bit_rate,width,height,codec_name:stream=codec_name,bit_rate:stream=sample_rate -of json 'xxx.avi'
{
 "programs": [

 ],
 "streams": [
 {
 "codec_name": "mpeg4",
 "width": 1280,
 "height": 720,
 "r_frame_rate": "29/1",
 "duration": "371.620058",
 "bit_rate": "5057186"
 },
 {
 "codec_name": "mp3",
 "sample_rate": "44100",
 "r_frame_rate": "0/0",
 "bit_rate": "128000"
 }
 ]
}



then, i used ffmpeg simple
(I'm guessing that this problem is just a stupid mistake of newbie,maybe like not use avi ? And the raw video is nsfw, maybe not suitable for release, XD--------but if really need it,can also supply)


ffmpeg -i xxx.avi -c:v libx265 'compressed_xxx.avi'

ffmpeg version 5.1.2-3ubuntu1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12 (Ubuntu 12.2.0-14ubuntu2)
 configuration: --prefix=/usr --extra-version=3ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
 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
Input #0, avi, from 'xxx.avi':
 Duration: 00:06:11.62, start: 0.000000, bitrate: 5196 kb/s
 Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 5057 kb/s, 29 fps, 29 tbr, 29 tbn
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 128 kb/s
File 'compressed_xxx.avi' already exists. Overwrite? [y/N] y

Stream mapping:
 Stream #0:0 -> #0:0 (mpeg4 (native) -> hevc (libx265))
 Stream #0:1 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Linux][GCC 11.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-3.1 (Main tier)
x265 [info]: Thread pool 0 using 40 threads on numa nodes 0,1
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 5 / wpp(12 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias : 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-28.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing lslices=4 deblock sao
Output #0, avi, to 'compressed_xxx.avi':
 Metadata:
 ISFT : Lavf59.27.100
 Stream #0:0: Video: hevc, yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 29 fps, 29 tbn
 Metadata:
 encoder : Lavc59.37.100 libx265
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp
 Metadata:
 encoder : Lavc59.37.100 libmp3lame
frame=10776 fps= 33 q=36.0 Lsize= 42885kB time=00:06:11.59 bitrate= 945.4kbits/s speed=1.15x
video:36477kB audio:5807kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.422882%
x265 [info]: frame I: 63, Avg QP:26.58 kb/s: 5832.53
x265 [info]: frame P: 3716, Avg QP:28.99 kb/s: 1837.94
x265 [info]: frame B: 6997, Avg QP:35.36 kb/s: 203.80
x265 [info]: Weighted P-Frames: Y:0.1% UV:0.0%
x265 [info]: consecutive B-frames: 2.8% 53.6% 2.0% 39.0% 2.7%

encoded 10776 frames in 322.72s (33.39 fps), 800.22 kb/s, Avg QP:33.11



ffprobe to the result :


Input #0, avi, from 'compressed_xxx.avi':
 Metadata:
 software : Lavf59.27.100
 Duration: 00:06:11.62, start: 0.000000, bitrate: 945 kb/s
 Stream #0:0: Video: rawvideo, bgr24, 1280x720, 804 kb/s, SAR 1:1 DAR 16:9, 29 fps, 29 tbr, 29 tbn
 Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp, 128 kb/s

or:

{
 "programs": [

 ],
 "streams": [
 {
 "codec_name": "rawvideo",
 "width": 1280,
 "height": 720,
 "r_frame_rate": "30/1",
 "duration": "371.633333",
 "bit_rate": "792222"
 },
 {
 "codec_name": "aac",
 "sample_rate": "44100",
 "r_frame_rate": "0/0",
 "duration": "371.635374",
 "bit_rate": "128000"
 }
 ]
}



the cedec show like 'rawvideo', not for other video that can correct play, like :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'compressed_yyy.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf59.27.100
 Duration: 00:32:16.26, start: 0.000000, bitrate: 604 kb/s
 Stream #0:0[0x1](und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 1280x720, 468 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : Lavc59.37.100 libx265
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]

or:

{
 "programs": [

 ],
 "streams": [
 {
 "codec_name": "hevc",
 "width": 1280,
 "height": 720,
 "r_frame_rate": "30/1",
 "duration": "1936.233333",
 "bit_rate": "468393"
 },
 {
 "codec_name": "aac",
 "sample_rate": "48000",
 "r_frame_rate": "0/0",
 "duration": "1936.256000",
 "bit_rate": "127151"
 }
 ]
}



does i need any config to specify in ffmpeg commands to get the right codec ?
(btw, does this video bitrate is normally ?)