How can I get rtmp with ffmpeg? Setting swfsize and hash? >
Hello there, It works with rtmpdump but I can not run it with ffmpeg. I need to set swfsize and hash, but I can not set it. Rtmpdump running version: rtmpdump -r rtmpe://93.189.57.254/xlive -a xlive -f WIN 23,0,0,162 -s http://sportstream365.com/swf/VideoPlayer.swf -w 5aaaa32059cba732636c28519b2ce34a3568f1058a8bd02d6a932643554ccbb4 -x 585534 -p 'http://sportstream365.com/viewer?game=109968871' -C S:client -C S:3.1.0.10 -C S:en --live -y raw:600238 Could you give a sample ffmpeg command. Thank you
On Fri, May 12, 2017 at 15:42:12 +0300, Sinan Aksu wrote:
It works with rtmpdump but I can not run it with ffmpeg. I need to set swfsize and hash, but I can not set it.
Did you check the documentation? If your ffmpeg used the native (i.e. ffmpeg's own) implementation of RTMP, there are corresponding options for (hopefully) all those options you mentioned: https://ffmpeg.org/ffmpeg-protocols.html#rtmp The rtmpdump option -a/--app maps to -rtmp_app, the option -f/--flashVer maps to "-rtmp_flashver", and so on. So you are looking for "-rtmp_swfsize" and "-rtmp_swfhash". If your build of ffmpeg uses librtmp, those options are part of the URL you give to ffmpeg, as documented here: https://ffmpeg.org/ffmpeg-protocols.html#librtmp-rtmp_002c-rtmpe_002c-rtmps_... and in the librtmp man page: https://rtmpdump.mplayerhq.hu/librtmp.3.html
Rtmpdump running version: rtmpdump -r rtmpe://93.189.57.254/xlive -a xlive -f WIN 23,0,0,162 -s http://sportstream365.com/swf/VideoPlayer.swf -w 5aaaa32059cba732636c28519b2ce34a3568f1058a8bd02d6a932643554ccbb4 -x 585534 -p 'http://sportstream365.com/viewer?game=109968871' -C S:client -C S:3.1.0.10 -C S:en --live -y raw:600238
Could you give a sample ffmpeg command.
The above command does not work for me, so I can't check whether my attempt to map it to ffmpeg would work. Moritz
I looked at the documents. I created a command like the following. But it failed and I could not solve the error. Command : ffmpeg -i "rtmpe://93.189.57.254/xlive" -rtmp_app xlive -rtmp_flashver WIN 23,0,0,162 -rtmp_swfurl " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_swfverify " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_pageurl " http://sportstream365.com/viewer?game=116356399" -rtmp_conn S:client -rtmp_conn S:3.1.0.10 -rtmp_conn S:en -rtmp_live live -rtmp_playpath "raw:600238" Error Output : Windows ffmpeg version N-83882-g58f0bbc Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.3.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 48.100 / 55. 48.100 libavcodec 57. 83.100 / 57. 83.100 libavformat 57. 66.104 / 57. 66.104 libavdevice 57. 3.100 / 57. 3.100 libavfilter 6. 76.100 / 6. 76.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100 libpostproc 54. 2.100 / 54. 2.100 Trailing options were found on the commandline. rtmp server sent error rtmp server requested close rtmpe://93.189.57.254/xlive: Unknown error occurred 2017-05-12 20:26 GMT+03:00 Moritz Barsnick <barsnick@gmx.net>:
On Fri, May 12, 2017 at 15:42:12 +0300, Sinan Aksu wrote:
It works with rtmpdump but I can not run it with ffmpeg. I need to set swfsize and hash, but I can not set it.
Did you check the documentation?
If your ffmpeg used the native (i.e. ffmpeg's own) implementation of RTMP, there are corresponding options for (hopefully) all those options you mentioned:
https://ffmpeg.org/ffmpeg-protocols.html#rtmp
The rtmpdump option -a/--app maps to -rtmp_app, the option -f/--flashVer maps to "-rtmp_flashver", and so on. So you are looking for "-rtmp_swfsize" and "-rtmp_swfhash".
If your build of ffmpeg uses librtmp, those options are part of the URL you give to ffmpeg, as documented here: https://ffmpeg.org/ffmpeg-protocols.html#librtmp-rtmp_ 002c-rtmpe_002c-rtmps_002c-rtmpt_002c-rtmpte and in the librtmp man page: https://rtmpdump.mplayerhq.hu/librtmp.3.html
Rtmpdump running version: rtmpdump -r rtmpe://93.189.57.254/xlive -a xlive -f WIN 23,0,0,162 -s http://sportstream365.com/swf/VideoPlayer.swf -w 5aaaa32059cba732636c28519b2ce34a3568f1058a8bd02d6a932643554ccbb4 -x 585534 -p 'http://sportstream365.com/viewer?game=109968871' -C S:client -C S:3.1.0.10 -C S:en --live -y raw:600238
Could you give a sample ffmpeg command.
The above command does not work for me, so I can't check whether my attempt to map it to ffmpeg would work.
Moritz _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On Sat, May 13, 2017 at 11:48:38 +0300, Sinan Aksu wrote:
I looked at the documents. I created a command like the following. But it failed and I could not solve the error.
Command : ffmpeg -i "rtmpe://93.189.57.254/xlive" -rtmp_app xlive -rtmp_flashver WIN 23,0,0,162 -rtmp_swfurl " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_swfverify " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_pageurl " http://sportstream365.com/viewer?game=116356399" -rtmp_conn S:client -rtmp_conn S:3.1.0.10 -rtmp_conn S:en -rtmp_live live -rtmp_playpath "raw:600238"
Please do take some more time to read the ffmpeg documentation and perhaps look at some examples. Especially the option system: Input options belong *before* the input ("-i") they shall apply to, output options before the corresponding output. https://www.ffmpeg.org/ffmpeg.html#Description In your case, all the "-rtmp_*" options obviously belong before "-i rtmpe://93.189.57.254/xlive". A hint was in your ffmpeg's console output:
Trailing options were found on the commandline.
BTW, I'm on this mailing list, no need to forward your messages to my personal address. Moritz
Thank you for your reply. When I look at the documents, the command looks correct. I am using the latest version of windows build ffmpeg. But swf does not accept size and hash settings. Could this be the problem? Because rtmpdump does not work if you do not set swf and hash, but if it is set it works. Rtmpdump does not automatically recognize the size and hash values of the swf file. For this reason I value manual. He works like that. Do you need to set the sqf in ffmpeg and the hash values manually? How can I do that. By the way, I do not write the output part of the command, so I guess it gives the warning. I have arranged the end of the command as follows and the warning is off. New command: ffmpeg -i "rtmpe: //93.189.57.254/xlive" -rtmp_app xlive -rtmp_flashver WIN 23,0,0,162 -rtmp_swfurl " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_swfverify "http: // sportstream365.com/swf/VideoPlayer.swf "-rtmp_pageurl" http://sportstream365.com/viewer?game=116356399 "-rtmp_conn S: client -rtmp_conn S: 3.1.0.10 -rtmp_conn S: en -rtmp_live live - rtmp_playpath "raw: 600238" -f flv -t 60 test.flv New error output: libswscale 4. 3.101 / 4. 3.101 Libswresample 2. 4.100 / 2. 4.100 Libpostproc 54. 2.100 / 54. 2.100 Rtmp server sent error Rtmp server requested close Rtmpe: //93.189.57.254/xlive: Unknown error occurred 2017-05-13 12:40 GMT+03:00 Moritz Barsnick <barsnick@gmx.net>:
On Sat, May 13, 2017 at 11:48:38 +0300, Sinan Aksu wrote:
I looked at the documents. I created a command like the following. But it failed and I could not solve the error.
Command : ffmpeg -i "rtmpe://93.189.57.254/xlive" -rtmp_app xlive -rtmp_flashver WIN 23,0,0,162 -rtmp_swfurl " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_swfverify " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_pageurl " http://sportstream365.com/viewer?game=116356399" -rtmp_conn S:client -rtmp_conn S:3.1.0.10 -rtmp_conn S:en -rtmp_live live -rtmp_playpath "raw:600238"
Please do take some more time to read the ffmpeg documentation and perhaps look at some examples. Especially the option system: Input options belong *before* the input ("-i") they shall apply to, output options before the corresponding output.
https://www.ffmpeg.org/ffmpeg.html#Description
In your case, all the "-rtmp_*" options obviously belong before "-i rtmpe://93.189.57.254/xlive".
A hint was in your ffmpeg's console output:
Trailing options were found on the commandline.
BTW, I'm on this mailing list, no need to forward your messages to my personal address.
Moritz _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On Sat, May 13, 2017 at 16:15:45 +0300, Sinan Aksu wrote:
Thank you for your reply. When I look at the documents, the command looks correct.
No, as I told you, the options for your input need to come *before* the actual "-i" input. This is still not the case in your command line.
I am using the latest version of windows build ffmpeg.
I don't think so. These are quite old, as far as I can tell:
New error output: libswscale 4. 3.101 / 4. 3.101 Libswresample 2. 4.100 / 2. 4.100 Libpostproc 54. 2.100 / 54. 2.100
By the way, I do not write the output part of the command, so I guess it gives the warning. I have arranged the end of the command as follows and the warning is off.
Please do quote the actual command line and complete, uncut console output in the future. Thanks. Moritz
The input is already the RTMPE source itself. I want to take the live broadcast from that RTMPE and save it to the flv file. All output : C:\f\f>ffmpeg -i "rtmpe://93.189.57.254/xlive" -rtmp_app xlive -rtmp_flashver WIN 23,0,0,162 -rtmp_swfurl " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_swfverify " http://sportstream365.com/swf/VideoPlayer.swf" -rtmp_pageurl " http://sportstream365.com/viewer?game=116356399" -rtmp_conn S:client -rtmp_conn S:3.1.0.10 -rtmp_conn S:en -rtmp_live live -rtmp_playpath "raw:600238" -f flv -t 60 test.flv ffmpeg version N-85750-ga75ef15 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.3.0 (GCC) configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 61.100 / 55. 61.100 libavcodec 57. 93.100 / 57. 93.100 libavformat 57. 72.101 / 57. 72.101 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6. 88.100 / 6. 88.100 libswscale 4. 7.101 / 4. 7.101 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 rtmp server sent error rtmp server requested close rtmpe://93.189.57.254/xlive: Unknown error occurred 2017-05-13 17:29 GMT+03:00 Moritz Barsnick <barsnick@gmx.net>:
On Sat, May 13, 2017 at 16:15:45 +0300, Sinan Aksu wrote:
Thank you for your reply. When I look at the documents, the command looks correct.
No, as I told you, the options for your input need to come *before* the actual "-i" input. This is still not the case in your command line.
I am using the latest version of windows build ffmpeg.
I don't think so. These are quite old, as far as I can tell:
New error output: libswscale 4. 3.101 / 4. 3.101 Libswresample 2. 4.100 / 2. 4.100 Libpostproc 54. 2.100 / 54. 2.100
By the way, I do not write the output part of the command, so I guess it gives the warning. I have arranged the end of the command as follows and the warning is off.
Please do quote the actual command line and complete, uncut console output in the future. Thanks.
Moritz _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (2)
-
Moritz Barsnick -
Sinan Aksu