
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (77)
-
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (6581)
-
FFMPEG Executing Command Error (index entry 349 + TemporalOffset 1 = 350, which is out of bounds)
21 octobre 2022, par Marcelo Lopes NunesWhen I conversion file MXF using ffmpeg command :


fmpeg -y -i TEST.mxf -vcodec mpeg2video -b:v 50000k -minrate 50000k -maxrate 50000k -bufsize 20000k -g 15 -bf 2 -r 25 -s 1920x1080 -aspect 16:9 -top 1 -flags:v +ilme+ildct -vf yadif=1 -acodec pcm_s24le -map 0:0 -map 0:a -map 0:a -map 0:a -map 0:a -ar 48000 -ac 1 CONVERT.mxf


FFmpeg command Execution error index entry 349 + TemporalOffset 1 = 350, which is out of bounds below log.


libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
[mxf @ 0x560422b8bc20] index entry 349 + TemporalOffset 1 = 350, which is out of bounds
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2: mono



So after this, the audio isn't synchronized with the movie.
I executed the same command with a lot of other MXFs it worked and I don't have the FFmpeg error in the log.


Mediainfo MXF below.


<track type="General">
 <videocount>1</videocount>
 <audiocount>2</audiocount>
 <othercount>3</othercount>
 <fileextension>mxf</fileextension>
 <format>MXF</format>
 XDCAM HD422
 1.3
 OP-1a
 Closed / Complete
 <filesize>91497029</filesize>
 <duration>14.000</duration>
 <overallbitrate>52284016</overallbitrate>
 <framerate>25.000</framerate>
 <framecount>350</framecount>
 <footersize>2629</footersize>
 <packagename>Source Package</packagename>
 0-00-00 00:00:00.000
 UTC 2022-10-19 10:23:49
 2022-10-19 11:23:49
 FFmpeg
 OP1a Muxer
 58.29.100.0.0
 58.29.100.0.0
 </track>
 <track type="Video">
 <streamorder>0</streamorder>
 <id>2</id>
 <format>MPEG Video</format>
 XDCAM HD422
 2
 4:2:2
 High
 Yes
 Default
 M=3, N=15
 Frame
 Frame
 <codecid>0D01030102046001-0401020201040300</codecid>
 <duration>14.000</duration>
 CBR
 <bitrate>50000000</bitrate>
 <width>1920</width>
 <height>1080</height>
 1920
 1080
 <pixelaspectratio>1.000</pixelaspectratio>
 <displayaspectratio>1.778</displayaspectratio>
 <framerate>25.000</framerate>
 <framecount>350</framecount>
 <colorspace>YUV</colorspace>
 <chromasubsampling>4:2:2</chromasubsampling>
 <bitdepth>8</bitdepth>
 <scantype>Interlaced</scantype>
 <scanorder>TFF</scanorder>
 Lossy
 <delay>0.000</delay>
 0.000
 00:00:00:00
 Group of pictures header
 Open
 Closed
 <streamsize>87500000</streamsize>
 <buffersize>2500608</buffersize>
 <extra>
 0
 8
 </extra>
 </track>
 <track type="Audio" typeorder="1">
 <streamorder>1</streamorder>
 <id>3</id>
 <format>PCM</format>
 Little
 Frame (AES)
 <codecid>0D01030102060300</codecid>
 <duration>14.000</duration>
 CBR
 <bitrate>1152000</bitrate>
 <channels>1</channels>
 <samplesperframe>1920</samplesperframe>
 <samplingrate>48000</samplingrate>
 <samplingcount>672000</samplingcount>
 <framerate>25.000</framerate>
 <framecount>350</framecount>
 <bitdepth>24</bitdepth>
 <delay>0.000</delay>
 No
 Container
 <streamsize>2016000</streamsize>
 0.02203
 <extra>
 0
 <locked>Yes</locked>
 <blockalignment>3</blockalignment>
 </extra>
 </track>



I researched this problem on ffmpeg.org and I found "This implies there's a VBR index with slices. Probably because of mxf->slice_count = 1 ;
Slices are MXF's way of indexing VBR combined with CBR." but I don't know how I fix this.


