
Recherche avancée
Médias (21)
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (36)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (6267)
-
Why my ffmpeg video encode codes does not work on other computer ?
10 avril 2022, par Object UnknownI'm writing code to encode some cv::Mat images to a MP4 video. The program can run successfully in my computer which I developed it, but when I copied it (and all dlls it needs) to an other computer, it stopped work.


The function which reporting error : (I got it from StackOverflow, and added some changes)


int uns::VideoWriter::Remux()
{
 AVFormatContext* ifmt_ctx = NULL, * ofmt_ctx = NULL;
 int err = 0, ret = 0;
 int64_t ts = 0;
 AVStream* inVideoStream = NULL;
 AVStream* outVideoStream = NULL;
 if ((err = avformat_open_input(&ifmt_ctx, VIDEO_TMP_FILE.c_str(), 0, 0)) < 0)
 {
 if(callback != nullptr) 
 callback("[uns::VideoWriter/Remux] Failed to open input file for remuxing", err);
 ret = -1;
 goto end;
 }
 if ((err = avformat_find_stream_info(ifmt_ctx, 0)) < 0) 
 {
 if(callback != nullptr) 
 callback("[uns::VideoWriter/Remux] Failed to retrieve input stream information", err);
 ret = -2;
 goto end;
 }
 if ((err = avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, FINAL_FILE_NAME.c_str())))
 {
 if(callback != nullptr) 
 callback("[uns::VideoWriter/Remux] Failed to allocate output context", err);
 ret = -3;
 goto end;
 }
 inVideoStream = ifmt_ctx->streams[0];
 outVideoStream = avformat_new_stream(ofmt_ctx, NULL);
 if (!outVideoStream) 
 {
 if(callback != nullptr) 
 callback("[uns::VideoWriter/Remux] Failed to allocate output video stream", 0);
 ret = -4;
 goto end;
 }
 outVideoStream->time_base = { 1, fps };
 if ((err = avcodec_parameters_copy(outVideoStream->codecpar, inVideoStream->codecpar)) < 0)
 {
 if (callback != nullptr)
 callback("[uns::VideoWriter/Remux] Failed to copy stream information", err);
 return -4;
 goto end;
 }
 outVideoStream->codecpar->codec_tag = 0;
 if (!(ofmt_ctx->oformat->flags & AVFMT_NOFILE)) 
 {
 if ((err = avio_open(&ofmt_ctx->pb, FINAL_FILE_NAME.c_str(), AVIO_FLAG_WRITE)) < 0)
 {
 if(callback != nullptr) 
 callback("[uns::VideoWriter/Remux] Failed to open output file", err);
 ret = -5;
 goto end;
 }
 }
 ofmt_ctx->streams[0]->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
 ofmt_ctx->streams[0]->time_base.num = 1;
 ofmt_ctx->streams[0]->time_base.den = fps;
 if ((err = avformat_write_header(ofmt_ctx, 0)) < 0) 
 {
 if(callback != nullptr) 
 callback("[uns::VideoWriter/Remux] Failed to write header to output file", err);
 ret = -6;
 goto end;
 }
 AVPacket videoPkt;
 while (true) 
 {
 if ((err = av_read_frame(ifmt_ctx, &videoPkt)) < 0) 
 {
 break;
 }
 videoPkt.stream_index = outVideoStream->index;
 videoPkt.pts = ts;
 videoPkt.dts = ts;
 videoPkt.duration = av_rescale_q(videoPkt.duration, inVideoStream->time_base, outVideoStream->time_base);
 ts += videoPkt.duration;
 videoPkt.pos = -1;
 if ((err = av_interleaved_write_frame(ofmt_ctx, &videoPkt)) < 0) 
 {
 if(callback != nullptr) 
 callback("[uns::VideoWriter/Remux] Failed to mux packet", err);
 av_packet_unref(&videoPkt);
 break;
 }
 av_packet_unref(&videoPkt);
 }
 av_write_trailer(ofmt_ctx);
