Invert regexreplace result?
Posted: 02 Sep 2011 19:12
Hi,
I have a text file that is filled with a ffmpeg output of a simple
Many lines but I'm only interested in the resolution of the video file.
A few lines to demonstrate it:
The interesting part is the 1280x528.
It isn't hard to find via a regexp:
but the problem is, how do I throw anything else away in a regexreplace() command?
Ofc I could do it with e.g. grep from the unixtools collection but I'd like use only internal xyplorer script function in this case.
I have a text file that is filled with a ffmpeg output of a simple
Code: Select all
ffmpeg.exe -i somevideofile 2>file.txtA few lines to demonstrate it:
Code: Select all
title : 01:32:04.269
Chapter #0.11: start 5911.447000, end 5911.447000
Metadata:
title : 01:38:31.447
Stream #0.0(ger): Video: h264 (High), yuv420p, 1280x528 [PAR 1:1 DAR 80:33], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0.1(ger): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)
Stream #0.2(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s
At least one output file must be specifiedIt isn't hard to find via a regexp:
Code: Select all
\d+x\d+Ofc I could do it with e.g. grep from the unixtools collection but I'd like use only internal xyplorer script function in this case.