
Advanced search
Medias (1)
-
MediaSPIP Simple : futur thème graphique par défaut?
26 September 2013, by
Updated: October 2013
Language: français
Type: Video
Other articles (64)
-
Des sites réalisés avec MediaSPIP
2 May 2011, byCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Taille des images et des logos définissables
9 February 2011, byDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Librairies et logiciels spécifiques aux médias
10 December 2010, byPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel; FFMpeg avec le maximum de décodeurs et (...)
On other websites (3871)
-
ffmpeg Grab Single Frame From Youtube Stream
11 September 2021, by Rich_FI'm trying to grab a single frame of a streaming video on
Youtube
.



This is the code structure I'm trying to use:


ffmpeg --verbose -i $(youtube-dl -f 96 --no-playlist 'https://www.youtube.com/watch?v=XMs6LnT5mfk') -frames:1 -pred 1 clip1.jpg



Trying to use
youtube-dl
to grab part of a stream, doesn't seem to work, and is actually throwing anffmpeg
error at me:

[youtube] Q-44KECp-xQ: Downloading webpage
[youtube] Downloading just video Q-44KECp-xQ because of --no-playlist
[youtube] Q-44KECp-xQ: Downloading m3u8 information
[youtube] Q-44KECp-xQ: Downloading MPD manifest
[download] Destination: Ryde Esplanade & Pier, Isle of Wight UK _ Railcam LIVE 2021-09-11 03_25-Q-44KECp-xQ.mp4

ERROR: ffmpeg exited with code -9



How can I achieve this? I'm open to reworking this approach, or moving to something completely different. Cheers


-
FFMPEG not exporting audio OR exports audio with still video
7 September 2021, by Zak44Trying to utilize ffmpeg to convert a mp4 to DNxHD, then wrap it in an MXF. The ultimate goal is to get this into Avid Media Composer. I've been having issues with this particular command, where no audio is ever exported:


ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -f rawvideo BLAH.mov



If I tweak the above command by removing the force of the "rawvideo" option I get audio, however the video then sits on the first frame and never advances:


ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -r 24 BLAH.mov



What exactly am I doing wrong? Here is the output from running the second time:


ffmpeg -y -r 24 -i Test_fix.mp4 -vcodec dnxhd -vsync drop -b:v 36M -s 1920x1080 -threads 2 -vf colormatrix=bt601:bt709 -c:a aac -r 24 BLAH.mov
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 12.0.0 (clang-1200.0.32.29)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
 libavutil 56. 70.100 / 56. 70.100
 libavcodec 58.134.100 / 58.134.100
 libavformat 58. 76.100 / 58. 76.100
 libavdevice 58. 13.100 / 58. 13.100
 libavfilter 7.110.100 / 7.110.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 9.100 / 5. 9.100
 libswresample 3. 9.100 / 3. 9.100
 libpostproc 55. 9.100 / 55. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Test_fix.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 creation_time : 2021-07-01T17:19:54.000000Z
 Duration: 00:01:05.75, start: 0.000000, bitrate: 6336 kb/s
 Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 6016 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
 Metadata:
 creation_time : 2021-07-01T17:19:54.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
 Metadata:
 creation_time : 2021-07-01T17:19:54.000000Z
 handler_name : #Mainconcept MP4 Sound Media Handler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mov, to 'BLAH.mov':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 encoder : Lavf58.76.100
 Stream #0:0(eng): Video: dnxhd (DNXHD) (AVdn / 0x6E645641), yuv422p(tv, bt709/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 36000 kb/s, 24 fps, 12288 tbn (default)
 Metadata:
 creation_time : 2021-07-01T17:19:54.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc58.134.100 dnxhd
 Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 creation_time : 2021-07-01T17:19:54.000000Z
 handler_name : #Mainconcept MP4 Sound Media Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc58.134.100 aac
[mov @ 0x7fd129013000] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mov @ 0x7fd129013000] Encoder did not produce proper pts, making some up.
frame= 1577 fps=133 q=1.0 Lsize= 290993kB time=00:01:05.70 bitrate=36279.7kbits/s speed=5.54x
video:290168kB audio:809kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.005816%
[aac @ 0x7fd129019000] Qavg: 22541.643



-
FFMPEG error when finding stream information with custom AVIOContext
8 September 2021, by ryanI am writing software that takes in a file as a stream and decodes it. I have the following custom AVIO code for stream input:


/* Allocate a 4kb buffer for copying. */
std::uint32_t bufSize = 4096;
struct vidBuf
{
 std::byte* ptr;
 int size;
};

vidBuf tmpVidBuf = { const_cast(videoBuffer.data()),
 static_cast<int>(videoBuffer.size()) };
AVIOContext *avioContext =
 avio_alloc_context(reinterpret_cast(av_malloc(bufSize)),
 bufSize, 0,
 reinterpret_cast(&tmpVidBuf),
 [](void *opaque, std::uint8_t *buf, int bufSize) -> int
 {
 auto &me = *reinterpret_cast(opaque);
 bufSize = std::min(bufSize, me.size);

 std::copy_n(me.ptr, bufSize, reinterpret_cast(buf));
 me.ptr += bufSize;
 me.size -= bufSize;
 return bufSize;
 }, nullptr, nullptr);

auto avFormatPtr = avformat_alloc_context();
avFormatPtr->pb = avioContext;
avFormatPtr->flags |= AVFMT_FLAG_CUSTOM_IO;
//avFormatPtr->probesize = tmpVidBuf.size;
//avFormatPtr->max_analyze_duration = 5000000;

avformat_open_input(&avFormatPtr, nullptr, nullptr, nullptr);

if(auto ret = avformat_find_stream_info(avFormatPtr, nullptr);
 ret < 0)
 logerror << "Could not open the video file: " << makeAVError(ret) << '\n';
</int>


However, when I run this code I get the error:


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d10736d580] stream 0, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d10736d580] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none(tv, bt709), 540x360, 649 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 '':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Duration: 00:04:08.41, start: 0.000000, bitrate: N/A
 Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none(tv, bt709), 540x360, 649 kb/s, SAR 1:1 DAR 3:2, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 01/10/2021.
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 69 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 01/10/2021.
 vendor_id : [0][0][0][0]
Assertion desc failed at libswscale/swscale_internal.h:677



Note the absence of the YUV420p part in the video stream data.


This is strange since if I run my program with a different mp4 file it works perfectly fine, this error only occurs with a specific mp4 file. I know that the mp4 file is valid since mpv can play it, and ffprobe is able to get its metadata:


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'heard.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf58.76.100
 Duration: 00:04:08.41, start: 0.000000, bitrate: 724 kb/s
 Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 540x360 [SAR 1:1 DAR 3:2], 649 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 01/10/2021.
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 69 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 01/10/2021.
 vendor_id : [0][0][0][0]



As you can see by my code I also tried setting analyzeduration and probesize, but this did not fix the issue.


I also know that this error is because of my custom io because when I have
avformat_open_input
open the file directly, it is able to be decoded just fine. I am new to ffmpeg, so I might have missed something simple.