ivfenc to webm

1,273 views
Skip to first unread message

Kai Hendry

unread,
Oct 11, 2010, 4:21:52 PM10/11/10
to WebM Discussion
I did search this forum and peer at the FAQ, but still I couldn't
frustrating figure out how to convert the "output_vp8.ivf" to a webm
file for playback. Could someone please tell me?

I've just upgraded to Ubuntu "maverick" and I'm looking to convert the
MOV files from the CLI produced by my http://natalian.org/archives/2010/10/11/Canon_IXUS_1000_HS/
into "HD" (whatever that means) videos on my http://video.natalian.org/
site.

I'm also looking for encoding options which basically make the
filesize as small as possible. I have quite a powerful i7 machine, but
a very poor UK broadband upload channel.


I hope you can help. Many thanks,

James Zern

unread,
Oct 11, 2010, 5:28:11 PM10/11/10
to webm-d...@webmproject.org
On Mon, Oct 11, 2010 at 13:21, Kai Hendry <kai.h...@gmail.com> wrote:
> I did search this forum and peer at the FAQ, but still I couldn't
> frustrating figure out how to convert the "output_vp8.ivf" to a webm
> file for playback. Could someone please tell me?
>
This can be done with ffmpeg, for example:
$ ffmpeg -i output_vp8.ivf -vcodec copy output.webm

Yaowu Xu

unread,
Oct 11, 2010, 5:33:04 PM10/11/10
to webm-d...@webmproject.org
http://www.webmproject.org/tools/encoder-parameters/ should be a good
starting point to learn about all the encoder options. . The first few
sample command lines in section 10 would work fine for you as far as I
can see.


>
> I hope you can help. Many thanks,
>

> --
> You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
> For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
>
>

Kai Hendry

unread,
Oct 12, 2010, 4:05:58 PM10/12/10
to WebM Discussion
Hmm, didn't work. Am I missing something?

hendry@x201 libvpx$ file output_vp8.ivf
output_vp8.ivf: data
hendry@x201 libvpx$ ffmpeg -i output_vp8.ivf -vcodec copy output.webm
FFmpeg version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg
developers
built on Oct 5 2010 22:35:47 with gcc 4.4.5
configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/usr --enable-
avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-
libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --
enable-libvorbis --enable-vaapi --enable-pthreads --enable-zlib --
enable-libvpx --disable-stripping --enable-runtime-cpudetect --enable-
gpl --enable-postproc --enable-x11grab --enable-libdc1394 --enable-
shared --disable-static
WARNING: library configuration mismatch
libavutil configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/
usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-
bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --
enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --
enable-zlib --enable-libvpx --disable-stripping --enable-runtime-
cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-
libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --
disable-static --disable-ffmpeg --disable-ffplay
libavcodec configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/
usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-
bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --
enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --
enable-zlib --enable-libvpx --disable-stripping --enable-runtime-
cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-
libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --
disable-static --disable-ffmpeg --disable-ffplay
libavformat configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/
usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-
bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --
enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --
enable-zlib --enable-libvpx --disable-stripping --enable-runtime-
cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-
libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --
disable-static --disable-ffmpeg --disable-ffplay
libavdevice configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/
usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-
bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --
enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --
enable-zlib --enable-libvpx --disable-stripping --enable-runtime-
cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-
libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --
disable-static --disable-ffmpeg --disable-ffplay
libavfilter configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/
usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-
bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --
enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --
enable-zlib --enable-libvpx --disable-stripping --enable-runtime-
cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-
libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --
disable-static --disable-ffmpeg --disable-ffplay
libswscale configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/
usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-
bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --
enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --
enable-zlib --enable-libvpx --disable-stripping --enable-runtime-
cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-
libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --
disable-static --disable-ffmpeg --disable-ffplay
libpostproc configuration: --extra-version=4:0.6-2ubuntu6 --prefix=/
usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-
bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --
enable-libtheora --enable-libvorbis --enable-vaapi --enable-pthreads --
enable-zlib --enable-libvpx --disable-stripping --enable-runtime-
cpudetect --enable-gpl --enable-postproc --enable-x11grab --enable-
libdc1394 --shlibdir=/usr/lib/i686/cmov --cpu=i686 --enable-shared --
disable-static --disable-ffmpeg --disable-ffplay
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
output_vp8.ivf: Invalid data found when processing input

