
Recherche avancée
Autres articles (40)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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. -
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 (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (5416)
-
LGPD : Demystifying Brazil’s New Data Protection Law
31 août 2023, par Erin — Privacy -
FFMPEG : How should I deal with constant corrupt packets incoming from a remote stream ? [closed]
2 mai 2023, par 2x2I'll get downvoted madly fast ; I am new here, and, honestly, I'm weak at FFMPEG.


I am working to "record" a test HLS broadcast (colored bars) into a local mp4 file.


Trying to normally record it into the file, using a simple command, yields this result. It works fine at the start, due to the corrupt packets slowly accumulating and seemingly seamlessly getting spliced together. After, the recording simply continues, and begins to lag frequently.


I'll summarize the FFMPEG log below :


>! ```
>! 
>! Command input:
>! 
>! > ffmpeg -i http://IP_1:8080/udp/IP_2:1234 -c copy OUT/test1.mp4
>! 
>! ...
>! 
>! Initialization:
>! 
>! ffmpeg version 2023-04-26-git-e3143703e9-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
>! built with gcc 12.2.0 (Rev10, 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-libaribb24 --enable-libaribcaption --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-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --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-libcodec2 --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 58. 6.100 / 58. 6.100
>! libavcodec 60. 10.100 / 60. 10.100
>! libavformat 60. 5.100 / 60. 5.100
>! libavdevice 60. 2.100 / 60. 2.100
>! libavfilter 9. 5.100 / 9. 5.100
>! libswscale 7. 2.100 / 7. 2.100
>! libswresample 4. 11.100 / 4. 11.100
>! libpostproc 57. 2.100 / 57. 2.100
>! 
>! ...
>! 
>! Problems begin:
>! 
>! [mpeg2video @ 000001e3f88a60c0] Invalid frame dimensions 0x0.
>! Last message repeated 4 times
>! 
>! ...
>! 
>! Repetitive two errors - Packet errors:
>! 
>! [mpegts @ 000001e3f888b300] PES packet size mismatch
>! [mpegts @ 000001e3f888b300] Packet corrupt (stream = 0, dts = 4813344832).
>! 
>! ...
>! 
>! Information:
>! 
>! Input #0, mpegts, from 'http://IP_1:8080/udp/IP_2:1234':
>! Duration: N/A, start: 53478.855478, bitrate: 3428 kb/s
>! Program 10
>! Metadata:
>! service_name : SERVICE
>! service_provider: unknown
>! Stream #0:0[0x65]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 3300 kb/s, 25 fps, 25 tbr, 90k tbn
>! Side data:
>! cpb: bitrate max/min/avg: 3300000/0/0 buffer size: 1638400 vbv_delay: N/A
>! Stream #0:1[0x66](rus): Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, mono, fltp, 128 kb/s
>! Output #0, mp4, to 'OUT/test1.mp4':
>! Metadata:
>! encoder : Lavf60.5.100
>! Stream #0:0: Video: mpeg2video (Main) (mp4v / 0x7634706D), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 3300 kb/s, 25 fps, 25 tbr, 90k tbn
>! Side data:
>! cpb: bitrate max/min/avg: 3300000/0/0 buffer size: 1638400 vbv_delay: N/A
>! Stream #0:1(rus): Audio: mp2 (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s
>! Stream mapping:
>! Stream #0:0 -> #0:0 (copy)
>! Stream #0:1 -> #0:1 (copy)
>! Press [q] to stop, [?] for help
>! 
>! ```



I will also attach a video demonstration of the occurrence :


https://drive.google.com/file/d/13ndIpH3de3k8f3TMVGEbJUNVe-vD0vIW/view?usp=sharing


Download it ; the processed web version doesn't include any of the visual glitches that are visible in the original file.


I have been wanting to run FFMPEG with a minute-long delay (i.e. intentionally increasing the latency). Unfortunately, FFMPEG only has features to lower latency, not add more (I read the entire documentation trying to figure this out).


Another of my ideas was to try FFPLAY (afaik it's FFMPEG but with output to a window). Didn't work, got the same errors.


None of the other parameters listed in the documentation seemed to have any use to help me out ; I tried a bunch, to no avail.


What will you suggest ? I would like to hear some ideas on how I could fix this.


-
Issue with Batch File for FFmpeg Video Frame Extraction
30 septembre 2023, par Claudio MartiniIssue


[swscaler @ 0000019531bb00c0] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'temp_frames/frame%08d.jpg':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 encoder : Lavf60.11.100
 Stream #0:0(eng): Video: mjpeg, yuvj420p(pc, progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
 Metadata:
 creation_time : 2023-09-29T13:37:07.000000Z
 handler_name : ?Mainconcept Video Media Handler
 vendor_id : [0][0][0][0]
 encoder : Lavc60.26.100 mjpeg
 Side data:
 cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[image2 @ 000001951c61b980] Could not open file : temp_frames/frame00000001.jpg
[vost#0:0/mjpeg @ 000001951c603e80] Error submitting a packet to the muxer: I/O error
[out#0/image2 @ 000001951cb8ee80] Error muxing a packet
[out#0/image2 @ 000001951cb8ee80] video:389kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame= 1 fps=0.0 q=1.0 Lsize=N/A time=00:00:00.24 bitrate=N/A speed=1.03x
Conversion failed!



I've noticed that using an escape code '%%' for the '%' character, as suggested for similar issues, resolves the problem :


ffmpeg -i video.mp4 -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 tmp_frames/frame%%08d.jpg



However, the same issue occurs even when the command is used within a drag&drop batch file :


setlocal enabledelayedexpansion

REM Check if an MP4 file was dragged onto the script
if "%~1"=="" (
 echo Drag an MP4 file onto this script to begin frame extraction.
 pause
 exit /b
)

REM Extract frames from the MP4 file
ffmpeg -i "%~1" -qscale:v 1 -qmin 1 -qmax 1 -vsync 0 temp_frames/frame%%08d.jpg

echo Extraction complete.
pause



This is essentially the same code, but it doesn't work as expected within the batch file. Can anyone provide insight into why this issue is occurring and how to resolve it within the batch file context ?