3

this is my first time ever posting a question on here, so bear with me. I'm using Ubuntu 12.04 and ffmpeg version 0.11.2, and I'm trying to capture a video from /dev/video0, segment the videos, and then create an m3u8 list file that lists all the segments. According to the ffmpeg documentation at http://ffmpeg.org/ffmpeg.html#Synopsis , ffmpeg supports certain options when creating a list file like '-segment_list_flags' and '-segment_list_type'. When I tried implementing these into my script, though, I just got an error that said:"unrecognized option 'segment_list_flags'" or "unrecognized option 'segment_list_type'". The actual command that I'm typing in looks like this:

  ffmpeg -f video4linux2 -s wvga -t ${CAPTURE_DURATION} -i "/dev/video0" \ 
  -vcodec ${VID_CODEC} -b:v 96k -flags +loop -cmp +chroma \
  -partitions +parti4x4+partp8x8+partb8x8 -subq 5 -trellis 1 -refs 1 -coder 0 \
  -me_range 16 -keyint_min 25 -sc_threshold 40 -map 0 -flags -global_header \
  -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' \
  -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 \
  -async 2 -preset fast -crf 22 -threads 0 -sameq -f segment -segment_time ${SEG_TIME} \
  -segment_list ${LOCATE}${OUTPUT}_first.m3u8 -segment_list_flags +live \
  -segment_list_size ${SEG_LIST_SIZE} -segment_format ${SEG_FORMAT} -acodec libmp3lame \
  -ar 4800 -ab 64k -y "${LOCATE}${OUTPUT}%01d.${EXTENSION}"

In other parts of my script, I obviously have those variables that you see defined, and they all work fine. I should mention that before I tried implementing the -segment_list_flags option, it did spit out a list file, but it wasn't a legal .m3u8 list file that I would need for Http Live Streaming. It just sequentially listed the different ${LOCATE}${OUPUT} segments that I told it to create.

The full output of my command in the terminal is this:

ffmpeg version 0.11.2 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 27 2012 13:32:44 with gcc 4.6.3
  configuration: --enable-gpl --enable-gray --enable-runtime-cpudetect --enable-bzlib --enable-gnutls --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libnut --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openal --enable-openssl --enable-zlib --enable-nonfree --enable-version3 --enable-x11grab

  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100

[video4linux2,v4l2 @ 0x30e1e80] The V4L2 driver changed the video from 852x480 to 640x480
[video4linux2,v4l2 @ 0x30e1e80] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 10590.729975, bitrate: 110592 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 110592 kb/s, 30 tbr, 1000k tbn, 30 tbc
Unrecognized option 'segment_list_flags'
Failed to set value '+live' for option 'segment_list_flags'

If any one knows why it's giving me this error, I'd really appreciate if you could help out. Maybe I don't have some option enabled from the ./configure?

llogan
  • 121,796
  • 28
  • 232
  • 243
user1704620
  • 101
  • 2
  • 6

1 Answers1

1

The online documentation is generated from FFmpeg git-master. Therefore, if you're using something other than the most recent code then you must refer to ffmpeg -h or man ffmpeg for documentation for your specific ffmpeg version. This is one reason why general users are recommended using git-master instead of a release. The releases are targeted mostly for distros who have a compulsion to use "releases". The segment_list_flags option was added less than 3 weeks ago and was probably not backported to 0.11.2.

Some recommendations for your command:

  • Do not use -sameq. See sameq does not mean "same quality".

  • Declaring each individual libx264 option is not recommended and has been depreciated by the -preset option. Also, since you are already using a preset it makes no sense to additionally declare these options which can lead to breakage. See the FFmpeg and x264 Encoding Guide.

  • FFmpeg usage questions are better suited at superuser.com.

Community
  • 1
  • 1
llogan
  • 121,796
  • 28
  • 232
  • 243