[FFmpeg-user] HLS/fmp4 contains 0x47 in unfortunate places

Randal Michnovicz rmichnovicz at gmail.com
Wed Feb 15 00:54:02 EET 2023


Funny coincidence, I was just looking at this with someone yesterday! It
looks like there was a fix added for this issue in hls.js very recently
here: https://github.com/video-dev/hls.js/pull/5157 -- maybe it's worth
trying to upgrade HLS.js to version 1.3.3?

On Tue, Feb 14, 2023 at 2:20 PM David Ing <ding at panopto.com> wrote:

> I am generating HLS/fmp4 as follows:
>
> ffmpeg -hide_banner -loglevel warning
>    -itsoffset 0.010666450 -i audio.121063.m4a
>    -i video.242528.m4v
>    -i video.141815.m4v
>    -i video.84763.m4v
>    -map 0:a:0 -map 1:v:0 -map 0:a:0 -map 2:v:0 -map 0:a:0 -map 3:v:0
>    -c:a copy
>    -c:v copy
>    -copyts
>    -bsf:v setts=pts='not(not(N))*PTS'
>    -var_stream_map "a:0,v:0,name:363591 a:1,v:1,name:262878
> a:2,v:2,name:205826"
>    -hls_flags single_file+independent_segments
>    -hls_playlist_type vod
>    -hls_segment_type fmp4
>    -hls_list_size 0
>    -hls_time 9
>    -hls_segment_filename hls/%v/fragmented.mp4
>    -f hls hls/%v/index.m3u8
>
>
> The resulting HLS/fmp4 seems to be valid, but at least one player (hls.js)
> has a problem.  The player believes the fmp4 file is mpegts because it sees
> the byte 0x47 appearing three times in the stream, with very specific
> offsets:
>
>    - 0x47 @ i
>    - 0x47 @ i + 188
>    - 0x47 @ i + 376
>
> This does not happen in most cases, just in one unlucky case (with specific
> media files).
>
> I have 2 questions about this:
>
>    1. Is there an ffmpeg command that can insert short (meaningless) byte
>    sequences to prevent the mpegts pattern (described above) from
> appearing?
>    2. If not, I'd like to build my own.  Is there a particular escape
>    sequence that allows one to insert a meaningless byte into the stream of
>    mp4 bytes?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list