1
I am trying to encode and segment video for HLS on demand(VoD). I am using the following code for such:
ffmpeg -i 20170706_174314.mp4 -c 24 \
-vcodec libx264 -acodec aac -ac 1 -strict -2 -b:v 128k \
-profile:v baseline -maxrate 400k -bufsize 1835k \
-hls_time 10 -hls_playlist_type vod -vsync 1 \
video_chunks/index1.m3u8 \
-c 24 -vcodec libx264 -acodec aac -ac 1 -strict -2 -b:v 128k \
-profile:v baseline -maxrate 700k -bufsize 1835k \
-hls_time 10 -hls_playlist_type vod -vsync 1 \
video_chunks/index2.m3u8
Later on I create another playlist with bandwidth separators to call on the two other playlists generated with the code above.
I tried this other code also just for segmenting but had the same exactly problem:
ffmpeg -i 20170706_174314.mp4 \
-c:a libmp3lame -ar 48000 -ab 64k -c:v libx264 -b:v 128k -flags \
-global_header -map 0 -f segment \
-segment_list video_chunks/test.m3u8 -segment_time 10 -segment_format mpegts \
video_chunks/segment_%05d.ts
This code was working great on some videos but yesterday I recorded a video with my Samsung J7 Prime phone to test since the videos will be generated by phone and this video was poorly encoded. The quality sucks and some parts of the video turned Black&White.
Another thing I noticed on this video is that the following message kept appearing in loop until the end of the encoding&segmenting process.
Past duration X too large
Where X is a decimal really close to
0.675316
The link to the video is below:
My FFmpeg version:
ffmpeg --version
ffmpeg version N-86482-gbc40674 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 66.100 / 55. 66.100
libavcodec 57. 99.100 / 57. 99.100
libavformat 57. 73.100 / 57. 73.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 92.100 / 6. 92.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
SO: Windows 10