ponwork / multicast-checker Goto Github PK
View Code? Open in Web Editor NEWIPTV channels streams checker/scanner (UDP based)
License: MIT License
IPTV channels streams checker/scanner (UDP based)
License: MIT License
To add the following:
Hello.
Can you please add option to make output m3u playlist sorted by ip address?
For example:
#EXTM3U
#EXTINF:2,Channel: 234.0.10.02:1234
udp://@234.0.10.02:1234
#EXTINF:2,Channel: 234.0.10.03:1234
udp://@234.0.10.03:1234
#EXTINF:2,Channel: 234.0.10.04:1234
udp://@234.0.10.04:1234
#EXTINF:2,Channel: 234.0.10.05:1234
udp://@234.0.10.05:1234
...
Hi,
I'm trying to use this on a Raspberry, with Raspbian.
the multicast-checker indicates there's no multicasts.
There's multicasts on the ethernet interface. Actually, this very Raspberry is multicasting one of them.
I indicate the correct interface IP
I use a playlist that works perfectly in VLC.
I did change the regular expression code for the m3u parser, in order to get any order number.
I added a some debug prints, I was in doubt if the socket was being created.
python3 ./multicast-checker.py --playlist ../PBT.canais_sample.m3u --nic 10.22.224.100
[*] Email parameters are not defined.
[*] Run the script with -h parameter for the details.
socket <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('10.22.224.100', 1234)>
socket <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('10.22.224.100', 5501)>
socket <socket.socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=17, laddr=('10.22.224.100', 5501)>
address: 239.251.0.60 port: 5501 Resultado: 1
[*] Channel 24 Kitchen HD is not working
address: 239.192.1.203 port: 1234 Resultado: 1
address: 239.251.0.97 port: 5501 Resultado: 1
[*] Channel Bay is not working
[*] Channel AMC HD is not working
[*] The following channel(s) are not working:
239.251.0.60:5501 - 24 Kitchen HD
239.192.1.203:1234 - Bay
239.251.0.97:5501 - AMC HD
[*] Finished in 5.0 second(s)
Where one reads
address: xxx.xxx.xxx.xxx port: xxxx Resultado: X
Is in mass_checker(channel), the result of channel_checker(sock)
def mass_checker(channel):
# Function to mass check the channels in the dictionary
# Define global variables
global os_name
global channels_not_working
# Check channel
channel_address, channel_port = channels_dictionary[channel].split(':')
sock = socket_creator(args.nic, channel_address, channel_port, os_name)
result = channel_checker(sock)
-> print('address: ', channel_address, ' port: ', channel_port, 'Resultado: ', result, sep=" ")
Raspbian is Debian based. So is Ubuntu.
How can I further debug this?
Might there be a difference in how sockets are created? Or a difference in how ffprobe is called in Raspbian?
Great tool, man! A big and great tool!! ;)
ffprobe -v quiet -print_format json -show_programs udp://233.99.64.1:1234
ffmpeg -y -i udp://239.255.242.218:1234 -vcodec copy -acodec copy -t 7 test.mp4
# python3 multicast-checker.py --playlist output.m3u
File "multicast-checker.py", line 47
result = subprocess.run(['ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_programs', f'udp://@{address}:{port}'], capture_output=True, text=True, timeout=args.info_timeout)
^
SyntaxError: invalid syntax
OS Ubuntu 16.04 x64
Python 3.5.2
ffmpeg -version
ffmpeg version git-2019-04-04-8e3b01e Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
configuration: --pkg-config-flags=--static --prefix=/root/ffmpeg-build-static-binaries --bindir=/root/ffmpeg-build-static-binaries/bin --extra-cflags='-I /root/ffmpeg-build-static-binaries/include -I /usr/local/cuda/include/' --extra-ldflags='-L /root/ffmpeg-build-static-binaries/lib -L /usr/local/cuda/lib64/' --extra-libs=-lpthread --enable-cuda --enable-cuda-sdk --enable-cuvid --enable-libnpp --enable-gpl --enable-libass --enable-libfdk-aac --enable-vaapi --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-libaom --enable-nvenc
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 48.101 / 58. 48.101
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.