Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th November 2015, 20:42   #1  |  Link
Sivar
Registered User
 
Join Date: Apr 2004
Location: SE Idaho
Posts: 21
Alleged x265 crash

Have others had frequent, serious problems with x265?
Using the most recent Staxrip with x265 1.7, 1.8, and 1.8 nightlies I've found:

1) Use of --frame-threads 1 nearly always crashes x265 after a few percent of the file, the last log entry: av_interleaved_write_frame(): Broken pipe. I tried manually installing the most recent Avisynth with no change. Attached is a log from a failed encode of a 2-minute clip from "Captain America".

2) Sometimes x265 will unceremoniously die without error, warning, or log entry. Attached is a log from such a situation (sans error).


The problems may be related to StaxRip, but Stax76's software always seems so amazingly robust and well-designed, and once the encode is going I am not sure how it could cause such a failure mode. Perhaps AVISynth or other software may be involved, too.

As a side note, why would Doom9 of all forums not allow users to directly upload log files? Zipping them is not a big deal, but it seems strange.
Attached Files
File Type: zip EncodeExperiment.zip (4.1 KB, 17 views)
Sivar is offline   Reply With Quote
Old 27th November 2015, 21:03   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,134
If you think you found a reproducible crash in x265, the first thing to do is: Eliminate Avisynth!

There are way too many things that can go wrong on the Avisynth side. So, to be 100% sure this really is a x265 issue, run x265 directly from command-line and encode directly from an existing Y4M file. Or, maybe, pipe input from FFmpeg.

If the problem then still occurs, please post your exact x265 version and the exact x265 command-line to reproduce the crash - alongside with the shortest possible a sample that can be used to reproduce the crash.


Quote:
Originally Posted by Sivar View Post
As a side note, why would Doom9 of all forums not allow users to directly upload log files? Zipping them is not a big deal, but it seems strange.
Have you tried uploading your files with a .txt extension? If it still doesn't work, you probably ran into the size limit.
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 27th November 2015 at 21:35.
LoRd_MuldeR is offline   Reply With Quote
Old 28th November 2015, 17:18   #3  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 325
Quote:
Originally Posted by Sivar View Post
1) Use of --frame-threads 1 nearly always crashes x265 after a few percent of the file, the last log entry: av_interleaved_write_frame(): Broken pipe. I tried manually installing the most recent Avisynth with no change. Attached is a log from a failed encode of a 2-minute clip from "Captain America".
It could be ffmpeg bug. You can download current 64-bit static ffmpeg build from site
http://ffmpeg.zeranoe.com/builds/
and replace ffmpeg.exe in your "C:\StaxRip\Apps\ffmpeg\" folder.
Ma is offline   Reply With Quote
Old 29th November 2015, 19:30   #4  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,241
Quote:
Originally Posted by Ma View Post
It could be ffmpeg bug. You can download current 64-bit static ffmpeg build from site
http://ffmpeg.zeranoe.com/builds/
and replace ffmpeg.exe in your "C:\StaxRip\Apps\ffmpeg\" folder.
I was having the exact same problem a month or so ago. I thought it was x265, but that is a ffmpeg error message, and the problems went away when I switched to a more recent ffmpeg build.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 3rd December 2015, 06:29   #5  |  Link
Sivar
Registered User
 
Join Date: Apr 2004
Location: SE Idaho
Posts: 21
Thank you for your advice. While cycle times are long, I will try to remember to report for other readers if use of the most recent FFmpeg yields consistent success.
Sivar is offline   Reply With Quote
Old 3rd December 2015, 08:01   #6  |  Link
x265_Project
Registered User
 
