Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- $counter = 2;
- open (my $fh, '>>', 'output.txt');
- while ($counter <= 999) {
- system("hdhomerun_config <number> set /tuner0/vchannel $counter");
- $result = `timeout 5s hdhomerun_config <number> save /tuner0 - | ffmpeg -i pipe: 2>&1`;
- if ($result =~ m{Video\: .+? \(})
- {
- $result = $&;
- }
- my @words = split / /, $result;
- print $fh "Channel: $counter - $words[1]\n";
- $counter++;
- }
- system("hdhomerun_config <number> set /tuner0/vchannel none");
- close $fh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement