
Recherche avancée
Autres articles (64)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ) (...)
Sur d’autres sites (12312)
-
batch scripting help passing arguments to ffmpeg
20 octobre 2022, par notsolowkiI need to join some videos parts together into 1 part. Im working from a folder called series. series contains multiple subfolder 1,2,3,4 etc that represent video number. each sub folder contains the parts to be joined together.


I made a batch script that seems to be able to make a list of sub directories and make a list of sub directory contents,


however run i run the script and try to pass the information from "mylist" line by line to ffmpeg it dont seem to work it complains invalid input information detected.


I intended for the batch script to start at folder 1 and pass the file names from "mylist.txt" to ffmpeg input 1 by one untill the last folder in folderlist.txt is processed.


What am i doing wrong. how can i make this script work ?


:: Create File List
for /D %%G in ("%cd%\*")DO ( 

for %%i in ("%%~nxG"\*.mp4) do echo file '%%i'>> mylist.txt
echo %%~nxG >> folderlist.txt

)

:: Concatenate Files
::for /F "delims=" %%a in (mylist.txt) do (
ffmpeg -f concat -safe 0 -i %%a -c copy %%a.mp4
::)
pause
@echo off


pause



the error i get when i run it from ffmpeg after running the batch is,


C:\Users\Laptop\Desktop\t10>(ffmpeg -f concat -safe 0 -i "file '4\Tosh.0 April 17 2018 10 1004 April 17 2018 - Ticket Girl Act 1.mp4'" -c copy file '4\Tosh.0 April 17 2018 10 1004 April 17 2018 - Ticket Girl Act 1.mp4'.mp4 )
ffmpeg version 2022-10-06-git-2c2aaa5bd0-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12.1.0 (Rev2, 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-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-libmfx --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-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 57. 39.100 / 57. 39.100
 libavcodec 59. 50.100 / 59. 50.100
 libavformat 59. 34.100 / 59. 34.100
 libavdevice 59. 8.101 / 59. 8.101
 libavfilter 8. 49.101 / 8. 49.101
 libswscale 6. 8.112 / 6. 8.112
 libswresample 4. 9.100 / 4. 9.100
 libpostproc 56. 7.100 / 56. 7.100
file '4\Tosh.0 April 17 2018 10 1004 April 17 2018 - Ticket Girl Act 1.mp4': No such file or directory



-
FFMPEG fails with seeking params before input on AWS Lambda
18 janvier 2023, par Rashid GoshtasbiI am trying to run the following command on AWS Lambda that has FFMPEG layer but it fails with a SIGSEGV. The FFMPEG process starts working fine until it reaches the segment's it wants to get.


/opt/ffmpeglib/ffmpeg -ss 00:02:00 -t 30 -i https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8 /tmp/out.aac -y



Note : The url is a sample url for this sharing


What this is doing : It will seek 2 minutes into the stream url, then capture the next 30 seconds into an out.aac file. When I run this locally, it works fine. When I run this on Lambda, it ends abruptly when reading the segments that are in the time frame I want (from 2:00min to 2:30 min).


FFMPEG will skip the frames if I put the -ss 00:02:00 -t 30 before the -i which they state is faster. If i put it after the -i, it works, but of course, it's a bit slower.


Example working command :


/opt/ffmpeglib/ffmpeg -i https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8 -ss 00:02:00 -t 30 /tmp/out.aac -y



Wondering if anyone knows a way to run this on Lambda. Thank you.


Note : I have tried this on Python and Javascript. Tried also making child processes with Javascript and no luck. I also added -nostdin and piped stdin/out to dev null but nothing.


Thanks.


Example of me running locally :


~/D/build [1]$ ffmpeg -ss 00:02:00 -t 30 -i https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8 /tmp/out.aac -y 14:56:13
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.102)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --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-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --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-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa_audio_1_stereo_128000.m3u8' for reading
[hls @ 0x122f05250] Skip ('#EXT-X-VERSION:3')
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_0.ts' for reading
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_1.ts' for reading
Input #0, hls, from 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa-audio-only.m3u8':
 Duration: 00:03:31.43, start: 0.000000, bitrate: 0 kb/s
 Program 0 
 Metadata:
 variant_bitrate : 128000
 Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
 Metadata:
 variant_bitrate : 128000
