2016-06-13 133 views
1

我想为ffplay或ffmpeg传递多个头文件,它说我需要用CRLF进行分割。在Linux上,我可以使用\$'\r\n',但如何为Windows?windows CMD在双引号内发送CRLF

SET CRLF=^ 
ffplay -v debug -i "http://example.com/test" -headers "Accept-Language: en-US,en;q=0.5%CRLF%Connection: keep-alive" 

调试日志:Connection: keep-alive不发送

[http @ 04df3f40] No trailing CRLF found in HTTP header. 
[http @ 04df3f40] request: GET /test HTTP/1.1 0KB sq= 0B f=0/0 
User-Agent: Lavf/57.37.101 
Accept: */* 
Range: bytes=0- 
Connection: close 
Host: example.com 
Icy-MetaData: 1 
Accept-Language: en-US,en;q=0.5 

感谢

回答

0

请尝试设置CRLF这种方式。它可能工作。

C:\Users\pwatson>type t.bat 
@echo off 
setlocal enabledelayedexpansion 

REM === The following line -MUST- be followed by two (2) blank lines. 
SET CRLF=^ 


REM === DO NOT EDIT THE PREVIOUS TWO (2) LINES 

echo this is a!CRLF!new line 

然后运行它。

C:\Users\pwatson>call t.bat 
this is a 
new line