
Recherche avancée
Autres articles (32)
-
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)
Sur d’autres sites (4186)
-
FFmpeg muxing theora/vorbis unable to flush ?
11 novembre 2013, par user2979732I'm pretty new to ffmpeg and it's confusing. I'm working on a basic muxer and have been spending over a week on this - I don't normally post as I solve 98% of my issues with google, but unable to get this one so far.
The basis of my source is FFmpeg's own muxing.c example. When I try to force it using libvorbis for audio, and create "test.ogg" it demonstrates the same issues I'm having in my own derivation of muxing.c. The problem is with ogg/theora/vorbis. I'm forcing the use of audio codec like this :
audio_st = add_stream(oc, &audio_codec, avcodec_find_encoder_by_name("libvorbis")->id);
It seems the problem is in not setting audio pts in the muxing.c sample. There is a confusion in general about this, nobody apart from this guy didn't address what I am looking for http://webcache.googleusercontent.com/search?q=cache:6ml82RMN3YYJ:ffmpeg.org/pipermail/libav-user/2013-April/004304.html+&cd=4&hl=en&ct=clnk&gl=cz
I couldn't find any answers to that naturally - like why don't they set the audio pts ? Laziness ? Not needed ? Do they believe all encoders will produce the pts for them(not true as seen below) ?
Anyway, when you try muxing.c with mp4/libx264/forced libmp3lame all is fine, but the encoder says that "encoder did not produce valid pts, making some up.". However, it's silent with ogg/theora/vorbis, as if there were valid pts(?) but the result is no audio packets present in the stream(!), at least from what I saw using ffprobe. Which results in the video not being able to replay even, until you take out the empty audio stream. Then it plays the video, which shows that stream is fine.
Coming to my original issue. I tried setting the pts on the audio frame you're sending to the encoder to fix that problem(this already sucks). I was unable to find a definite answer how to properly set the pts - that's the other big issue as I'm trying stuff which I'm not sure works. Anyway, in the end when setting "some" pts, this results in ogg with sound.
if (frame->pts == AV_NOPTS_VALUE) frame->pts = audio_sync_opts;
audio_sync_opts = frame->pts + frame->nb_samples;I'm aware I should probably use rescaling to adjust for the container time bases etc..if this was present/explained in ffmpeg's own sample I wouldn't have to guess now (as I'm stil not 100% sure about time base relationship between container and codec, I think container time base takes somehow over the codec one).
My other problem is flushing - but that might have something to do with the screwed up pts. So I won't rather get into that in detail - the basic problem is, when I send finite number of audio frames, like 20, I get 2 packets only for example. From my understanding, I need to flush the rest of audio after all the encoding/muxing is done, which I managed to do with mp4/libx264/libmp3lame, but with ogg/theora/vorbis it doesn't flush. Why not, I have no idea.
If someone could rework muxing.c into sending it finite number of audio / video frames - ie . not until duration > X, but until it sent 20 video & 100 audio frames(just an example). So that number of frames I have is important, not the video time I end up with. Then encode / mux all the frames - with proper video/audio pts, working with theora/ogg and flushing if needed, that would probably solve all of my issues. I'm sure for an expert ffmpeg'er modifying muxing.c addressing all those things would be a pretty quick exercise and could help more than 1 confused person.
Thanks !
-
installing x264 0.120 for redhat el7
16 août 2017, par Mohammad Alkhaldiim trying to install x264 for redhat el7
i cloned it from github then compiled it and installed
this is the clone link :http://git.videolan.org/git/x264.git
when i run x264 —version it gives me this output
x264 0.148.x
built on Aug 16 2017, gcc : 4.8.5 20150623 (Red Hat 4.8.5-11)
x264 configuration : —bit-depth=8 —chroma-format=all
libx264 configuration : —bit-depth=8 —chroma-format=all
x264 license : GPL version 2 or lateri need x264 0.120 for installing x264-plugins-ugly
Thank you in advance.
-
ffmpeg how to encode first then use it for another output
10 août 2017, par mahdi ghI’m trying to capture screen with gdigrab and combine int with a sound and then send it on my decklink sdi device.
here is my code to capture :
ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i title="Play" -f dshow -i audio="CABLE Output (VB-Audio Virtual Cable)" -af aresample=resampler=soxr -ar 48000 -acodec pcm_s16le -ac 2 -c:v libx264 -qp 0 -preset ultrafast "output.avi"
here is my code for output to ffmpeg :
ffmpeg -i output.avi -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)"
this way it works, but when I combine these two arguments to send the output to decklink card on the fly, ffmpeg stops working. here is the combination code :
ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i title="Play" -f dshow -i audio="CABLE Output (VB-Audio Virtual Cable)" -af aresample=resampler=soxr -ar 48000 -acodec pcm_s16le -ac 2 -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)"
I have tried so many different combinations but no luck. it works only if i store it on a file then use that file as input. Is there a way to tell ffmpeg to use the result of first command as input of second command ?
Thanks
Update :
Here is log report :ffmpeg started on 2017-08-08 at 12:26:36
Report written to "ffmpeg-20170808-122636.log"
Command line:
ffmpeg -framerate 25 -thread_queue_size 512 -f gdigrab -i "title=Play" -c:v rawvideo -f dshow -i "audio=CABLE Output (VB-Audio Virtual Cable)" -af "aresample=resampler=soxr" -ar 48000 -acodec pcm_s16le -ac 2 -map 0:v:0 -map 1:a:0 -f decklink -pix_fmt uyvy422 "DeckLink SDI (2)" -report
ffmpeg version N-71608-ga924b83 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 30.100 / 56. 30.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-framerate' ... matched as AVOption 'framerate' with argument '25'.
Reading option '-thread_queue_size' ... matched as option 'thread_queue_size' (set the maximum number of queued packets from the demuxer) with argument '512'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'gdigrab'.
Reading option '-i' ... matched as input file with argument 'title=Play'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'rawvideo'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'dshow'.
Reading option '-i' ... matched as input file with argument 'audio=CABLE Output (VB-Audio Virtual Cable)'.
Reading option '-af' ... matched as option 'af' (set audio filters) with argument 'aresample=resampler=soxr'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '48000'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'pcm_s16le'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:a:0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'decklink'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'uyvy422'.
Reading option 'DeckLink SDI (2)' ... matched as output file.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file title=Play.
Applying option thread_queue_size (set the maximum number of queued packets from the demuxer) with argument 512.
Applying option f (force format) with argument gdigrab.
Successfully parsed a group of options.
Opening an input file: title=Play.
[gdigrab @ 0000000002d3f2a0] Found window Play, capturing 720x576x32 at (0,0)
[gdigrab @ 0000000002d3f2a0] Cursor pos (588,602) -> (-271,597)
[gdigrab @ 0000000002d3f2a0] All info found
Input #0, gdigrab, from 'title=Play':
Duration: N/A, start: 1502178996.958615, bitrate: 331786 kb/s
Stream #0:0, 1, 1/1000000: Video: bmp, bgra, 720x576, 331786 kb/s, 25 tbr, 1000k tbn, 25 tbc
Successfully opened the file.
Parsing a group of options: input file audio=CABLE Output (VB-Audio Virtual Cable).
Applying option c:v (codec name) with argument rawvideo.
Applying option f (force format) with argument dshow.
Successfully parsed a group of options.
Opening an input file: audio=CABLE Output (VB-Audio Virtual Cable).
[dshow @ 0000000002d3c340] Selecting pin Capture on audio only
dshow passing through packet of type audio size 88200 timestamp 111632750000 orig timestamp 111632750000
[dshow @ 0000000002d3c340] All info found
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, dshow, from 'audio=CABLE Output (VB-Audio Virtual Cable)':
Duration: N/A, start: 11163.275000, bitrate: 1411 kb/s
Stream #1:0, 1, 1/10000000: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Successfully opened the file.
Parsing a group of options: output file DeckLink SDI (2).
Applying option af (set audio filters) with argument aresample=resampler=soxr.
Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument pcm_s16le.
Applying option ac (set number of audio channels) with argument 2.
Applying option map (set input stream mapping) with argument 0:v:0.
Applying option map (set input stream mapping) with argument 1:a:0.
Applying option f (force format) with argument decklink.
Applying option pix_fmt (set pixel format) with argument uyvy422.
Successfully parsed a group of options.
Opening an output file: DeckLink SDI (2).
Successfully opened the file.
detected 2 logical cores
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'video_size' to value '720x576'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'pix_fmt' to value '30'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0000000002dd7ea0] w:720 h:576 pixfmt:bgra tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0000000002d3df00] compat: called with args=[uyvy422]
[format @ 0000000002d3df00] Setting 'pix_fmts' to value 'uyvy422'
[auto-inserted scaler 0 @ 0000000002d44ca0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0000000002d44ca0] w:iw h:ih flags:'0x4' interl:0
[format @ 0000000002d3df00] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0000000002e586c0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0000000002d44ca0] w:720 h:576 fmt:bgra sar:0/1 -> w:720 h:576 fmt:uyvy422 sar:0/1 flags:0x4
[Parsed_aresample_0 @ 0000000002d513a0] Setting 'resampler' to value 'soxr'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'time_base' to value '1/44100'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'sample_rate' to value '44100'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'sample_fmt' to value 's16'
[graph 1 input from stream 1:0 @ 0000000002d51460] Setting 'channel_layout' to value '0x3'
[graph 1 input from stream 1:0 @ 0000000002d51460] tb:1/44100 samplefmt:s16 samplerate:44100 chlayout:0x3
[audio format for output stream 0:1 @ 0000000002d51520] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:1 @ 0000000002d51520] Setting 'sample_rates' to value '48000'
[audio format for output stream 0:1 @ 0000000002d51520] Setting 'channel_layouts' to value '0x3'
[AVFilterGraph @ 0000000002d4d0c0] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[Parsed_aresample_0 @ 0000000002d513a0] ch:2 chl:stereo fmt:s16 r:44100Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
dshow passing through packet of type audio size 88200 timestamp 111637810000 orig timestamp 111637810000
[decklink @ 0000000002dd6a00] Found Decklink mode 720 x 576 with rate 25.00(i)
Output #0, decklink, to 'DeckLink SDI (2)':
Metadata:
encoder : Lavf56.30.100
Stream #0:0, 0, 1/25: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc56.35.101 rawvideo
Stream #0:1, 0, 1/48000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
encoder : Lavc56.35.101 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (bmp (native) -> rawvideo (native))
Stream #1:0 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
Cliping frame in rate conversion by 0.000008
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Encoder did not produce proper pts, making some up.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
*** 40 dup!
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 1.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 2.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 3.
[decklink @ 0000000002dd6a00] Buffered video frames: 4.
[decklink @ 0000000002dd6a00] Buffered video frames: 5.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 6.
[decklink @ 0000000002dd6a00] Buffered video frames: 7.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 8.
[decklink @ 0000000002dd6a00] Buffered video frames: 9.
[decklink @ 0000000002dd6a00] Buffered video frames: 10.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 11.
[decklink @ 0000000002dd6a00] Buffered video frames: 12.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 13.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
dshow passing through packet of type audio size 88200 timestamp 111642810000 orig timestamp 111642810000
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 14.
[decklink @ 0000000002dd6a00] Ending audio preroll.
[decklink @ 0000000002dd6a00] Starting scheduled playback.
[decklink @ 0000000002dd6a00] Buffered video frames: 15.
[decklink @ 0000000002dd6a00] Buffered video frames: 16.
[decklink @ 0000000002dd6a00] Buffered video frames: 17.
[decklink @ 0000000002dd6a00] Buffered video frames: 18.
[decklink @ 0000000002dd6a00] Buffered video frames: 19.
[decklink @ 0000000002dd6a00] Buffered video frames: 20.
[decklink @ 0000000002dd6a00] Buffered video frames: 21.
[decklink @ 0000000002dd6a00] Buffered video frames: 22.
[decklink @ 0000000002dd6a00] Buffered video frames: 23.
[decklink @ 0000000002dd6a00] Buffered video frames: 24.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[decklink @ 0000000002dd6a00] Buffered video frames: 24.
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
frame= 42 fps=0.0 q=0.0 size=N/A time=00:00:01.68 bitrate=N/A dup=40 drop=0
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
dshow passing through packet of type audio size 88200 timestamp 111647710000 orig timestamp 111647710000
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (689,472) -> (-170,467)
[gdigrab @ 0000000002d3f2a0] Cursor pos (814,496) -> (-45,491)
[gdigrab @ 0000000002d3f2a0] Cursor pos (814,496) -> (-45,491)
[gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
[gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
[gdigrab @ 0000000002d3f2a0] Cursor pos (811,497) -> (-48,492)
[gdigrab @ 0000000002d3f2a0] Cursor pos (806,497) -> (-53,492)