[FFmpeg-user] duration errors for help

Arachnia asdfg1945 at gmail.com
Fri Apr 25 08:06:08 CEST 2014


I make a test for converting a rtsp stream from a ipcamera to ts and m3u8
recently.

when I only encode a video stream, it works perfectly. My command is

ffmpeg  -f rtsp -rtsp_transport tcp -i 'rtsp://192.168.0.91:554/rtsp'
-vcodec libx264 -crf 24 -b:v 128k -s 352x288 -profile:v baseline -pix_fmt
yuv420p -acodec aac -ac 2 -b:a 1k -ar 22050 -strict -2 -flags -global_header
-map 0 -f segment -segment_time 10 -segment_list_size 2 -segment_list
test.m3u8 -segment_list_type m3u8 -segment_format mpegts live%08d.ts

Ipcam closed audio output, so the command only had a video encoding. I run
the command for 24 hours, it works fine.
Duration every ts file is 10s. 

ffprobe live00008529.ts
ffprobe version 2.2.1 Copyright (c) 2007-2014 the FFmpeg developers
  built on Apr 14 2014 16:45:50 with gcc 4.4.7 (GCC) 20120313 (Red Hat
4.4.7-4)
  configuration: --enable-libx264 --enable-gpl --enable-pthreads
--enable-avfilter --enable-filter=movie --enable-libfaac --enable-nonfree
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'live00008529.ts':
  Duration: 00:00:09.96, start: 85294.360000, bitrate: 166 kb/s
  Program 1 
    Metadata:
      service_name    : RTSP Session
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Constrained Baseline) ([27][0][0][0] /
0x001B), yuv420p, 352x288, 25 fps, 25 tbr, 90k tbn, 50 tbc

When I opened the audio output, it was a nightmare.
I ran the command about one and half an hour, the duration began to changed.

ffprobe 'live00000546.ts
ffprobe version 2.2.1 Copyright (c) 2007-2014 the FFmpeg developers
  built on Apr 22 2014 09:45:19 with gcc 4.4.7 (GCC) 20120313 (Red Hat
4.4.7-4)
  configuration: --enable-libx264 --enable-gpl --enable-pthreads
--enable-avfilter --enable-filter=movie --enable-libfaac --enable-nonfree
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'live00000546.ts':
  Duration: 00:00:13.27, start: 5456.735789, bitrate: 204 kb/s
  Program 1 
    Metadata:
      service_name    : RTSP Session
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Baseline) ([27][0][0][0] / 0x001B),
yuv420p, 352x288, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 22050 Hz,
stereo, fltp, 2 kb/s

If I wait for more time, the result is like follow
ffprobe live00001021.ts
 Input #0, mpegts, from 'live00001021.ts':
  Duration: 00:00:39.26, start: 10190.309300, bitrate: 21 kb/s

ffprobe live00002021.ts
Input #0, mpegts, from 'live00002027.ts':
  Duration: 26:29:43.68, start: 20219.606444, bitrate: 0 kb/s

And jwplayer can't play at all.
I try same options like '-vbsf h264_mp4toannexb', or '-absf aac_adtstoasc'
but not work.

I don't know how it happed and it has confused me three days.
Anything help.




--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/duration-errors-for-help-tp4664924.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list