transcoding

Conversion from iso-8859-15 (Latin9) to UTF-8?

核能气质少年 提交于 2019-12-22 16:08:10
问题 I need to convert some strings formated with Latin9 charset to UTF-8. I cannot use iconv as it is not included in my embedded system. Do you know if there is some available code for it? 回答1: Code points 1 to 127 are the same in both Latin-9 (ISO-8859-15) and UTF-8. Code point 164 in Latin-9 is U+20AC, \xe2\x82\xac = 226 130 172 in UTF-8. Code point 166 in Latin-9 is U+0160, \xc5\xa0 = 197 160 in UTF-8. Code point 168 in Latin-9 is U+0161, \xc5\xa1 = 197 161 in UTF-8. Code point 180 in Latin-9

Dump last frame of video file using ffmpeg/mencoder/transcode et. al

筅森魡賤 提交于 2019-12-18 14:18:15
问题 I'd like to grab the last frame in a video ( .mpg , .avi , whatever) and dump it into an image file ( .jpg , .png , whatever). Toolchain is a modern Linux command-line , so things like mencoder , transcode , ffmpeg &c. Cheers, Bob. 回答1: This isn't a complete solution, but it'll point you along the right path. Use ffprobe -show_streams IN.AVI to get the number of frames in the video input. Then ffmpeg -i IN.AVI -vf "select='eq(n,LAST_FRAME_INDEX)'" -vframes 1 LAST_FRAME.PNG where LAST_FRAME

Transcoding MJPEG to FLV or MP4

我怕爱的太早我们不能终老 提交于 2019-12-18 12:47:10
问题 I want to transcode MJPEG stream that comes from IP camera (http://xx.yy.zz.tt:8080/video.cgi) to FLV or MP4 stream under Linux OS so that users can play the file using a web based Flash player such as Flowplayer. I discovered VLC for that purpose but I cannot figure out the exact command line string. I also need HTTP authentication feature since IP camera access is password protected. I also interested in any non-VLC solution if any (ffmpeg?). 回答1: appears VLC can do HTTP authentication.

android.media.MediaExtractor. Anyone got this beast to work? “Failed to instantiate extractor” exception

核能气质少年 提交于 2019-12-13 16:56:40
问题 Trying to run this (example code from developer.android.com) MediaExtractor extractor = new MediaExtractor(); extractor.setDataSource("/sdcard/myvideo.mp4"); Getting "Failed to instantiate extractor" exception on the second line. Tried to place the file in internal storage, tried to access via FileDescriptor, nothing helped. Anyone?? I/MonoDroid( 6802): UNHANDLED EXCEPTION: Java.IO.IOException: Exception of type 'Java.IO.IOException' was thrown. I/MonoDroid( 6802): at Android.Runtime.JNIEnv

what is The fastest way to scale down a H264 video in 2:1?

不想你离开。 提交于 2019-12-12 02:41:40
问题 when I use ffmpeg to scale a H264 video. It seems that the video is decoded to the raw graph then scaled then encoded again. But if the speed is very critical,is there a faster way if I specify a “good" ratio like 2:1, as if I want to pick up one pixel in every four? I know a bit how h264 works, 8*8/4*4 pixels are coded as a group,so it's not easy to pick up 1/4 pixels in its range. But is there a way to merge 4 group into one quickly? 回答1: When you use ffmpeg for scaling purpose, there is no

MIME type for transcoded stream

北战南征 提交于 2019-12-11 11:41:11
问题 I wish to determine the MIME type of the contents of a pipe. The pipe is outputting a transcoded video stream, so there is no corresponding file extension. Can I determine the MIME type in these circumstances using say ffprobe -i pipe:0 or some equivalent? Is there a canonical mapping of codecs or container formats to MIME type? 回答1: You can use DetectContentType to guess the content type based on the magic numbers: http://golang.org/pkg/net/http/#DetectContentType 回答2: My suggestion would be

Drawtext, drawbox or overlay on only a single frame using FFmpeg

喜欢而已 提交于 2019-12-10 13:57:45
问题 I'm using the drawtext and drawbox avfilters on FFmpeg, two of the most poorly documented functions known to man. I'm struggling to work out if and how I can use them on only a single frame, i.e., drawtext on frame 22. Current command: ffmpeg -i test.wmv -y -b 800k -f flv -vcodec libx264 -vpre default -s 768x432 \ -g 250 -vf drawtext="fontfile=/home/Cyberbit.ttf:fontsize=24:text=testical:\ fontcolor=green:x=100:y=200" -qscale 8 -acodec libfaac -sn -vstats out.flv Two elements mentioned in the

Upload FFmpeg output directly to Amazon S3

时光总嘲笑我的痴心妄想 提交于 2019-12-09 16:11:43
问题 I am using the fluent-ffmpeg library with node.js to transcode videos originally in a flash movie format to the mp3 format with multiple resolutions, 1080p, etc.. Once the transcoding is complete, I would like to move the transcoded video to an s3 bucket. I pull the original .flv file from a source s3 bucket and pass the stream to the ffmpeg constructor function. The issue is after the transcoding completes, how do I then get the stream of the mp4 data to send to s3. Here is the code I have

How do I convert a G.726 ADPCM signal into a PCM signal?

爷,独闯天下 提交于 2019-12-07 16:14:17
问题 I usually look to SoX or Window's built in audio libraries for this stuff, but it appears that neither have G.726 codecs. So I have a sequence of bytes that I know are encoded as G.726 although the bit-rate and whether it is mu-law or A-law is not known at this time (experimentation will determine those parameters), and I need to decode them into a normal PCM signal. So I downloaded the reference implementation from the ITU-T (ITU-T Recommendation G.191) but I'm kind of confused on how to use

Conversion from iso-8859-15 (Latin9) to UTF-8?

半城伤御伤魂 提交于 2019-12-06 10:42:36
I need to convert some strings formated with Latin9 charset to UTF-8. I cannot use iconv as it is not included in my embedded system. Do you know if there is some available code for it? Code points 1 to 127 are the same in both Latin-9 (ISO-8859-15) and UTF-8. Code point 164 in Latin-9 is U+20AC, \xe2\x82\xac = 226 130 172 in UTF-8. Code point 166 in Latin-9 is U+0160, \xc5\xa0 = 197 160 in UTF-8. Code point 168 in Latin-9 is U+0161, \xc5\xa1 = 197 161 in UTF-8. Code point 180 in Latin-9 is U+017D, \xc5\xbd = 197 189 in UTF-8. Code point 184 in Latin-9 is U+017E, \xc5\xbe = 197 190 in UTF-8.