View Full Version : ffmpeg pipe to x265, length is shorter?
zerowalker
7th April 2016, 21:26
Hi,
I have tried encoding an avi file with x265 using ffmpeg to pipe the data.
However, the encoded file is shorter.
The end seems to be the same, though the time is incorrect, meaning somewhere it must cut something.
No clue what can be wrong:(
ffmpeg -i input -f yuv4mpegpipe -pix_fmt yuv420p - | x265 --y4m --colormatrix bt709 --transfer bt709 --colorprim bt709 --range limited -o output -
Original: 07:41:43
Encoded: 07:32:25
poisondeathray
8th April 2016, 02:14
What container are you using ?
Check the frame count and frame rate before, and after.
Check if it's a decoding problem of source, or decoding problem of output ?
zerowalker
8th April 2016, 04:17
What container are you using ?
Check the frame count and frame rate before, and after.
Check if it's a decoding problem of source, or decoding problem of output ?
Container is Matroska.
I encode to 265, but put it in an MKV using MKVToolnix
ffmpeg won't work to mux, think i have seen this issue once before with an x264 file that also only worked with MKVToolnix.
[matroska @ 00000000027b5720] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in
the future. Fix your code to set the timestamps properly
[matroska @ 00000000027b5720] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
MediaInfo says:
Original:
Frame rate : 24.000
Frame rate : 24.000 fps
Frame count : 248831
Encoded x265:
Frame rate : 24.000
Frame rate : 24.000 fps
Frame count : 651484
Though Avisynth says: 664888 frames for the Original.
zerowalker
8th April 2016, 23:52
Okay now did two versions.
One with ffmpeg encoding video and audio (8bit).
Another using Avisynth and x265, and ffmpeg for the audio than muxing them.
the ffmpeg encoding is about 100ms longer.
I would prefer to use ffmpeg instead of doing separate encodings and muxing.
But i can't find any new builds of ffmpeg with x265 10bit.
Does anyone know of any place to get such builds?
Thanks:)
EDIT: though for some reason the ffmpeg encoded file says it's VFR 24fps, not sure why. Avisynth version is CFR, but i guess that's cause it's forces that.
Motenai Yoda
10th April 2016, 21:58
you need to set pixel format for output to 10 bit
zerowalker
10th April 2016, 23:10
Doesn't ffmpeg need to be built with the 10bit version?
Like it has to with x264?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.