
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 (22)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
Taille des images et des logos définissables
9 février 2011, parDans 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 (...) -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation"
Sur d’autres sites (4972)
-
What is the best way to split videos into equally sized parts using ffmpeg ? [closed]
18 juin 2024, par GBPUI have tried to split an mp4 file into smaller parts of equal time length like this
ffmpeg -i ../data/2024-06-02_12-34-51.mp4 -c copy -map 0 -segment_time 00:00:05 -f segment v1_%03d.mp4
. However, this produced videos of highly variables size, some 25x larger than others. I assume this was due to inconsistent framerate during recording.

Next, I tried a script that would split based and limit each part to a specific size :


#!/bin/sh
# Short script to split videos by filesize using ffmpeg by LukeLR

if [ $# -ne 3 ]; then
 echo 'Illegal number of parameters. Needs 3 parameters:'
 echo 'Usage:'
 echo './split-video.sh FILE SIZELIMIT "FFMPEG_ARGS'
 echo 
 echo 'Parameters:'
 echo ' - FILE: Name of the video file to split'
 echo ' - SIZELIMIT: Maximum file size of each part (in bytes)'
 echo ' - FFMPEG_ARGS: Additional arguments to pass to each ffmpeg-call'
 echo ' (video format and quality options etc.)'
 exit 1
fi

FILE="../data/$1"
SIZELIMIT="$2"
FFMPEG_ARGS="$3"

# Duration of the source video
DURATION=$(ffprobe -i "$FILE" -show_entries format=duration -v quiet -of default=noprint_wrappers=1:nokey=1|cut -d. -f -2)

# Duration that has been encoded so far
CURDURATION=0

# Filename of the source video (without extension)
BASENAME="${FILE%.*}"

# Extension for the video parts
#EXTENSION="${FILE##*.}"
EXTENSION="mp4"

# Number of the current video part
i=1

# Filename of the next video part
NEXTFILENAME="$BASENAME-$i.$EXTENSION"

echo "Duration of source video: $DURATION"

# Until the duration of all partial videos has reached the duration of the source video
#while [[ $CUR_DURATION -lt $DURATION ]]; do
while [[ $(bc <<< "$CURDURATION < $DURATION") -eq 1 ]]; do
 # Encode next part
 echo ffmpeg -i "$FILE" -ss "$CURDURATION" -fs "$SIZELIMIT" $FFMPEG_ARGS "$NEXTFILENAME"
 ffmpeg -ss "$CURDURATION" -i "$FILE" -fs "$SIZELIMIT" $FFMPEG_ARGS "$NEXTFILENAME"

 # Duration of the new part
 NEWDURATION=$(ffprobe -i "$NEXTFILENAME" -show_entries format=duration -v quiet -of default=noprint_wrappers=1:nokey=1|cut -d. -f -2)

 # Total duration encoded so far
 echo $CURDURATION
 CURDURATION=$(bc <<< "$CURDURATION + $NEWDURATION")
 echo $CURDURATION

 i=$((i + 1))

 echo "Duration of $NEXTFILENAME: $NEWDURATION"
 echo "Part No. $i starts at $CURDURATION"
 echo "Current Duration: $CURDURATION"

 NEXTFILENAME="$BASENAME-$i.$EXTENSION"
done



I call the script like this :
bash split-video.sh 2024-06-02_12-34-51.mp4 10000000 "-c copy"

Unfortunately, this has an issue where some of the sub videos are extremely short and have wildly inconsistent numbers of frames in them (some with nearly 400, others with 1), despite being similar sizes. I am guessing this has something to do with inconsistent framerate and keyframes or something ?

I am curious what the best way to split a video into equally sized parts, and ideally with similar numbers of frames, is using ffmpeg.


-
How to convert rtmp hevc video stream to srt av1 endpoint with ffmpeg ?
20 juin 2024, par Lulíki want use ffmpeg to listen rtmp stream and send to srt endpoint.


Flow : smartphone (camera) -> laptop (ffmpeg script) -> desktop (obs studio)


ffmpeg script show warning message and in obs stuido i can see any video only audio.


Thank you in advance.


Console output while running script (error in the end is bcs i stoped sending data from phone) :


ffmpeg version git-2024-06-20-8d6014d Copyright (c) 2000-2024 the FFmpeg developers
 built with gcc 12 (Debian 12.2.0-14)
 configuration: --enable-libsvtav1 --enable-libsrt
 libavutil 59. 24.100 / 59. 24.100
 libavcodec 61. 8.100 / 61. 8.100
 libavformat 61. 3.104 / 61. 3.104
 libavdevice 61. 2.100 / 61. 2.100
 libavfilter 10. 2.102 / 10. 2.102
 libswscale 8. 2.100 / 8. 2.100
 libswresample 5. 2.100 / 5. 2.100
Input #0, flv, from 'rtmp://192.168.0.194/s/streamKey':
 Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: hevc (Main), yuv420p(tv, smpte170m/bt470bg/smpte170m), 1080x1920, 10240 kb/s, 30 fps, 120 tbr, 1k tbn
 Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 131 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (hevc (native) -> av1 (libsvtav1))
 Stream #0:1 -> #0:1 (aac (native) -> mp2 (native))
Press [q] to stop, [?] for help
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]: SVT-AV1 Encoder Lib 595a874
Svt[info]: SVT [build] : GCC 12.2.0 64 bit
Svt[info]: LIB Build date: Jun 20 2024 14:25:08
Svt[info]: -------------------------------------------
Svt[info]: Number of logical cores available: 12
Svt[info]: Number of PPCS 76
Svt[info]: [asm level on system : up to avx2]
Svt[info]: [asm level selected : up to avx2]
Svt[info]: -------------------------------------------
Svt[info]: SVT [config]: main profile tier (auto) level (auto)
Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 1080 / 1920 / 120 / 1
Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
Svt[info]: SVT [config]: preset / tune / pred struct : 10 / PSNR / random access
Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 641 / 16 / key frame
Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 35 
Svt[info]: SVT [config]: AQ mode / variance boost : 2 / 0
Svt[info]: -------------------------------------------
Svt[warn]: Failed to set thread priority: Invalid argument
Output #0, mpegts, to 'srt://192.168.0.167:9998?mode=caller':
 Metadata:
 encoder : Lavf61.3.104
 Stream #0:0: Video: av1, yuv420p(tv, smpte170m/bt470bg/smpte170m, progressive), 1080x1920, q=2-31, 120 fps, 90k tbn
 Metadata:
 encoder : Lavc61.8.100 libsvtav1
 Stream #0:1: Audio: mp2, 44100 Hz, stereo, s16, 384 kb/s
 Metadata:
 encoder : Lavc61.8.100 mp2
