
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (19)
-
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 -
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 (3675)
-
FFMPEG Pipeline
7 décembre 2022, par user20623229I created an FFMPEG pipeline so that I can stream video frames to an RTSP server. I created a synthetic video for testing where each frame is a green number on a black background. The video plays on my screen but it does not stream to the server because I get the error "Unable to find a suitable output format for 'rtsp ://10.0.0.6:8554/mystream"
My code is below. The source code is taken from the answer : How to stream frames from OpenCV C++ code to Video4Linux or ffmpeg ?


int main() {
 int width = 720;
 int height = 1280;
 int fps = 30;

 FILE* pipeout = _popen("ffmpeg -f rawvideo -r 30 -video_size 720x1280 -pixel_format bgr24 -i pipe: -vcodec libx264 -crf 24 -pix_fmt yuv420p rtsp://10.0.0.6:8554/mystream", "w");



 for (int i = 0; i < 100; i++)
 {
 Mat frame = Mat(height, width, CV_8UC3);
 frame = Scalar(60, 60, 60); //Fill background with dark gray 
 putText(frame, to_string(i + 1), Point(width / 2 - 50 * (int)(to_string(i + 1).length()), height / 2 + 50), FONT_HERSHEY_DUPLEX, 5, Scalar(30, 255, 30), 10); // Draw a green number

 imshow("frame", frame);
waitKey(1); 

 fwrite(frame.data, 1, width * height * 3, pipeout);
 }
 // Flush and close input and output pipes
 fflush(pipeout);

 _pclose(pipeout); //Windows
 return 0;
}



When I change -f rawvideo to -f rtsp in the FFMPEG command, I no longer get the error but the program just displays the first frame on the screen and seems to get stuck. Is there a wrong parameter in the pipeline. When I change the RTSP url to a file name such as output.mkv, it works perfectly and saves the video to the file.


-
How to swtich audio stream with ffmpeg ?
6 octobre 2022, par JasonI have a file which has both english and japanese audio tracks. This is the meta data of the file (using command ffmpeg -i "my_vid.mp4" :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'my_vid.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf58.76.100
 Duration: 00:27:13.14, start: 0.000000, bitrate: 1699 kb/s
 Chapters:
 Chapter #0:0: start 0.000000, end 263.012000
 Metadata:
 title : Chapter 01
 Chapter #0:1: start 263.012000, end 353.019000
 Metadata:
 title : Chapter 02
 Chapter #0:2: start 353.019000, end 891.098000
 Metadata:
 title : Chapter 03
 Chapter #0:3: start 891.098000, end 1535.075000
 Metadata:
 title : Chapter 04
 Chapter #0:4: start 1535.075000, end 1624.080000
 Metadata:
 title : Chapter 05
 Chapter #0:5: start 1624.080000, end 1633.140000
 Metadata:
 title : Chapter 06
 Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], 1413 kb/s, 23.98 fps, 23.98 tbr, 16k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 136 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:2[0x3](jpn): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 137 kb/s
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:3[0x4](eng): Data: bin_data (text / 0x74786574)
 Metadata:
 handler_name : SubtitleHandler



Per the ffmpeg documentation I'm trying to switch the video's audio output to japanese. However, the output video is still in english (which it was in before). This is my current ffmpeg cmd :


ffmpeg -i "my_vid.mp4" -c copy -disposition:a:1 default "output.mp4"



what am I doing wrong ? Still pretty new to ffmpeg


Edit :


With one of the suggestions I tried adding the -map 0 option to my command


ffmpeg -i "my_vid.mp4" -map 0 -c copy -disposition:a:2 default "output.mp4"



but still not change. The meta data for the output video is as follows :


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf59.33.100
 Duration: 00:27:13.14, start: 0.000000, bitrate: 1699 kb/s
 Chapters:
 Chapter #0:0: start 0.000000, end 263.012000
 Metadata:
 title : Chapter 01
 Chapter #0:1: start 263.012000, end 353.019000
 Metadata:
 title : Chapter 02
 Chapter #0:2: start 353.019000, end 891.098000
 Metadata:
 title : Chapter 03
 Chapter #0:3: start 891.098000, end 1535.075000
 Metadata:
 title : Chapter 04
 Chapter #0:4: start 1535.075000, end 1624.080000
 Metadata:
 title : Chapter 05
 Chapter #0:5: start 1624.080000, end 1633.140000
 Metadata:
 title : Chapter 06
 Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], 1413 kb/s, 23.98 fps, 23.98 tbr, 16k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 136 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:2[0x3](jpn): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 137 kb/s
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:3[0x4](eng): Data: bin_data (gpmd / 0x646D7067)
 Metadata:
 handler_name : SubtitleHandler
 Stream #0:4[0x5](eng): Data: bin_data (text / 0x74786574)
 Metadata:
 handler_name : SubtitleHandler



-
Some H264-mp4 videos can't be loaded by any non-Chromium based web browser
3 mai 2020, par LaizrodI regularly use ffmpeg to encode some videos, blu-ray etc in mp4 files (encoded in H264 and AAC) in order to be played on web browsers.
Chromium based browsers such as Google Chrome or the new Microsoft Edge can play all of my files flawlessly.
But today I noticed that some video files couldn't be loaded by some web browsers. It looks like they can't be loaded by any non-Chromium based web browser. (Safari, Firefox etc..)



So I decided to check out and compare the specs of files that work with any web browser, and files that doesn't work with non-Chromium based browsers.



There's what I got :



- 

- Playable by any web browser :





General
Complete name : /storage/100.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (isom/iso2/avc1/mp41)
File size : 624 MiB
Duration : 23 min 54 s
Overall bit rate : 3 648 kb/s
Encoded date : UTC 2019-10-02 22:15:27
Tagged date : UTC 2019-10-02 22:15:27
Writing application : HandBrake 1.2.2 2019022300

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 1 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Format settings, GOP : M=3, N=24
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 23 min 54 s
Bit rate : 3 481 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 (24000/1001) FPS
Minimum frame rate : 23.974 FPS
Maximum frame rate : 23.981 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.070
Stream size : 595 MiB (95%)
Encoded date : UTC 2019-10-02 22:15:27
Tagged date : UTC 2019-10-02 22:15:27
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 23 min 54 s
Bit rate mode : Constant
Bit rate : 160 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 44.1 kHz
Frame rate : 43.066 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 27.4 MiB (4%)
Title : Stereo
Language : Japanese
Default : Yes
Alternate group : 1
Encoded date : UTC 2019-10-02 22:15:27
Tagged date : UTC 2019-10-02 22:15:27




- 

- Unplayable by non-chromium based web browsers :





General
Complete name : /storage/DL/test.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 329 MiB
Duration : 23 min 52 s
Overall bit rate : 1 926 kb/s
Writing application : Lavf58.20.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 23 min 52 s
Bit rate : 1 792 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.036
Stream size : 306 MiB (93%)
Writing library : x264 core 155 r2917 0a84d98
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=34 / lookahead_threads=8 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=21.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : Japanese
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 23 min 52 s
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 21.9 MiB (7%)
Language : Japanese
Default : Yes
Alternate group : 1




My knowledge is limited and I'm unable to understand why and which differences are causing my issue.
Can someone identify the problem and help me fix it with ffmpeg ?



Thank you