[FFmpeg-user] Using tee with segmenter
Lev Zelensky
lev.zelensky at gmail.com
Sun Apr 30 15:26:22 EEST 2017
Hello fellow ffmpeg users,
I'm trying to use a tee to output my stream into 1min segments and into a
file at the same time. Here's my command:
ffmpeg -i "rtsp://${cameraIp}:554/axis-media/media.amp?videocodec=h264&resolution=1280x720&fps=15"
-c copy -map 0 \
-f tee "[f=ssegment:segment_time=60:segment_format=mp4:reset_timestamps=1:r=15]
${rootPath}/${storeId}-${location}-%03d.mp4 \
| /tmp/${cameraIp}.mkv"
Individually (without tee) both outputs work fine. So I can either
output into segmented files or into a non-segmented file. But with the
tee I get this error:
[stream_segment,ssegment @ 0x217ece0] Failed to open segment '
/etc/cida/diagnostics/vid/780801-99-000.mp4'
[tee @ 0x217d820] Slave
'[f=ssegment:segment_time=60:segment_format=mp4:reset_timestamps=1:r=15]
/etc/cida/diagnostics/vid/780801-99-%03d.mp4': error writing header:
No such file or directory
See full command output below. Any suggestions?
ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg
--mandir=/usr/share/man --enable-avresample --disable-debug
--enable-nonfree --enable-gpl --enable-version3
--enable-libopencore-amrnb --enable-libopencore-amrwb
--disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse
--enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265
--enable-libfdk-aac --enable-libvorbis --enable-libmp3lame
--enable-libopus --enable-libvpx --enable-libspeex --enable-libass
--enable-avisynth --enable-libsoxr --enable-libxvid
--enable-libvidstab --enable-libwavpack --enable-nvenc
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, rtsp, from
'rtsp://10.83.245.7:554/axis-media/media.amp?videocodec=h264&resolution=1280x720&fps=15':
Metadata:
title : Session streamed with GStreamer
comment : rtsp-server
Duration: N/A, start: 0.080011, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive),
1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 180k tbc
[stream_segment,ssegment @ 0x217ece0] Failed to open segment '
/etc/cida/diagnostics/vid/780801-99-000.mp4'
[tee @ 0x217d820] Slave
'[f=ssegment:segment_time=60:segment_format=mp4:reset_timestamps=1:r=15]
/etc/cida/diagnostics/vid/780801-99-%03d.mp4': error writing header:
No such file or directory
[tee @ 0x217d820] Slave muxer #0 failed, aborting.
Could not write header for output file #0 (incorrect codec parameters
?): No such file or directory
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Last message repeated 1 times
Regards,
Lev
More information about the ffmpeg-user
mailing list