[FFmpeg-user] Current time for name of file out, is it possible ?

Stanislas DEFAWES sdefawes at ina.fr
Fri Sep 13 10:10:10 CEST 2013


Thanks for your answer,

No i'm on Mac OS X.8 and ffmpeg 2.0.7.
I know it's possible to do that if you don't use -segment option :

ffmpeg -i udp://239.224.224.2:1234   -acodec copy -vcodec copy -map 0 -f mpegts -t 60 /Users/stan/Desktop/Capture_FR2/out_`date +%T`.mpg

But this syntax don't work with the option -segment… 

Le 13 sept. 2013 à 08:08, Francois Visagie <francois.visagie at gmail.com> a écrit :

>> -----Original Message-----
>> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
>> bounces at ffmpeg.org] On Behalf Of Stanislas DEFAWES
>> Sent: 12 September 2013 17:09
>> To: FFmpeg user questions
>> Subject: [FFmpeg-user] Current time for name of file out, is it possible ?
>> 
>> Hello,
>> Is it possible to give current time for name of the file out when using
> format -
>> segment ?
>> 
>> for exemple :
>> 
>> ffmpeg -i udp://239.224.224.2:1234   -acodec copy -vcodec copy -map 0 -f
>> segment -segment_time 3600 -segment_format mpegts
>> /Users/toto/Desktop/Capture_CURRENT_TIME.mpg
> 
> You don't say on which operating system you're working, but I guess that
> looks like a Windows command line. In that case you can use the %TIME%
> environment variable. However, you'll have to remove the colon delimiter ':'
> using perhaps the for command (do for /? to see syntax), or perhaps the set
> command's environment variable substitution, e.g. %PATH:str1=str2%.
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list