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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With