
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (47)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (8006)
-
How to extract audio in ffmpeg from mov file
3 août 2020, par David542I have a ProRes422 file with a
.mov
container :FINAL.mov
. I would like to save out the audio track to a new file (no encoding or anything, just save it out). In QuickTime there is an option to save "Audio Only" —



What would be the equivalent way to do this within
ffmpeg
? From basic research it seems something along the lines of :

$ ffmpeg \
 -i FINAL.mov \
 -vn # remove video? \
 ?? # keep audio \ 
 MYAUDIO_FINAL.mov



$ ffmpeg -i
gives :

Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'FINAL.mov':
 Metadata:
 major_brand : qt
 minor_version : 537199360
 compatible_brands: qt
 creation_time : 2016-01-11T19:23:10.000000Z
 com.apple.finalcutstudio.media.uuid: CE6F1278-8982-4B98-9E46-AE7C329436EF
 com.apple.quicktime.player.movie.audio.gain: 1.000000
 com.apple.quicktime.player.movie.audio.treble: 0.000000
 com.apple.quicktime.player.movie.audio.bass: 0.000000
 com.apple.quicktime.player.movie.audio.balance: 0.000000
 com.apple.quicktime.player.movie.audio.pitchshift: 0.000000
 com.apple.quicktime.player.movie.audio.mute:
 com.apple.quicktime.player.movie.visual.brightness: 0.000000
 com.apple.quicktime.player.movie.visual.color: 1.000000
 com.apple.quicktime.player.movie.visual.tint: 0.000000
 com.apple.quicktime.player.movie.visual.contrast: 1.000000
 com.apple.quicktime.player.version: 7.6.6 (7.6.6)
 com.apple.quicktime.version: 7.7.3 (2826.24) 0x7738000 (Mac OS X, 10.9.5, 13F34)
 Duration: 00:01:59.58, start: 0.000000, bitrate: 154872 kb/s
 Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 153307 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976 tbn, 23976 tbc (default)
 Metadata:
 creation_time : 2016-01-11T19:23:10.000000Z
 handler_name : Apple Alias Data Handler
 encoder : Apple ProRes 422 (HQ)
 Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
 Metadata:
 creation_time : 2016-01-11T19:23:10.000000Z
 handler_name : Apple Alias Data Handler



And a second file with 8 channel audio :


Duration: 01:10:12.00, start: 0.000000, bitrate: 173231 kb/s
 Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le(bt709, progressive), 1920x1080, 164007 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 encoder : Apple ProRes 422 (HQ)
 Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FL), s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (FR), s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (LFE), s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BL), s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (BR), s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (DL), s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
 Stream #0:8(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 1 channels (DR), s32 (24 bit), 1152 kb/s (default)
 Metadata:
 handler_name : Apple Alias Data Handler
At least one output file must be specified



-
FFmpeg downmuxing multiple tracks with custom "af"s
26 août 2020, par CasualDemonI am trying to do a custom downmix conversion, that is the rough equivalent of :


ffmpeg -y -i "file.mkv" \
 -map 0:1 -c:0 flac -ac:0 4 \
 -map 0:3 -c:1 flac -ac:1 3 \
 -map 0:3 -c:2 flac -ac:2 3 \
 audio.mkv



I tried using the command :


ffmpeg -y -i "file.mkv" \
 -map 0:1 -c:0 flac -af:0 "pan=3.1| FL < FL + 0.6*BL + 0.6*SL | FR < FR + 0.6*BR + 0.6*SR | FC = FC | LFE = LFE" \
 -map 0:3 -c:1 flac -af:1 "pan=2.1| FL < FL + 0.6*BL + 0.6*SL + 0.5*FC | FR < FR + 0.6*BR + 0.6*SR + 0.5*FC | LFE = LFE" \
 -map 0:3 -c:2 flac -af:2 "pan=2.1| FL < FL + 0.6*BL + 0.6*SL + 0.5*FC + 0.5*LFE | FR < FR + 0.6*BR + 0.6*SR + 0.5*FC + 0.5*LFE" \
 audio.mkv



But it gave an error that only 1 "af" is supported, unlike "ac" :


Only '-af pan=2.1| FL < FL + 0.6*BL + 0.6*SL + 0.5*FC + 0.5*LFE | FR < FR + 0.6*BR + 0.6*SR + 0.5*FC + 0.5*LFE | LFE = FC' read, ignoring remaining -af options: Use ',' to separate filters



