
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (52)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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 (8273)
-
FFMPEG Combine multiple commands into one script
16 février 2017, par ObeeWnnI need some help combining ffmpeg commands into a python or bash script :
\Download
Youtube-dl URL
\Concatenate videos
WD = "C:\"
import glob
files = glob.glob ('*.mp4')
with open ('output.txt', 'w') as in_files:
for eachfile in files: in_files.write('file \''+eachfile+'\'\n')
ffmpeg -y -f concat -i output.txt -c copy input.mp4
\Encode
ffmpeg -y -threads 16 -i input.mp4 -c:a libfdk_aac -vbr 4 -c:v libx264 intermediate1.ts
ffmpeg -y -threads 16 -i endscreen720.mp4 -c:a libfdk_aac -vbr 4 -c:v libx264 intermediate2.ts
ffmpeg -y -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc tmp.mp4
ffmpeg -y -i tmp.mp4 -itsoffset 00:00:20 -i lt1sub.avi -filter_complex overlay tmp1.mp4
ffmpeg -y -i tmp1.mp4 -i intro.avi -filter_complex overlay tmp1a.mp4
ffmpeg -y -i tmp1a.mp4 -i watermarkfile720.png -filter_complex "[0:v]drawtext=enable='between(n,30,116)' : 'fontfile=/Windows/Fonts/arial.ttf':text='TEXTGOESHERE':fontcolor=white:fontsize=50:x=150:y=(300)+th[text]; [text][1:v]overlay[filtered]" -map "[filtered]" -map 0:a -codec:v libx264 -codec:a copy tmp2.mp4
ffmpeg -y -i tmp2.mp4 -r 60 -vf scale=1920:1080 output.mp4
\Create Thumbnail
ffmpeg -y -i tmp1.mp4 -vf drawtext="fontfile=/Windows/Fonts/arial.ttf': text='':fontcolor=white@1.0:fontsize=120:y=0:x=100" -ss 00:00:12 -vframes 1 out.png
set /p input= Video #
ffmpeg -y -i out.png -i tnOverlay.png -filter_complex overlay,drawtext="fontfile=/Windows/Fonts/arial.ttf': text="%input%":fontcolor=white@1.0:fontsize=120:y=25:x=1190" out.pngThis is to download videos, place an intro video in the beginning, draw text over intro, concatenate the videos, apply watermark throughout video, apply outro, create thumbnail, etc.
My FFmpeg compile :ffmpeg version N-83522-g6a37abc59a Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Rev1, Built by MSYS2 project)
configuration: --enable-avisynth --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-cuda --enable-cuvid --enable-schannel --enable-sdl2 --enable-decklink --enable-fontconfig --enable-frei0r --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmfx --enable-libmodplug --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwavpack --enable-libwebp --enable-libxavs --enable-libxvid --enable-libzimg --enable-openssl --enable-libsnappy --enable-gpl --enable-opencl --enable-opengl --enable-libcdio --enable-libfdk-aac --enable-libkvazaar --enable-librubberband --enable-libssh --enable-libtesseract --enable-libzvbi --enable-chromaprint --enable-libopenh264 --enable-libopenmpt --enable-netcdf --disable-w32threads --enable-version3 --enable-nonfree --enable-filter=frei0r --disable-debug
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.100 / 57. 80.100
libavformat 57. 66.102 / 57. 66.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 73.100 / 6. 73.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100Would like to use libfdk-aac and x264, or highest quality possible. The video source will be at 720p60fps and will be rendered to 1080p60fps.
-
ffmpeg udp capture not working
27 février 2017, par user3172852I have confirmed that there is incoming UDP packets at port 5968 of my computer with wireshark.
However when I try to capture these packets with ffmpeg. After exiting (ctrl+c) I get no output, the output file is not even written to disk. This is what my terminal looks like.ubuntu@ip-132-31-40-100:~$ ffmpeg -i udp://127.0.0.1:59618 -vcodec copy stream.mp4
ffmpeg version git-2017-01-22-f1214ad Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc
libavutil 55. 44.100 / 55. 44.100
libavcodec 57. 75.100 / 57. 75.100
libavformat 57. 63.100 / 57. 63.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 69.100 / 6. 69.100
libavresample 3. 2. 0 / 3. 2. 0
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100 -
FFMPEG to create an MPEG-DASH stream with VP8
16 septembre 2019, par Kenny WordenI’m trying to use FFMPEG to stream a live video feed from my webcam
/dev/video0
. Following scattered tutorials and scarce documentation (is this a known problem for the encoding community ?) I arrived at the following bash script :#!/bin/bash
ffmpeg \
-y \
-f v4l2 \
-i /dev/video0 \
-s 640x480 \
-input_format mjpeg \
-r 24 \
-map 0:0 \
-pix_fmt yuv420p \
-codec:v libvpx \
-s 640x480 \
-threads 4 \
-b:v 50k \
-tile-columns 4 \
-frame-parallel 1 \
-keyint_min 24 -g 24 \
-f webm_chunk \
-header "stream.hdr" \
-chunk_start_index 1 \
stream_%d.chk &
sleep 2
ffmpeg \
-f webm_dash_manifest -live 1 \
-i stream.hdr \
-c copy \
-map 0 \
-f webm_dash_manifest -live 1 \
-adaptation_sets "id=0,streams=0" \
-chunk_start_index 1 \
-chunk_duration_ms 1000 \
-time_shift_buffer_depth 30000 \
-minimum_update_period 60000 \
stream_manifest.mpdWhen I run this script, my webcam light turns on, the
stream.hdr
andstream_manifest.mpd
files are written, and chunks start to be created (i.e.stream_1.chk
,stream_2.chk
, etc...). However, FFMPEG throws the following error :Could not write header for output file #0 (incorrect codec parameters
?) : Invalid data found when processing inputI will explain what I think I am doing with this script, and hopefully this will expose any errors in my thinking.
First, we invoke FFMPEG to use Video for Linux 2 (v4l2) to read from my webcam (
/dev/video0
) of a resolution 640x480. The input format ismjpeg
with a framerate of 24fps.I then declare that FFMPEG should "map" (copy) the video stream output by v4l2 to a file. I specify the pixel format (YUV420P) and use libvpx (VP8 encoding) to encode the video stream. I set the size to be 640x480, use 4 threads, set the bitrate to be 50kbps, do some magic with tile-columns and frame-parallel options, and set the I-frames to be 24 frames apart.
I then create a
stream.hdr
file. The starting index is 1. This command continues to run infinitely until I kill it, grabbing new video from my webcam and outputting it into chunks.I then sleep for 2 seconds to give the previous command time to generate a header file.
And that’s really it. The next invocation of FFMPEG simply creates the MPEG-DASH manifest file given the header generated in the previous step.
So what’s going on ? Why can I not view the video in a web browser (I’m using Dash.js) ? I serve the manifest, header, and chunks on a Node.js server so that trivial issue is not the problem.
Edit : Here is my full console output.
ffmpeg version 3.0.7-0ubuntu0.16.10.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[video4linux2,v4l2 @ 0x55847e244ea0] The driver changed the time per frame from 1/24 to 1/30
[mjpeg @ 0x55847e245c00] Changing bps to 8
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 64305.102081, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 640x480, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Codec AVOption frame-parallel (Enable frame parallel decodability features) specified for output file #0 (stream_%d.chk) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Codec AVOption tile-columns (Number of tile columns to use, log2) specified for output file #0 (stream_%d.chk) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
[swscaler @ 0x55847e24b720] deprecated pixel format used, make sure you did set range correctly
[libvpx @ 0x55847e248a20] v1.5.0
Output #0, webm_chunk, to 'stream_%d.chk':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: vp8 (libvpx), yuv420p, 640x480, q=-1--1, 50 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc57.24.102 libvpx
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> vp8 (libvpx))
Press [q] to stop, [?] for help
frame= 21 fps=0.0 q=0.0 size=N/A time=00:00:00.70 bitrate=N/A dup=5 drop=frame= 36 fps= 35 q=0.0 size=N/A time=00:00:01.20 bitrate=N/A dup=5 drop=frame= 51 fps= 33 q=0.0 size=N/A time=00:00:01.70 bitrate=N/A dup=5 drop=ffmpeg version 3.0.7-0ubuntu0.16.10.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
configuration: --prefix=/usr --extra-version=0ubuntu0.16.10.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-chromaprint --enable-libx264
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, webm_dash_manifest, from 'stream.hdr':
Metadata:
encoder : Lavf57.25.100
Duration: N/A, bitrate: N/A
Stream #0:0: Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Metadata:
webm_dash_manifest_file_name: stream.hdr
webm_dash_manifest_track_number: 1
Output #0, webm_dash_manifest, to 'stream_manifest.mpd':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: vp8, yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Metadata:
webm_dash_manifest_file_name: stream.hdr
webm_dash_manifest_track_number: 1
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
frame= 67 fps= 33 q=0.0 size
frame= 82 fps= 32 q=0.0 size=N/A time=00:00:02.73 bitrate=N/A dup=5 drop=
frame= 97 fps= 32 q=0.0 size=N/A time=00:00:03.23 bitrate=N/A dup=5 drop=
frame= 112 fps= 32 q=0.0 size=N/A time=00:00:03.73 bitrate=N/A dup=5 ...