recorded videos with bad datas stop playing before end
Hi,
when we record video (h264/speex) in flv container, sometimes, the video stop playing before the end. The recorded video is good. If I delete meta data we inject with yamdi, I can play it locally, without any problem. But for jwplayer, we need metadata. So I run video into yamdi, and then the video stop playing before the end. I checked the video with flvmeta -C option, and this what I have : 0x0006decc: warning W20018: tag body length is zero 0x0000000d: warning W80062: datasize should be 1082, got 449167 0x0000000d: warning W80062: audiosamplerate should be 5500, got 0 0x0000000d: warning W80062: audiosamplesize should be 16, got 1 0x0000000d: warning W81071: invalid keyframes arrays length
on a good video, I have this : 0x001773a9: warning W20018: tag body length is zero
do you think this might come from the recording from nginx rtmp ? If so, is there any way to fix it ?
Thank you.
Can you give me any files to test?
sure. This one is 13s, but plays only 5 seconds
https://www.dropbox.com/s/bk9i9k28krvpj9a/605.broadcast.meta.flv
is this the original file or after yamdi? I need original
it's after yamdi. I make a new one...
ok, so you were right to suggest the original file. I should have made more tests. Here my results: https://www.dropbox.com/s/vknupxhdb5tak5u/608.broadcast.meta.flv.flvmeta https://www.dropbox.com/s/77abo2d28txebt2/608.broadcast.meta.flv.nginxrtmp https://www.dropbox.com/s/7zhngowcq975i4p/608.broadcast.meta.flv.yamdi
the nginx rtmp is the original. No meta since nginx rtmp does not include meta, so it plays well on my local machine, but still stops after few seconds on jwplayer.
The errors:
- after yamdi : 0x0005bdc4: warning W20018: tag body length is zero 0x0000000d: warning W80062: datasize should be 938, got 375319 0x0000000d: warning W80062: videodatarate should be 265.107304217, got 266.321671621 0x0000000d: warning W80062: audiosamplerate should be 5500, got 0 0x0000000d: warning W80062: audiosamplesize should be 16, got 1 0x0000000d: warning W81071: invalid keyframes arrays length
- after flvmeta : 0x0005bd63: warning W20018: tag body length is zero
but both videos stops after few seconds, but the metadata are good.
if you need, this our server config: rtmp { server {
listen 1935;
chunk_size 4096;
publish_time_fix on;
application myapp {
interleave on;
live on;
wait_key on;
wait_video on;
record all;
record_path /tmp;
sync 100ms;
Hi Arut,
it seems that these bad videos do not start at the beginning. I have half a second delay when I try to sync them with others videos, no matter if it is flv or I converted it to mp4 with ffmpeg and libfdak aac (just copying video track). I will try to setup a project for you to test in the same conditions as we do.
Cannot download https://www.dropbox.com/s/77abo2d28txebt2/608.broadcast.meta.flv.nginxrtmp
https://www.dropbox.com/s/77abo2d28txebt2/608.broadcast.meta.flv.nginxrtmp.flv
What I found
- flvmeta fixes the problem
- ffmpeg (-c copy) fixes the problem
- yamdi does not fix the problem
The fixes made by flvmeta/ffmpeg are (except metadata injection)
- Speex 5.5 kHz -> 11 kHz - wrong audio from publisher
- Changed timestamps
It looks like the publisher sends Speex 11 KHz but says it's 5.5kHz. Please try changing sound rate at publisher and see what changes.
can you tell me what command line you use with flvmeta and ffmpeg ? and version ?
Thank you.
flvmeta is the latest
flvmeta input.flv output.flv
ffmpeg -i input.flv -c copy output.flv
ok it's good. I used options with flvmeta :/
Thank you!