Microsoft sendt til tælling af WannaCrypt?

Så lykkedes det endnu engang for Microsoft at være medårsag til at man skal fravælge propraitere operativ systemer ved selv at være udsatte for WannaCrypt og ikke have styr på IT sikkerheden, men allene fokusere på at høste folks privatliv og firmaers data, på fod med Google og facebook.

Konklusion: Eller som Microsoft retteligt burde have skrevet i deres “Microsoft solution available to protect additional products” Updater til et Linux eller Unix system som stadigt sætter private data og IT sikkerhed højt.

Posted on

Reload windows Enviroment Variables whitout restart

Hvordan kan man dog reloade Whitdows System Enviroments Variable uden at skulle genstarte eller logge ud og logge ind, og hvorfor skulle man dog dette. Jo det er jo smart hvis man gerne vil teste Variablerne man har tilføjet for at teste om FFmpeg nu virker efter man har installere fra “FFmpeg for Windows” og synes det kunne være dejligt kun at skulle taste “ffmpeg -i input.avi output.mp4” fordi man er misundelig på Linux brugerne.

Men for at kunne reloaded “Enviroment Variables” skal der bruges to scripts 1 .vbs og en .bat

I resetvars.vbs scriptet skal du putte følgende kode

Set oShell = WScript.CreateObject("WScript.Shell")
filename = oShell.ExpandEnvironmentStrings("%TEMP%\resetvars.bat")
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set oFile = objFileSystem.CreateTextFile(filename, TRUE)

set oEnv=oShell.Environment("System")
for each sitem in oEnv 
    oFile.WriteLine("SET " & sitem)
path = oEnv("PATH")

set oEnv=oShell.Environment("User")
for each sitem in oEnv 
    oFile.WriteLine("SET " & sitem)

path = path & ";" & oEnv("PATH")
oFile.WriteLine("SET PATH=" & path)

I det andet script (resetvars.bat filen) skal du putte følgende kode

call "%TEMP%\resetvars.bat"

Nu skal du så eksekvere resetvars.bat for at genindlæse dine “Enviroment Variables”, og du kan gemme disse filer hvor du har lyst, eneste er at de skal ligge i samme folder

PS: Koden der skal tilføjes til “Enviroment Variables” for FFmpeg er ;C:\ffmpeg\bin i slutningen af “Path”

Posted on

FFMPEG combine or merge several video into one video (Concatenating media files)

If you have several videos that you need to combine into one video, here is a couple of tricks. tested with ffmpeg version N-71718-gfa2d3b6-syslint

Option one fx combine dvd files .vob into a mp4

This example combines two vob files because the movie was split into several vobs.

ffmpeg -i "concat:/media/dvd/VIDEO_TS/VTS_01_1.VOB|/media/dvd/VIDEO_TS/VTS_01_2.VOB" -acodec libfaac -aq 100 -ac 2 -vcodec libx264 -vpre slow -crf 24 -threads 0 output.mp4

Option two

Create a file mylist.txt with all the files you want to have concatenated in the following form (lines starting with a # are ignored):

# this is a comment
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

Note that these can be either relative or absolute paths. Then you can stream copy or re-encode your files:

ffmpeg -f concat -i mylist.txt -c copy output

It is possible to generate this list file with a bash for loop, or using printf. Either of the following would generate a list file containing every *.wav in the working directory:

# with a bash for loop
for f in ./*.wav; do echo "file '$f'" >> mylist.txt; done
# or with printf
printf "file '%s'\n" ./*.wav > mylist.txt

If your shell supports process substitution (like Bash and Zsh), you can avoid explicitly creating a list file and do the whole thing in a single line. This would be impossible with the concat protocol (see below). Make sure to generate absolute paths here, since ffmpeg will resolve paths relative to the list file your shell may create in a directory such as “/proc/self/fd/”.

ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$PWD/$f'"; done) -c copy output.wav
ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" ./*.wav) -c copy output.wav
ffmpeg -f concat -i <(find . -name '*.wav' -printf "file '$PWD/%p'\n") -c copy output.wav

You can also loop a video. This example will loop input.mkv 10 times:

for i in {1..10}; do printf "file '%s'\n" input.mkv >> mylist.txt; done
ffmpeg -f concat -i mylist.txt -c copy output.mkv

Concat protocol

While the demuxer works at the stream level, the concat protocol works at the file level. Certain files (mpg and mpeg transport streams, possibly others) can be concatenated. This is analogous to using cat on UNIX-like systems or copy on Windows.


ffmpeg -i "concat:input1.mpg|input2.mpg|input3.mpg" -c copy output.mpg

If you have MP4 files, these could be losslessly concatenated by first transcoding them to mpeg transport streams. With h.264 video and AAC audio, the following can be used:

ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4

If you’re using a system that supports named pipes, you can use those to avoid creating intermediate files – this sends stderr (which ffmpeg sends all the written data to) to /dev/null, to avoid cluttering up the command-line:

mkfifo temp1 temp2
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp1 2> /dev/null & \
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts temp2 2> /dev/null & \
ffmpeg -f mpegts -i "concat:temp1|temp2" -c copy -bsf:a aac_adtstoasc output.mp4

All MPEG codecs (H.264, MPEG4/divx/xvid, MPEG2; MP2, MP3, AAC) are supported in the mpegts container format, though the commands above would require some alteration (the -bsf bitstream filters will have to be changed).

Sources: and

Posted on