
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (54)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (8115)
-
shell script - youtube stream - ffmpeg [duplicate]
9 octobre 2022, par CodeMaker748Hey guys i found that script in web and try to get it to run. But i get some errors and wounder how this happens with this script maybe someone can help me to get this script running at ubuntu.


All Files are in the same directory.


#! /bin/bash
VBR="1500k"
FPS="24"
QUAL="superfast"

YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY="aaaa-aaaa-aaaa-aaaa-aaaa"

VIDEO_SOURCE= "./video.mp4"
AUDIO_SOURCE= "./audio.mp3" 
NP_SOURCE="./song.txt"
FONT="./ARIBL0.tff"

ffmpeg -re -f lavfi -i "movie=filename=$VIDEO_SOURCE:loop=0, setpts=N/(FRAME_RATE*TB)" -thread_queue_size 512 -i "$AUDIO_SOURCE" -map 0:v:0 -map 1:a:0 -map_metadata:g 1:g -vf drawtext="fontsize=20: fontfile=$FONT: box=0: boxcolor=black@0.5: boxborderw=20: textfile=$NP_SOURCE: reload=1: fontcolor=white@0.8: x=50: y=th" -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR -acodec libmp3lame -ar 44100 -threads 6 -qscale:v 3 -b:a 320000 -bufsize 512k -f flv "$YOUTUBE_URL/$KEY"



and i get this errors :


root@v33476:~/LiveRadioScript2# bash startRadio.sh
startRadio.sh: line 9: ./video.mp4: Permission denied
startRadio.sh: line 10: ./audio.mp3: Permission denied
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
 configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
[Parsed_movie_0 @ 0x55d0e2286080] Failed to avformat_open_input ''
[lavfi @ 0x55d0e2284280] Error initializing filter 'movie' with args 'filename=:loop=0'
movie=filename=:loop=0, setpts=N/(FRAME_RATE*TB): No such file or directory



-
ffmpeg options to stream to Youtube
24 octobre 2022, par David GoncalvesPlease bear with me as I don't really understand most of the commands behind ffmpeg.


I am using this code to live stream from a raspberry 4B with a USB Logitech C920 to YouTube :
ffmpeg -re -f s16le -i /dev/zero -f v4l2 -thread_queue_size 512 -codec:v h264 -s 1920x1080 -i /dev/video0 -codec:v copy -acodec aac -b:v 128k -g 60 -f flv rtmp ://a.rtmp.youtube.com/live2/[key]


The streaming works but I get the following error in the command line :
Non-monotonous DTS in output stream 0:0 ; previous : 0, current : -167 ; changing to 0. This may result in incorrect timestamps in the output file.


I also get this error in Youtube studio :
Please use a keyframe frequency of four seconds or less. Currently, keyframes are not being sent often enough, which can cause buffering. The current keyframe frequency is 8.0 seconds. Note that ingestion errors can cause incorrect GOP (group of pictures) sizes.
Any help ?


-
FFMPEG : Reducing bandwidth usage while trimming youtube audio
24 octobre 2022, par nashI have created a python script which creates audio trims of youtube videos using ffmpeg.


The script works fine for small videos of about <20m, however my intention is to use this for large videos most of which are several hours long.
It appears ffmpeg may be streaming the entire audio while seeking the trim points, not only is this slow but it adds a lot of unnecessary network overhead, especially since the trims I'm making are barely a minute long.


Here is the script :


from yt_dlp import YoutubeDL as ydl
import ffmpeg, sys, getopt


default_url = "https://youtu.be/FtutLA63Cp8"
default_start = "6"
default_end = "36"


def get_secs(time_str) -> int:

 h = "0"
 m = "0"
 s = "0"

 time_hms = time_str.split(":")

 if len(time_hms) == 1:
 s = time_hms[0]
 elif len(time_hms) == 2:
 m, s = time_hms
 elif len(time_hms) == 3:
 h, m, s = time_hms

 secs = (int(h) * 3600) + (int(m) * 60) + int(s)
 return secs


# Extract Url
def get_url(url):

 ydl_opts = {}
 info = ydl(ydl_opts).extract_info(url, download=False) # dict of lists
 # info = ydl.sanitize_info(info)

 title = info["title"].strip() + ".mp4"

 formats = info["formats"] # list of dicts
 audio_direct_url = ""
 for format in formats:
 if format["audio_ext"] != "none":
 audio_direct_url = format["url"]
 break

 # return r["formats"][-1]["url"]
 return audio_direct_url, title


def snip_url(url, title, start, end):
 input = ffmpeg.input(url)
 pts = "PTS-STARTPTS"
 audio = input.filter_("atrim", start=start, end=end).filter_("asetpts", pts)
 out = ffmpeg.output(audio, ("out/" + title))

 return ffmpeg.run(out)


def mince():
 pass


def main(argv):
 usage_str = "main.py -u <url> -o <outputfile> -s <starttime> -t <stoptime>"
 target_url = ""
 out_filename = ""
 start_time = default_start
 stop_time = default_end

 try:
 opts, args = getopt.getopt(
 argv, "hu:o:s:t:", ["url=", "ofile=", "start=", "terminate="]
 )

 except getopt.GetoptError:
 print(usage_str)
 sys.exit(2)

 for opt, arg in opts:
 if opt == "-h":
 print(usage_str)
 sys.exit()
 elif opt in ("-u", "--url"):
 target_url = arg
 elif opt in ("-o", "--ofile"):
 out_filename = arg
 elif opt in ("-s", "--start"):
 start_time = arg
 elif opt in ("-t", "--terminate"):
 stop_time = arg

 if target_url == "":
 print(usage_str)
 sys.exit(2)

 # URLs may have seperators, remove them
 target_url = target_url.rsplit("?")[0]

 stream_url, title = get_url(target_url)
 if out_filename != "":
 title = out_filename
 start_time = get_secs(start_time)
 stop_time = get_secs(stop_time)
 snip_url(stream_url, title, start_time, stop_time)


if __name__ == "__main__":

 main(sys.argv[1:])
</stoptime></starttime></outputfile></url>


There is a similar question on this site, however this involves grabbing still frames and not audio sections.


I have also looked through both the
ffmpeg-python
and regular ffmpeg documentation and not found anything relevant.

Is there a way to get ffmpeg to 'skip' to the desired trim position without streaming the entire audio ? Preferrably using the
ffmpeg-python
library.

If not, are there ways I can reduce the bandwidth overhead and/or speed up this process.


I am also open to using other software (preferrably python libraries) similar to ffmpeg that can achieve the same task.