[FFmpeg-user] ffmpeg can't stream video using rtsp ... Could not write header for output file #0

Roman Rusconi rrusconi at gmail.com
Thu Oct 1 17:58:46 CEST 2015


I just made a mistake when writing the email.

The command line I used was:

	ffmpeg.exe -v debug -stats -i rtsp://192.168.1.40/rus -vcodec copy -an -f rtsp -c copy rtsp://localhost:554/video          

There's no RSTP, it's always RTSP what I'm using.


Roman Rusconi
rrusconi at gmail.com

-----Original Message-----
From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of Rodney Baker
Sent: Thursday, October 01, 2015 12:42 PM
To: ffmpeg-user at ffmpeg.org
Subject: Re: [FFmpeg-user] ffmpeg can't stream video using rtsp ... Could not write header for output file #0

On Wed, 30 Sep 2015 10:02:43 Roman Rusconi wrote:
> Hello.
> 
> 
> 
> I'm trying to re stream an rtsp stream using ffmpeg.
> 
> I have no problem getting the original rtsp stream and write it to a file,
> although I can't get ffmpeg to stream this video again using rtsp.
> 
> Everything seems fine until the point ffmpeg gets stuck and only stops if I
> press CTRL-C, at this point I get an error message saying:
> 
> 
> 
> "Could not write header for output file #0 (incorrect codec parameters ?):
> Immediate exit requested"
> 

This line here...

> 
> [rtsp @ 00000000066a3900] Codec for stream 0 does not use global headers but
> container format requires global headers
> 

...and this line here...

> Could not write header for output file #0 (incorrect codec parameters ?):
> Immediate exit requested
> 
> Exiting normally, received signal 2.
.
...would appear to be related. Check your command line parameters. The order of 
options is significant. 

However, the errors may be misleading - you do seem to have an error in your 
command line. RTSP and RSTP are two different protocols: 

>ffmpeg.exe -v debug -stats -i rtsp://192.168.1.40/rus -vcodec copy -an -f
>rtsp -c copy rstp://localhost:554/video                     ^^^^
Try correcting the url for the output stream first. 

Having said all that, I'm not an expert - some of the dev's do watch this list and have a 
much better idea of how these things work, so if this doesn't help, hopefully someone 
else can. :)

Regards,
Rodney.

-- 
===========================================================
===
Rodney Baker VK5ZTV
rodney.baker at iinet.net.au
===========================================================
===
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list