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 > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th June 2009, 15:57   #21  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by CAFxX View Post
As a side note, how do I pipe a series of PNG images (BBB) to x264?
AviSynth (ImageSource), MPlayer or MEncoder (mf://*.png -mf fps=24), ffmpeg, ...
nm is offline   Reply With Quote
Old 2nd July 2009, 16:10   #22  |  Link
CAFxX
Stray Developer
 
CAFxX's Avatar
 
Join Date: Mar 2003
Location: Italy
Posts: 82
How am I supposed to tell mencoder to output the images on stdout so that I can pipe it to x264?
__________________
CAFxXcrossway, a collection of my projects
CAFxX@strayorange, my blog
CAFxX is offline   Reply With Quote
Old 2nd July 2009, 16:20   #23  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by CAFxX View Post
How am I supposed to tell mencoder to output the images on stdout so that I can pipe it to x264?
MEncoder -of rawvideo -o - "c:\source.avi" | x264 --crf 22 --output "c:\out.mkv" --fps 25 --frames 1000 - 1280x720
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 2nd July 2009 at 16:23.
LoRd_MuldeR is offline   Reply With Quote
Old 2nd July 2009, 16:29   #24  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by CAFxX View Post
How am I supposed to tell mencoder to output the images on stdout so that I can pipe it to x264?
http://forum.doom9.org/showthread.php?t=144094

You can convert the image sequence to a yuv4mpeg file with mplayer -vo yuv4mpeg:file=out.y4m, which x264 can parse directly. This also works through a special FIFO file so that the intermediate video doesn't need to be written to disk. On Windows you'll need Cygwin or this.

Or you could link MEncoder against your custom libx264 version and use MEncoder's x264 interface: -of rawvideo -o out.264 -ovc x264 -x264encopts ...
nm is offline   Reply With Quote
Old 2nd July 2009, 16:39   #25  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by LoRd_MuldeR View Post
MEncoder -of rawvideo -o - "c:\source.avi" | x264 --crf 22 --output "c:\out.mkv" --fps 25 --frames 1000 - 1280x720
This bold part is probably also required (-nosound only if the input has an audio track):

mencoder -really-quiet -nosound -vf format=i420 -ovc raw -of rawvideo -o - mf://*.png | x264 --crf 22 --output out.mkv --fps 25 - 1280x720
nm is offline   Reply With Quote
Old 2nd July 2009, 17:11   #26  |  Link
CAFxX
Stray Developer
 
CAFxX's Avatar
 
Join Date: Mar 2003
Location: Italy
Posts: 82
Code:
cafxx@cafxx-vm2:~/Storage/BBB$ mplayer -nosound -vf format=i420 -ovc raw - "mf://*.png"
MPlayer 1.0rc2-4.3.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz (Family: 6, Model: 23, Stepping: 7)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Unknown option on the command line: -ovc
Error parsing option on the command line: -ovc
I can't find in the -vo option documentation an alternative to -ovc raw...
__________________
CAFxXcrossway, a collection of my projects
CAFxX@strayorange, my blog
CAFxX is offline   Reply With Quote
Old 2nd July 2009, 17:19   #27  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Use MEncoder, not MPlayer
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 2nd July 2009, 17:19   #28  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by CAFxX View Post
I can't find in the -vo option documentation an alternative to -ovc raw...
That's because there isn't one. Use -vo yuv4mpeg with MPlayer.
nm is offline   Reply With Quote
Old 2nd July 2009, 17:22   #29  |  Link
CAFxX
Stray Developer
 
CAFxX's Avatar
 
Join Date: Mar 2003
Location: Italy
Posts: 82
Quote:
Originally Posted by nm View Post
That's because there isn't one. Use -vo yuv4mpeg with MPlayer.
In this case, how do I specify to x264 that what's coming in from stdin is a yuv4mpeg?
__________________
CAFxXcrossway, a collection of my projects
CAFxX@strayorange, my blog
CAFxX is offline   Reply With Quote
Old 2nd July 2009, 17:25   #30  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by CAFxX View Post
In this case, how do I specify to x264 that what's coming in from stdin is a yuv4mpeg?
You use a named pipe.
Dark Shikari is offline   Reply With Quote
Old 2nd July 2009, 17:26   #31  |  Link
thewebchat
Advanced Blogging
 
Join Date: May 2009
Posts: 480
You don't. x264 only accepts YUV on stdin. You can make a named pipe or give up or something.
thewebchat is offline   Reply With Quote
Old 2nd July 2009, 17:38   #32  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by LoRd_MuldeR View Post
MEncoder -of rawvideo -o - "c:\source.avi" | x264 --crf 22 --output "c:\out.mkv" --fps 25 --frames 1000 - 1280x720
Don't forget -really-quiet otherwise mencoder will produce garbage to stdout.

However, there are still printf code hiding in mencoder. They may sometimes give you a surprise.
roozhou is offline   Reply With Quote
Old 6th July 2009, 17:00   #33  |  Link
CAFxX
Stray Developer
 
CAFxX's Avatar
 
Join Date: Mar 2003
Location: Italy
Posts: 82
I finally managed to do some testing. Results here.

Pretty graph FTW:
__________________
CAFxXcrossway, a collection of my projects
CAFxX@strayorange, my blog
CAFxX is offline   Reply With Quote
Old 6th July 2009, 19:11   #34  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
I asked for B-frames 1, 2, and 3; above that I don't expect to be able to find any significant improvement among anything, so you won't be able to do a meaningful measurement.
Dark Shikari is offline   Reply With Quote
Reply

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 21:53.


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