hendry@x201 ~$ ffmpeg -formats 2> /dev/null | grep WebM
E webm WebM file format
hendry@x201 ~$ ffmpeg -codecs 2> /dev/null | grep libvpx
DEV libvpx libvpx VP8
hendry@x201 ~$


I think the `ivfenc` is vp8 - WebM Project VP8 Encoder v0.9.2-89-
g4d2b178
I'm typically building straight from git.

Kai Hendry

unread,
Oct 12, 2010, 4:07:01 PM10/12/10
to WebM Discussion
On Oct 11, 10:33 pm, Yaowu Xu <ya...@google.com> wrote:
> http://www.webmproject.org/tools/encoder-parameters/should be a good
> starting point to learn about all the encoder options. . The first few
> sample command lines in section 10 would work fine for you as far as I
> can see.

I'm aware of http://www.webmproject.org/tools/encoder-parameters/#10_sample_command_lines
though they aren't ordered in the sense which should produce the
smallest file size, now are they? :)

Johann Koenig

unread,
Oct 12, 2010, 4:15:48 PM10/12/10
to webm-d...@webmproject.org
On Tue, Oct 12, 2010 at 16:05, Kai Hendry <kai.h...@gmail.com> wrote:
> hendry@x201 libvpx$ ffmpeg -i output_vp8.ivf -vcodec copy output.webm
> FFmpeg version 0.6-4:0.6-2ubuntu6, Copyright (c) 2000-2010 the FFmpeg
> developers
>  built on Oct  5 2010 22:35:47 with gcc 4.4.5

I believe IVF support is fairly new in ffmpeg. This says it was built
on Oct 5, but when is the checkout from?

The only references to 0.6 seem to indicate it's from around May:
http://git.ffmpeg.org/?p=ffmpeg&a=search&h=HEAD&st=commit&s=0.6

It might have missed the IVF demuxer:
http://www.listware.net/201005/mplayer-ffmpeg-devel/76172-ffmpeg-devel-patch-ivf-demuxer.html
(applied 5/27)
--
- johann koenig
google

Johann Koenig

unread,
Oct 12, 2010, 4:19:12 PM10/12/10
to webm-d...@webmproject.org
On Tue, Oct 12, 2010 at 16:15, Johann Koenig <johann...@google.com> wrote:
> The only references to 0.6 seem to indicate it's from around May:
> http://git.ffmpeg.org/?p=ffmpeg&a=search&h=HEAD&st=commit&s=0.6

Sorry, looking in the wrong place. Looks like 0.6 was released in
June. But the news item, changelog and release notes don't mention
IVF.

Kai Hendry

unread,
Oct 12, 2010, 4:31:14 PM10/12/10
to WebM Discussion
On Oct 12, 9:15 pm, Johann Koenig <johannkoe...@google.com> wrote:
> I believe IVF support is fairly new in ffmpeg. This says it was built
> on Oct 5, but when is the checkout from?

http://packages.ubuntu.com/maverick/ffmpeg

So I need rebuild ffmpeg?

Be good if you had a working ffmpeg with some sort of ffmpeg -formats
test

Johann Koenig

unread,
Oct 12, 2010, 4:37:19 PM10/12/10
to webm-d...@webmproject.org
On Tue, Oct 12, 2010 at 16:31, Kai Hendry <kai.h...@gmail.com> wrote:
> On Oct 12, 9:15 pm, Johann Koenig <johannkoe...@google.com> wrote:
>> I believe IVF support is fairly new in ffmpeg. This says it was built
>> on Oct 5, but when is the checkout from?
>
> http://packages.ubuntu.com/maverick/ffmpeg
>
> So I need rebuild ffmpeg?

