
Recherche avancée
Médias (91)
-
Richard Stallman et le logiciel libre
19 octobre 2011, par
Mis à jour : Mai 2013
Langue : français
Type : Texte
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Elephants Dream - Cover of the soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (39)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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 (6149)
-
ffmpeg concat skips frames near end of each subclip
3 janvier 2024, par calvinusesyourcodeSo I have some video files to concat but in the resulting video the last few frames of each subclip are buggy. Imagine in the last 5 frames the first 3 frames are skipped and so at the end of each clip it seems to jitter.


It should be virtually impossible for my input videos to have any differences between them, as they were all recorded on the same iPhone and all converted with the same command :


command = [
 'ffmpeg', '-y',
 '-i', input_path,
 '-vf', 'scale=1080:1920',
 '-r', '30',
 '-c:v', 'libx264',
 output_path
 ]
subprocess.run(command, check=True)



I have tried re-encoding instead of merely copying and adding
-r 30
but that doesn't seem to work.

subprocess.run(["ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", temp_textfile, "-c", "copy", output_path])



subprocess.run(["ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", temp_textfile, "-r", "30", "-c:v", "libx264", "-c:a", "aac", output_path], check=True)



Somewhere someone said to open in VLC and do a frame-by-frame, reporting that "the frames are actually there, just not visually when watching normally". In my case the frame-by-frame reveals the frames are indeed being skipped.


Full console output :


ffmpeg version 2023-05-18-git-01d9a84ef5-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa 
--enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 7.100 / 58. 7.100
 libavcodec 60. 14.100 / 60. 14.100
 libavformat 60. 5.100 / 60. 5.100
 libavdevice 60. 2.100 / 60. 2.100
 libavfilter 9. 8.100 / 9. 8.100
 libswscale 7. 2.100 / 7. 2.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d60610ebc0] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'run\broll_subclips.txt':
 Duration: N/A, start: -0.023220, bitrate: 3094 kb/s
 Stream #0:0(und): Video: h264 (High 10) (avc1 / 0x31637661), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67, progressive), 1080x1920, 2968 kb/s, 30 fps, 30 tbr, 15360 tbn
 Metadata:
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : Lavc60.14.100 libx264
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s
 Metadata:
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001d6066fd380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX 
FMA3 BMI2 AVX2
[libx264 @ 000001d6066fd380] profile High 10, level 4.0, 4:2:0, 10-bit
[libx264 @ 000001d6066fd380] 264 - core 164 r3107 a8b68eb - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=81 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'joined_clips.mp4':
 Metadata:
 encoder : Lavf60.5.100
 Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67, progressive), 1080x1920, q=2-31, 30 fps, 15360 tbn
 Metadata:
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : Lavc60.14.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
 Metadata:
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 encoder : Lavc60.14.100 aac
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.23 bitrate= 1.7kbits/s dup[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:01.97 bitrate= 0.2kbits/s dupframe= 42 fps= 41 q=41.0 size= 256kB time=00:00:01.97 bitrate=1062.7kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 81 fps= 53 q=41.0 size= 768kB time=00:00:04.71 bitrate=1334.8kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 124 fps= 61 q=41.0 size= 1280kB time=00:00:06.10 bitrate=1717.1kbits/s duframe= 178 fps= 69 q=38.0 size= 1536kB time=00:00:07.96 bitrate=1579.9kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 235 fps= 76 q=41.0 size= 2048kB time=00:00:09.84 bitrate=1704.1kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 273 fps= 76 q=41.0 size= 2560kB time=00:00:11.12 bitrate=1885.5kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 309 fps= 75 q=41.0 size= 2816kB time=00:00:12.30 bitrate=1874.5kbits/s duframe= 354 fps= 77 q=41.0 size= 3328kB time=00:00:13.83 bitrate=1969.9kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 411 fps= 80 q=41.0 size= 3840kB time=00:00:15.72 bitrate=2001.1kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 479 fps= 85 q=41.0 size= 4096kB time=00:00:17.99 bitrate=1864.6kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d608de8100] Auto-inserting h264_mp4toannexb bitstream filter
frame= 515 fps= 84 q=41.0 size= 4608kB time=00:00:19.20 bitrate=1965.7kbits/s duframe= 549 fps= 81 q=41.0 size= 4864kB time=00:00:20.31 bitrate=1961.1kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d60c3e8d40] Auto-inserting h264_mp4toannexb bitstream filter
frame= 600 fps= 83 q=41.0 size= 5632kB time=00:00:22.03 bitrate=2093.7kbits/s du[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d60c3e8d40] Auto-inserting h264_mp4toannexb bitstream filter
frame= 648 fps= 83 q=41.0 size= 5888kB time=00:00:23.61 bitrate=2042.5kbits/s du[out#0/mp4 @ 000001d6061163c0] video:6385kB audio:335kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.377336%
frame= 724 fps= 86 q=-1.0 Lsize= 6746kB time=00:00:24.03 bitrate=2299.4kbits/s dup=6 drop=2 speed=2.86x
[libx264 @ 000001d6066fd380] frame I:12 Avg QP:26.96 size: 87427
[libx264 @ 000001d6066fd380] frame P:191 Avg QP:32.28 size: 15534
[libx264 @ 000001d6066fd380] frame B:521 Avg QP:35.40 size: 4840
[libx264 @ 000001d6066fd380] consecutive B-frames: 2.9% 2.8% 2.1% 92.3%
[libx264 @ 000001d6066fd380] mb I I16..4: 21.0% 56.5% 22.5%
[libx264 @ 000001d6066fd380] mb P I16..4: 1.9% 6.3% 1.0% P16..4: 25.0% 4.5% 2.2% 0.0% 0.0% skip:59.1%
[libx264 @ 000001d6066fd380] mb B I16..4: 0.2% 0.7% 0.1% B16..8: 24.4% 1.8% 0.2% direct: 0.3% skip:72.3% L0:46.0% L1:50.7% BI: 3.3%
[libx264 @ 000001d6066fd380] 8x8 transform intra:64.9% inter:79.1%
[libx264 @ 000001d6066fd380] coded y,uvDC,uvAC intra: 42.4% 26.9% 3.0% inter: 3.7% 0.9% 0.0%
[libx264 @ 000001d6066fd380] i16 v,h,dc,p: 25% 28% 12% 35%
[libx264 @ 000001d6066fd380] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 18% 23% 5% 6% 6% 
 6% 6% 6%
[libx264 @ 000001d6066fd380] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 21% 19% 5% 6% 6% 
 7% 5% 5%
[libx264 @ 000001d6066fd380] i8c dc,h,v,p: 71% 13% 13% 4%
[libx264 @ 000001d6066fd380] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001d6066fd380] ref P L0: 68.7% 17.8% 13.4%
[libx264 @ 000001d6066fd380] ref B L0: 88.4% 9.1% 2.5%
[libx264 @ 000001d6066fd380] ref B L1: 96.9% 3.1%
[libx264 @ 000001d6066fd380] kb/s:2167.24
[aac @ 000001d606184b40] Qavg: 346.828



