Author |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 13 Jan '15 15:52 Post subject: |
|
|
Try convert it in ffmpeg it will most likely crash depending on what command line you use compared to me. I used it as a good way to fix my application to start marking information outputs as a single attempt since with ffmpeg the information output will never crash. And with a max attempt number of 5 when it hits 5 attempts if on the final attempt it does not work it marks it as failed. |
|
Back to top |
|
jimski

Joined: 18 Jan 2014 Posts: 196 Location: USSA
|
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 13 Jan '15 16:04 Post subject: |
|
|
Jimski use my soloution if a video is crashing your ffmpeg process like the one i shared it is most likely corrupt or not worth the hassle of trying to get to work.
https://www.apachelounge.com/viewtopic.php?p=29578#29578
To fix it since when ffmpeg crashes not much we can do to fix that but using "-i" we mark the information output of ffmpeg as a single attempt and we have a maximum number of attempts for me it is 5 and when you hit that 5 attempts mark it as failed. It is my soloution to a unique problem and from the file i shared it prooves it is for good reason that you should do things this way since information outputs will never crash. (Thats a fact) |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Tue 13 Jan '15 16:42 Post subject: |
|
|
C0nw0nk wrote: | Try convert it in ffmpeg it will most likely crash depending on what command line you use compared to me. I used it as a good way to fix my application to start marking information outputs as a single attempt since with ffmpeg the information output will never crash. And with a max attempt number of 5 when it hits 5 attempts if on the final attempt it does not work it marks it as failed. |
My FFmpeg did not crash but reported a lot of errors and ended with 'conversion failed'. I did not try it with Zeranoe's FFmpegs, but with my own custom built one. That one has a few patches: https://github.com/Jan-E/MyMpeg |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 13 Jan '15 17:02 Post subject: |
|
|
Thanks if you ever compile and start providing Windows ffmpeg builds like zeranoe let me know id be happy to test. Right now i just download Zeranoe's 64bit static builds and use those. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Tue 13 Jan '15 22:48 Post subject: |
|
|
The only things I disable are w32threads and doc. Doc because it installs the documentation and this takes too much space. And w32threads because pthreads is faster than w32threads. The last time I looked, Zeranoe disabled w32threads as well.
Sandbox: I initially copied the script from Roger Pack. See the readme at https://github.com/Jan-E/MyMpeg
Roger uses sandbox as well: the script installs everything (compilers like gcc and g++, many libraries and the resulting ffmpeg/ffprobe/ffplay.exes) in ~/sandbox. If you want to clean things afterwards: rm -rf ~/sandbox
Faac: I am using this because in my tests it was the fastest audio encoder. However, it makes ffmpeg.exe 'non free and non distributable'. You will not see updates by me.
See for instance http://oss.netfarm.it/mplayer-win32.php
Quote: | libfdk-aac encoder
libfdk-aac encoder is not included in MEncoder and FFmpeg package due to licensing problems, you should download separately libfdk-aac-x86-v0.1.3-13-g9a32340.7z or libfdk-aac-x86_64-v0.1.3-13-g9a32340.7z (for the 64bit version) and unpack the dll (with e.g. 7zip) in the directory in which the executable lies.
faac encoder
faac encoder is not included in MEncoder and FFmpeg package due to licensing problems, you should download separately libfaac-1.28.7z or libfaac-1.28-x64.7z (for the 64bit version) and unpack the dll (with e.g. 7zip) in the directory in which the executable lies (as shown in the picture). |
Edit: If you want updates, grab a Ubuntu system or virtualbox, git clone Roger Pack's or my repo and build it yourself. Update every once in a while by using a 'git pull'. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 13 Jan '15 22:55 Post subject: |
|
|
Yeah i was going to mention it violates the licenses and terms to distribute ffmpeg with those audio encoders in them. (What i find to be silly and hope they change their licenses)
But it is also good to know it never crossed my mind to download zeranoe's 64bit shared build and just manualy add in the .dll of the audio encoder to make it work like that.
Is there any performance between a static and a shared build ? Just seems once saves more disk space than the other to me. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Tue 13 Jan '15 23:03 Post subject: |
|
|
C0nw0nk wrote: | But it is also good to know it never crossed my mind to download zeranoe's 64bit shared build and just manualy add in the .dll of the audio encoder to make it work like that. |
I do not know if adding libfaac.dll works with Zeranoe's builds. It used to work with Sherpya's builds, but I am not sure if that still is the case.
Anyway, it does not seem to violate the licenses if you build it without distribution.
C0nw0nk wrote: | Is there any performance between a static and a shared build ? Just seems once saves more disk space than the other to me. |
Not as far as I know. Static is a lot easier as well. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 13 Jan '15 23:08 Post subject: |
|
|
Well when i come to testing it if it does not work with Zeranoes can i do it with your builds ? |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Wed 14 Jan '15 15:35 Post subject: |
|
|
Thanks Jan i put your ffmpeg build into production on mp4's i use libfaac as my audio encoder and webm it is libopus.
As of your patches above i dont notice any real difference in audio outputs unless i am missing something from my command line ? But all is working well i was actualy supprised at how fast libfaac encoded compared to ffmpeg's experimental audio encoder. (Performance gain.)
And the non fatal recorvery patches is that to prevent ffmpeg from crashing and try to skip the error preventing it from converting ? Wouldnt that cause unexpected behaviour in video playback maybe even a corrupt output file ? |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Wed 14 Jan '15 23:11 Post subject: |
|
|
Since you use libopus i am assuming you generate WebM files but i could be wrong you could be using it in OGG containers but i was just curious what video bitrates you use.
On MP4's i use a minimum of 1000k and currently on webm's it is 700k what is why my webm videos look a little choppy but i have been thinking about increasing it but on the downside WebM's are slow to compile so increasing the video bitrates will make it slower. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Thu 15 Jan '15 2:02 Post subject: |
|
|
You will be really surprised: -b:v 336k -ab 96k
The relevant part of our FFmpeg command line:
-movflags +faststart -s 448x256 -aspect 16:9 -sws_flags bicubic -vcodec libx264 -b:v 336k -r 25 -strict -2 -acodec libfaac -ab 96k -ar 48000 -ac 2 -x264opts
global_header=1:partitions=p8x8+b8x8+i8x8:level_idc=30:cabac=0:subq=3:qp_min=0:qp_max=51:qp_step=4:me=dia:\
subme=0:mixed_refs=0:me_range=16:chroma_me=1:trellis=0:8x8dct=0:cqm=flat:chroma_qp_offset=0:nr=0:\
keyint=25:min_keyint=12:scenecut=0:ratetol=1.0:qcomp=0.60:ip_factor=1.4:weightp=0:fast_pskip=1:frameref=1:\
bframes=0:mbtree=1:rc_lookahead=15:sliced_threads=0:threads=8
Our only requirements are that the faces and gestures are recognizable. Speech is far more important. And speed in compression and uploading. As I said: the compression is being done before uploading. Our users upload less than 200MB per hour video.
Nowadays I only compile to mp4. That my FFmpeg builds contain all those codecs is just a strange desire to have a 'complete' build. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Thu 15 Jan '15 17:12 Post subject: |
|
|
Yeah i used to convert to only MP4 since it was used by everyone until linux and Windows XP users started complaining saying they could not watch so i had to start generating WebM's since i refuse to use the putrid filth known as Shock wave flash or FLV/OGG.
http://en.wikipedia.org/wiki/HTML5_video#Browser_support
MP4 is supported by pretty much all browsers and Operating systems but linux and Windows XP users dont get the luxury so i had to have WebM videos. But WebM is fairly new so hopefully google keep making it better. Since compared to MP4 WebM's do have allot smaller file size.
This is also the media player i use.
http://mediaelementjs.com/
And with a comments feature i have i do a nifty little trick using javascript allowing users to click timestamps and jumping to that time frame in the video like on YouTube. |
|
Back to top |
|