Before you do that, it'd be worth verifying the ivf file. Does it
decode with ivfdec from libvpx?

Johann Koenig

unread,
Oct 12, 2010, 4:51:28 PM10/12/10
to webm-d...@webmproject.org
On Tue, Oct 12, 2010 at 16:37, Johann Koenig <johann...@google.com> wrote:
> On Tue, Oct 12, 2010 at 16:31, Kai Hendry <kai.h...@gmail.com> wrote:
>> On Oct 12, 9:15 pm, Johann Koenig <johannkoe...@google.com> wrote:
>>> I believe IVF support is fairly new in ffmpeg. This says it was built
>>> on Oct 5, but when is the checkout from?
>>
>> http://packages.ubuntu.com/maverick/ffmpeg
>>
>> So I need rebuild ffmpeg?

Unless maverick is tracking HEAD, yes. Both webm and ivf are targeted
towards the next (yet unnumbered) release:
http://git.ffmpeg.org/?p=ffmpeg;a=blob;f=Changelog

> Before you do that, it'd be worth verifying the ivf file. Does it
> decode with ivfdec from libvpx?

Still do that though.

Kai Hendry

unread,
Oct 12, 2010, 5:29:02 PM10/12/10
to WebM Discussion
On Oct 12, 9:37 pm, Johann Koenig <johannkoe...@google.com> wrote:
> Before you do that, it'd be worth verifying the ivf file. Does it
> decode with ivfdec from libvpx?

Yes, ivfdev exits cleanly and seems to produces img-1280x720-
{0001..0032}.i420

Whatever they are. :-)

Kai Hendry

unread,
Oct 12, 2010, 6:01:05 PM10/12/10
to WebM Discussion
On Oct 12, 9:51 pm, Johann Koenig <johannkoe...@google.com> wrote:
> Unless maverick is tracking HEAD, yes. Both webm and ivf are targeted
> towards the next (yet unnumbered) release:http://git.ffmpeg.org/?p=ffmpeg;a=blob;f=Changelog

I built ffmpeg from git and it did execute:

hendry@x201 ffmpeg$ ./ffmpeg -i output_vp8.ivf -vcodec copy
output.webm
FFmpeg version git-935b671, Copyright (c) 2000-2010 the FFmpeg
developers
built on Oct 12 2010 22:48:38 with gcc 4.4.5
configuration:
libavutil 50.32. 3 / 50.32. 3
libavcore 0. 9. 1 / 0. 9. 1
libavcodec 52.92. 0 / 52.92. 0
libavformat 52.81. 0 / 52.81. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.51. 1 / 1.51. 1
libswscale 0.12. 0 / 0.12. 0
Input #0, ivf, from 'output_vp8.ivf':
Duration: 00:00:00.53, start: 0.000000, bitrate: 135597 kb/s
Stream #0.0: Video: vp8, yuv420p, 1280x720, 60 tbr, 60 tbn, 60 tbc
Output #0, webm, to 'output.webm':
Metadata:
encoder : Lavf52.81.0
Stream #0.0: Video: VP80 / 0x30385056, yuv420p, 1280x720, q=2-31,
1k tbn, 60 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
frame= 32 fps= 0 q=-1.0 Lsize= 8828kB time=1.05
bitrate=68943.2kbits/s
video:8828kB audio:0kB global headers:0kB muxing overhead 0.008186%

However when I mplayer the output.webm, it's all just garbled. :(

Be good if you sent some patches to http://www.darwinsys.com/file/ so
`file` would return some more telling than "data".

I placed a temporary copy on http://static.dabase.com/output.webm if
you are interested in inspecting the file yourself.


Incidentally I'm having better luck with http://www.transcoder.org/
though I'm not a fan of GUIs.

James Zern