Stream mapping:
 Stream #0:0 -> #0:0 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_30.ts' for reading
[hls @ 0x122f05250] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_31.ts' for reading
Output #0, adts, to '/tmp/out.aac':
 Metadata:
 encoder : Lavf59.27.100
 Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 variant_bitrate : 128000
 encoder : Lavc59.37.100 aac
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_32.ts' for reading
[https @ 0x124038800] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_33.ts' for reading
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_34.ts' for reading
[https @ 0x124038800] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_35.ts' for reading
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_36.ts' for reading
[https @ 0x124038800] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_37.ts' for reading
[https @ 0x12001c600] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_38.ts' for reading
size= 486kB time=00:00:30.01 bitrate= 132.8kbits/s speed=10.7x 
video:0kB audio:477kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.018663%



It doesn't do anything after this line via the lambda console logs :


[hls @ 0x72faa80] Opening 'https://cdn.bitmovin.com/content/assets/art-of-motion-dash-hls-progressive/audio/1_stereo_128000/hls/segment_0.ts' for reading



-
streaming data with ffmpeg using pipe - freeze after few seconds
13 octobre 2022, par tamirgIm fetching some video data, and trying to stream it using ffmpeg.
what i do is create an ffmpeg process, set it to get info from '-', and then when i fetch the video data i write it to the process STDIN.


My problem is that its working, but only working for around 3 seconds, then the stream stops, and there are no longer any logs from ffmpeg.


Im running ffmpeg with log level debug, and it seems to parse the data ok, which i guess thats why it works for 3 seconds, but then the ffmpeg stops printing any more logs.


I dont want to attach all the logs because its too much, but ill write the main parts.
Maybe the ffmpeg process is missing some arguments ?


It starts with :


Clipping frame in rate conversion by 0.000008
2022-10-13T09:16:53.535546194Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)
2022-10-13T09:16:53.535987546Z Last message repeated 2 times
2022-10-13T09:16:53.536012520Z [hevc @ 0x55f4e8798100] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.537017901Z [hevc @ 0x55f4e86eeb80] Decoded frame with POC 0.
2022-10-13T09:16:53.538652961Z [hevc @ 0x55f4e8798100] Output frame with POC 8.
2022-10-13T09:16:53.538782714Z [hevc @ 0x55f4e8789c00] Decoded frame with POC 1.
2022-10-13T09:16:53.540362322Z [hevc @ 0x55f4e8773500] Decoded frame with POC 2.
2022-10-13T09:16:53.540989229Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)
2022-10-13T09:16:53.541118680Z Last message repeated 1 times
2022-10-13T09:16:53.541161109Z [hevc @ 0x55f4e86eeb80] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.542663730Z [hevc @ 0x55f4e86eeb80] Output frame with POC 9.
2022-10-13T09:16:53.544954074Z [hevc @ 0x55f4e8783e80] Decoded frame with POC 3.
2022-10-13T09:16:53.545102776Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)
2022-10-13T09:16:53.545165406Z Last message repeated 2 times
2022-10-13T09:16:53.545175969Z [hevc @ 0x55f4e8789c00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.546742754Z [hevc @ 0x55f4e8789c00] Output frame with POC 10.
2022-10-13T09:16:53.547695241Z [hevc @ 0x55f4e8877c40] Decoded frame with POC 4.
2022-10-13T09:16:53.549347290Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)



then :


2022-10-13T09:16:53.828180084Z cur_dts is invalid (this is harmless if it occurs once at the start per stream)

