
Recherche avancée
Autres articles (46)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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
Sur d’autres sites (11696)
-
Ffmpeg converting to mp4 from mkv[mpeg@ 0x7f9c19800000] start time for stream 0 is not set in estimate_timings_from_pts
6 février 2018, par croakouttatuneI recently converted a number of anime episodes from MKV to MP4 to burn and watch on my SamsungBRPlayer, however during the process I wasn’t able to convert the subtitle stream #0:2 through ffmpeg from .ssa to .srt thru their respective codecs (SSA to MOV_TEXT, can also be SUBRIP). I eventually decided to extract the SSA files and encode them as .srt... one for each episode. I converted these to .srt and plugged them back into the 8 episodes.
for i in *.mkv;do ffmpeg -i "$i" -i *.srt -c copy -c:s mov_text -c:v h264_videotoolbox -c:a aac -b:a 128k -target ntsc-dvd -y "yfolder/${i%.mkv*}.mp4"; done
After testing the compatibility of these files I know that this video codec will work, and the BluRay player I use also recognizes the subtitle files ; However , when looking back at the streams #0:0 which is where the subtitles are stored gives me "[mpeg @ 0x7f8621000000] start time for stream 0 is not set in estimate_timings_from_pts." This stream #0:O is now a data stream...0:1 video 0:2 being audio ...
One of the reasons I thought that I could have received this message is from an Attachment from the original MKV files in the #0:3 stream, which because it wasn’t anything more than metadata I ignored.
Another would probably be from the code mentioned above importing multiple .srt files into each of the new .mp4 files. I did find a solution however I’m not able to utilize the coding.$ for video in *.mkv
do
base=${video%.mkv} ffmpeg -i $base.mkv -vf subtitles=$base.srt
$base-out.mkv ; doneI couldn’t seem to get it to work. My files were as follows :
[AnimeGT] Hansom Gold - 001 [720p] [suitup].mp4
[AnimeGT] Hansom Gold - 002 [720p] [suitup].mp4
[AnimeGT] Hansom Gold - 003 [720p] [suitup].mp4
[AnimeGT] Hansom Gold - 004 [720p] [suitup].mp4
[AnimeGT] Hansom Gold - 005 [720p] [suitup].mp4
[AnimeGT] Hansom Gold - 006 [720p] [suitup].mp4
[AnimeGT] Hansom Gold - 007 [720p] [suitup].mp4
[AnimeGT] Hansom Gold - 008 [720p] [suitup].mp4
So the titles are obviously fake but whatever. What I need to know is how to use the
${I%.*}.mp4
and${h%.*}.srt
to represent both the base and the video variables in the coding I failed at above.
While keeping the data stream from each file.
if that’s the problem. Some help would be nice.[mpeg @ 0x7f9c19800000] start time for stream 0 is not set in estimate_timings_from_pts
I need to know how to deal with this.
-
How can I remove the zero padding at the start of a .mp3 file generated by ffmpeg conversion ?
22 juin 2022, par Miguel de SousaAfter reading this and this, I understand that the
.mp3
encoder appends zeros at the start and at the end of an audio.

With this approach, the encoder can pass a sliding analysis window through the initial and final audio samples, just like in the rest of the audio.


This sliding window is associated with a Fourier Transform-like algorithm, but I will not get into this technical detail.


My problem is : When I generate an
.mp3
withffmpeg
like :

MacBook-Air-de-Miguel:faixas miguel$ ffmpeg -i primeira_caf.caf primeira_agora_vai.mp3
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with Apple clang version 11.0.3 (clang-1103.0.32.62)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
[caf @ 0x7fe205009000] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, caf, from 'primeira_caf.caf':
 Duration: 00:00:08.73, start: 0.000000, bitrate: 1414 kb/s
 Stream #0:0: Audio: pcm_s16le (lpcm / 0x6D63706C), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
 Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'primeira_agora_vai.mp3':
 Metadata:
 TSSE : Lavf58.45.100
 Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p
 Metadata:
 encoder : Lavc58.91.100 libmp3lame
size= 137kB time=00:00:08.75 bitrate= 128.6kbits/s speed= 61x 
video:0kB audio:137kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.180156%



my generated
.mp3
has +- 50ms of latency. I'm not 100% sure that all this latency is caused by the zero padding that I mentioned.

Converting
.caf
to other audio formats like.wav
and.ogg
do not give me this problem.

Considering
.mp3
as a constraint, is there any simple way to generate a.mp3
with zero latency ? Maybe affmpeg
argument that cuts off the zero padding at the start ?

If not, is it possible to do it manually ? How can I know or calculate how many samples should be cut off ?


I have also tried
sox
. It adds 25ms of latency instead of 50ms.

-
vcodec copy does not work when start/duration is messed up in video file
25 janvier 2014, par anishsaneMy Video file shows below meta-data with ffprobe/ffmpeg :
Duration: 00:44:27.52, start: 1333.760000, bitrate: 335 kb/s
Stream #0.0(und): Video: h264 (Main), yuv420p, 640x480, 25 tbr, 90k tbn, 50 tbcNote : The file does not contain audio.
I am trying to convert this video file to other video file, using ffmpeg/avconv.
This works : (but encodes h.264 video to mpeg4)
ffmpeg -i input.mp4 output.mp4
& it generates output file of proper duration (44:27 - 1333 seconds = 22:14)
This does not work :
ffmpeg -i input.mp4 -vcodec copy output.mp4
Generates file without video.
The output contains :
$ avconv -i input.mp4 -vcodec copy output.mp4
avconv version 0.8.9-6:0.8.9-0ubuntu0.13.10.1, Copyright (c) 2000-2013 the Libav developers
built on Nov 9 2013 19:09:46 with gcc 4.8.1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-01-19 22:43:21
Duration: 00:44:27.52, start: 1333.760000, bitrate: 335 kb/s
Stream #0.0(und): Video: h264 (Main), yuv420p, 640x480, 25 tbr, 90k tbn, 50 tbc
Metadata:
creation_time : 2014-01-19 22:43:21
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2014-01-19 22:43:21
encoder : Lavf53.21.1
Stream #0.0(und): Video: ![0][0][0] / 0x0021, yuv420p, 640x480, q=2-31, 90k tbn, 90k tbc
Metadata:
creation_time : 2014-01-19 22:43:21
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press ctrl-c to stop encoding
frame= 0 fps= 0 q=-1.0 Lsize= 0kB time=10000000000.00 bitrate= 0.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead inf%