UPDATE : I am thinking that the way I am converting my files from .mov to .mp4 is the problem. Please suggest the best way to convert from iPhone 4k 60fps .mov files to nice 1080p 30fps .mp4 files. I know I could just use handbrake but I am trying to be a man here xD. Perhaps handbrake has a
View ffmpeg code for conversion
.

UPDATE 2 : re-encoding the videos before concat with
-c:v libx264
fixes the problem... which seems weird because that is how they were originally encoded...

def join_broll(video_paths, desired_length, clip_length=None, output_path="quick_clips.mp4", preserve_inputs=True):
 subclips = []
 total_duration = 0

 temp_textfile = os.path.join(run_folder, "broll_subclips.txt")
 j = 0
 with open(temp_textfile, "w") as file:
 while True:
 for i, video_path in enumerate(video_paths):

 time_left = desired_length - total_duration
 video_duration = duration_of(video_path)
 subclip_path = f"subclip_{i+j}.mp4"

 if (not clip_length and video_duration < time_left) or (clip_length and clip_length < time_left):

 if clip_length:

 subclips.append(subclip_path)
 subprocess.run(["ffmpeg", "-y", "-i", video_path, "-t", str(clip_length), "-c:v", "libx264", subclip_path]) # added "-c:v libx264"
 total_duration += clip_length
 file.write(f"file '{os.path.join('..', subclip_path)}'\n")

 else:
 
 subclips.append(subclip_path)
 subprocess.run(["ffmpeg", "-y", "-i", video_path, "-c:v", "libx264", subclip_path]) # added "-c:v libx264"
 total_duration += video_duration
 file.write(f"file '{subclip_path}'\n")

 else:

 subclips.append(subclip_path)
 subprocess.run(["ffmpeg", "-y", "-i", video_path, "-t", str(time_left), "-c:v", "libx264", subclip_path]) # added "-c:v libx264"
 total_duration += time_left
 file.write(f"file '{os.path.join('..', subclip_path)}'\n")

 break

 j += 1
 if desired_length - total_duration < 0.1:
 break
 

 subprocess.run(["ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", temp_textfile, "-c", "copy", output_path])
 # subprocess.run(["ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", temp_textfile, "-r", "30", "-c:v", "libx264", "-c:a", "aac", output_path], check=True)
 return output_path



-
getting 2 video streams in output.mkv ?
3 janvier 2024, par KiritoIn short, I have 1 video.mkv and 1 subtitle.ass. Using ffmpeg, I am adding subtitles to the video without removing the previous subtitles that came with the video. The problem is that some videos' output.mkv files are getting a duplicate video stream. Not all the videos I tested have this issue. I have added the log of one of those for reference.