[mpegts @ 0x55ec921d9540] Stream 0, codec av1, is muxed as a private data stream and may not be recognized upon reading.
[in#0/flv @ 0x55ec9219cc40] Error during demuxing: Input/output error1990.7kbits/s speed=0.967x 
[out#0/mpegts @ 0x55ec922247c0] video:4431KiB audio:1138KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 6.374870%
frame= 723 fps= 31 q=35.0 Lsize= 5923KiB time=00:00:24.12 bitrate=2011.3kbits/s speed=1.04x



I send video stream from mobile app over rtmp encoded with hevc to my laptop where running script
ffmpeg -f flv -listen 1 -i rtmp://192.168.0.194/s/streamKey -c:v libsvtav1 -f mpegts srt://192.168.0.167:9998?mode=caller
. On the desktop i have obs with media source inputsrt://192.168.0.167:9998?mode=listener
.

When i run ffmpeg script without video codec option (-c:v libsvtav1) its working fine and in obs i can see video from my phone camera. With the option i can not see video only audio.
I clearly dont understand warning message :
[mpegts @ 0x55ec921d9540] Stream 0, codec av1, is muxed as a private data stream and may not be recognized upon reading.
.
Do I need specify codec (av1) in obs media source or my ffmpeg script is wrong ?

-
lavu/version : fix minor version
17 mai 2024, par Haihao Xiang