Skip to content
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

Segment error from hls stream #969

Open
itsUnsmart opened this issue Nov 18, 2019 · 0 comments
Open

Segment error from hls stream #969

itsUnsmart opened this issue Nov 18, 2019 · 0 comments

Comments

@itsUnsmart
Copy link

itsUnsmart commented Nov 18, 2019

Version information

  • fluent-ffmpeg version: 2.1.2
  • ffmpeg version: (using @ffmpeg-installer/ffmpeg v 1.0.20)
  • OS: Windows 10 EDU

Code to reproduce

const vid_path = join(__dirname, 'out_%02d.mkv')

ffmpeg()
	.addInput('https://videocdn.mixer.com/hls/19058549-9b897317449242d3d8c6e4ad173dd01c_source/index.m3u8') // this is a live stream that I am trying to capture and save to 60s segments that I can then use ffmpeg again on the output file(s) to create partial clips from the stream
	.addOutputOptions([
		'-c copy',
		'-f segment',
		'-segment_time 60',
		'-segment_wrap 2',
		'-reset_timestamps 1',
		'-y'
	])
	.addOutput(vid_path) 
	.on('error', (err, std, stderr) => {
		console.error('Error occurred.')
		console.error(err)

		console.error(std)
		console.error(stderr)
	})
	.on('end', () => {
		console.log('done')
	})
	.run()

(note: if the problem only happens with some inputs, include a link to such an input file)

Expected results

It creates 2 segments each 60s of the live stream that get written over each other just to keep at most 2mins of the stream locally

Observed results

It creates the first 60s fine, then it goes to create the 2nd file and errors out.

Error parsing AAC extradata, unable to determine samplerate.

Error writing trailer of D:****\out_%02d.mkv: Invalid argument
frame= 3610 fps= 66 q=-1.0 Lsize=N/A time=00:01:00.18 bitrate=N/A speed= 1.1x
video:59415kB audio:860kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!

ffmpeg-20191118-141819.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant