fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.82k stars 875 forks source link

meta data does not contain time even if it does. #98

Closed spruce closed 11 years ago

spruce commented 11 years ago

Hey somehow i dont get it to work properly. My ffmpeg was an installation for airVideo, so maybe that's the problem? Can you look over it and maybe say what i'm doing wrong?

Thanks for your great engagement to do a cool wrapper.

Spruce

Error thrown of actual code Error: meta data contains no duration, aborting screenshot creation at module.exports.takeScreenshots.screenshotcount (/home/spruce/fbrowser/node_modules/fluent-ffmpeg/lib/processor.js:345:27) at FfmpegCommand._prepare (/home/spruce/fbrowser/node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js:297:9) at module.exports._loadDataInternal (/home/spruce/fbrowser/node_modules/fluent-ffmpeg/lib/metadata.js:165:7) at ChildProcess.exithandler (child_process.js:544:7) at ChildProcess.EventEmitter.emit (events.js:99:17) at maybeClose (child_process.js:638:16) at Process._handle.onexit (child_process.js:680:5)

your example of getting meta info

{ ffmpegversion: 0, title: '', artist: '', album: '', track: '', date: '', durationraw: '', durationsec: 0, synched: false, major_brand: undefined, video: { container: '', bitrate: 0, codec: '', resolution: { w: 0, h: 0 }, resolutionSquare: { w: 0, h: NaN }, rotate: 0, fps: 0, stream: 0, aspect: 0, pixel: 0 }, audio: { codec: '', bitrate: 0, sample_rate: 0, stream: 0 } }

Output off ffmpeg -i filmname.mkv

ffmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers built on Apr 27 2012 01:14:46 with gcc 4.4.5 configuration: --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame --disable-decoder=aac libavutil 51. 2. 1 / 51. 2. 1 libavcodec 53. 3. 0 / 53. 3. 0 libavformat 53. 0. 3 / 53. 0. 3 libavdevice 53. 0. 0 / 53. 0. 0 libavfilter 2. 4. 0 / 2. 4. 0 libswscale 0. 14. 0 / 0. 14. 0 [matroska,webm @ 0x1cecd60] Estimating duration from bitrate, this may be inaccurate Input #0, matroska,webm, from 'filmname.mkv': Duration: 01:23:05.53, start: 0.000000, bitrate: 1760 kb/s Chapter #0.0: start 0.000000, end 242.283000 Metadata: title : Chapter.01 Chapter #0.1: start 242.283000, end 614.322000 Metadata: title : Chapter.02 Chapter #0.2: start 614.322000, end 947.905000 Metadata: title : Chapter.03 Chapter #0.3: start 947.905000, end 1226.642000 Metadata: title : Chapter.04 Chapter #0.4: start 1226.642000, end 1627.000000 Metadata: title : Chapter.05 Chapter #0.5: start 1627.000000, end 1819.984000 Metadata: title : Chapter.06 Chapter #0.6: start 1819.984000, end 2103.017000 Metadata: title : Chapter.07 Chapter #0.7: start 2103.017000, end 2470.926000 Metadata: title : Chapter.08 Chapter #0.8: start 2470.926000, end 2714.712000 Metadata: title : Chapter.09 Chapter #0.9: start 2714.712000, end 2994.449000 Metadata: title : Chapter.10 Chapter #0.10: start 2994.449000, end 3241.821000 Metadata: title : Chapter.11 Chapter #0.11: start 3241.821000, end 3522.185000 Metadata: title : Chapter.12 Chapter #0.12: start 3522.185000, end 3819.232000 Metadata: title : Chapter.13 Chapter #0.13: start 3819.232000, end 4073.778000 Metadata: title : Chapter.14 Chapter #0.14: start 4073.778000, end 4491.737000 Metadata: title : Chapter.15 Chapter #0.15: start 4491.737000, end 4491.737000 Metadata: title : Chapter.16 Stream #0.0: Video: h264 (High), yuv420p, 1280x534 [PAR 1:1 DAR 640:267], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc Stream #0.1(ger): Audio: ac3, 48000 Hz, stereo, s16, 224 kb/s (default) Metadata: title : 2.0 AC3MD THX to TwixX Stream #0.2(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s At least one output file must be specified

spruce commented 11 years ago

fixed it by my self.

johndierks commented 11 years ago

Spruce: Can you fill on some details on how you fixed this? Running into the same error.

spruce commented 11 years ago

Sure :) My Problem was, that the filmname contained spaces, which were not correctly handed over to ffmpeg. So I kind of hacked the enclosing part of the lib. Because I wanted to develop this great library a little further I created a fork of it: https://github.com/spruce/node-liquid-ffmpeg