
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 (56)
-
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 (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
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 (6328)
-
RTSP Stream Recording using FFMPEG
9 juillet 2022, par Shanavas K Abdul RahmanI am not in to scripting. It would be really helpful if someone can help with a bash or python script on Raspbian v5 for my below requirement.


I am trying to locally record
Eufy
Cam human detection usingffmpeg
. I have managed to find the command to fetch the stream which isffmpeg -hide_banner -y -loglevel verbose -rtsp_transport tcp -use_wallclock_as_timestamps 1 -i rtsp://192.168.xx.xx/live0 -vcodec copy -acodec copy -f segment -reset_timestamps 1 -segment_time 900 -segment_format mkv -strftime 1 "/media/pi/hdd/cam_name/camname$(date +"%Y-%m-%d-%H-%M-%S").mkv
.

Since these are battery operated cameras I cannot stream continuously. Camera generates stream only when it detects human as per my camera configuration. So when there is no human presence,
ffmpeg
return error "404 Stream Not Found" which is expected result. I wantffmpeg
to reattempt in endless loop if previous attempts returns error404 Stream Not Foun
d.

When human presence is detected, stream is being recorded to the mentioned location which works well. I need ffmpeg to reconnect even after successful stream fetch to seek for next motion recording. Successful stream download ends as follows.


No more output streams to write to, finishing.


:04.26 bitrate=N/A speed=0.559x 
[segment @ 0x2172d60] segment:'/media/pi/hdd/cam_name/camname2022-07-09-11-13-29.mkv' count:0 ended
[AVIOContext @ 0x2143630] Statistics: 16 seeks, 13 writeouts
frame= 31 fps=4.1 q=-1.0 Lsize=N/A time=00:00:04.26 bitrate=N/A speed=0.559x 
video:359kB audio:8kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (rtsp://192.168.100.16/live0):
 Input stream #0:0 (video): 34 packets read (373534 bytes); 
 Input stream #0:1 (audio): 42 packets read (7884 bytes); 
 Total: 76 packets (381418 bytes) demuxed
Output file #0 (/media/pi/Extreme 900/Gate_View/GateView2022-07-09-11-13-29.mkv):
 Output stream #0:0 (video): 31 packets muxed (367940 bytes); 
 Output stream #0:1 (audio): 42 packets muxed (7884 bytes); 
 Total: 73 packets (375824 bytes) muxed



In summary, I am looking for a script with below conditions.


IF terminal returns
404 Stream Not Found" OR "packets muxed
THEN repeat same command in endless loop.

I have several battery operated cameras. Please help with script.


Thanks in advance.


Regards,


Shanavas Abdulrahman


-
Creating iPhone compatible video with ffmpeg from an image and MP3 file
22 février 2020, par GracieI have the following command that I have used to create an MP4 video file from an image and an MP3 file, it plays fine in a Chrome browser on desktop and on an Android phone - but it doesn’t work on an iPhone 10. Do I need some extra codec or setting to make this compatible for iPhone ? Should I be converting this into a MPEG file instead for wider compatibility ?
ffmpeg -loop 1 -i 6f4aa5dfefc4dd32186f41315ad9d1e2-0.png -i "music.mp3" -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest aa-image0.mp4
Here are the ffprobe details for the input MP3 file used to create the MP4 video and also the ffprobe for that output file :
Input #0, wav, from 'download0.mp3':
Duration: 00:00:35.94, bitrate: 384 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, 1 channels, s16, 384 kb/sInput #0, mov,mp4,m4a,3gp,3g2,mj2, from 'aa-image0.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.22.100
Duration: 00:00:38.76, start: 0.000000, bitrate: 505 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2664x1498 [SAR 1:1 DAR 1332:749], 367 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 138 kb/s (default)
Metadata:
handler_name : SoundHandlerThe video seems to play on the iPhone, but the audio seems to start/stop constantly. Like it is a streaming issue (even though it is not). Maybe an MP3 encoding issue when I created the video ?
Here are the test files I have used and created (any iPhone users will likely find the MP4 will not play the audio in the video properly) :
https://ffmpeg-iphone-issue.netlify.com/tesla.jpg
https://ffmpeg-iphone-issue.netlify.com/tesla.mp3
https://ffmpeg-iphone-issue.netlify.com/tesla.mp4 (OUTPUT - Created from the 2 files above)
In summary, two FFmpeg commands are required :
1) Used to create iPhone/iOS compatible videos in FFmpeg from an image and MP3 (A slight modification to the command at the top of the page)
and
2) An FFmpeg command that could be used to fix or re-encode the video above so that it works on iPhone (A new command incorporating the parts so it works with iPhone and then to rebuild and fix the "broken" video. In a similar fashion to this video where he fixes a broken video https://www.youtube.com/watch?v=2FhmbKKh6mc [command in Youtube description])
-
Replace Special Characters In Batch-File Variable Feeding ffmpeg program
14 janvier 2019, par whereswallerI am attempting to write a batch-file that leverages
ffmpeg.exe
to convert all files in a folder structure to mp3 format (specifically 128 KBps).My batch-file is presently unable to process filenames (constructed by concatenating the
%_SOURCE%
and%%~F
variables) containing certain special characters generating the following errors :No such file or directory
…
ellipsis sign–
en dash—
em dash−
minus sign
Invalid argument
‘
and’
curved single quotation marks“
and”
curved double quotation marks
Invalid argument (yet sometimes passes depending on where symbol is in the filename, for example, seems to work if placed between the
n
andt
ofDont
inC:\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Dont Love Me.mp3
)-
hyphen!
exclamation mark~
tilde'
non-curved single quotation mark=
equals sign+
plus sign%
percentage sign(
open bracket
How can I modify my batch-file script so that the
%%~F
variable escapes these characters correctly ?Example current filename input :
C:\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Don't Love Me.mp3
Example desired filename input :
C:\Users\Test\Documents\Input\Peter Bjorn And John - I Know You Don"^'"t Love Me.mp3
Script (see line beginning
C:\ffmpeg\bin\ffmpeg.exe
) :@echo off
setlocal EnableExtensions DisableDelayedExpansion
rem // Define constants here:
set "_SOURCE=C:\Users\Test\Documents\Input" & rem // (absolute source path)
set "_TARGET=C:\Users\Test\Documents\Output" & rem // (absolute target path)
set "_PATTERN=*.*" & rem // (pure file pattern for input files)
set "_FILEEXT=.mp3" & rem // (pure file extension of output files)
pushd "%_TARGET%" || exit /B 1
for /F "delims=" %%F in ('
cd /D "%_SOURCE%" ^&^& ^(rem/ list but do not copy: ^
^& xcopy /L /S /Y /I ".\%_PATTERN%" "%_TARGET%" ^
^| find ".\" ^& rem/ remove summary line;
^)
') do (
2> nul mkdir "%%~dpF."
rem // Set up the correct `ffmpeg` command line here:
set "FFREPORT=file=C\:\\Users\\Test\\Documents\\Output\\ffreport-%%~F.log:level=32"
"C:\ffmpeg\bin\ffmpeg.exe" -report -n -i "%_SOURCE%\%%~F" -vn -c:a libmp3lame -b:a 128k "%%~dpnF%_FILEEXT%"
if not errorlevel 1 if exist "%%~dpnF%_FILEEXT%" del /f /q "%_SOURCE%\%%~F"
)
popd
endlocal
pause