Newest 'x264' Questions - Stack Overflow
Les articles publiés sur le site
-
Compilation of x264 with newest libswscale and libavformat
4 décembre 2016, par pcrolandYesterday I wanted to compile x264 myself because the latest binary on videolan is compiled without libswscale: link
If I just use
./configure --enable-static --enable-shared
then the binary will compile libswscale 3.1.101 and libavformat 56.40.101 from the libswscale-dev and libavformat-dev packages. If I clone FFmpeg's git and use
./configure --enable-static --enable-shared --extra-cflags="-I$HOME/FFmpeg"
the binary will have the latest libswscale and libavformat, but it wont work:
pc@pcroland:~/bin$ ./x264 --version x264 0.148.2744 b97ae06 (libswscale 4.3.101) (libavformat 57.58.101) built on Dec 4 2016, gcc: 5.4.0 20160609 x264 configuration: --bit-depth=8 --chroma-format=all libx264 configuration: --bit-depth=8 --chroma-format=all x264 license: GPL version 2 or later libswscale/libavformat license: GPL version 2 or later pc@pcroland:~/bin$ ./x264 --input-res 1920x1080 --fps 24000/1001 --vf resize:720,404,method=spline --output /home/pc/test.264 /home/pc/asd.264 [h264 @ 0x1bc3ec0] Format h264 detected only with low score of 1, misdetection possible! [h264 @ 0x1bc3ec0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options lavf [error]: could not find input stream info avs [error]: failed to load avisynth raw [info]: 1920x1080p 0:0 @ 24000/1001 fps (cfr) resize [info]: resizing to 720x404 x264 [info]: using SAR=404/405 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2 x264 [info]: profile High, level 3.0 Bus error (core dumped) pc@pcroland:~/bin$
How to reproduce the error:
cd; git clone https://github.com/FFmpeg/FFmpeg; git clone http://git.videolan.org/git/x264.git; cd x264; ./configure --enable-static --enable-shared --extra-cflags="-I$HOME/FFmpeg" --bindir="$HOME/bin"; sudo make; sudo make install
System: Ubuntu 16.04
-
Compilation of x264 with newest libswscale and libavformat
4 décembre 2016, par pcrolandYesterday I wanted to compile x264 myself because the latest binary on videolan is compiled without libswscale: link
If I just use
./configure --enable-static --enable-shared
then the binary will compile libswscale 3.1.101 and libavformat 56.40.101 from the libswscale-dev and libavformat-dev packages. If I clone FFmpeg's git and use
./configure --enable-static --enable-shared --extra-cflags="-I$HOME/FFmpeg"
the binary will have the latest libswscale and libavformat, but it wont work:
pc@pcroland:~/bin$ ./x264 --version x264 0.148.2744 b97ae06 (libswscale 4.3.101) (libavformat 57.58.101) built on Dec 4 2016, gcc: 5.4.0 20160609 x264 configuration: --bit-depth=8 --chroma-format=all libx264 configuration: --bit-depth=8 --chroma-format=all x264 license: GPL version 2 or later libswscale/libavformat license: GPL version 2 or later pc@pcroland:~/bin$ ./x264 --input-res 1920x1080 --fps 24000/1001 --vf resize:720,404,method=spline --output /home/pc/test.264 /home/pc/asd.264 [h264 @ 0x1bc3ec0] Format h264 detected only with low score of 1, misdetection possible! [h264 @ 0x1bc3ec0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options lavf [error]: could not find input stream info avs [error]: failed to load avisynth raw [info]: 1920x1080p 0:0 @ 24000/1001 fps (cfr) resize [info]: resizing to 720x404 x264 [info]: using SAR=404/405 x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2 x264 [info]: profile High, level 3.0 Bus error (core dumped) pc@pcroland:~/bin$
How to reproduce the error:
cd; git clone https://github.com/FFmpeg/FFmpeg; git clone http://git.videolan.org/git/x264.git; cd x264; ./configure --enable-static --enable-shared --extra-cflags="-I$HOME/FFmpeg" --bindir="$HOME/bin"; sudo make; sudo make install
System: Ubuntu 16.04
-
ffmpeg x264 encoding cpu usage
4 décembre 2016, par Amin FazlaliI want to convert a mkv formatted video to mp4, using the ffmpeg application. and for that I ran below command in terminal:
ffmpeg -y -i c38a4990774b3c23.mkv -c:v libx264 -c:a aac -r 25 -strict -2 -map_metadata -1 -movflags faststart -vf "crop=1920:800:0:4, scale=iw*min(426/iw\,240/ih):ih*min(426/iw\,240/ih), pad=426:240:(426-iw*min(426/iw\,240/ih))/2:(240-ih*min(426/iw\,240/ih))/2, setsar=sar=1" output.mp4
I have compiled ffmpeg with --enable-pthread configuration
when I run this command on my personal PC with a 3.2GHz quad core cpu, it uses 60% of overall cpu process and encode video with 150fps; but when I run this command on a production server with 8 2.4GHz dual core cpu (16 core) it only uses up to 20% of overall cpu process and encode video with 97fps.
I have also tried ramdisk but I got no performance improvement.
-
ffmpeg x264 encoding cpu usage
4 décembre 2016, par Amin FazlaliI want to convert a mkv formatted video to mp4, using the ffmpeg application. and for that I ran below command in terminal:
ffmpeg -y -i c38a4990774b3c23.mkv -c:v libx264 -c:a aac -r 25 -strict -2 -map_metadata -1 -movflags faststart -vf "crop=1920:800:0:4, scale=iw*min(426/iw\,240/ih):ih*min(426/iw\,240/ih), pad=426:240:(426-iw*min(426/iw\,240/ih))/2:(240-ih*min(426/iw\,240/ih))/2, setsar=sar=1" output.mp4
I have compiled ffmpeg with --enable-pthread configuration
when I run this command on my personal PC with a 3.2GHz quad core cpu, it uses 60% of overall cpu process and encode video with 150fps; but when I run this command on a production server with 8 2.4GHz dual core cpu (16 core) it only uses up to 20% of overall cpu process and encode video with 97fps.
I have also tried ramdisk but I got no performance improvement.
-
ffmpeg : Generic stream (or file) re-streaming at lower bitrate
29 novembre 2016, par ChristianI often find streams on the internet that are high-bitrate only, or video streams that offer no audio-only stream.
Is there a generic way to tell
ffmpeg
orffserver
, in my case on a small server, to input a given stream, digest it (eg. x264ify it or even HEVCify it, and convert the audio to AAC+ HEC at a low bitrate) and output
a) a lightweight low-bitrate version or
b) an audio-only stream of the ingested stream
that can be viewed (in my case) by a mobile device that doesn't have the greatest connectivity?Thanks for any pointers in the right direction.