unread,
Oct 12, 2010, 6:34:37 PM10/12/10
to webm-d...@webmproject.org
On Tue, Oct 12, 2010 at 13:05, Kai Hendry <kai.h...@gmail.com> wrote:
> Hmm, didn't work. Am I missing something?
>
> [...]

>
> hendry@x201 ~$ ffmpeg -formats 2> /dev/null | grep WebM
>  E webm            WebM file format
> hendry@x201 ~$ ffmpeg -codecs 2> /dev/null | grep libvpx
>  DEV    libvpx          libvpx VP8
> hendry@x201 ~$
>
You would want to add IVF to your formats test.

James Zern

unread,
Oct 12, 2010, 6:40:54 PM10/12/10
to webm-d...@webmproject.org
This looks more like noise from a capture rather than garbled. I would
think the output from ivfdec would be similar; if you post the ivf
source we can know for sure.

James Zern

unread,
Oct 12, 2010, 6:43:59 PM10/12/10
to webm-d...@webmproject.org
On Tue, Oct 12, 2010 at 15:01, Kai Hendry <kai.h...@gmail.com> wrote:
>
> Be good if you sent some patches to http://www.darwinsys.com/file/ so
> `file` would return some more telling than "data".
>
Seems there was a patch sent for webm files [1], but nothing for IVF
as far as I can tell.

[1]: http://mx.gw.com/pipermail/file/2010/000588.html

Kai Hendry

unread,
Oct 13, 2010, 5:20:03 AM10/13/10
to WebM Discussion
On Oct 12, 11:40 pm, James Zern <jz...@google.com> wrote:
> This looks more like noise from a capture rather than garbled. I would
> think the output from ivfdec would be similar; if you post the ivf
> source we can know for sure.

By way of "source", you mean all those i420 files? I uploaded them
_temporarily_ to:
http://static.dabase.com/

Johann Koenig

unread,
Oct 13, 2010, 9:13:23 AM10/13/10
to webm-d...@webmproject.org

You can view them with display from the imagemagick package:
display -size 1280x720 yuv:img-1280x720-0001.i420

Johann Koenig

unread,
Oct 13, 2010, 9:14:53 AM10/13/10
to webm-d...@webmproject.org

You can save a lot of space by uploading the ivf file instead and the
output of ivfdec --md5 <file>

James Zern

unread,
Oct 13, 2010, 2:17:27 PM10/13/10
to webm-d...@webmproject.org
I meant the source of output_vp8.ivf not the decoded output from
ivfdec, but these do show the same output as the webm file.

James Zern

unread,
Oct 13, 2010, 2:20:52 PM10/13/10
to webm-d...@webmproject.org
Another option, if you cat the files together, is mplayer's rawvideo demuxer:
$ mplayer -demuxer rawvideo -rawvideo w=1280:h=720:i420 img.i420

Kai Hendry

unread,
Oct 13, 2010, 5:36:45 PM10/13/10
to WebM Discussion
On Oct 13, 2:13 pm, Johann Koenig <johannkoe...@google.com> wrote:
> You can view them with display from the imagemagick package:
> display -size 1280x720 yuv:img-1280x720-0001.i420

Ok, I gather you can't run ivfenc on a .mov file. Pity ivfenc was not
clever enough to complain.

How do I convert the mov produced by my camera for something the
ivfenc to work upon?


I really think the FAQ/docs needs to be improved, since I can't be the
only one to encounter these pitfalls. :}

James Zern

unread,
Oct 13, 2010, 7:45:40 PM10/13/10
to webm-d...@webmproject.org
On Wed, Oct 13, 2010 at 14:36, Kai Hendry <kai.h...@gmail.com> wrote:
> On Oct 13, 2:13 pm, Johann Koenig <johannkoe...@google.com> wrote:
>> You can view them with display from the imagemagick package:
>> display -size 1280x720 yuv:img-1280x720-0001.i420
>
> Ok, I gather you can't run ivfenc on a .mov file. Pity ivfenc was not
> clever enough to complain.
>
Correct it only accepts raw input.

