-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Won't Build on Ubuntu 13.10 x64 #1461
Comments
I realized that I had not enabled the resource loader's support in // A list of media types: http://en.wikipedia.org/wiki/Internet_media_type
// A comprehensive mime type list: http://plugindoc.mozdev.org/winmime.php
// This set of codecs is supported by all variations of Chromium.
static const char* const common_media_types[] = {
// Ogg.
"audio/ogg",
"application/ogg",
#if !defined(OS_ANDROID) // Android doesn't support Ogg Theora.
"video/ogg",
#endif
// WebM.
"video/webm",
"audio/webm",
// Wav.
"audio/wav",
"audio/x-wav",
// MPEG-4.
"video/mp4",
"video/x-m4v",
"audio/mp4",
"audio/x-m4a",
// MP3.
"audio/mp3",
"audio/x-mp3",
"audio/mpeg",
}; ... // List of supported codecs when passed in with <source type="...">.
// This set of codecs is supported by all variations of Chromium.
//
// Refer to http://wiki.whatwg.org/wiki/Video_type_parameters#Browser_Support
// for more information.
//
// The codecs for WAV are integers as defined in Appendix A of RFC2361:
// http://tools.ietf.org/html/rfc2361
static const char* const common_media_codecs[] = {
#if !defined(OS_ANDROID) // Android doesn't support Ogg Theora.
"theora",
"vp9", // TODO(tomfinegan): Move vp9 back down with vp8 once VP9 is supported
// on Android. https://crbug.com/285016
#endif
"vorbis",
"vp8",
"1", // WAVE_FORMAT_PCM.
"avc1",
"mp4a"
}; So, I (maybe incorrectly) assume this should give me what I want since I made the corresponding changes to
Every time I try to build, without fail. Has anyone else experienced this? |
also worth noting that i receive this error with or without modification to the source. ... sorry for the comment barrage. |
Update: From
...to...
It successfully runs my application, but unfortunately I'm faced with still no playback of I think I've reached a dead end here. 😒 |
The instructions need to be updated: you need to patch the ffmpeg repo (or define the diff --git a/ffmpeg.gyp b/ffmpeg.gyp
index ac059f0..1b0424c 100644
--- a/ffmpeg.gyp
+++ b/ffmpeg.gyp
@@ -54,7 +54,7 @@
['chromeos == 1', {
'ffmpeg_branding%': '<(branding)OS',
}, { # otherwise, assume Chrome/Chromium.
- 'ffmpeg_branding%': '<(branding)',
+ 'ffmpeg_branding%': 'Chrome',
}],
], and follow |
@rogerwang thanks so much, I will give it a shot! |
@gordonwritescode Did you ever figure this one out? I have a build that will play h264 video but not aac audio. Im not sure if aac is something different or included in the mpeg4 codec? |
@kirkegaard I never did get back around to aac support :( sorry |
it looks like you don't need to build all of chrome/chromium/node-webkit for this I'm getting a lot smaller libffmpegsumo.so that seems to be lacking symbols from the Debian distributed one. |
@xaiki: The reason for this is that in recent commits to Chromium they have moved from using FFMpeg to decode AAC to a embedded AAC decoder; hence why there are so many symbols missing |
Oh so that might be the reason why i can get h264 to work but not aac, since its not in the ffmpegsumo file anymore? Would it be possible to update the library included in node-webkit so we at least can have aac support? |
@kirkegaard: I'm working on a full ffmpeg compile now for node-webkit. Should appear in a fork very soon. |
@xeoncore That would be amazing! Thank you! |
@kirkegaard: First comes porting in AAC, AC3 and H264/265. Once thats done and works, I'll move on to supporting some new containers like AVI. Theoretically Chrome already supports XviD because all XviD is is a MPEG4 |
@xeoncore i'm working on the exact same thing ! |
@xaiki: If you want to test any of your builds @jduncanator reached out and said he'd help. So far he gave me this: http://us-chi.cdn.ptn.pm/nwtests/ Seems like a good place to start with unit-tests etc. |
#!/bin/bash
cd /path/to/node-webkit/src/third_party/ffmpeg
nano ./chromium/scripts/build_ffmpeg.sh
./chromium/scripts/build_ffmpeg.sh linux x64 `pwd`
./chromium/scripts/copy_config.sh
rm -fr build.ia32.linux/
cp -r build.x64.linux/ build.ia32.linux/
./chromium/scripts/generate_gyp.py
gclient runhooks This seems to do the trick for me. Can compile FLAC and others in! |
+1 like a dream if you can do it for all platforms 💃 |
need opus codec too :p |
Opus seems easy |
for the moment i do live ffmpeg transcoding but it use a lot of cpu sometimes and boring for seeking and things like that ... :p |
@smolleyes I've got it working. Sadly it wasn't just a hack to ffmpeg (meaning I could just keep upto date a fork of ffmpeg). It involved a hack to chromium source code as well. For now I'll have to maintain both. Or maybe just a patch for Chrome's source |
Do you have your patch somewhere ? |
@xaiki Patching is required for AC3 audio playback as it isn't a registered codec in the source of Chromium. diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h
index a17d221..5981f28 100644
--- a/media/base/audio_decoder_config.h
+++ b/media/base/audio_decoder_config.h
@@ -33,6 +33,7 @@ enum AudioCodec {
kCodecPCM_S24BE,
kCodecOpus,
kCodecEAC3,
+ kCodecAC3,
// DO NOT ADD RANDOM AUDIO CODECS!
//
// The only acceptable time to add a new codec is if there is production code
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 1a45134..320e09a 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -89,6 +89,8 @@ static AudioCodec CodecIDToAudioCodec(AVCodecID codec_id) {
return kCodecPCM_MULAW;
case AV_CODEC_ID_OPUS:
return kCodecOpus;
+ case AV_CODEC_ID_AC3:
+ return kCodecAC3;
default:
DVLOG(1) << "Unknown audio CodecID: " << codec_id;
}
@@ -134,6 +136,8 @@ static AVCodecID AudioCodecToCodecID(AudioCodec audio_codec,
return AV_CODEC_ID_PCM_MULAW;
case kCodecOpus:
return AV_CODEC_ID_OPUS;
+ case kCodecAC3:
+ return AV_CODEC_ID_AC3;
default:
DVLOG(1) << "Unknown AudioCodec: " << audio_codec;
} Doing that plus patching the build script of FFmpeg and you have a working AC3 decoder for node-webkit. You can obviously expand this to whatever codec you like. |
We got ac3 playing in mp4 without patching. |
@xaiki How so? I've tried everything and anything short of patching, still couldn't get AC3 working. |
(I'm in a bus from the phone right now) |
@xaiki Done all that (jduncanator told me about the copy x64 trick ;)) but still no AC3 unless you manually add the AC3 codec ID to Chrome source. If you wish to test it I have a patched version uploaded here: https://mega.co.nz/#!woh0hJBC!ez8HoC-LS4kl6LYkT8b7UzZahYFX6dGGcPj743fB_-g You can test it with any of the video files here that are labelled with "AC3" audio. It doesn't seem to support Opus but I'm working on that. Also supports FLAC. Enjoy! |
@smolleyes Once I have a Opus version working, I'll merge all my changes into my ffmpeg fork and release a guide on compiling and building a patched Node-webkit (along with binaries of course!) |
Don't use |
@xeoncore hi :) humm my problem is with the ./chromium/scripts/build_ffmpeg.sh win ia32 don t think i can use ninja with it ... don t understand the problem |
hi :p still trying ! so i reinstalled vs 2010 ultimate and cleaning everything before, ffmpeg config now works but won t build in cygwin error: License: LGPL version 2.1 or later same code build on mingw actually... i ll try to continue edit: same problem on generate content Windows toolchain out of date or doesn't exist, updating (Express)... it absolutely want to install 2013toolchain!!! (and it fail if i do) why does it not continue with 2010 .. !!! |
ok it definitely stop will wait for a real doc on how to build node-webkit with precise tools to download/install (visual studio v???, yasm ???, c99 ?? etc etc) and where, how to launch cygwin or mingw etc etc on windows seven/eight... :( let me know if i can help (i HATE windows :p) thanks |
@xeoncore Hello! Is there a way to contact to you about building node-webkit? Skype or something. |
hello still anyone on how to build step by step on win7 ? :D? thx |
trying to build ffmpeg on nw11 i have at the end of libffmpegsumo build i have libffmpegsumo.so: version node not found for symbol av_fast_malloc at LIBAVCODEC_55 no idears why ? |
@xeoncore do you have a fork of node-webkit with more codecs enabled ? Or at least an instruction would help a lot! |
linux ubuntu12.04 32bit compile nod-webkit 0.11.2 windows7 64bit compile node-webkit 0.11.2 32bit windows7 64bit compile node-webkit 0.11.2 32bit add ffmpeg mp4 format support |
hi thanks for the comment lixiaohui when i download sources with gclient and nw12 i don t have build_ffmpeg.sh do i have to use .py ? |
ffmpeg seems ok with the .py i modified... im building nw now on linux x64 still searching howto setup the windows env exactly (cygwin..) ++ |
ok got everything working nw build with hevc/dts/dtshd/flac/ac3/mp3/opus... only problem is avi with a small frame rate or don t know what is not fluid... if someone know howto cross compile from ubuntu 64 to 32 with the same sources i m interested :) thanks |
@smolleyes you can't. |
i m done with it by chroot... got some difficulties with windows now (and again pfffffffffffffffff) i m on pt channel on irc if you can help with it , might be cool |
@smolleyes I'm sorry, I haven't touched the Chromium source in months. I never got anything building on Windows so I can't help. |
ok thanks :) windows is boooooooooooooorrring :( |
got my win32 build YEAAAHHH 💃 |
How do you add # mime_util.cc
static const char* const common_media_types[] = {
// Ogg.
"audio/ogg",
"application/ogg",
#if !defined(OS_ANDROID) // Android doesn't support Ogg Theora.
"video/ogg",
#endif
// WebM.
"video/webm",
"audio/webm",
// Wav.
"audio/wav",
"audio/x-wav",
// FLAC.
"audio/flac",
"audio/x-flac",
#if defined(OS_ANDROID)
// HLS. Supported by Android ICS and above.
"application/vnd.apple.mpegurl",
"application/x-mpegurl",
#endif
}; libffmpegsumo compiled with # libffmpegsumo.py
configure_flags['Chrome'].extend([
'--enable-decoder=aac,flac,mp3',
'--enable-demuxer=aac,flac,mp3',
'--enable-parser=aac,flac,mpegaudio',
]) |
Selfanswer: FLAC works with CromeOS branding and added flac mimetype. // src/net/base/mime_util.cc
static const char* const common_media_types[] = {
// Ogg.
"audio/ogg",
"application/ogg",
#if !defined(OS_ANDROID) // Android doesn't support Ogg Theora.
"video/ogg",
#endif
// WebM.
"video/webm",
"audio/webm",
// Wav.
"audio/wav",
"audio/x-wav",
// FLAC.
"audio/flac",
"audio/x-flac",
#if defined(OS_ANDROID)
// HLS. Supported by Android ICS and above.
"application/vnd.apple.mpegurl",
"application/x-mpegurl",
#endif
}; # src/third_party/ffmpeg/ffmpeg.gyp
['chromeos == 1', {
'ffmpeg_branding%': '<(branding)OS',
}, { # otherwise, assume Chrome/Chromium.
'ffmpeg_branding%': 'ChromeOS',
}], But how to make custom codec list support still interesting |
hi i never touched to mime_util.cc ... here are all the changes i made... https://github.com/smolleyes/nw_ffmpeg then i build with (exemple for linux x64)
++ |
@smolleyes, did you add new extension? Without modify Thanks for diff! |
@imShara You need to serve them with correct headers, |
@jduncanator, served with header xdg-mime query filetype "song.flac" audio/x-flac |
Try also adding "audio/x-flac" to the mime_utils.cc file. |
@jduncanator, why need? It works with |
@jduncanator, you are right, |
@imShara It depends on what Content-Type you serve it with. You could serve it with |
I have been trying for days to get Node-Webkit to build, so that I can create a custom version of
libffmpegsumo.so
to enable support for h.264 video.I followed the instructions here in the wiki page several times. I had to modify the
build_install_deps.sh
, to allow me to run it on 13.10 since the version is not included in the supported list. This was fine, I just had to install some packages manually.Syncing using
gclient
and./build/gyp_chromium content/content.gyp
both complete successfully.I modify the the lines in
build_ffmpeg.sh
as you state in the wiki ...Then I run the build using
ninja
:It does it's thing and get almost completely finished before it dies at:
Now, even though I don't get the
nw
executable from this, it does in fact give melibffmpegsumo.so
, so I figured I should be able to use this with the latest pre-built binary.Nope. It behaves exactly as before. I tried numerous times with numerous different versions of Chrome and Chromium, just taking their copy of
libffmpegsumo.so
, but when I use theirs, my app simply crashes after about 2 seconds with no output.This is a showstopper for me and it's extremely frustrating, because I have read the Node-Webkit documentation and the referenced Chromium documentation up and down to try and get this to work and I am at a complete loss. 😓
What am I missing? Or where can I acquire a proper working copy of
libffmpegsumo.so
for the lastest version of node-webkit that includes the GPL licensed h.264 and mp3 support?Your help is very much appreciated!
The text was updated successfully, but these errors were encountered: