K-S-V / Scripts

Collection of my scripts
GNU General Public License v3.0
634 stars 226 forks source link

corrupt FLVs? #14

Closed sbekman closed 11 years ago

sbekman commented 11 years ago

I have a weird issue that only happens occasionally.

The flv adobehds generates will only playback sound with a black screen in flash, but if I open it in VLC it seems fine. These files also provide out of sync audio (too fast) when using ffmpeg to convert to mp4.

Files that show video in flash convert just fine.

Same command, different results on different files. Any ideas?

K-S-V commented 11 years ago

can you post the command line you are using? is it a reproducible issue? if VLC can play it without any problem then i don't think it's an issue with flv generation. also provide the debug log after adding following to your command line.

--debug 2> Debug.txt

sbekman commented 11 years ago

Yes, it's specific files - I will get that debug log for you shortly.

Thanks

K-S-V commented 11 years ago

it's not the correct debug log. make sure you add 2 to redirection operator ( 2> ). also post the url of offending video where this issue is consistently reproducible. also make sure you are running the latest version of AdobeHDS script.

php AdobeHDS.php --update

sbekman commented 11 years ago

You can get the two log files:

https://www.dropbox.com/sh/a79h5tcexkbw3wt/BIlBlzq1kU

broken.txt is the one that doesn't work

working.txt is the one that works fine

I can't post the video online due to copyright reasons, but I can send it to you privately.

Thanks!

K-S-V commented 11 years ago

your broken.txt log seems perfectly fine. there isn't any problem with flv generation as per log file. what's the size of broken file and working file? can you also test it with duration switch to check if this problem occurs also when only small portion of stream is captured.

to capture only two minutes of content: --duration 120

is this issue always reproducible with same file?

sbekman commented 11 years ago

Sizes are around the same. I'm beginning to think it's something with the audio bitrate / codec maybe? It's specific encoders that always have the issue, but the settings appear the same as working ones. Stumping me.

It is always reproducible with the same file, yep. Capturing only two minutes didn't help

sbekman commented 11 years ago

Also just tried using --start 1000 (to try to get two minutes near the middle), same issue.

K-S-V commented 11 years ago

can you upload the two minute sample somewhere?

sbekman commented 11 years ago

<>

Let me know once you've got it so I can remove it.

Thanks!

ghost commented 11 years ago

@portshner I just tested it using this syntax, no problem on audio or video

<embed
src="file:///c:/cygwin/opt/svnpenn.github.io/jwplayer/player.swf"
flashvars="file=file:///c:/steven/desktop/test12.flv"
>
sbekman commented 11 years ago

use Flowplayer, or ffmpeg that file to mp4 using ffmpeg -i test12.flv -acodec copy -vcodec copy test12.mp4

The resulting mp4 is out of sync in JWPlayer/Flow (but is fine if trying to watch via HTML5, etc)

sbekman commented 11 years ago

I figured you downloaded it locally. Would you like me to put it back up?

ghost commented 11 years ago

The flv adobehds generates will only playback sound with a black screen in flash, but if I open it in VLC it seems fine.

@portshner this latest video shows black for first 3 seconds, then normal. No warnings when remuxing to MP4. The 3 second black is likely due to the video not starting on a keyframe, it is obviously you are capturing a live stream and this is to be expected.

@K-S-V this issue needs to be closed. It is an issue with either

sbekman commented 11 years ago

Is there a way to force adobehds to start on a keyframe? do you have further suggestions? Thanks for your assistance!

for what it's worth, video is out of sync using both HTTP Dynamic Streaming, and JWPlayer as well.

ghost commented 11 years ago

@portshner just cut off the part of the video before the first keyframe

ffmpeg -ss 5 -i testnew.flv -c copy outfile.flv
sbekman commented 11 years ago

I think that actually worked! You are an absolutely life saver sir. Thank you. My apologies to KSV for thinking this had to do with the AdobeHDS script (fantastic work, if you take donations - let me know)