> How do I convert the mov produced by my camera for something the
> ivfenc to work upon?
>

You could, for instance, use ffmpeg to decode the file to yuv:
$ ffmpeg -i input.mov output.yuv

John Koleszar

unread,
Oct 14, 2010, 10:37:25 AM10/14/10
to webm-d...@webmproject.org

Or pipe from ffmpeg, to avoid storing the raw video on your disk:

$ ffmpeg -i file.mov -f yuv4mpegpipe - 2>/dev/null | ivfenc --options
- output.ivf

Then convert the ivf to a webm file:

$ ffmpeg -i output.ivf -vcodec copy output.webm

This will get a little bit easier soon when webm writing support is
added to ivfenc. Still will need to feed it the uncompressed data
somehow though.

John

Kai Hendry

unread,
Oct 19, 2010, 10:12:18 AM10/19/10
to WebM Discussion
On Oct 14, 12:45 am, James Zern <jz...@google.com> wrote:
> You could, for instance, use ffmpeg to decode the file to yuv:
>  $ ffmpeg -i input.mov output.yuv

I've built ffmpeg and libvpx on a new machine at http://webm.naovi.com/
and still I am not producing a webm video I can playback. :(

I am starting to think, perhaps my http://webm.naovi.com/output.yuv
from the initial conversion is not correct. Can you please confirm
this initial step is at least being done correctly?


Kind regards,

Daniel Wright

unread,
Oct 19, 2010, 10:56:33 AM10/19/10
to webm-d...@webmproject.org
I tried your yuv file, but got an error, so you may be right about issues with the conversion to yuv step.  I use this command line I found a while ago for converting to YUV, and so far it's worked fine for me:

ffmpeg -i INPUT  -v 0 -vcodec rawvideo -pix_fmt yuv420p -vsync 0 -an -f rawvideo OUTPUT


Daniel Wright

unread,
Oct 19, 2010, 11:11:52 AM10/19/10
to webm-d...@webmproject.org
Hey, a little update on your original yuv file - I was able to make it work after I discovered that the dimensions are actually 1920x1088.  QT reports the video as 1920x1080, and it's listed that way in the tkhd track header of the input file, but that seems to be incorrect.

John Koleszar

unread,
Oct 19, 2010, 11:30:53 AM10/19/10
to webm-d...@webmproject.org
Agree. The problem is in your test.sh script. ffmpeg passes the
correct w&h to ivfenc, but you override it to be 1280x720. ivfenc does
not support scaling if that's what you're trying to do (but ffmpeg
can, before piping to ivfenc). Suggest removing '--i420 -w 1280 -h
720' from your command line. A quick sanity test shows this seems to
work:

$ ffmpeg -i samurai-ambush.mov -f yuv4mpegpipe - 2>/dev/null |
~/on2/build/ivfenc --limit=10 --target-bitrate=2000 - sam.ivf
$ ~/on2/build/ivfdec -y -o sam.y4m sam.ivf
$ mplayer sam.y4m

Kai Hendry

unread,
Oct 19, 2010, 5:50:28 PM10/19/10
to WebM Discussion
On Oct 12, 11:34 pm, James Zern <jz...@google.com> wrote:
> You would want to add IVF to your formats test.

http://webm.naovi.com/ffmpeg-version.txt

Kai Hendry

unread,
Oct 19, 2010, 5:53:22 PM10/19/10
to WebM Discussion
On Oct 19, 4:30 pm, John Koleszar <jkoles...@google.com> wrote:
> $ ffmpeg -i samurai-ambush.mov -f yuv4mpegpipe - 2>/dev/null |

`ffmpeg -i samurai-ambush.mov -f yuv4mpegpipe -` does not work for me.
I get a:

[yuv4mpegpipe @ 0xa4848c0] ERROR: yuv4mpeg only handles yuv444p,
yuv422p, yuv420p, yuv411p and gray pixel formats. Use -pix_fmt to
select one.


Not sure which one to select.

Kai Hendry

unread,
Oct 19, 2010, 5:59:49 PM10/19/10
to WebM Discussion
On Oct 19, 4:30 pm, John Koleszar <jkoles...@google.com> wrote:
> $ ffmpeg -i samurai-ambush.mov -f yuv4mpegpipe - 2>/dev/null |
> ~/on2/build/ivfenc --limit=10 --target-bitrate=2000 - sam.ivf
> $ ~/on2/build/ivfdec -y -o sam.y4m sam.ivf
> $ mplayer sam.y4m

I did try:

hendry@h2 webm.naovi.com$ ffmpeg -i samurai-ambush.mov -f yuv4mpegpipe
-pix_fmt yuv420p - 2>/dev/null |
> ivfenc --limit=10 --target-bitrate=2000 - sam.ivf

But the mplayer exits with:

Audio: no sound
Starting playback...
error reading frame stream ended unexpectedly (failed read/write)

Kai Hendry

unread,
Oct 24, 2010, 3:08:38 PM10/24/10
to WebM Discussion
If I can't playback yuv, does that mean I need to rebuild mplayer?

I used the following command to convert the "1920x1088" MOV to
output.yuv:
ffmpeg -i samurai-ambush.mov -v 0 -vcodec rawvideo -pix_fmt yuv420p -
vsync 0 -an -f rawvideo output.yuv

hendry@x201 videos$ mplayer output.yuv
MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing output.yuv.
Seek failed
libavformat file format detected.
picture size invalid (0x0)
Last message repeated 1 times
[rawvideo @ 0x9f1c8b0]Could not find codec parameters (Video:
rawvideo, yuv420p)
[rawvideo @ 0x9f1c8b0]Estimating duration from bitrate, this may be
inaccurate
LAVF_header: av_find_stream_info() failed


Exiting... (End of file)




Now I'm wondering if the odd size "1920x1088" my camera outputs is
making my life difficult?

John Koleszar

unread,
Oct 24, 2010, 8:02:44 PM10/24/10
to webm-d...@webmproject.org
On Sun, Oct 24, 2010 at 3:08 PM, Kai Hendry <kai.h...@gmail.com> wrote:
> If I can't playback yuv, does that mean I need to rebuild mplayer?
>
> I used the following command to convert the "1920x1088" MOV to
> output.yuv:
> ffmpeg -i samurai-ambush.mov -v 0 -vcodec rawvideo -pix_fmt yuv420p -
> vsync 0 -an -f rawvideo output.yuv
>
> hendry@x201 videos$ mplayer output.yuv
[...]

You won't be able to play a raw yuv file without specifying the
dimensions on the command line. Using -f yuv4mpegpipe is encouraged
instead, as it will save the resolution in the file headers so you
don't need to specify it (you can save to a file, you don't have to
send it to a pipe). mplayer shouldn't have a problem playing a y4m
file, you mentioned that it didn't work in an earlier post but didn't
provide enough detail to guess at what you were seeing.

