[FFmpeg-user] FFmpeg - HLS m3u8 to UDP Output
Hassan Ghaddar
Hassan.A.Ghaddar at live.com
Tue Nov 27 12:22:40 EET 2018
Dear Sir,
i am Facing a problem when trying to stream HlS m3u8 to udp using ffmpeg.
1. input( from https://www.euronews.com/live) : https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p.m3u8
2. Output: udp://127.0.0.1:1234
3. Command : ffmpeg -re -i "https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p.m3u8" -map 0:0 -map 0:1 -c copy -mpegts_original_network_id 1 -mpegts_transport_stream_id 1 -mpegts_service_id 1 -mpegts_pmt_start_pid 4096 -streamid 0:289 -streamid 1:337 -metadata service_provider="MYCALL" -metadata service_name="My Station ID" -f mpegts udp://127.0.0.1:1234.
4. Result: e:\ffmpeg>ffmpeg -re -i "https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p.m3u8" -map 0:0 -map 0:1 -c copy -mpegts_original_network_id 1 -mpegts_transport_stream_id 1 -mpegts_service_id 1 -mpegts_pmt_start_pid 4096 -streamid 0:289 -streamid 1:337 -metadata service_provider="MYCALL" -metadata service_name="My Station ID" -f mpegts udp://127.0.0.1:1234
ffmpeg version N-92528-g90ac0e5f29 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20181017
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 24.101 / 56. 24.101
libavcodec 58. 40.100 / 58. 40.100
libavformat 58. 23.100 / 58. 23.100
libavdevice 58. 6.100 / 58. 6.100
libavfilter 7. 46.100 / 7. 46.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[hls,applehttp @ 00000216bac1b040] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110742-42279.ts' for reading
[hls,applehttp @ 00000216bac1b040] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110750-42280.ts' for reading
Input #0, hls,applehttp, from 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p.m3u8':
Duration: N/A, start: 51894.289433, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp
Metadata:
variant_bitrate : 0
Output #0, mpegts, to 'udp://127.0.0.1:1234':
Metadata:
service_provider: MYCALL
service_name : My Station ID
encoder : Lavf58.23.100
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp
Metadata:
variant_bitrate : 0
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[https @ 00000216bb119e00] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110758-42281.ts' for reading
[https @ 00000216bb167300] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110806-42282.ts' for reading
[https @ 00000216bb5861c0] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p.m3u8' for reading
[https @ 00000216bb119e00] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110814-42283.ts' for reading
[https @ 00000216bb167300] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110822-42284.ts' for reading
[https @ 00000216bb5861c0] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p.m3u8' for reading
[https @ 00000216bb119e00] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110830-42285.ts' for reading
[https @ 00000216bb167300] Opening 'https://euronews-en-b13-cdn.hexaglobe.net/aee4dc37c40bb2647f92ccfc2f97661f/5bfd1702/euronews/euronews-euronews-website-web-responsive-2/ewnsabrenbkp_eng.smil/ewnsabrenbkp_eng_720p-20181127110838-42286.ts' for reading
frame= 1246 fps= 25 q=-1.0 Lsize= 13726kB time=00:00:49.77 bitrate=2258.8kbits/s speed= 1x
video:12180kB audio:407kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 9.043862%
Exiting normally, received signal 2.
As FFmpeg trying to reopen the input, it stops the udp output, which leads the udp output stream to have audio and video freezes .
I made another to output to a file (.mp4), the File has no problems, and the stream is recorded well.
Can you help me please.
Best Regards,
Hassan Ghaddar
More information about the ffmpeg-user
mailing list