Here is my code :


ffmpeg -i input_video.mkv -i subtitle_path.ass -c:v copy -c:a copy -c:s copy -map 0:v:0
 -map 0:m:language:jpn -map 0:s -map 1 -metadata:s:s:3 language=ara -max_interleave_delta 0 -y output_path.mkv



\TEST> ffmpeg -i input_video.mkv -i subtitle_path.ass -c:v copy -c:a copy -c:s copy -map 0:v:0 -map 0:m:language:jpn -map 0:s -map 1 -metadata:s:s:3 language=ara -max_interleave_delta 0 -y output_path.mkv
ffmpeg version 2023-12-28-git-c1340f3439-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 36.100 / 58. 36.100
 libavcodec 60. 36.100 / 60. 36.100
 libavformat 60. 20.100 / 60. 20.100
 libavdevice 60. 4.100 / 60. 4.100
 libavfilter 9. 14.102 / 9. 14.102
 libswscale 7. 6.100 / 7. 6.100
 libswresample 4. 13.100 / 4. 13.100
 libpostproc 57. 4.100 / 57. 4.100
Input #0, matroska,webm, from 'input_video.mkv':
 Metadata:
 encoder : libebml v1.3.5 + libmatroska v1.4.8
 creation_time : 2018-04-21T21:21:39.000000Z
 Duration: 00:24:26.56, start: 0.000000, bitrate: 2453 kb/s
 Stream #0:0(jpn): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
 Metadata:
 BPS-eng : 2291326
 DURATION-eng : 00:24:26.465000000
 NUMBER_OF_FRAMES-eng: 35160
 NUMBER_OF_BYTES-eng: 420018724
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:1(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
 Metadata:
 BPS-eng : 159375
 DURATION-eng : 00:24:26.560000000
 NUMBER_OF_FRAMES-eng: 68745
 NUMBER_OF_BYTES-eng: 29216626
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:2(eng): Subtitle: ass (default)
 Metadata:
 BPS-eng : 99
 DURATION-eng : 00:21:35.870000000
 NUMBER_OF_FRAMES-eng: 302
 NUMBER_OF_BYTES-eng: 16109
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:3(spa): Subtitle: ass
 Metadata:
 BPS-eng : 92
 DURATION-eng : 00:20:05.580000000
 NUMBER_OF_FRAMES-eng: 254
 NUMBER_OF_BYTES-eng: 13877
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:4(por): Subtitle: ass
 Metadata:
 BPS-eng : 91
 DURATION-eng : 00:20:05.580000000
 NUMBER_OF_FRAMES-eng: 254
 NUMBER_OF_BYTES-eng: 13846
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Input #1, ass, from 'subtitle_path.ass':
 Duration: N/A, bitrate: N/A
 Stream #1:0: Subtitle: ass
Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:0 -> #0:1 (copy)
 Stream #0:1 -> #0:2 (copy)
 Stream #0:2 -> #0:3 (copy)
 Stream #0:3 -> #0:4 (copy)
 Stream #0:4 -> #0:5 (copy)
 Stream #1:0 -> #0:6 (copy)
Output #0, matroska, to 'output_path.mkv':
 Metadata:
 encoder : Lavf60.20.100
 Stream #0:0(jpn): Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn (default)
 Metadata:
 BPS-eng : 2291326
 DURATION-eng : 00:24:26.465000000
 NUMBER_OF_FRAMES-eng: 35160
 NUMBER_OF_BYTES-eng: 420018724
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:1(jpn): Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 1k tbn (default)
 Metadata:
 BPS-eng : 2291326
 DURATION-eng : 00:24:26.465000000
 NUMBER_OF_FRAMES-eng: 35160
 NUMBER_OF_BYTES-eng: 420018724
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:2(jpn): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp (default)
 Metadata:
 BPS-eng : 159375
 DURATION-eng : 00:24:26.560000000
 NUMBER_OF_FRAMES-eng: 68745
 NUMBER_OF_BYTES-eng: 29216626
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:3(eng): Subtitle: ass (default)
 Metadata:
 BPS-eng : 99
 DURATION-eng : 00:21:35.870000000
 NUMBER_OF_FRAMES-eng: 302
 NUMBER_OF_BYTES-eng: 16109
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:4(spa): Subtitle: ass
 Metadata:
 BPS-eng : 92
 DURATION-eng : 00:20:05.580000000
 NUMBER_OF_FRAMES-eng: 254
 NUMBER_OF_BYTES-eng: 13877
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:5(por): Subtitle: ass
 Metadata:
 BPS-eng : 91
 DURATION-eng : 00:20:05.580000000
 NUMBER_OF_FRAMES-eng: 254
 NUMBER_OF_BYTES-eng: 13846
 _STATISTICS_WRITING_APP-eng: mkvmerge v22.0.0 ('At The End Of The World') 32-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2018-04-21 21:21:39
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:6(ara): Subtitle: ass
Press [q] to stop, [?] for help
[out#0/matroska @ 000002995bf18bc0] video:820349kB audio:28532kB subtitle:65kB other streams:0kB global headers:5kB muxing overhead: 0.122471%
size= 849986kB time=00:23:40.86 bitrate=4900.6kbits/s speed= 326x



I am very Clueless as the command is working on some videos


-
Sporadic "Error parsing Cues... Operation not permitted" errors when trying to generate a DASH manifest
22 novembre 2023, par kshetlineI have already-generated .webm audio and video files (1 audio, 3 video resolutions for each video I want to stream). The video has been generated not (directly) by ffmpeg, but HandbrakeCLI 1.7.0, with V9 encoding. The audio (which has never caused an error) is generated by ffmpeg using libvorbis.


Most of the time ffmpeg (version 6.1) creates a manifest without any problem. Sporadically, however, "Error parsing Cues" comes up (frequently with the latest videos I've been trying to process) and I can't create a manifest. Since this is happening during an automated process to process many videos for streaming, the audio and video sources are being created exactly the same way whether ffmpeg succeeds or fails in generating a manifest, making this all the more confusing.


The video files ffmpeg chokes on play perfectly well using VLC, and mediainfo doesn't show any problems with these files.


Here's the way I've been (sometimes successfully, sometimes not) generating a manifest, with extra logging added :


ffmpeg -v 9 -loglevel 99 \
 -f webm_dash_manifest -i '.\Sample Video.v480.webm' \
 -f webm_dash_manifest -i '.\Sample Video.v720.webm' \
 -f webm_dash_manifest -i '.\Sample Video.v1080.webm' \
 -f webm_dash_manifest -i '.\Sample Video.audio.webm' \
 -c copy -map 0 -map 1 -map 2 -map 3 \
 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1,2 id=1,streams=3" \
 '.\Sample Video.mpd'



Here's the result when it fails :


ffmpeg version 6.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 29.100 / 58. 29.100
 libavcodec 60. 31.102 / 60. 31.102
 libavformat 60. 16.100 / 60. 16.100
 libavdevice 60. 3.100 / 60. 3.100
 libavfilter 9. 12.100 / 9. 12.100
 libswscale 7. 5.100 / 7. 5.100
 libswresample 4. 12.100 / 4. 12.100
 libpostproc 57. 3.100 / 57. 3.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v480.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v720.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.v1080.webm'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-i' ... matched as output url with argument '.\Sample Video.audio.webm'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '3'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'webm_dash_manifest'.
Reading option '-adaptation_sets' ... matched as AVOption 'adaptation_sets' with argument 'id=0,streams=0,1,2 id=1,streams=3'.
Reading option '.\Sample Video.mpd' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url .\Sample Video.v480.webm.
Applying option f (force format) with argument webm_dash_manifest.
Successfully parsed a group of options.
Opening an input file: .\Sample Video.v480.webm.
[webm_dash_manifest @ 000002bbcb41dc80] Opening '.\Sample Video.v480.webm' for reading
[file @ 000002bbcb41e300] Setting default whitelist 'file,crypto,data'
st:0 removing common factor 1000000 from timebase
[webm_dash_manifest @ 000002bbcb41dc80] Error parsing Cues
[AVIOContext @ 000002bbcb41e5c0] Statistics: 102283 bytes read, 4 seeks
[in#0 @ 000002bbcb41dac0] Error opening input: Operation not permitted
Error opening input file .\Sample Video.v480.webm.
Error opening input files: Operation not permitted



This is
mediainfo
for the offending input file, Sample Video.v480.webm :

General
Complete name : .\Sample Video.v480.webm
Format : WebM
Format version : Version 2
File size : 628 MiB
Duration : 1 h 34 min
Overall bit rate : 926 kb/s
Frame rate : 23.976 FPS
Encoded date : 2023-11-21 16:48:35 UTC
Writing application : HandBrake 1.7.0 2023111500
Writing library : Lavf60.16.100

Video
ID : 1
Format : VP9
Format profile : 0
Codec ID : V_VP9
Duration : 1 h 34 min
Bit rate : 882 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.106
Stream size : 598 MiB (95%)
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709



I don't know if I need different command line options, or whether this might be an ffmpeg or Handbrake bug. It has taken many, many hours to generate these video files (VP9 is painfully slow to encode), so I hate to do a lot of this over again, especially doing it again encoding the video with ffmpeg instead of Handbrake, as Handbrake is (oddly enough, considering it uses ffmpeg under the hood) noticeably faster.


I have no idea what these "Cues" are that ffmpeg wants and can't parse, or how I would change them.