So I tried doing as it said, and separated them with a comma :


ffmpeg -y -i "file.mkv" \
 -map 0:1 -c:0 flac \
 -map 0:3 -c:1 flac \
 -map 0:3 -c:2 flac \
 -af "pan=3.1| FL < FL + 0.6*BL + 0.6*SL | FR < FR + 0.6*BR + 0.6*SR | FC = FC | LFE = LFE,pan=2.1| FL < FL + 0.6*BL + 0.6*SL + 0.5*FC | FR < FR + 0.6*BR + 0.6*SR + 0.5*FC | LFE = LFE,pan=2.1| FL < FL + 0.6*BL + 0.6*SL + 0.5*FC + 0.5*LFE | FR < FR + 0.6*BR + 0.6*SR + 0.5*FC + 0.5*LFE | LFE = LFE" \
 audio.mkv



Which started the encoding, but I noticed that it was only applying the last pan, and all three tracks were being downmixed to the last 2.1 !


According to the documentation, https://ffmpeg.org/ffmpeg-filters.html#Filtergraph-syntax-1 adding a "," is creating a "filterchain" which I don't think I want, as I am doing the same filter on three different tracks. So I am at a loss of what I am supposed to do from there.


Thanks for any help !


-
FFmpeg - generate x264 CBR video transport stream with C-API
6 juillet 2020, par ZeroDefectUsing various posts sprinkled around the Internet, including this one here on SO, I've been able to understand how to use the FFmpeg cli to generate a CBR video bitrate using the x264 codec (wrapped in an MPEG-2 transport stream). Note : I'm concerned with the video bitrate - nothing else.


ffmpeg -i cbr_test_file_input.mp4 -c:v libx264 -pix_fmt yuv420p -b:v 6000000 -preset fast -tune film -g 25 -x264-params vbv-maxrate=6000:vbv-bufsize=6000:force-cfr=1:nal-hrd=cbr -flags +ildct+ilme x264_cbr_test_output.ts



However, I'm trying to approach this from an FFmpeg C-API point of view. I'm having issues. I've knocked together some code to try do something very similar to what is being done in the FFmpeg CLI. I can generate a transport stream of what I think should be CBR, but the profile of the video bitrate is very different from what I thought was the FFmpeg cli equivalent :


The initialisation of the AVCodecContext looks something like :


av_dict_set(&pDict, "preset", "faster", 0);
 av_dict_set(&pDict, "tune", "film", 0);
 av_dict_set_int(&pDict, "rc-lookahead", 25, 0);

 pCdcCtxOut->width = pCdcCtxIn->width;
 pCdcCtxOut->height = pCdcCtxIn->height;
 pCdcCtxOut->pix_fmt = AV_PIX_FMT_YUV420P;
 pCdcCtxOut->gop_size = 25;

 // Going for 6Mbit/s
 pCdcCtxOut->bit_rate = 6000000;
 //pCdcCtxOut->rc_min_rate = pCdcCtxOut->bit_rate;
 pCdcCtxOut->rc_max_rate = pCdcCtxOut->bit_rate;
 pCdcCtxOut->rc_buffer_size = pCdcCtxOut->bit_rate;
 pCdcCtxOut->rc_initial_buffer_occupancy = static_cast<int>((pCdcCtxOut->bit_rate * 9) / 10);

 std::string strParams = "vbv-maxrate="
 + std::to_string(pCdcCtxOut->bit_rate / 1000)
 + ":vbv-bufsize="
 + std::to_string(pCdcCtxOut->bit_rate / 1000)
 + ":force-cfr=1:nal-hrd=cbr";

 av_dict_set(&pDict, "x264-params", strParams.c_str(), 0);

 pCdcCtxOut->field_order = AV_FIELD_TT;
 pCdcCtxOut->flags = (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME | AV_CODEC_FLAG_CLOSED_GOP);

 // WARN: Make some assumptions here!
 pCdcCtxOut->time_base = AVRational{1,25};
 pCdcCtxOut->framerate = AVRational{25,1};
 pCdcCtxOut->sample_aspect_ratio = AVRational{64,45};
</int>


The output graphs appear very different :




Above is the FFmpeg CLI output - video bitrate holds fairly steady.




Above is the output of my sample application - some significant dips in the video bitrate.


I've taken this a step further and created a git repo consisting of :


- 

- Code of sample application
- Test input file (.mp4)
- Outputs (.ts file) of tests
- Graphs of output bitrates.