end:
 if (ifmt_ctx) 
 {
 avformat_close_input(&ifmt_ctx);
 }
 if (ofmt_ctx && !(ofmt_ctx->oformat->flags & AVFMT_NOFILE)) 
 {
 avio_closep(&ofmt_ctx->pb);
 }
 if (ofmt_ctx) 
 {
 avformat_free_context(ofmt_ctx);
 }
 return ret;
}



Notes :




callback
is a function which prints error messsage and error code.
The error I recived is
[uns::VideoWriter/Remux] Failed to write header to output file, error code: -22




I want to know what is causing this and how to resolve it please.


Other Informations :




Developing Env :




OS : Windows 11 Professional Workstation build 22593.ni_release

IDE : Visual Studio 2022

ffmpeg : 4.4.1

Installed ffmpeg library :
ffmpeg[avcodec],ffmpeg[avdevice],ffmpeg[avfilter],ffmpeg[avfilter],ffmpeg[avformat],ffmpeg[openh264],ffmpeg[swresample],ffmpeg[swscale]

Compile Settings : x64 Release







Running Env which causing error :




OS : Windows Server 2019 DataCenter

With all dlls VS2022 copied to release folder





-
what is wrong with this ffmpeg command ? i am trying to trim a video & apply audio filter(audio disable) to it
18 septembre 2022, par Khaled Mortajai am working on a a command that trim a video, after trim it applies audio filter to some seconds of the trimmed video.


-ss 0:00:02.000000 -i "/data/user/0/com.example.cameraapp/cache/REC4972494270640553218.mp4" -t 0:00:14.000000 -avoid_negative_ts make_zero -af volume=enable='between(t,5,10)':volume=0 "/data/user/0/com.example.cameraapp/app_flutter/Trimmer/REC4972494270640553218_trimmed:Sep18,2022-22:24:01.mp4"



the af is the audio filter
anyone have idea what is wrong here ?


-
How to debug ffmpeg reliability for long running rtsp streams
13 septembre 2022, par MarkI have a long running ffmpeg background process that "watches" an rtsp stream and takes snapshots every 7 minutes.


It's being run like this


C:\Windows\System32\cmd.exe /c C:\ffmpeg\bin\ffmpeg.exe -nostdin -rtsp_transport tcp -y -timeout 5000000 -i rtsp://someurl -q:v 1 -an -vf fps=0.002381,scale="1280:720" -strftime 1 -f image2 C:\somelocalfolder\%Y-%m-%d_%H-%M-%S.jpg > c:\ffmpeglog.txt 2>&1



This process runs for days but intermittently, for hours at a time, seems to miss taking snapshots, until eventually it starts to take them again - then fail again, etc. The logs at info level are not helpful. I checked the stream during times when it was not taking snapshots and the stream was up. What's happening here ? How can I debug this ?


Below is an image of succesfull snapshots per hour. There should always be between 8 and 9.



Logs look like this


ffmpeg version 2022-03-31-git-e301a24fa1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 57. 24.101 / 57. 24.101
 libavcodec 59. 25.100 / 59. 25.100
 libavformat 59. 20.101 / 59. 20.101
 libavdevice 59. 6.100 / 59. 6.100
 libavfilter 8. 29.100 / 8. 29.100
 libswscale 6. 6.100 / 6. 6.100
 libswresample 4. 6.100 / 4. 6.100
 libpostproc 56. 5.100 / 56. 5.100
