Log in

View Full Version : ffmpeg x265 pipe no audio


dooley2009
15th June 2017, 03:04
I am using a static version of ffmpeg and x265 to encode an 8 bit .mp4 to 10 bit.

Everything goes great but there is no sound! I've looked everywhere for an answer.

Can anyone help me?

ffmpeg.exe -hwaccel auto -ss 00:26:45 -y -t 10 -i "vid.mp4" -c:a libfaac -ar 48k -b:a 210k -map 0:0 -an -sn -vsync 0 -strict -1 -pix_fmt yuv444p10le -f yuv4mpegpipe - | x265 --preset medium --input - --output-depth 10 --y4m --crf 18.00 "vid(10bit).mp4"

stax76
15th June 2017, 03:52
Your ffmpeg output is just video to pipe. You have to process audio separately, I don't see a reason though why you use x265.exe, you might as well use ffmpeg for x265 encoding.

dooley2009
15th June 2017, 04:36
I have tried everything to get ffmpeg to output a 10 bit video but it wont.

Here is my code for that attempt. Always comes out 8 bit.

ffmpeg.exe -hwaccel auto -y -i "vid (8bit).mp4" -preset medium -crf 18 -c:a aac -b:a 192k -c:v libx265 -x265-params -format yuv420p10le "Vid (10bit).mp4"


And here is the result.

C:\Users>ffmpeg.exe -hwaccel auto -y -ss 00:26:45 -t 5 -i "vid (8bit).mp4" -preset medium -crf 18 -c:a aac -b:a 192k -c:v libx265_Main10 -x265-params -format yuv420p10le "vid (10bit).mp4"
ffmpeg version N-86383-g4705edb Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 63.100 / 55. 63.100
libavcodec 57. 96.101 / 57. 96.101
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 91.100 / 6. 91.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\JDesktop\Desktop\Video Encoding\Test Video\vid.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:27:17.57, start: 0.000000, bitrate: 7001 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 6801 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
handler_name : SoundHandler
[NULL @ 0000000003011520] Unable to find a suitable output format for 'yuv420p10le'
yuv420p10le: Invalid argument

Also I don't know how to go about processing the audio separately. Do you know how a place I can look for instructions?

Thanks for helping.

dooley2009
15th June 2017, 04:41
I cant get ffmpeg to output 10 bit.

Here is my code


ffmpeg.exe -hwaccel auto -y -i "vid (8bit).mp4" -preset medium -crf 18 -c:a aac -b:a 192k -c:v libx265 -x265-params -format yuv420p10le "Vid(10bit).mp4"

I also tried this.

ffmpeg.exe -hwaccel auto -y -i "vid (8bit).mp4" -preset medium -crf 18 -c:a aac -b:a 192k -c:v libx265 -x265-params -pix_fmt yuv444p10le "Vid(10bit).mp4"


I get the error at the very bottom

[NULL @ 0000000003011520] Unable to find a suitable output format for 'yuv420p10le'
yuv420p10le: Invalid argument


I don't know how to output the audio separately. Can you recommend some instructions or examples?

Thanks for helping. This has driven me crazy.

stax76
15th June 2017, 04:44
I'm a GUI user, wait a few hours for a CLI user to help you, sorry.

sneaker_ger
15th June 2017, 07:41
Either get/build ffmpeg binary with 10 bit x265 support (https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=10&t=3691) or do a 3 step process:
ffmpeg.exe -y -hwaccel auto -ss 00:26:45 -t 10 -i "vid.mp4" -map 0:v:0 -pix_fmt yuv420p10le -f yuv4mpegpipe - | x265 --preset medium --input - --output-depth 10 --y4m --crf 18.00 "vid(10bit).265"
ffmpeg.exe -y -ss 00:26:45 -t 10 -i "vid.mp4" -map 0:a:0 -c:a aac -ar 48k -b:a 210k audio.m4a
mp4box -add "vid(10bit).265" -add "audio.m4a" -new "output.mp4"

dooley2009
15th June 2017, 12:25
Thank you so much. I ended up compiling my own library using only a 10 bit version of x265.

When I get home I'm going to also test your command line.

Thanks again to everyone who tried to help me out.