Python library to convert .wav file to ogg file - python-2.7

Can anyone suggest a Python library (on windows) to convert a wav file to an ogg file other than Pymedia module. By using Pymedia module I am not able to convert from wav to ogg file.
Using pymedia i can convert a wav to mp3 file,but if i try to convert to other format it throws Just-in-time debugger error please can any one help me to solve my problem.

Try using oggenc http://www.rarewares.org/ogg-oggenc.php
If you're using 64-bit Windows, you can get http://www.rarewares.org/files/ogg/oggenc2.87-1.3.3-x64.zip
(oggenc -h gives the usage.)

Related

ffmpeg/Libavcodec couldn't find codec

I want to make a transcoding video app from h.264 to h.265.
I have a problem with libavcodec library. I have this library in my project, all function is working, but when i'm trying to set codec :
avcodec_find_decoder_by_name("libx265");
function couldn't find it. Hovewer, when i give "hevc" instead of "libx265" function is working, but it's not the same.
Please for help :)
There is no decoder named libx265
libx265 is only an encoder.
FFmpeg has a native, built-in HEVC/H.265 decoder
It is named hevc. You don't have to do anything special to include or enable it.
There are also several hardware accelerated HEVC decoders that may be available for your system: hevc_cuvid, hevc_mediacodec, hevc_qsv, hevc_rkmpp, and hevc_v4l2m2m.
ffmpeg has implemented codecs (lets call them builtin) and wrappers to third party codecs. It seems/could be that the h265 codec is just a wrapper, that means you have to install a h265 decoder. Besides, did you specify the h265 codec when you configured ffmpeg? Did you build it yourself or pre build via package manager?
Try 'ffmpeg -decoders' at the command line and search for h265.

Encoding audio to matroska container using ffmpeg audio encoder adpcm_adx

Trying to reencode audio file from mp4 container to Matroska(mkv) container using FFmpeg audio encoder adpcm_adx or (aptx, comfortnoise, g726le...) I am getting an error message
No wav codec tag found for codec ...
I have c++ code which includes thired-party integration of ffmpeg,
and I am having the same result using ffmpeg terminal options.
ffmpeg -i file.mp4 -c:v copy -c:a adpcm_adx -b:a 44100 output.mkv
Instead of getting output file correctly I am getting
No wav codec tag found for codec adpcm_adx
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- Conversion failed!
Maybe I should specify extra parameters for making it work which I haven't hooked up yet.
Thanks in advance.
I'll appreciate any help.

How to write a big amount of multipage TIFF files?

Hi everybody from a beginner in Python. I try to convert a huge file of raw video data into multiple multipage TIFF files by using the "freeimage.write_multipage()" function of the freeimage package from the Mahotas library (Python 2.7). Unfortunately, it seems that this "very easy to use" function doesn't release memory when running the script. So, my script works fine for small input raw files (less than 1 GB) but crashes with bigger files (a 3 GB input file crashes with Win XP pro 32 - ram 3.2 GB). My goal is to convert input files up to 1.5 TB.
When running my script, the Windows Task manager shows an increase of the used ram, output file after output file until the crash which release all the used ram. An extract of the reported error is: "... RuntimeError : mahotas.freeimage: FreeImage error: Memory allocation failed..."
From Stackoverflow, I saw different advices for building multipages TIFF files with using scripts in Image Magic or Irfanview but I think it's impossible for my needs (I have thousands of pictures to assemble).
Thank you for any help.

youtube-dl command saves as flv and not mp3

So below is my command that I am running. It should be converting it to mp3 but it still exports as a video in flv. What am I doing wrong?
$cmd = '/usr/local/bin/youtube-dl -o "%(title)s.%(ext)s" -x --audio-format mp3 -- '.escapeshellarg($url).'';
youtube-dl will download the video before converting it. Most likely, you don't have ffprobe or ffmpeg installed. Make sure both programs are available (i.e. you get a sensible output for ffprobe --help and ffmpeg --help).
You can directly download the .mp3 file from the youtube site.
For e.g in ubuntu terminal youtube-dl youtube.com/watch?v=qn6CMz18lkQ -f 141 .Most probably 141 is the .mp3 file format code for better quality.

how to convert and play a .h263 file?

I am working on ubuntu. I have a file.h263 and I don't know how to play it. I've tried ffmpeg -f msg0001.h263 -i file.avi but it didn;t work. Need some help please. I want to convert file.h263 in .avi or mp2 in order to play the file in an android phone. Got any advices? It would be best to have a c++ code. but i didn't find any example, nothing at all.
Please help. If you have a piece of code that does this I would appreciate.
Thx
You should be able to play H263 file and convert it to AVI as the following:
ffplay -i file.h263
ffmpeg -i file.h263 file.avi
For android playback you can keep video stream in H.263 and convert the file to 3GPP (.3gp) or MPEG-4 file format or change file format and codec to MPEG-4 and H.264. For example:
ffmpeg -i file.h263 -vcodec copy -f 3gp file-h263.3gp
ffmpeg -i file.h263 -vcodec h264 -f mp4 file-h264.mp4
See Android supported media formats for more information.
.h263 is old yet great format, and if your software player uses HW accelration to play video that majority of old videocards (including Nvidia, ATI) will provide you HW accelration for video playback for .h263 format files... now various use .h264 format... thus try to convert videos to .h264 format instead of avi...
i think what you are facing is a extension delima .... try renaming it to MP4, then various player will play it without problems..
you can also use vlc.. one of the best video players ever...
Beside GStreamer can play H263 files , and with gstreamer pipelines you can convert various format on flies...
though i usually use Handbreak to convert video files /DVD's, and it is available on windows, Mac as well as on linux ....
P.S. in Gstreamer, you might need to install plugins, install all 2... good, bad and ugly plugin. i am not sure in which .h263 comes in, but must be in one of these three......