mp4

extract audio to mp3 from mp4 using c++ (not executing ffmpeg with args)

大憨熊 提交于 2019-12-03 20:43:48
how can i programmatically convert ( extract the audio channel ) from mp4 video file format ? i just can't find any thing in the web , for using c++ . i what to dynamically link external engine that i can via c++ take mp4 file and convert it to mp3 file. and not passing command line args to LAME or MPLAYER or FFMPEG ? You can try using ffmpeg to do it in c or c++. Here is the normal flow of steps. Init ffmpeg using av_register_all(); Open input file using avformat_open_input( &informat, sourcefile, 0, 0)). Find stream info using avformat_find_stream_info(informat, 0)). Find the audio stream by

Convert WebM as MP4 on the fly

笑着哭i 提交于 2019-12-03 20:39:39
I am trying to convert a remote WebM file on the fly to MP4. This should happen without writing anything to disk. Furthermore it would be great to be able to stream out results as soon as possible. This is my flask function without the actual conversion, so you get a idea of the streaming. @app.route("/stream/mp4") def as_mp4(): url = "http://video.webmfiles.org/big-buck-bunny_trailer.webm" r = requests.get(url, stream=True) def stream(): # convert it here for chunk in r.iter_content(chunk_size=1024): yield chunk # end for # end def return Response(stream(), mimetype="video/mp4") # end def You

ffmpeg: how to save h264 raw data as mp4 file

旧巷老猫 提交于 2019-12-03 17:35:34
I encode h264 data by libavcodec. ex. while (1) { ... avcodec_encode_video(pEnc->pCtx, OutBuf, ENC_OUTSIZE, pEnc->pYUVFrame); ... } If I directly save OutBuf data as a .264 file, it can`t be play by player. Now I want to save OutBuf as a mp4 file. Anyone know how to do this by ffmpeg lib? thanks. Roman R. You use avformat_write_header , av_interleaved_write_frame , avformat_write_trailer and friends. Their usage is shown in the muxing example of FFmpeg. See a similar topic: Raw H264 frames in mpegts container using libavcodec with also writing to a file (different container, same API) See also

Streaming webcam video in Flash using MP4 encoding

夙愿已清 提交于 2019-12-03 17:25:49
One of the features of the Flash app I'm working on is to be able to stream a webcam to others. We're just using the built-in webcam support in Flash and sending it through FMS. We've had some people ask for higher quality video, but we're already using the highest quality setting we can in Flash (setting quality to 100%). My understanding is that in the newer flash players they added support for MPEG-4 encoding for the videos. I created a simple test Flex app to try and compare the video quality of the MP4 vs FLV encodings. However, I can't seem to get MP4 to work at all. According to the

Playing MP4 files in Firefox using HTML5 video

末鹿安然 提交于 2019-12-03 16:16:21
问题 I have searched around quite a bit but have not solved my problem. I have a video tag running as follows: <video class="ne" src="{{ page | video_url }}" muted="true" volume="0" controls width="720" height="480" poster="{{ page | video_poster_image_url }}" type="video/mp4"> </video> I am using Jekyll for the URLs. They work fine. The site is live at switzerlandllc.com. Click any video in FF and it shows an image and an X. Chrome and other browsers work fine. If you grab the source of a video

Batch File Loop Skip File if name contains

坚强是说给别人听的谎言 提交于 2019-12-03 15:50:46
I am creating this batch file, that works with handbrakecli, to batch convert avi to mp4. However I am stuck in how to continue the loop and skip the current file inside a loop. FOR /R "%somepath%" %%G in (*.avi) DO ( rem skip if filename contains word trailer rem skip if file name contains word sample rem do conversion ) This currently doesn't work in skipping the files that contain trailer or sample I have tried using find or findstr and both fail to skip. echo "%%G" | c:\windows\system32\findstr /i "trailer" > NUL If %ERRORLEVEL% EQU 1 set skip Yes Here is for sample. echo "%%G" | c:

Mp4 video rotation metadata

偶尔善良 提交于 2019-12-03 14:36:12
I have developed an android/ios video sharing app that records a video and uploads it to amazon s3. For compatibility both android/ios record in mp4 format with H264/AAC codecs. The users might shoot portrait or landscape and the app, getting info from the sensors, set the rotation of the file (mediarecorder.setOrientationHint on android and something similar on iOS) The videos from iOS play fine on android and vice versa. The problem is when i want to play a video on a web browser. The browsers that support mp4 format (ie, chrome) display the video but ignore the rotation metadata. The same

Streaming an mp4 through a php file progressively

老子叫甜甜 提交于 2019-12-03 14:35:33
I'm working on a more secure streaming method for our video player. Because each file requires special token authentication and also only allows each token to be loaded once, I'm running MP4 through a php container. This works perfectly inside a HTML5 video tag and prevents users from easily downloading the source. I'm adapting some code from here <?php include('...'); //include site functions /* Here I connect to the database, and retrieve the location of the video which is returned as $video = "http://domain.tld/folder/file.mp4" This has been removed for this SO example. */ $file = $video;

How to get the the single images of an mp4-Movie in Java

一曲冷凌霜 提交于 2019-12-03 13:59:19
I want to do some image analysis on a video that's stored in .mp4 format. Therefore I need a way to just get the images of this movie in Java. I goolged a lot and found some libraries like jcodec and jaad. BUT I wasn't able to get the things running with these libraries. And as I found out, there were examples (at least I found none) that showed my usecase. Can you help me? Do you know any library that can do what I need and is running at least on Win7 64 bit. Or do you know how to accomplish this with jcodec? Thanks a lot + best regards, andy edit: As I wrote, I tried it with jcodec. I found

Pseudo Streaming an MP4 file

浪子不回头ぞ 提交于 2019-12-03 13:36:58
问题 I have a few questions regarding pseudo streaming an MP4 file. Is the entire file downloaded, eg. if I scrub 1 minute in to a 2 minute video, will only the second half be downloaded thus saving bandwidth? Is there anyway I can check this using Chrome dev tools? How would I go about creating a MP4 that's ready for pseudo streaming? I've read the meta data needs to be at the start of the file, how can I do this? Is there any recommended software? 回答1: 1) The entire file is not downloaded. 2)