Playing raw video with mplayer is something like:

$ mplayer -demuxer rawvideo -rawvideo w=1920:h=1088 raw.yuv

John

Kai Hendry

unread,
Oct 25, 2010, 11:36:57 AM10/25/10
to WebM Discussion
On Oct 25, 1:02 am, John Koleszar <jkoles...@google.com> wrote:
> Playing raw video with mplayer is something like:
> $ mplayer -demuxer rawvideo -rawvideo w=1920:h=1088 raw.yuv

Thanks! That worked. I can playback yuv. :-) Not sure what 'yuv'
actually means.

Now if encode it into ivf, like so:
ffmpeg -i samurai-ambush.mov -pix_fmt yuv420p -f yuv4mpegpipe - 2>/dev/
null | ivfenc --limit=10 --target-bitrate=2000 - sam.ivf
I can't playback the sam.ivf!

If I then convert this "ivf" into a webm container, like so:
ffmpeg -i sam.ivf -vcodec copy output.webm

It doesn't seem to playback correctly. Just the first few frames
appear:

==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[libvpx @ 0x13bd860]v0.9.2
Selected video codec: [fflibvpx] vfm: ffmpeg (FFmpeg wrapper for
libvpx/VP8)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is 1.76:1 - prescaling to correct movie aspect.
VO: [xv] 1920x1088 => 1920x1088 Planar YV12
V: 0.4 0/ 0 ??% ??% ??,?%

