
Recherche avancée
Médias (2)
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (61)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (8918)
-
ffmpeg-normalize exits with OSError : [WinError 193] %1 is not a valid Win32 application
1er septembre 2021, par Moldy1I have a large number of files I want to normalize the volume with a simple method using a basic loop.


When trying to use ffmpeg-normalize the application exits with the error. I searched the error on-line but I can't find any issue similar to mine. I thought it may be a 'path' or file type association problem but they look ok.


Can anyone give me an explanation for this error and a possible fix for it please ?


D:\Test>ffmpeg-normalize.exe in.mkv -o out.mkv
Traceback (most recent call last):
 File "c:\users\les\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
 return _run_code(code, main_globals, None,
 File "c:\users\les\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
 exec(code, run_globals)
 File "C:\Users\Les\AppData\Local\Programs\Python\Python39\Scripts\ffmpeg-normalize.exe\__main__.py", line 7, in <module>
 File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\__main__.py", line 409, in main
 ffmpeg_normalize = FFmpegNormalize(
 File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_ffmpeg_normalize.py", line 68, in __init__
 self.has_loudnorm_capabilities = ffmpeg_has_loudnorm()
 File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_cmd_utils.py", line 185, in ffmpeg_has_loudnorm
 cmd_runner.run_command()
 File "c:\users\les\appdata\local\programs\python\python39\lib\site-packages\ffmpeg_normalize\_cmd_utils.py", line 101, in run_command
 p = subprocess.Popen(
 File "c:\users\les\appdata\local\programs\python\python39\lib\subprocess.py", line 947, in __init__
 self._execute_child(args, executable, preexec_fn, close_fds,
 File "c:\users\les\appdata\local\programs\python\python39\lib\subprocess.py", line 1416, in _execute_child
 hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 is not a valid Win32 application

D:\Test>path
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Calibre2\;C:\Program Files (x86)\Calibre2\;C:\Users\Les\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\Les\AppData\Local\Programs\Python\Python39\;C:\Users\Les\AppData\Local\Microsoft\WindowsApps;D:\MABS\local64\bin-video;C:\Program Files (x86)\sox-14-4-2

D:\Test>ftype python.file
python.file="C:\Users\Les\AppData\Local\Programs\Python\Python39\python.exe" "%1"

D:\Test>python.exe
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32

ffmpeg -version
ffmpeg version N-100483-g728b83a7c4-gd67c6c7f6f+4 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)



 D:\Test>ffmpeg-normalize --version
 ffmpeg-normalize v1.22.1
</module>


-
Encoding of D3D11Texture2D to an rtsp stream using libav*
1er décembre 2020, par uzerFirstly I'll declare that I am just beginning with whole libav* and no experience with DirectX, so please go easy on me.


I have managed to create a rtsp stream using libav* using video file as source. Now, I am trying to create an rtsp stream from an ID3D11Texture2D, which I am obtaining from GDI API using Bitblit method. Here's my approach for creating live rtsp stream :


- 

- Set input context

- 

- AVFormatContext* ifmt_ctx = avformat_alloc_context() ;
- avformat_open_input(&ifmt_ctx, _videoFileName, 0, 0) ;






- Set output context

- 

- avformat_alloc_output_context2(&ofmt_ctx, NULL, "rtsp", _rtspServerAdress) ; //RTSP
- copy all the codec context and stream from input to output






- Start streaming

- 

- while av_read_frame(ifmt_ctx, &pkt) ; is valid av_interleaved_write_frame(ofmt_ctx, &pkt) ;
- with some timestamp checks and conditions for livestreaming














Now I am finding it difficult to follow current libav* documentation (which is deprecated) and little tutorial content available online.


The most relevant article I found on working between directX and libav* is this article.
However it's actually doing the opposite of what I need to do. I am not sure how to go about creating input stream and context with DirectX texture ! How can I convert the texture into an AVFrame which can be encoded to an AVStream ?


Here's some rough outline of what I am expecting


ID3D11Texture2D* win_textureptr = WindowManager::Get().GetWindow(RtspStreaming::WindowId())->GetWindowTexture();

 D3D11_TEXTURE2D_DESC* desc;
 win_textureptr->GetDesc(desc);
 int width = desc->Width;
 int height = desc->Height;
 //double audio_time=0.0;
 auto start_time = std::chrono::system_clock::now();
 std::chrono::duration<double> video_time;
 
 //DirectX BGRA to h264 YUV420p
 SwsContext* conversion_ctx = sws_getContext(
 width, height, AV_PIX_FMT_BGRA,
 width, height, AV_PIX_FMT_YUV420P,
 SWS_BICUBLIN | SWS_BITEXACT, nullptr, nullptr, nullptr);
 
 uint8_t* sw_data[AV_NUM_DATA_POINTERS];
 int sw_linesize[AV_NUM_DATA_POINTERS];

 while (RtspStreaming::IsStreaming())
 {

 //copy the texture
 //win_textureptr->GetPrivateData();
 

 // convert BGRA to yuv420 pixel format
 /*
 frame = av_frame_alloc();
 //this obviously is incorrect... I would like to use d3d11 texture here instead of frame
 sws_scale(conversion_ctx, frame->data, frame->linesize, 0, frame->height,
 sw_data, sw_linesize);

 frame->format = AV_PIX_FMT_YUV420P;
 frame->width = width;
 frame->height = height;*/


 //encode to the video stream
 
 /* Compute current audio and video time. */
 video_time = std::chrono::system_clock::now() - start_time;

 //write frame and send
 av_interleaved_write_frame(ofmt_ctx, &pkt);

 av_frame_unref(frame);
 }

 av_write_trailer(ofmt_ctx);
</double>


- Set input context

-
Can't get ffmpeg to stream webcam [on hold]
29 novembre 2017, par joeyI have a rapsberry with ffmpeg installed and a microsoft hd3000 cam installed
I run the following command :
ffserver -f /etc/ffserver.conf & ffmpeg -framerate 21 -re -f video4linux2 -i /dev/video0 -f alsa -i sysdefault:CARD=HD3000 http://localhost:8090/feed1.ffmand i get the following :
/etc/ffserver.conf:164: Setting default value for video bit rate tolerance = 16000. Use NoDefaults to disable it.
/etc/ffserver.conf:164: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
/etc/ffserver.conf:164: Setting default value for video max rate = 6229744. Use NoDefaults to disable it.
/etc/ffserver.conf:219: Setting default value for audio sample rate = 22050. Use NoDefaults to disable it.
/etc/ffserver.conf:219: Setting default value for audio channel count = 1. Use NoDefaults to disable it.
/etc/ffserver.conf:219: Setting default value for video bit rate tolerance = 64000. Use NoDefaults to disable it.
/etc/ffserver.conf:219: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it.
/etc/ffserver.conf:219: Setting default value for video max rate = 6369328. Use NoDefaults to disable it.
bind(port 8090): Address already in use
Wed Nov 29 13:17:49 2017 Could not start server
[video4linux2,v4l2 @ 0x1a35630] The driver changed the time per frame from 1/21 to 1/10
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 12116.079136, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, alsa, from 'sysdefault:CARD=HD3000':
Duration: N/A, start: 1511961469.424072, bitrate: 1536 kb/s
Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
[tcp @ 0x1a44160] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
Wed Nov 29 13:17:49 2017 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175
[tcp @ 0x1a63ca0] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
[mpeg1video @ 0x1a6ecb0] bitrate tolerance 21333 too small for bitrate 64000, overriding
[mpeg1video @ 0x1a6ecb0] MPEG-1/2 does not support 3/1 fps
Stream mapping:
Stream #1:0 -> #0:0 (pcm_s16le (native) -> mp2 (native))
Stream #0:0 -> #0:1 (rawvideo (native) -> mpeg1video (native))
Stream #1:0 -> #0:2 (pcm_s16le (native) -> wmav2 (native))
Stream #0:0 -> #0:3 (rawvideo (native) -> msmpeg4v3 (msmpeg4))
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
Wed Nov 29 13:17:49 2017 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 0
[2]+ Exit 1 ffserver -f /etc/ffserver.confI use the default /etc/ffserver.conf.
I can’t seem to figur out what is the problem.