[FFmpeg-user] impossible to read rtsp stream with the type h264
Moritz Barsnick
barsnick at gmx.net
Tue Feb 26 19:15:25 EET 2019
On Tue, Feb 26, 2019 at 17:07:17 +0000, ABDALLAH Moussa wrote:
> I try to read a stream video with the command line : ffmpeg -i rtsp://192.9.200.121/h264 -y -map 0 -t 5 -c copy -f matroska _capture.mkv
Do you need "-f matroska"? It's the default for ".mkv" files.
> Stream #0:0: Video: h264, none, 1280x720, 90k tbr, 90k tbn, 180k tbc
> Stream #0:1: Data: none
> [matroska @ 0x3a20fc0] Only audio, video, and subtitles are supported for Matroska.
> Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
It tells you in really clear words here: With "-map 0", you tell ffmpeg
to map all streams, and one of them is "Data", and Matroska refuses to
accept data streams.
You could instead do "-map 0:v [-map 0:a]", or you can surpress data
streams with "-map 0 -dn".
Cheers,
Moritz
More information about the ffmpeg-user
mailing list