-
ffmpeg output gives file not found error in python
20 octobre 2022, par Batuhan YılmazTrying to build an auto subtitled video generator in Python. But couldn't generate the subtitled video of the input video using ffmpeg. Getting an error saying there is no output.mp4. FileNotFoundError : [Errno 2] No such file or directory : 'C :\Users\batuh\Desktop\auto-multipage\output.mp4'


Can you help me out ? Full code is here : https://github.com/BatuhanYilmaz26/auto-sub-exp/blob/main/pages/02_up3.py


Here's the parts where I used ffmpeg :


def inferecence(loaded_model, uploaded_file, task):
 with open(f"{save_dir}/audio.mp3" , "wb") as f:
 f.write(uploaded_file.read())
 audio = ffmpeg.input(f"{save_dir}/audio.mp3")
 audio = ffmpeg.output(audio, f"{save_dir}/output.wav", acodec="pcm_s16le", ac=1, ar="16k")
 ffmpeg.run(audio, overwrite_output=True)
 if task == "Transcribe":
 options = dict(task="transcribe", best_of=5)
 results = loaded_model.transcribe(f"{save_dir}/output.wav", **options)
 vtt = getSubs(results["segments"], "vtt", 80)
 srt = getSubs(results["segments"], "srt", 80)
 lang = results["language"]
 return results["text"], vtt, srt, lang
 elif task == "Translate":
 options = dict(task="translate", best_of=5)
 results = loaded_model.transcribe(f"{save_dir}/output.wav", **options)
 vtt = getSubs(results["segments"], "vtt", 80)
 srt = getSubs(results["segments"], "srt", 80)
 lang = results["language"]
 return results["text"], vtt, srt, lang
 else:
 raise ValueError("Task not supported")
 
 results = inferecence(loaded_model, input_file, task)
 
 subprocess.run(shlex.split(f"ffmpeg -i {save_dir}/input.mp4 -i {save_dir}/output.wav -i transcript.srt -c:v copy -c:a copy -c:s copy -map 0:a -map 1:v -map 2:s -metadata:s:a:0 language={results[3]} -y {save_dir}/output.mp4"))
 #subprocess.run(shlex.split(f"ffmpeg -i {save_dir}/input.mp4 -vf {save_dir}/transcript.srt -y {save_dir}/output.mp4"))
 with open(os.path.join(os.getcwd(), "output.mp4"), "rb") as f:
 data = f.read()
 st.video(data)
 st.download_button(label="Download Subtitled Video",
 data=data,
 file_name="output.mp4")



sorry about the indentations


Logfile :


ffmpeg started on 2022-10-20 at 23:43:53
Report written to "ffmpeg-20221020-234353.log"
Command line:
ffmpeg -i C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4 -i C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.wav -i transcript.srt -c:v copy -c:a copy -c:s copy -map 0:a -map 1:v -map 2:s -metadata:s:a:0 "language=eng" -y C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.mp4 -report
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200523
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4'.
Reading option '-i' ... matched as input url with argument 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.wav'.
Reading option '-i' ... matched as input url with argument 'transcript.srt'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:s' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:v'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2:s'.
Reading option '-metadata:s:a:0' ... matched as option 'metadata' (add metadata) with argument 'language=eng'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/output.mp4' ... matched as output url.
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 y (overwrite output files) with argument 1.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4.
Successfully parsed a group of options.
Opening an input file: C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4.
[NULL @ 000001fba186b9c0] Opening 'C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4' for reading
[file @ 000001fba186c140] Setting default whitelist 'file,crypto'
C:UsersbatuhDesktopauto-multipagepageslocaloutput/input.mp4: No such file or directory



-
FFmpeg hevc_nvenc encoder B Frame problem
16 mai 2023, par ramondqI'm using the latest FFmpeg windows Build (2022-12-02 12:44) from BtbN.
I'm trying to encode a video into HEVC codec using hevc_nvenc encoder. But it says
[hevc_nvenc @ 00000263983f4280] B frames as references are not supported
. Cause my GPU GTX1060 (GP106) doesn't support hardware accelerate encode HEVC of B frames.
command line

I tried to disable the B frames by adding the parameter
-bf 0
, but it doesn't work.
Then I tried to use the latest build from gyan.dev and it is the same. But when I tried to use an older build (2021-02-28 12:32) of BtbN, it doesn't have the problem.
Is there a workaround to bypass this B frame problem ? Cause I don't want to switch to an older build. Thanks.