Input #0, rtsp, from 'rtsp://somerul':
 Metadata:
 title : HIK Media Server V4.21.005
 comment : HIK Media Server Session Description : standard
 Duration: N/A, start: 0.033000, bitrate: N/A
 Stream #0:0: Video: h264 (High), yuv420p(progressive), 704x576, 30 tbr, 90k tbn
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
[swscaler @ 000002a1c2c20680] [swscaler @ 000002a1c2c2e0c0] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000002a1c2c20680] [swscaler @ 000002a1c2c67c40] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 000002a1c2c20680] [swscaler @ 000002a1c2cc6700] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'C:\somelocalfolder\Temp\stream_2\StreamedImages\%Y-%m-%d_%H-%M-%S.jpg':
 Metadata:
 title : HIK Media Server V4.21.005
 comment : HIK Media Server Session Description : standard
 encoder : Lavf59.20.101
 Stream #0:0: Video: mjpeg, yuvj420p(pc, progressive), 1280x720, q=2-31, 200 kb/s, 0.0024 fps, 0.0024 tbn
 Metadata:
 encoder : Lavc59.25.100 mjpeg
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame= 1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A speed= 0x 



Update
I got some trace logs. The ffmpeg seems to fail silently at some point and stop taking snapshots.


After about 3 million log lines (which is really only a couple of hours in my case) I get the following


rtsp://192.168.15.195:554/streaming/channels/904: Unknown error



But ffmpeg silently continues. Here is a bit more of the log


[Parsed_fps_0 @ 00000248e7d50e40] Read frame with in pts 1074443040, out pts 28
[Parsed_fps_0 @ 00000248e7d50e40] Dropping frame with pts 28
frame= 28 fps=0.0 q=1.0 size=N/A time=03:08:59.77 bitrate=N/A speed=0.95x 
[rtsp @ 00000248e765cf00] tcp_read_packet:
[h264 @ 00000248e7d59880] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
[rtsp @ 00000248e765cf00] ret=-138 c=24 [$]
rtsp://192.168.15.195:554/streaming/channels/904: Unknown error
[Parsed_fps_0 @ 00000248e7d50e40] Read frame with in pts 1074446100, out pts 28
[Parsed_fps_0 @ 00000248e7d50e40] Dropping frame with pts 28
frame= 28 fps=0.0 q=1.0 size=N/A time=03:08:59.77 bitrate=N/A speed=0.95x 
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=696
[rtsp @ 00000248e765cf00] Sending:
GET_PARAMETER rtsp://192.168.15.195:554/streaming/channels/904 RTSP/1.0

CSeq: 402

User-Agent: Lavf59.20.101

Session: 931848797

Authorization: Digest username="******", realm="709382dda4ccb674edf093d3", nonce="13fca62fc", uri="rtsp://192.168.15.195:554/streaming/channels/904", response="74341df9611f0ac3dc247b402424735b", algorithm="MD5"



--
[NULL @ 00000248e7662640] nal_unit_type: 7(SPS), nal_ref_idc: 3
[NULL @ 00000248e7662640] nal_unit_type: 8(PPS), nal_ref_idc: 3
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=756
[Parsed_fps_0 @ 00000248e7d50e40] Read frame with in pts 1074449070, out pts 28
[Parsed_fps_0 @ 00000248e7d50e40] Dropping frame with pts 28
[Parsed_fps_0 @ 00000248e7d50e40] Read frame with in pts 1074449070, out pts 28
[Parsed_fps_0 @ 00000248e7d50e40] Dropping frame with pts 28
frame= 28 fps=0.0 q=1.0 size=N/A time=03:08:59.77 bitrate=N/A speed=0.949x 
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=1352
frame= 28 fps=0.0 q=1.0 size=N/A time=03:08:59.77 bitrate=N/A speed=0.949x 
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=1352
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=1352
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=1352
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=1228
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=1352
[NULL @ 00000248e7662640] reference count 1 overflow
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=804
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=1352
[NULL @ 00000248e7662640] illegal memory management control operation 11
[rtsp @ 00000248e765cf00] tcp_read_packet:
[rtsp @ 00000248e765cf00] ret=1 c=24 [$]
[rtsp @ 00000248e765cf00] id=0 len=836



Basically it appears an issue of ffmpeg silently failing. If it crashed, my software could detect it and I could rerun it, but if it fails silently like this, I need another solution.