Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Byte Offset in FFmpeg for source Files?

I am working on an C++ Application (running on Ubuntu) that opens FFmpeg for video conversion and reads the output through popen(). This works fine but now i need FFmpeg to start reading the source File at a specific Byte Offset. Is there any way to archive this? I already searched for a solution / command line parameter but couldn't find anything usefull. So is there any solution for this?

By the way: I already know there is a parameter for time offset but i need a byte offset.

like image 973
ZeroTek Avatar asked Nov 28 '25 06:11

ZeroTek


1 Answers

If you're working on linux you might pipe your ffmpeg input file through dd and skip to a specific offset. Something like:

> dd if=myfile.mp2 skip=<myoffset-in-block-size> ibs=<block-size> | ffmpeg -i pipe:0 ...

or prepare another input file for ffmpeg without piping.


If you're working under windows, you can use MSys 1.0, that also supports dd.

like image 117
πάντα ῥεῖ Avatar answered Nov 29 '25 18:11

πάντα ῥεῖ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!