
Recherche avancée
Autres articles (39)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (7109)
-
7 Fintech Marketing Strategies to Maximise Profits in 2024
24 juillet 2024, par Erin -
ffmpeg -ss then apply filter then concat producing timestamp errors
6 août 2020, par Bob RamseyUsing ffmpeg, I have split a file into multiple parts using -ss. Then I apply a filter to some of the files, then concat the files back together. When I do that, I get : Non-monotonous DTS in output stream 0:0 ; previous : 341334, current : 340526 ; changing to 341335. This may result in incorrect timestamps in the output file. The output file plays, but there are noticeable skips where the files are joined.


Here's how I am splitting the file :


ffmpeg -i full_source.mp4 -ss 0 -to 14.264250 -c copy 01-plain.mp4
ffmpeg -i full_source.mp4 -ss 14.264250 -to 18.435083 -c copy 01-filtered.mp4

ffmpeg -i full_source.mp4 -ss 18.435083 -to 29.988292 -c copy 02-plain.mp4
ffmpeg -i full_source.mp4 -ss 29.988292 -to 31.865167 -c copy 02-filtered.mp4
...
ffmpeg -i full_source.mp4 -ss 0 -to 14.264250 -c copy 10-plain.mp4
ffmpeg -i full_source.mp4 -ss 234.484203 -to 300.000 -c copy 10-filtered.mp4



Then I apply a different drawtext filter on each of the 10 filtered files and save them with a new name, like :


ffmpeg -hide_banner -loglevel warning -y -i 01-filtered.mp4 -filter_complex "drawtext=fontfile=calibri.ttf:fontsize=24:fontcolor=white:x=300:y=500:text='hello world'" -crf 15 01-filtered-complete.mp4



Finally, I join all of the plain and complete files back together like this :


ffmpeg -f concat -safe 0 -i mylist.txt -c:a copy -c:v copy outfile.mp4



And that's where the timing error comes in. I've tried adding -vsync drop in the concat command, but that didn't really work either. Same version of ffmpeg does the split, the filter, and the concat. I've tried different versions, everything from 20170519 to one from May 2020 with the same result. Always making sure that all three steps are done by the same version of ffmpeg.


The only thing I can see is that ffprobe shows a duration of 14.27 for 01-plain.mp4 when it should be 14.264250. All of the other files show a similar rounding difference. The files are 23.98 fps. If I do all of my filters in really long command without splitting the file, I can use the more precise numbers with no problem. It just takes 10 times as long. This is all scripted, it happens a couple of hundred times a day and time is money, so I can't take 10 times as long to do each file.


Any ideas ? Thanks in advance !


-
ffmpeg concat demuxer dropping audio after first clip
6 septembre 2020, par marcmanI'm trying to concatenate a video collection that all should be the same type and format. It seems to work like expected when the original sources are the same type, but when they're different types the demuxer drops audio. I understand that the demux requires all inputs to have the same codecs, but I believe I am doing that already.


This is my workflow (pseudocode with Python-like for loop) :


for i, video in enumerate(all_videos):
 # Call command for transcoding and filtering
 # I allow this command to be called on mp4, mov, and avi files
 # The point of this filter is:
 # (1) to superimpose a timestamp on the bottom right of the video
 # (2) to scale and pad the videos to a common output resolution (the specific numbers below are just copied from a video I ran, but they are filled in automatically for each given video by the rest of my script)
 # (3) To transcode all videos to the same common format
 ffmpeg \
 -y \
 -loglevel quiet \
 -stats \
 -i video_<i>.{mp4, mov, avi} \
 -vcodec libx264 \
 -acodec aac \
 -vf "scale=607:1080, pad=width=1920:height=1080:x=656:y=0:color=black, drawtext=expansion=strftime: basetime=$(date +%s -d'2020-08-27 16:42:26')000000 : fontcolor=white : text='%^b %d, %Y%n%l\\:%M%p' : fontsize=36 : y=1080-4*lh : x=1263-text_w-2*max_glyph_w" \
 tmpdir/video_<i>.mp4


# create file_list.txt, e.g.
#
# file '/abspath/to/tmpdir/video_1.mp4'
# file '/abspath/to/tmpdir/video_2.mp4'
# file '/abspath/to/tmpdir/video_3.mp4'
# ...


ffmpeg \
 -f concat \
 -safe 0 \
 -i file_list.txt \
 -c copy \
 all_videos.mp4
</i></i>


In my test case, my inputs are 3 videos in this order :


- 

- a camcorder video output in H.264+aac in a mp4
- an iphone video in mov format
- an iphone video in mp4 format








When I review each of the intermediate mp4-transcoded videos in
tmpdir
they all playback audio and video just fine and the filtering works as expected. However, when I review the final concatenated output, only the first clip (the camcorder video) has sound. When all the videos are from the camcorder, there is no audio issue—they all have sound.

When I output ffmpeg warnings and errors, the only thing that shows up is an expected warning about the timestamp :


[mp4 @ 0x55997ce85300] Non-monotonous DTS in output stream 0:1; previous: 5909504, current: 5430298; changing to 5909505. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55997ce85300] Non-monotonous DTS in output stream 0:1; previous: 5909505, current: 5431322; changing to 5909506. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55997ce85300] Non-monotonous DTS in output stream 0:1; previous: 5909506, current: 5432346; changing to 5909507. This may result in incorrect timestamps in the output file.
[mp4 @ 0x55997ce85300] Non-monotonous DTS in output stream 0:1; previous: 5909507, current: 5433370; changing to 5909508. This may result in incorrect timestamps in the output file.
...



What might I be doing wrong here ? I'm testing in both the Ubuntu 20.04 "Videos" applications as well as VLC Player and both demonstrate the same problem. I'd prefer to use the demuxer if possible for speed as re-encoding during concatenation is quite expensive.


NOTE : This is a different issue than laid out here, in which some of the videos had no audio. In my case, all videos have both video and audio.