FORUMS: list search recent posts

Can ffmpeg copy frames into different container?

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Ben Southall
Can ffmpeg copy frames into different container?
on Jun 14, 2010 at 5:42:43 pm

Hi,

I believe that I saw something in the ffmpeg documentation regarding copying video from one container to another, but WITHOUT ACTUALLY REENCODING IT. Does anyone know if this is possible? Thanks.


Return to posts index

Michael Rampe
Re: Can ffmpeg copy frames into different container?
on Jun 14, 2010 at 10:57:32 pm

Yes.

"-vcodec copy" and "-acodec copy" will pass the video/audio streams to the new container untouched.

Specify the container type in the output filename. ie. output.mp4 or output.avi

Do not expect all codec/container combinations to be valid.

For example: copying H.264 to transport streams (.ts) requires the use of a video bitstream filter, "-vbsf h264_mp4toannexb" to be valid.

Michael

"half-way to world domination A.K.A. the belligerent blue bike shed"


Return to posts index

Ben Southall
Re: Can ffmpeg copy frames into different container?
on Jun 15, 2010 at 8:06:34 pm

Thanks for that.

May I ask you where you learnt all of this stuff? I was looking for some tutorials about, basically, how audio and video files work, but haven't come across any. Do you know of any sites that have anything on this sort of thing?

Cheers,
Ben


Return to posts index


Michael Rampe
Re: Can ffmpeg copy frames into different container?
on Jun 16, 2010 at 12:01:42 am

[Ben Southall] "May I ask you where you learnt all of this stuff?"

Well not from any school that teaches this stuff or a single comprehensive website (I don't think either of these exist). Basically, using video for a number of years, reading spec files (QTFF.pdf is good), reading manuals, scanning the web and most importantly trying out things;-)

[Ben Southall] "I was looking for some tutorials about, basically, how audio and video files work, but haven't come across any."

Anything specific?

Michael

"half-way to world domination A.K.A. the belligerent blue bike shed"


Return to posts index

Ben Southall
Re: Can ffmpeg copy frames into different container?
on Jun 16, 2010 at 3:54:59 pm

Well, if one wants to know how a computer program works, it's possible to learn a simple programming language like python. Similarly, I looked-up on wikipedia what a B frame is. However, If one wanted to know in depth how a computer works, then there are loads of tutorials on assembly code and pc hardware. I'm probably not making a lot of sense here, but I'd like something that teaches how a stream of raw images is taken, compressed, put together inside a container, and eventually turned into a video, like the guide to binary and machine code.


Return to posts index

Michael Rampe
Re: Can ffmpeg copy frames into different container?
on Jun 17, 2010 at 8:36:43 am

Hi Ben,

DISCLAIMER: I do not now and have not ever been employed by any of the companies listed.

I don't really know if this will be helpful or not but I thought I would list a few things anyway.

Here are some things to look for after a first thought on this, you should be able to find most of them for free on the web but may have to register with some sites to get access to them. Sorry for not providing links but I do not have them handy and we all have google. This list is by no means thorough or complete, just a few good places to start.

[Ben Southall] "how a stream of raw images is taken"
"A Guide to Standard and High-Definition Digital Video Measurements" by Tektronix is very good. Also, look into the history of camera pickup types (tube-->CCD-->CMOS-->???) In regards to the mathematics of digital video systems, anything by Charles Poynton is good, especially in regards to chroma sub-sampling. (and his "A Tutorial on Magic Numbers for High Definition Electronic Production" is great to understand why certain numbers have to be used for video over others.)

[Ben Southall] "compressed"
The "DV_Compression_Primer" by Adobe is slightly inaccurately named as it covers other compression methods than DV but good for a novice. "The Digital Fact Book" by Quantel is very comprehensive and explains most concepts related to Digital Video in relatively simple language. Tektronix also have produced a glossary which is incredibly thorough but harder to read for a novice.

"The Engineer's Guide to Compression" and "The Engineer’s Guide to Motion Compensation" by Snell & Wilcox are very detailed. ("The Engineer's guide to Decoding & Encoding", also by Snell & Wilcox, is excellent for a historical perspective on analogue encoding which is still important for a full understanding of why digital is the way it is.) Look for other articles/whitepapers from Snell & Wilcox as they are excellent, including "Mpeg Encoding Basics" & "Mpeg Video" are a must.

[Ben Southall] "put together inside a container"
For Quicktime movies (and thus the very closely related mp4 spec) look for the "Quicktime File Format Specification" by Apple (QTFF.pdf) Also worth looking into transport streams and possibly the MXF format. Not too sure about sources for AVI/WMV or others....

[Ben Southall] "and eventually turned into a video"
This is simply the reverse of the rest of the process;-)

Companies to look for:
Quantel
Snell&Wilcox
Grass Valley
Thomson
Tektronix
(basically high end broadcast equipment manufacturers)

And finally, look the the standards creators. IEEE, SMPTE, MPEG etc. Most papers and standards usually come with a hefty fee and may not be what you are after anyway but these are the main gatekeepers in this area;-)

Helpful? maybe. maybe not. This is a BIG topic!!!

Michael



"half-way to world domination A.K.A. the belligerent blue bike shed"


Return to posts index


Ben Southall
Re: Can ffmpeg copy frames into different container?
on Jun 18, 2010 at 3:21:19 pm

Wow...
Thanks a load. I only wish I were a better reader...The DV compression one looks great so far.


Return to posts index

nayan kapadia
Re: Can ffmpeg copy frames into different container?
on Jun 22, 2010 at 11:00:49 am

Hi,
I am accessing H.264 stream using ffmpeg on windows.I want to use -vcodec copy and -f mpegts and save output in a file.This is my requirement.

For example:

ffmpeg.exe -i rtsp://wisedvin:wisenec2468@192.168.0.102:7070 -v
codec copy -vbsf h264_mp4toannexb -f mpegts -b 30k -s 320x240 -bt 10k -maxrate 100k oo.ts

When I start this command it give me below message on commandline.

Press [q] to stop encoding
[mpegts @ 01de0050]h264 bitstream malformated, no startcode found, use -vbsf h264_mp4toannexb
av_interleaved_write_frame(): Operation not permitted

Please giude me.

Thanks,
NBK


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]