VideoHelp Forum

Try DVDFab and copy Ultra HD Blu-rays and DVDs! Or rip iTunes movies and music! Download free trial !
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Hi Guys .

    I have problem, couldn't encode audio with video at the same time by using ffmpeg

    This my avs script ( I tried both of them )

    Code:
    V=  FFvideoSource("Detective_Conan.mkv")
    A = FFAudioSource("Detective_Conan.mka") 
    AudioDub(V,A)
    trim(0,400)
    Code:
    FFmpegSource2("Detective_Conan.mp4",atrack=-1)  
    trim(0,400)
    and this's the command line

    avs2yuv 842.avs - | ffmpeg -y -i - -c:v libx264 -c:a aac -b:a 128 output_.mp4
    the result is video without audio.
    Quote Quote  
  2. You can pipe either video or audio this way, not both at the same time. It will work if you open the script directly in ffmpeg (but 32 bit AviSynth needs 32 bit ffmpeg unless used with a virtual file server).

    P.S.: 128kbps is "128k", not "128".
    Quote Quote  
  3. Originally Posted by sneaker View Post
    You can pipe either video or audio this way, not both at the same time. It will work if you open the script directly in ffmpeg (but 32 bit AviSynth needs 32 bit ffmpeg unless used with a virtual file server).

    P.S.: 128kbps is "128k", not "128".
    I know it works if encode directly like

    Code:
    ffmpeg -i Detective_Conan.mkv  -c:a copy -c:v libx264 out.mkv
    but I want to encode with avs for filtering at the same time :\
    Quote Quote  
  4. ffmpeg can directly open avs scripts just like it can directly open mkv files.
    ffmpeg -i "842.avs" -c:v libx264 -c:a aac -b:a 128k output_.mp4

    Or you can mix multiple inputs:
    avs2yuv 842.avs - | ffmpeg -f yuv4mpegpipe -i - -i "Detective_Conan.mkv" -map 0:0 -map 1:1 -c:v libx264 -c:a copy output_.mp4
    Quote Quote  
  5. Originally Posted by sneaker View Post
    ffmpeg can directly open avs scripts just like it can directly open mkv files.
    ffmpeg -i "842.avs" -c:v libx264 -c:a aac -b:a 128k output_.mp4
    I didn't know that but now

    thank you very much
    Last edited by alkoon; 18th Dec 2016 at 13:54.
    Quote Quote  
  6. one more question,

    I want to encode in 10bit, so I download this one : https://sourceforge.net/projects/ffmpeg-hi/files/
    But it doesn't support avs script input directly !
    Last edited by alkoon; 28th Dec 2016 at 12:06.
    Quote Quote  
  7. Originally Posted by alkoon View Post
    one more question,

    I want to encode in 10bit, so I download this one : https://sourceforge.net/projects/ffmpeg-hi/files/
    But it doesn't support avs script input directly !
    Please elaborate on this - it looks like very old ffmpeg so i see no point to even consider think to use it for encoding (lack of avisynth seem to be obvious especially for Linux where avisynth simply not exist).

    Go go for zeranoe build or build own version of ffmpeg https://github.com/jb-alvarado/media-autobuild_suite - it is more than recommended as you can enable nonfree libs.
    Quote Quote  
  8. First of all thank you for reply. secondly sorry for delay.

    I build my FFmpeg, and I got a note when I tried to encode in 'yuv420p10le' pixel format, the not is " Incompatible pixel format 'yuv420p10le' for codec 'libx264'" in yellow color

    this is my tools, following my code
    Click image for larger version

Name:	Untitled.png
Views:	131
Size:	9.9 KB
ID:	40287


    ffmpeg -i "test.avs" -c:v libx264 -pix_fmt yuv420p10le -profile:v high420 -level 4.2 -crf 16 "output.mp4"

    shouldn't come an option with "media-autobuild_suite-master" to build FFmpeg 10bit as well as x264/x265?!

    I just want to use FFmpeg for encoding video & audio at the same time, so i want to know also if it's possible to do a multiple input so I cant encode video with x264 or libx264
    and audio with "-c:a aac" or another audio tool like fdkaac or qaac.

    Thanks in advance
    Quote Quote  
  9. You can check ffmpeg build and particular codec capabilities by:

    Code:
    ffmpeg -h encoder=libx264 >ff_libx264.txt
    If there is no support for yuv420p10le
    Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21
    then obviously your build is incapable to encode 10 bit.

    AFAIK ffmpeg is unable to support 8 and 10 bit libx264 at the same time - consider to use external 10 bit x264.exe encoder - but as i'm not a software guy i will be happy to learn something new (you may try to add switch to force 10 bit compilation).
    https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=2270
    https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=3672

    You can try build own 10 bit libx264 ffmpeg build
    https://github.com/rdp/ffmpeg-windows-build-helpers
    Quote Quote  
  10. Back again.

    I just finished download and install "build_locally_gpl_32_bit_option"
    after that I got note it says :
    Click image for larger version

Name:	Untitled.png
Views:	130
Size:	10.7 KB
ID:	40308

    so I followed the instruction, but i got an error "command not found"

    Click image for larger version

Name:	Untitled2.png
Views:	152
Size:	7.9 KB
ID:	40309

    If couldn't complete 10 bit libx264 ffmpeg build, I want try this one if it's possible ..
    ... to do a multiple input so I cant encode video with x264 or libx264 and audio with "-c:a aac" or another audio tool like fdkaac or qaac. at the same time?
    Last edited by alkoon; 14th Jan 2017 at 03:29.
    Quote Quote  
  11. Some complied ffmpeg binaries are here - https://sourceforge.net/projects/ffmpegwindowsbi/files/ - you may try to find suitable high bitdepth x264 .
    Quote Quote  
  12. Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21
    So I went to random_builds >> ffmpeg_git_x26x_high_bitdepth_shared.installed.zip 2016-09-06

    Supported pixel formats: yuv420p10le yuv422p10le yuv444p10le nv20le
    It's support yuv420p10le but not supported avs script, maybe I have to wait till next update and I hope they support avs script for yuv420p10le

    anyway thank you so much pandy or helping =) .
    Quote Quote  
  13. AviSynth is 8 bit only. For more than 8 bit input you need to use a pipe with the interleaved "hack" or maybe AviSynth+ (though I don't know if ffmpeg supports the AviSynth+ additions). That's for the input - ffmpeg should be able to convert 8 bit input to 10 bit for encoding.
    Quote Quote  
  14. FFmpegSource2("DC_MV.mp4")
    Actually all videos that I used for input are 8bit, and the error that I got is "HD.avs: Unknown errors occurred "


    interleaved "hack"
    any example!


    About avs2yuv not support audio import only wav as I know --"
    I will try to use AviSynth+ later.

    Thanx again .
    Quote Quote  
  15. Originally Posted by alkoon View Post
    Actually all videos that I used for input are 8bit, and the error that I got is "HD.avs: Unknown errors occurred "
    You cannot use 64 bit ffmpeg to open 32 bit AviSynth. Compile ffmpeg as 32 bit.

    Originally Posted by alkoon View Post
    interleaved "hack"
    any example!
    http://avisynth.nl/index.php/High_bit-depth_Support_with_Avisynth

    Originally Posted by alkoon View Post
    About avs2yuv not support audio import only wav as I know --"
    I don't know why that is relevant.
    Quote Quote  



Similar Threads