
Recherche avancée
Autres articles (21)
-
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Prérequis à l’installation
31 janvier 2010, parPréambule
Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
Il (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (4789)
-
FFMPEG Create internal pipeline for adding raw frames to AVI file (no input file)
12 juillet 2018, par KatieI have an application that reads in a raw video file, does some image processing to each frame, then feeds the resulting BGRA-format byte[] frames to the FFMPEG container to eventually create an AVI file. Since this process works slightly differently than any other FFMPEG example I’ve seen in that it does not have an existing input file, I’m wondering if anyone knows how to do this.
I initialize the FFMPEG container :
ProcessBuilder pBuilder = new ProcessBuilder(raid.getLocation()
+ "\\ffmpeg\\bin\\ffmpeg.exe", "-r", "30", "-vcodec",
"rawvideo", "-f", "rawvideo", "-pix_fmt", "bgra", "-s",
size, "-i", "pipe:0", "-r", "30", "-y", "-c:v", "libx264",
"C:\export\2015-02-03\1500\EXPORT6.avi");
try
{
process = pBuilder.start();
}
catch (IOException e)
{
e.printStackTrace();
}
ffmpegInput = process.getOutputStream();For each incoming byte[] array frame, I add the frame to the container ("src" is a BufferedImage that I’m converting to a byte array) :
try
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(src, ".png", baos);
ffmpegInput.write(baos.toByteArray());
}
catch (IOException e)
{
e.printStackTrace();
}And once the video is finished loading frames, I close the container :
try
{
ffmpegInput.flush();
ffmpegInput.close();
}
catch (IOException e)
{
e.printStackTrace();
}The AVI file is created but it displays an error when opening. The FFMPEG logger displays this as the error :
ffmpeg version N-71102-g1f5d1ee Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 20.101 / 54. 20.101
libavcodec 56. 30.100 / 56. 30.100
libavformat 56. 26.101 / 56. 26.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 13.101 / 5. 13.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, rawvideo, from 'pipe:0':
Duration: N/A, bitrate: 294912 kb/s
Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 640x480, 294912 kb/s, 30 tbr, 30 tbn, 30 tbc
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 00000000003bcbe0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 00000000003bcbe0] profile High 4:4:4 Predictive, level 3.0, 4:4:4 8-bit
Output #0, avi, to 'C:\export\2015-02-03\1500\EXPORT6.avi':
Metadata:
ISFT : Lavf56.26.101
Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv444p, 640x480, q=-1--1, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc56.30.100 libx264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
frame= 0 fps=0.0 q=0.0 Lsize= 6kB time=00:00:00.00 bitrate=N/A
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)Any insight or ideas would be greatly appreciated !
-
FFMPEG- Streaming Stops after few seconds
25 mars 2019, par Manjot Singh KalsiHi there dear community
This is the thing that I am dealing with, since last few days. After thorough search in the ffmpeg community, I was unable to find the solution. I am unable to Stream local flv, to facebook
rtmp
server.I am running the following command to stream my local flv video to the
rtmp
server of Facebook for Live-Streaming of my local File.```ffmpeg -re -i SampleM.flv -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 426x240 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "rtmp://live-api.facebook.com:80/rtmp/my_key"```
It has been a misfortune-situation that even after reading
ffmpeg
documentation, I have been unable to find the issue that is leading me to this situation as follows.I am still missing something that i need to know.
Following is the log to the execution of the above command.
```ffmpeg version N-91024-g293a6e8332 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 18.100 / 56. 18.100
libavcodec 58. 19.101 / 58. 19.101
libavformat 58. 13.102 / 58. 13.102
libavdevice 58. 4.100 / 58. 4.100
libavfilter 7. 21.100 / 7. 21.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libpostproc 55. 2.100 / 55. 2.100
Input #0, flv, from '.\video.flv':
Metadata:
audiodelay : 0
canSeekToEnd : 1
creationdate : Fri Feb 03 11:52:46 2006
:
Duration: 00:00:16.92, start: 0.000000, bitrate: 316 kb/s
Stream #0:0: Audio: mp3, 22050 Hz, stereo, fltp, 40 kb/s
Stream #0:1: Video: vp6f, 1 reference frame, yuv420p, 360x288 (368x288), 266 kb/s, 25 fps, 25 tbr, 1k tbn
Stream mapping:
Stream #0:1 -> #0:0 (vp6f (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[graph_1_in_0_0 @ 0000020c0bcc4200] tb:1/22050 samplefmt:fltp samplerate:22050 chlayout:0x3
[format_out_0_1 @ 0000020c0bca2cc0] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_resampler_0 @ 0000020c0bca5140] ch:2 chl:stereo fmt:fltp r:22050Hz -> ch:2 chl:stereo fmt:fltp r:44100Hz
[graph 0 input from stream 0:1 @ 0000020c0c4f4600] w:360 h:288 pixfmt:yuv420p tb:1/1000 fr:25/1 sar:0/1 sws_param:flags=2
[scaler_out_0_0 @ 0000020c0c4f73c0] w:426 h:240 flags:'bicubic' interl:0
[scaler_out_0_0 @ 0000020c0c4f73c0] w:360 h:288 fmt:yuv420p sar:0/1 -> w:426 h:240 fmt:yuv420p sar:0/1 flags:0x4
[libx264 @ 0000020c0bc80600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000020c0bc80600] profile Constrained Baseline, level 3.0
[libx264 @ 0000020c0bc80600] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=7 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=3 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=abr mbtree=1 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1500 vbv_bufsize=6000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp://live-api.facebook.com:80/rtmp/my key:
Metadata:
audiodelay : 0
canSeekToEnd : 1
creationdate : Fri Feb 03 11:52:46 2006
:
encoder : Lavf58.13.102
Stream #0:0: Video: h264 (libx264), 1 reference frame ([7][0][0][0] / 0x0007), yuv420p, 426x240, q=-1--1, 400 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc58.19.101 libx264
Side data:
cpb: bitrate max/min/avg: 1500000/0/400000 buffer size: 6000000 vbv_delay: -1
Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, fltp, delay 1105, 128 kb/s
Metadata:
encoder : Lavc58.19.101 libmp3lame
No more output streams to write to, finishing.e=00:00:16.51 bitrate= 533.3kbits/s speed=0.992x
[flv @ 0000020c0bc97fc0] Failed to update header with correct duration.
[flv @ 0000020c0bc97fc0] Failed to update header with correct filesize.
frame= 424 fps= 25 q=-1.0 Lsize= 1153kB time=00:00:16.95 bitrate= 557.1kbits/s speed=0.997x
video:869kB audio:265kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.666647%
Input file #0 (.\video.flv):
Input stream #0:0 (audio): 649 packets read (84767 bytes); 649 frames decoded (373824 samples);
Input stream #0:1 (video): 424 packets read (566376 bytes); 424 frames decoded;
Total: 1073 packets (651143 bytes) demuxed
Output file #0 (rtmp://live-api.facebook.com:80/rtmp/my key):
Output stream #0:0 (video): 424 frames encoded; 424 packets muxed (889641 bytes);
Output stream #0:1 (audio): 649 frames encoded (747648 samples); 650 packets muxed (271673 bytes);
Total: 1074 packets (1161314 bytes) muxed
[libx264 @ 0000020c0bc80600] frame I:18 Avg QP:27.75 size: 7001
[libx264 @ 0000020c0bc80600] frame P:406 Avg QP:32.67 size: 1879
[libx264 @ 0000020c0bc80600] mb I I16..4: 39.3% 0.0% 60.7%
[libx264 @ 0000020c0bc80600] mb P I16..4: 8.3% 0.0% 2.3% P16..4: 42.2% 16.2% 4.4% 0.0% 0.0% skip:26.6%
[libx264 @ 0000020c0bc80600] final ratefactor: 28.61
[libx264 @ 0000020c0bc80600] coded y,uvDC,uvAC intra: 40.2% 33.7% 9.2% inter: 23.8% 7.5% 0.2%
[libx264 @ 0000020c0bc80600] i16 v,h,dc,p: 24% 50% 20% 6%
[libx264 @ 0000020c0bc80600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 34% 18% 5% 5% 4% 8% 4% 8%
[libx264 @ 0000020c0bc80600] i8c dc,h,v,p: 67% 24% 7% 2%
[libx264 @ 0000020c0bc80600] kb/s:418.33```This Image shows that The stream was alive few Few Seconds on Facebook
```[flv @ 0000020c0bc97fc0] Failed to update header with correct duration.
[flv @ 0000020c0bc97fc0] Failed to update header with correct filesize.```Please correct me, the above error listed in the log, seems to be the main cause that the video stops streaming after few seconds. I’ve checked for the latency issues, But they won’t help anyway.
Please Help me to tackle this issue. I’ll be very much thankful. :’)
Streaming ends even earlier, when I use Google compute engine, instead my own PC as streaming service.
-
Write, with ffmpeg, every 30 seconds wav file from ip stream to file.temp and change the name to timestamp.wav after
18 juillet 2018, par EliyaI’m using ffmpeg to record IP stream and write every 30 seconds to wav file.
Here is my bash script code :
#!/bin/bash
function start_ffmpeg_stream ()
{
address=$1 #This is IP stream address
ffmpeg_option=$2 # "?overrun_nonfatal=1&fifo_size=250000"
folder_name=$3 #folderName
channel_number=$4 #i
#local pid
ffmpeg -loglevel 8 -thread_queue_size 1500 -i "$address$ffmpeg_option" -c copy\
-vn -f segment -segment_time 30 -ar 8000 -acodec pcm_s32le -ac 1 -strftime 1 /"$folder_name"/"X$channel_number""_""%s.wav"&
pid=$!
echo "$Start ffmpeg, pid is - $pid"
__="$pid"
}
ffmpegOptions="?overrun_nonfatal=1&fifo_size=250000"
folderName="/wav_files"
start_ffmpeg_stream "udp://224.10.0.1" "$ffmpegOptions" "$folderName" "1"Now the wav file name is like "X000001_unix_time_stamp.wav".
I want to write the file name in writeing time something like "X000001_unix_time_stamp.temp"
And when the 30 seconds done and the FFmpeg finish to write this 30 seconds, I want that FFmpeg changes the name to "X000001_unix_time_stamp.wav"
And keep writing next 30 seconds.
The only change that i want is, when FFmpeg writing it write in temp name and after FFmpeg finish to write it change the name.
It’s seem to case when i donloaded a file so until the donload not finish the file has a temp name and when it done the name change to const name.