Exiting... (End of file)



And I fear we've lost the sound at some step. :( I really hope we can
get to the same stage as `ffmpeg2theora` in the near future. Right
now, I have tripped up so many times, I am about to admit defeat.

John Koleszar

unread,
Oct 25, 2010, 11:52:02 AM10/25/10
to webm-d...@webmproject.org
On Mon, Oct 25, 2010 at 11:36 AM, Kai Hendry <kai.h...@gmail.com> wrote:
> On Oct 25, 1:02 am, John Koleszar <jkoles...@google.com> wrote:
>> Playing raw video with mplayer is something like:
>> $ mplayer -demuxer rawvideo -rawvideo w=1920:h=1088 raw.yuv
>
> Thanks! That worked. I can playback yuv. :-) Not sure what 'yuv'
> actually means.
>
> Now if encode it into ivf, like so:
> ffmpeg -i samurai-ambush.mov -pix_fmt yuv420p -f yuv4mpegpipe - 2>/dev/
> null | ivfenc --limit=10 --target-bitrate=2000 - sam.ivf
> I can't playback the sam.ivf!
>

I think you need a newer mplayer to get the ivf support. They build
ffmpeg in staticly, so the ffmpeg version you run from the command
line isn't necessarily the same version that mplayer uses.

> If I then convert this "ivf" into a webm container, like so:
> ffmpeg -i sam.ivf -vcodec copy output.webm
>
> It doesn't seem to playback correctly. Just the first few frames
> appear:
>

This is because of the --limit=10 parameter to your encode. This tells
it to encode only the first 10 frames. I added this to keep the time
down. If you're getting visible output, then you've found all the
steps you need to convert the video, just remove the --limit and it
will convert all frames.

> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> [libvpx @ 0x13bd860]v0.9.2
> Selected video codec: [fflibvpx] vfm: ffmpeg (FFmpeg wrapper for
> libvpx/VP8)
> ==========================================================================
> Audio: no sound
> Starting playback...
> Movie-Aspect is 1.76:1 - prescaling to correct movie aspect.
> VO: [xv] 1920x1088 => 1920x1088 Planar YV12
> V:   0.4   0/  0 ??% ??% ??,?%
>
> Exiting... (End of file)
>
>
>
> And I fear we've lost the sound at some step. :(

Right, ivfenc only works on the video. You need to transcode the audio
separately, then combine (remux) the two streams. Hopefully someone
else can give you an example of the commands to do this. We should try
to get a more complete example of this on the website.

> I really hope we can
> get to the same stage as `ffmpeg2theora` in the near future. Right
> now, I have tripped up so many times, I am about to admit defeat.
>

There's going to be a release in the next couple of days that should
make this a little easier for you. It can create .webm files directly,
so you won't have to convert the ivf to webm. Thanks for sticking with
it.

Kai Hendry

unread,
Oct 27, 2010, 4:27:05 AM10/27/10
to WebM Discussion
On Oct 25, 4:52 pm, John Koleszar <jkoles...@google.com> wrote:
> There's going to be a release in the next couple of days that should
> make this a little easier for you. It can create .webm files directly,
> so you won't have to convert the ivf to webm. Thanks for sticking with
> it.

Thanks, please keep me informed. I would like to test this version.
Reply all
Reply to author
Forward
0 new messages