Join Date: Jul 2013
Posts: 596
Quote:
Originally Posted by Sivar View Post
Thank you for your advice. While cycle times are long, I will try to remember to report for other readers if use of the most recent FFmpeg yields consistent success.
You're not the first to conclude that x265 must be at fault when it's used with some application or media processing library that you know and trust. But x265 is constantly being improved, and our APIs change every now and then. If the application calling x265 doesn't update the parameters they are passing x265, you will run into problems. If x265 encoding fails in an application, a good first step towards figuring out which component is the culprit is to try the same encode in x265 directly (through the x265 command line interface). This isn't always easy, as you may have to decode and process your source video in a separate step, saving a large YUV or Y4M file, but it will usually provide the answer.

Now can we change the title of this thread?!

Tom
x265_Project is offline   Reply With Quote
Old 3rd December 2015, 08:05   #7  |  Link
shae
Registered User
 
Join Date: Jun 2006
Posts: 347
Why doesn't x265 accept compressed formats as input?
shae is offline   Reply With Quote
Old 3rd December 2015, 08:15   #8  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,548
http://forum.doom9.org/showpost.php?...postcount=1771
sneaker_ger is offline   Reply With Quote
Old 4th December 2015, 00:13   #9  |  Link
shae
Registered User
 
Join Date: Jun 2006
Posts: 347
For the library itself it definitely makes sense, but it's also a commandline program. Making use of an external decoder lib/program would make it more usable, like x264.

Last edited by shae; 4th December 2015 at 00:19.
shae is offline   Reply With Quote
Old 4th December 2015, 14:32   #10  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,495
It's not necessary; that would be equivalent to:

ffmpeg -i file.mkv -f y4m - | x265 - --y4m ....

which can be encapsulated in a batch file if you must. (Might need -strict -1 for 10-bit and up.) x264 only included it because someone else contributed it.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 4th December 2015, 15:31   #11  |  Link
shinchiro
Registered User
 
Join Date: Feb 2012
Posts: 46
^you missing some args
These is what basically work to pipe y4m to x265..
ffmpeg -i input.mkv -f yuv4mpegpipe -pix_fmt yuv420p - | x265 --y4m --preset medium --output output.mkv -
shinchiro is offline   Reply With Quote
Old 8th December 2015, 05:16   #12  |  Link
Sivar
Registered User
 
Join Date: Apr 2004
Location: SE Idaho
Posts: 21
Admittedly, I haven't tried a single-thread encode again because they take a bit of time to complete. Aside from a small probability that single-thread encodes are unrelated to the other problems I ran into, it appears so far that my x265 issues were a combination of:
1. An old version of ffmpeg
2. Two bad source videos. The sources had graphical corruption in one spot roughly midway through the video.

I've never experienced either until my first look into x265, and I've transcoded a lot of media and have spend hundreds of hours researching, programming for, and tweaking my transcoding hobby. I thought that gave me the right to commit the cardinal sin of assuming that correlation implied causation. My apologies to the x265 team.

Last edited by Sivar; 8th December 2015 at 05:20. Reason: Added note about single-thread encoding
Sivar is offline   Reply With Quote
Old 9th December 2015, 09:03   #13  |  Link
kuchikirukia
Registered User
 
Join Date: Oct 2014
Posts: 460
Quote:
Originally Posted by shae View Post
For the library itself it definitely makes sense, but it's also a commandline program. Making use of an external decoder lib/program would make it more usable, like x264.
It's adding a bunch of work to add something that is merely a copy of other projects. It's like asking why they don't include an OS with the project so you can boot into x265, too. Windows exists. Why reinvent the wheel?

No decoder has achieved perfection, so adding a decoder is adding another project that will surely need some work. It's better to leave the decoder work to the decoder projects so x265 can concentrate wholly on encoding.
kuchikirukia is offline   Reply With Quote
Old 13th December 2015, 05:16   #14  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 870
Quote:
Originally Posted by shae View Post
Why doesn't x265 accept compressed formats as input?
It can. We have patches for that.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 8th January 2016, 16:06   #15  |  Link
shae
Registered User
 
Join Date: Jun 2006
Posts: 347
Thanks.
shae is offline   Reply With Quote
Reply

Tags
staxrip, x265

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.