2022-10-13T09:16:53.831843061Z Last message repeated 2 times
2022-10-13T09:16:53.831902903Z [hevc @ 0x55f4e88984c0] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.831909160Z [hevc @ 0x55f4e88984c0] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.831912827Z [hevc @ 0x55f4e88984c0] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.832173968Z [hevc @ 0x55f4e88984c0] nal_unit_type: 19(IDR_W_RADL), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.832309139Z [hevc @ 0x55f4e88984c0] Decoding VPS
2022-10-13T09:16:53.832324955Z [hevc @ 0x55f4e88984c0] Main profile bitstream
2022-10-13T09:16:53.832651015Z [hevc @ 0x55f4e88984c0] Decoding SPS
2022-10-13T09:16:53.832730623Z [hevc @ 0x55f4e88984c0] Main profile bitstream
2022-10-13T09:16:53.832785521Z [hevc @ 0x55f4e88984c0] Decoding VUI
2022-10-13T09:16:53.832833202Z [hevc @ 0x55f4e88984c0] Decoding PPS
2022-10-13T09:16:53.833112865Z [hevc @ 0x55f4e88984c0] Output frame with POC 0.
2022-10-13T09:16:53.835713007Z [hevc @ 0x55f4e8888080] Decoded frame with POC 59.
2022-10-13T09:16:53.836572581Z [libx264 @ 0x55f4e8794800] frame= 0 QP=44.23 NAL=3 Slice:I Poc:0 I:14400 P:0 SKIP:0 size=41597 bytes
2022-10-13T09:16:53.836783822Z [rtp @ 0x55f4eaa75fc0] Sending NAL 7 of len 24 M=0
2022-10-13T09:16:53.836805582Z [rtp @ 0x55f4eaa75fc0] Sending NAL 8 of len 4 M=0
2022-10-13T09:16:53.836809885Z [rtp @ 0x55f4eaa75fc0] Sending NAL 6 of len 642 M=0
2022-10-13T09:16:53.836830503Z [rtp @ 0x55f4eaa75fc0] Sending NAL 5 of len 40913 M=1
2022-10-13T09:16:53.836836082Z [rtp @ 0x55f4eaa75fc0] NAL size 40913 > 1460
2022-10-13T09:16:53.837084718Z [hevc @ 0x55f4e88a8900] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.837193504Z [hevc @ 0x55f4e88a8900] Output frame with POC 1.
2022-10-13T09:16:53.844457060Z [libx264 @ 0x55f4e8794800] frame= 1 QP=48.02 NAL=2 Slice:P Poc:2 I:16 P:655 SKIP:13729 size=1459 bytes
2022-10-13T09:16:53.844621824Z [rtp @ 0x55f4eaa75fc0] Sending NAL 1 of len 1455 M=1
2022-10-13T09:16:53.844680058Z [hevc @ 0x55f4e8798100] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:53.844749212Z [hevc @ 0x55f4e8798100] Output frame with POC 2.
2022-10-13T09:16:53.851913353Z [libx264 @ 0x55f4e8794800] frame= 2 QP=44.00 NAL=2 Slice:P Poc:4 I:0 P:11 SKIP:14389 size=48 bytes



and finally the last logs are those, and afterwards i don't get anymore logs :


2022-10-13T09:16:56.836957083Z [NULL @ 0x55f4e86e7a00] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:56.837158270Z [hevc @ 0x55f4e8773500] nal_unit_type: 1(TRAIL_R), nuh_layer_id: 0, temporal_id: 0
2022-10-13T09:16:56.837355973Z [hevc @ 0x55f4e8773500] Output frame with POC 59.
2022-10-13T09:16:56.837935475Z [hevc @ 0x55f4e86eeb80] Decoded frame with POC 57.
2022-10-13T09:16:56.840799210Z [hevc @ 0x55f4e8789c00] Decoded frame with POC 58.
2022-10-13T09:16:56.842434529Z [libx264 @ 0x55f4e8794800] frame= 59 QP=33.00 NAL=2 Slice:P Poc:118 I:11 P:952 SKIP:13437 size=5251 bytes
2022-10-13T09:16:56.842472226Z [rtp @ 0x55f4eaa75fc0] Sending NAL 1 of len 5247 M=1
2022-10-13T09:16:56.842478464Z [rtp @ 0x55f4eaa75fc0] NAL size 5247 > 1460
2022-10-13T09:16:56.846625001Z [hevc @ 0x55f4e8773500] Decoded frame with POC 59.