|
| 1 | +# How to use avTranscoder |
| 2 | + |
| 3 | +Check out applications contained in the project to see examples of how to use the library in C++, Java or Python. |
| 4 | + |
| 5 | +#### In C++ |
| 6 | +Set environment: |
| 7 | +``` |
| 8 | +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ffmpeg/lib:/path/to/avtranscoder/lib |
| 9 | +export PATH=$PATH:/path/to/avtranscoder/bin |
| 10 | +``` |
| 11 | + |
| 12 | +#### In Java |
| 13 | +Add argument to the JVM: |
| 14 | +``` |
| 15 | +-Djava.library.path=/path/to/avtranscoder/lib/java |
| 16 | +``` |
| 17 | +Set environment: |
| 18 | +``` |
| 19 | +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ffmpeg/lib |
| 20 | +``` |
| 21 | + |
| 22 | +#### In Python |
| 23 | +Set environment: |
| 24 | +``` |
| 25 | +export PYTHONPATH=$PYTHONPATH:/path/to/avtranscoder/lib/python<version>/site-packages/ |
| 26 | +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ffmpeg/lib |
| 27 | +``` |
| 28 | + |
| 29 | +#### Use profiles |
| 30 | +To wrap/unwrap/encode/decode, avTranscoder manipulates profiles. |
| 31 | +A profile is a set of key-value given as parameters to the InputFile(unwrap), the OutputFile(wrap), the Video/AudioDecoder(decode) or the Video/AudioEncoder(encode). |
| 32 | +There are two ways to manipulate profiles: |
| 33 | +* create profiles inside your code, by instanciate ```Map``` structures. |
| 34 | +* create profiles outside your code, by create text files. |
| 35 | +To indicate the path to the text files, export environment variable: |
| 36 | +``` |
| 37 | +export AVPROFILES=/path/to/profiles |
| 38 | +``` |
| 39 | + |
| 40 | +The minimum format profile (wrap/unwrap) is: |
| 41 | +``` |
| 42 | +avProfileName=profileName |
| 43 | +avProfileLongName=profileLongName |
| 44 | +avProfileType=avProfileTypeFormat |
| 45 | +format=formatName |
| 46 | +``` |
| 47 | + |
| 48 | +The minimum video profile (encode/decode) is: |
| 49 | +``` |
| 50 | +avProfileName=profileName |
| 51 | +avProfileLongName=profileLongName |
| 52 | +avProfileType=avProfileTypeVideo |
| 53 | +codec=codecName |
| 54 | +``` |
| 55 | + |
| 56 | +The minimum audio profile (encode/decode) is: |
| 57 | +``` |
| 58 | +avProfileName=profileName |
| 59 | +avProfileLongName=profileLongName |
| 60 | +avProfileType=avProfileTypeAudio |
| 61 | +codec=codecName |
| 62 | +``` |
0 commit comments