-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in ffmpeg 6 #57
Comments
Hotfix in a4b556b |
Additionally, sincle v6 in ffprobe's frame output ffprobe /tmp/test.mp4 -skip_frame nokey -show_entries frame -select_streams v -of json Before: {
"media_type": "video",
"stream_index": 0,
"key_frame": 1,
"pkt_pts": 0,
"pkt_pts_time": "0.000000",
"pkt_dts": 60416,
"pkt_dts_time": "3.933333",
"best_effort_timestamp": 0,
"best_effort_timestamp_time": "0.000000",
"pkt_duration": 512,
"pkt_duration_time": "0.033333",
"pkt_pos": "23057",
"pkt_size": "7976",
"width": 1280,
"height": 720,
"pix_fmt": "yuv444p",
"sample_aspect_ratio": "1:1",
"pict_type": "I",
"coded_picture_number": 0,
"display_picture_number": 0,
"interlaced_frame": 0,
"top_field_first": 0,
"repeat_pict": 0,
"chroma_location": "left",
"side_data_list": [
{
"side_data_type": "H.26[45] User Data Unregistered SEI message"
}
]
} After: {
"media_type": "video",
"stream_index": 0,
"key_frame": 1,
"pts": 0,
"pts_time": "0.000000",
"pkt_dts": 60416,
"pkt_dts_time": "3.933333",
"best_effort_timestamp": 0,
"best_effort_timestamp_time": "0.000000",
"pkt_duration": 512,
"pkt_duration_time": "0.033333",
"duration": 512,
"duration_time": "0.033333",
"pkt_pos": "23057",
"pkt_size": "7990",
"width": 1280,
"height": 720,
"crop_top": 0,
"crop_bottom": 0,
"crop_left": 0,
"crop_right": 0,
"pix_fmt": "yuv444p",
"sample_aspect_ratio": "1:1",
"pict_type": "I",
"coded_picture_number": 0,
"display_picture_number": 0,
"interlaced_frame": 0,
"top_field_first": 0,
"repeat_pict": 0,
"chroma_location": "left",
"side_data_list": [
{
"side_data_type": "H.26[45] User Data Unregistered SEI message"
}
]
} |
According to docs:
According to this, following code should return two segments, one 2sec long and another 4sec long:
But in reality we get two three ~2s segments:
It seems like it is not skipping keyframes in the video. |
There is a regression since ffmpeg 6 that breaks the segmenting.
Test script:
We can set up a simple dockerfile:
And then run scripts above with different versions.
docker build --build-arg VERSION=3.14 -t alpine-ffmpeg:3.14 . docker run --rm alpine-ffmpeg:3.14 -version
Versions prior 6
ffmpeg version 4.2.4 (from
alpine:3.11
)ffmpeg version 4.3.1 (from
alpine:3.12
)ffmpeg version 4.3.3 (from
alpine:3.13
)ffmpeg version 4.4.1 (from
alpine:3.14
)ffmpeg version 5.0.3 (from
alpine:3.16
)ffmpeg version 5.1.4 (from
alpine:3.17
)Versions after 6
ffmpeg version 6.0.1 (from
alpine:3.18
)ffmpeg version 6.1.1 (from
alpine:3.19
)ffmpeg version 6.1.2 (from
alpine:3.21
)It seems that it requires now relative offet to the seeked time in
segment_times
instead of the absolute time.Modified segmenter script:
ffmpeg -loglevel warning -ss 10 -i /tmp/test.mp4 -to 16 -copyts -c copy \ -f segment \ -segment_time_delta 0.2 \ -segment_format mpegts \ -segment_times 2,4,6 \ -segment_start_number 5 \ -segment_list_type csv \ -segment_list pipe:1 /tmp/test_%03d.ts;
New output:
The text was updated successfully, but these errors were encountered: