master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.46k stars 151 forks source link

Can't stream files produced with av1an via ffmpeg to webserver/icecast #623

Open Yasaka7 opened 2 years ago

Yasaka7 commented 2 years ago

So i wanted to stream av1 encoded video files. for this i made an icecast server which receives the av1 video + 1 audiotrack + 1 subtitle as webm. the ffmpeg command looks like this : ffmpeg -re -i input -map 0:0 -map 0:1 -map 0:2 -c:v copy -c:a copy -c:s webvtt -content_type video/webm icecast://source:password@serveradress/live.webm However ffmpeg gives this error message when i try to stream these files 2022-04-29 02_21_43-Windows PowerShell Also every video file crashes at the same timestamp. in this example it crashes always at 11-12secs. another file crashed always at 1:35 and the third one i tried crashed at 2:3x i think.

This does not happen with files where i used libaom-AV1 or SVT-AV1 in ffmpeg directly. I can stream these files without any problems. this error should be reproducable since it also happens if you want to stream the file in general to anywhere (for example you could try it with nginx). it always gives the same error.

EDIT: i think i found a solution, it seems to work fine if you remux everything with mkvmerge.

silverbacknet commented 2 years ago

If it works with mkvmerge, that sounds like an ffmpeg problem, not an av1an problem.

Yasaka7 commented 2 years ago

but if i use ffmpeg directly to encode with svt-av1/libaom the files are fine too. the other thing is i already use the -c mkvmerge option when i use av1an

silverbacknet commented 2 years ago

If you can upload that first part of the stream that crashes at 11-12 secs it would be very appreciated anyway. ffmpeg should NEVER crash, so this might narrow down an important bug in dav1d or ffmpeg itself.

Yasaka7 commented 2 years ago

i could send you the complete file, like i said when i remux it its fixed.