xxxx.tlivepush.com. You can use it to push streams for test purposes, but the test domain should not be used in production environments. 






StreamName), For example: livetest.2025-10-18 09:58:57.StreamName.StreamName in your playback URL with the stream name used for push, and you can use the URL to play the stream. 
rtmp://domain/AppName/StreamName?txSecret=Md5(key+StreamName+hex(time))&txTime=hex(time)
domain: The push domain name.AppName: The live streaming application name, which is live by default and is customizable.StreamName: The custom stream name used to identify a live stream.txSecret: The authentication string generated after push authentication is enabled.txTime: The expiration timestamp for the push URL.txTime indicates the expiration time of the URL.txTime).
/*** Get the push URL* If you do not pass in the authentication key and URL expiration time, a URL without hotlink protection will be returned.* @param domain: Your push domain name.* streamName: A unique stream name to identify the push URL.* key: The authentication key.* time: The URL expiration time (example: 2016-11-12 12:00:00).* @return String url*/function getPushUrl($domain, $streamName, $key = null, $time = null){if($key && $time){$txTime = strtoupper(base_convert(strtotime($time),10,16));//txSecret = MD5( KEY + streamName + txTime )$txSecret = md5($key.$streamName.$txTime);$ext_str = "?".http_build_query(array("txSecret"=> $txSecret,"txTime"=> $txTime));}return "rtmp://".$domain."/live/".$streamName . (isset($ext_str) ? $ext_str : "");}echo getPushUrl("123.test.com","123456","69e0daf7234b01f257a7adb9f807ae9f","2016-09-11 20:08:07");
package com.test;import java.io.UnsupportedEncodingException;import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;public class Test {public static void main(String[] args) {System.out.println(getSafeUrl("txrtmp", "11212122", 1469762325L));}private static final char[] DIGITS_LOWER ={'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};/** KEY+ streamName + txTime*/private static String getSafeUrl(String key, String streamName, long txTime) {String input = new StringBuilder().append(key).append(streamName).append(Long.toHexString(txTime).toUpperCase()).toString();String txSecret = null;try {MessageDigest messageDigest = MessageDigest.getInstance("MD5");txSecret = byteArrayToHexString(messageDigest.digest(input.getBytes("UTF-8")));} catch (NoSuchAlgorithmException e) {e.printStackTrace();} catch (UnsupportedEncodingException e) {e.printStackTrace();}return txSecret == null ? "" :new StringBuilder().append("txSecret=").append(txSecret).append("&").append("txTime=").append(Long.toHexString(txTime).toUpperCase()).toString();}private static String byteArrayToHexString(byte[] data) {char[] out = new char[data.length << 1];for (int i = 0, j = 0; i < data.length; i++) {out[j++] = DIGITS_LOWER[(0xF0 & data[i]) >>> 4];out[j++] = DIGITS_LOWER[0x0F & data[i]];}return new String(out);}}
package aimport ("crypto/md5""fmt""strconv""strings""time")func GetPushUrl(domain, streamName, key string, time int64)(addrstr string){var ext_str stringif key != "" && time != 0{txTime := strings.ToUpper(strconv.FormatInt(time, 16))txSecret := md5.Sum([]byte(key + streamName + txTime))txSecretStr := fmt.Sprintf("%x", txSecret)ext_str = "?txSecret=" + txSecretStr + "&txTime=" + txTime}addrstr = "rtmp://" + domain + "/live/" + streamName + ext_strreturn}/**domain: 123.test.com*streamName: streamname*key: 69e0daf7234b01f257a7adb9f807ae9f*time: 2022-04-26 14:57:19 CST*/func main(){domain, streamName, key := "123.test.com", "streamname", "69e0daf7234b01f257a7adb9f807ae9f"//CST: ChinaStandardTimeUT, "2006-01-02 15:04:05 MST" must be constt, err := time.Parse("2006-01-02 15:04:05 MST", "2022-04-26 14:57:19 CST")if err != nil{fmt.Println("time transfor error!")return}fmt.Println(GetPushUrl(domain, streamName, key, t.Unix()))return}
Feedback